diff --git a/src/mycomponents/detail/comDetailCard.vue b/src/mycomponents/detail/comDetailCard.vue
index 9a968002..69717a16 100644
--- a/src/mycomponents/detail/comDetailCard.vue
+++ b/src/mycomponents/detail/comDetailCard.vue
@@ -15,6 +15,7 @@
style='padding:0px 0px 5px 0px;align-items: center;'>
+
@@ -83,13 +84,17 @@
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
- if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
- this.$nextTick(res => {
- this.$refs.collapse1.resize()
- })
- }
+ this.$nextTick(res => {
+ setTimeout(() => {
+ if (this.$refs.collapse1) {
+ this.$refs.collapse1.resize();
+ }
+ }, 500)
+ })
}
},
+
+
immediate: true,
deep: true
}
diff --git a/src/mycomponents/detail/comRecommendDetailCard.vue b/src/mycomponents/detail/comRecommendDetailCard.vue
new file mode 100644
index 00000000..49a86e37
--- /dev/null
+++ b/src/mycomponents/detail/comRecommendDetailCard.vue
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 推
+ 荐
+
+
+
+
+
+
+
+
+ 实
+ 际
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/unPlanned/job/issueJobDetail.vue b/src/pages/unPlanned/job/issueJobDetail.vue
index 0f8731ba..047c6134 100644
--- a/src/pages/unPlanned/job/issueJobDetail.vue
+++ b/src/pages/unPlanned/job/issueJobDetail.vue
@@ -12,9 +12,9 @@
-
-
+
@@ -66,7 +66,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
- import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
+ import comRecommendDetailCard from "@/mycomponents/detail/comRecommendDetailCard.vue"
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@@ -75,7 +75,7 @@
components: {
winScanButton,
winScanPackAndLocation,
- comDetailCard,
+ comRecommendDetailCard,
detailInfoPopup,
jobTop
},
@@ -166,6 +166,9 @@
that.jobContent = res.data;
that.jobStatus = res.data.status
that.subList = res.data.subList;
+ that.subList.forEach(item=>{
+ item.isRecommend = true
+ })
that.detailSource = getDataSource(that.subList)
} else {
that.showErrorMessage('列表数据为0');
@@ -190,11 +193,21 @@
calcHandleQty() {
calcHandleQty(this.detailSource)
- this.continueScan()
+ // this.continueScan()
this.$forceUpdate();
},
updateData() {
+ //删除新添加的
+ for (var i = 0; i < this.detailSource.length; i++) {
+ var item =this.detailSource[i]
+ for (var j = 0; j < item.subList.length; j++) {
+ var sub =item.subList[j]
+ if(sub.isRecommend&&!sub.scaned){
+ item.subList.splice(j,1)
+ }
+ }
+ }
this.calcHandleQty();
},
@@ -218,11 +231,28 @@
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
- r.fromLocationCode == result.fromLocationCode
+ r.fromLocationCode == result.fromLocationCode&&
+ r.isRecommend==false
})
if (itemDetail == undefined) {
- this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
- .fromLocationCode + "】不在列表中")
+ var newAdd = {
+ itemCode:itemCode,
+ packingNumber:packingNumber,
+ batch:batch,
+ handleQty:Number(result.balance.qty),
+ qty:qty,
+ fromLocationCode:locationCode,
+ inventoryStatus:inventoryStatus,
+ toInventoryStatus:inventoryStatus,
+ balance:result.balance,
+ isRecommend:false,
+ isNewAdd:"newAdd"
+ }
+ newAdd.balance.balanceQty = Number(result.balance.qty);
+ newAdd.balance.packQty = Number(result.package.packQty)
+ newAdd.balance.packUnit = result.package.packUnit
+ newAdd.scaned = true;
+ detail.subList.push(newAdd)
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
@@ -275,29 +305,43 @@
},
commit() {
- this.scanCount = getScanCount(this.subList);
- if (this.scanCount == 0) {
+ var scanCount=0;
+ this.detailSource.forEach((item) => {
+ item.subList.forEach(cur => {
+ if(cur.scaned){
+ scanCount++;
+ }
+
+ })
+ })
+ if(scanCount==0){
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
+ this.checkCount();
+ // this.scanCount = getScanCount(this.jobContent.subList);
+ // if (this.scanCount == 0) {
+ // this.showErrorMessage("扫描数为0,请先扫描")
+ // return;
+ // }
- // //扫描数量和任务数量相等,直接提交
- if (this.scanCount == this.subList.length) {
- this.checkCount();
- } else if (this.scanCount < this.subList.length) {
- //扫描数量小于任务数量,判断是否允许部分提交
- if (this.jobContent.allowPartialComplete == "TRUE") {
- //提交
- this.checkCount();
- } else {
- //不允许部分提交,提示
- this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
- if (res) {
- this.openScanPopup();
- }
- });
- }
- }
+ // // //扫描数量和任务数量相等,直接提交
+ // if (this.scanCount == this.subList.length) {
+ // this.checkCount();
+ // } else if (this.scanCount < this.subList.length) {
+ // //扫描数量小于任务数量,判断是否允许部分提交
+ // if (this.jobContent.allowPartialComplete == "TRUE") {
+ // //提交
+ // this.checkCount();
+ // } else {
+ // //不允许部分提交,提示
+ // this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
+ // if (res) {
+ // this.openScanPopup();
+ // }
+ // });
+ // }
+ // }
},
checkCount(){
@@ -305,15 +349,18 @@
let str = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
- if (cur.qty != cur.handleQty) {
- var tempHandleQty =0
- if(cur.handleQty){
- tempHandleQty=cur.handleQty
- }else {
- tempHandleQty =0
+ if(cur.scaned){
+ if (cur.qty != cur.handleQty) {
+ var tempHandleQty =0
+ if(cur.handleQty){
+ tempHandleQty=cur.handleQty
+ }else {
+ tempHandleQty =0
+ }
+ str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
}
- str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
}
+
})
})
if (str) {
@@ -357,7 +404,7 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
- if (detail.scaned) {
+ if (detail.scaned&&!detail.isRecommend) {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = '';
detail.toBatch = detail.batch;