diff --git a/src/common/basic.js b/src/common/basic.js
index b22c9641..7bab6b38 100644
--- a/src/common/basic.js
+++ b/src/common/basic.js
@@ -728,6 +728,14 @@ export function getPackingNumberAndBatch(managementList, itemCode, packingNumber
// scanErrorAudio();
// }
+export function compare(key) {
+ return function(a, b) {
+ var val1 = a[key];
+ var val2 = b[key];
+ return val2 - val1;
+ }
+}
+
export function compareTime() {
return function(a, b) {
// 按照时间降序
diff --git a/src/mycomponents/scan/winScanPackAndLocation.vue b/src/mycomponents/scan/winScanPackAndLocation.vue
index 30f9daf1..55b5397e 100644
--- a/src/mycomponents/scan/winScanPackAndLocation.vue
+++ b/src/mycomponents/scan/winScanPackAndLocation.vue
@@ -97,6 +97,11 @@
type: Boolean,
default: false
},
+ //
+ isCount: {
+ type: Boolean,
+ default: false
+ },
//是否允许修改库位
allowModifyLocation: {
type: Boolean,
@@ -334,11 +339,16 @@
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
} else if (this.noShowBalanceMessage) {
- if (Array.isArray(datas)) {
- this.countCallBack(datas[0]);
- } else {
+ if(this.isCount){
this.countCallBack(datas);
+ }else {
+ if (Array.isArray(datas)) {
+ this.countCallBack(datas[0]);
+ } else {
+ this.countCallBack(datas);
+ }
}
+
} else {
this.mustHavaBalance(datas);
}
diff --git a/src/pages/count/coms/comCountJobCard.vue b/src/pages/count/coms/comCountJobCard.vue
index 4ca0e136..166928c7 100644
--- a/src/pages/count/coms/comCountJobCard.vue
+++ b/src/pages/count/coms/comCountJobCard.vue
@@ -1,42 +1,50 @@
-
-
-
-
+
-
+ }
+ }
+
-
+
\ No newline at end of file
diff --git a/src/pages/count/job/countDetail.vue b/src/pages/count/job/countDetail.vue
index af684cf4..572cde56 100644
--- a/src/pages/count/job/countDetail.vue
+++ b/src/pages/count/job/countDetail.vue
@@ -48,10 +48,15 @@
-
+
+ :allowEditStatus="editInventoryStatus"
+
+ :isShowBalance="jobContent.isOpenCount=='TRUE'">
@@ -68,8 +73,10 @@
import {
calc
} from '@/common/calc.js';
-
- import { Decimal } from 'decimal.js';//引入
+
+ import {
+ Decimal
+ } from 'decimal.js'; //引入
import {
goHome,
@@ -570,7 +577,7 @@
if (res) {
var item = this.createAddItemInfo(this.balance, this.package);
let newDetail = this.createAddDetailInfo(qty, inventoryStatus); //
- item.subList.push(newDetail);
+ item.subList.unshift(newDetail);
this.detailSource.push(item)
this.showMessage('添加成功');
this.updateData()
@@ -587,7 +594,7 @@
if (res) {
// detail.qty = calc.add(qty, qty)
let newDetail = that.createAddDetailInfo(qty, inventoryStatus); //
- detail.subList.push(newDetail);
+ detail.subList.unshift(newDetail);
this.showMessage('添加成功');
that.updateData()
}
@@ -837,4 +844,4 @@
background: #e0e0e0;
}
-
+
\ No newline at end of file
diff --git a/src/pages/count/job/countJob.vue b/src/pages/count/job/countJob.vue
index 41cf32d2..be05327f 100644
--- a/src/pages/count/job/countJob.vue
+++ b/src/pages/count/job/countJob.vue
@@ -21,6 +21,10 @@
+
+
+
+
@@ -47,6 +51,9 @@
import comCountJobCard from '@/pages/count/coms/comCountJobCard.vue'
import jobListPopup from '@/pages/count/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/count/coms/jobInfoPopup.vue'
+ import jobList from '@/mycomponents/jobList/jobList.vue'
+ import winScanButton from '@/mycomponents/scan/winScanButton.vue'
+ import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
export default {
name: 'receipt',
@@ -55,7 +62,10 @@
jobFilter,
comCountJobCard,
jobListPopup,
- jobInfoPopup
+ jobInfoPopup,
+ winScanPackJob,
+ jobList,
+ winScanButton
},
data() {
return {
@@ -195,6 +205,16 @@
selectedItem(item) {
this.openJobDetail(item);
},
+
+ openScanPopup() {
+ this.$refs.scanPopup.openScanPopup();
+ },
+
+ selectItem(item) {
+ this.$refs.scanPopup.closeScanPopup();
+ this.openJobDetail(item)
+
+ },
swipeClick(e, dataContent) {
if (e.content.text == "详情") {
@@ -286,6 +306,56 @@
}
});
},
+
+ getScanResult(result){
+ let that = this;
+ uni.showLoading({
+ title: "加载中....",
+ mask: true
+ });
+ var filters = []
+ filters.push({
+ column: "status",
+ action: "in",
+ value: '1,2'
+ })
+ filters.push({
+ column: "locationCode",
+ action: "==",
+ value: result.label.code
+ })
+
+ var params = {
+ filters: filters,
+ pageNo: 1,
+ pageSize: 1000,
+ }
+ getCountJobList(params).then(res => {
+ uni.hideLoading();
+ let resultList = res.data.list;
+ resultList.forEach(item => {
+ item.title = item.number;
+ item.selected = false
+ })
+ let list = []
+ resultList.forEach(item => {
+ if (!list.find(subItem => subItem.title == item.title)) {
+ list.push(item)
+ }
+ })
+
+ if (resultList == 0) {
+ that.showMessage('未查找到库位' + '【' + result.label.code + '】的盘点任务');
+ } else if (resultList == 1) {
+ that.selectItem(list[0]);
+ }else {
+ that.$refs.jobList.openList(list)
+ }
+ }).catch(error => {
+ uni.hideLoading();
+ that.showMessage(error);
+ })
+ }
}
}