From e142cb156752088f594c68b2106a900395d9534c Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 13:40:59 +0800
Subject: [PATCH 1/9] =?UTF-8?q?YT-568=E6=89=80=E6=9C=89=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E9=9A=90=E8=97=8F=E6=8E=89=E6=89=AB=E6=8F=8F?=
=?UTF-8?q?=E7=AE=B1=E7=A0=81=E8=BF=9B=E5=85=A5=E4=BB=BB=E5=8A=A1=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=EF=BC=8C=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7=E4=BB=BB?=
=?UTF-8?q?=E5=8A=A1=E8=A6=81=E4=BF=9D=E7=95=99=E6=89=AB=E6=8F=8FASN?=
=?UTF-8?q?=E5=8D=95=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/deliver/job/deliverDetailBatch.vue | 604 +++++++++++++------
1 file changed, 430 insertions(+), 174 deletions(-)
diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue
index 6f815e0c..d3b89425 100644
--- a/src/pages/deliver/job/deliverDetailBatch.vue
+++ b/src/pages/deliver/job/deliverDetailBatch.vue
@@ -9,7 +9,7 @@
发货类型
- {{jobContent.deliverType}}
+ {{jobContent.deliverType}}
@@ -19,7 +19,7 @@
目标库位
- {{toLocationCode}}
+ {{toLocationCode}}
@@ -28,19 +28,20 @@
+
+
+
-
-
+
+
+
-
+
@@ -74,13 +80,19 @@
getRemoveOption,
getCurrDateTime,
getPackingNumberAndBatch,
- deepCopyData
+ deepCopyData,
+ compareAsc,
} from '@/common/basic.js';
- import {
- getDataSource
- } from '@/pages/issue/js/issue.js';
+ import {
+ getTreeDataSource,
+ calcTreeHandleQty,
+ getScanCount,
+ getThreeDataSource,
+ getDataSource,
+ calcHandleQty,
+ } from '@/common/detail.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
@@ -88,10 +100,10 @@
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
- import comDeliverDetailCard from '@/pages/deliver/coms/comDeliverDetailCard.vue'
import comDeliverDetailCardBatch from '@/pages/deliver/coms/comDeliverDetailCardBatch.vue'
import comScanDeliverPackBatch from '@/pages/deliver/coms/comScanDeliverPackBatch.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
+ import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
export default {
name: 'issueDetail',
@@ -99,8 +111,9 @@
jobDetailPopup,
winScanButton,
comDeliverDetailCardBatch,
+ comScanDeliverPackBatch,
jobTop,
- comScanDeliverPackBatch
+ winScanPackAndLocation
},
data() {
return {
@@ -113,7 +126,7 @@
status: "",
toLocationCode: "",
jobStatus: "",
- fromLocationCode:''
+ allowBiggerQty:"TRUE",//开启数量校验提示
};
},
@@ -184,13 +197,16 @@
});
getDeliverDetail(that.id).then(res => {
uni.hideLoading();
- if (res.data &&res.data.subList.length > 0) {
+ if (res.data && res.data.subList.length > 0) {
that.jobContent = res.data;
that.jobStatus = res.data.status;
that.subList = res.data.subList;
- that.detailSource = getDataSource(that.detailSource, that.subList)
- that.fromLocationCode = that.subList[0].fromLocationCode
+ // that.detailSource = res.data;
+ that.detailSource = getThreeDataSource(that.jobContent)
+ console.log(999,that.detailSource)
+
that.toLocationCode = that.subList[0].toLocationCode
+ that.allowBiggerQty = res.data.allowBiggerQty;
that.resizeCollapse();
} else {
that.showMessage('未获取到详情');
@@ -207,14 +223,201 @@
resizeCollapse() {
this.$nextTick(r => {
- this.$refs.comIssueDetailCard.forEach(r => {
+ this.$refs.comIssueDetailCardBatch.forEach(r => {
r.resizeCollapse();
})
});
},
-
+ getScanResult(result, managementTypeParams) {
+ console.log(222,result)
+ this.managementType = managementTypeParams
+ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
+ this.setDataBatch(result)
+ }else{
+ this.setData(result)
+ }
+ },
+ setDataBatch(result) {
+ try {
+ let that = this
+ this.balanceinfo = result.balance
+ var packingNumber = result.label.packingNumber;
+ var batch = result.label.batch;
+ var qty = result.label.qty;
+ var itemCode = result.label.itemCode;
+ var locationCode = result.fromLocationCode;
+
+ if (!result.balance) {
+ this.showMessage("没有库存余额")
+ return;
+ }
+ console.log(9558,result)
+ // var inventoryStatus = "OK";
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+
+ if (detail == undefined) {
+ this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
+ } else {
+
+ var itemDetail = detail.subList.find(r => {
+ return r.batch == batch &&
+ r.fromLocationCode == result.fromLocationCode
+ })
+ if (itemDetail == undefined) {
+ var isExit;
+ for (let subItem of detail.subList) {
+ var item;
+ // for (let pack of subItem.packList) {
+ // if (pack.batch == batch) {
+ // item = pack;
+ // isExit = pack;
+ // break;
+ // }
+ // }
+ // if (item != undefined) {
+ // subItem.scaned = true
+ // subItem.handleQty = 0;
+ // item = undefined
+ // }
+ }
+ if (isExit == undefined) {
+ // this.showErrorMessage("批次【" + batch + "】库位【" + result
+ // .fromLocationCode + "】不在列表中")
+ console.log(222,this.fromLocationCode)
+ detail.subList.push({
+ scaned:true,
+ fromLocationCode:this.fromLocationCode,
+ toLocationCode:this.toLocationCode,
+ batch:result.label.batch,
+ handleQty:result.label.qty,
+ qty:result.balance.qty,
+ inventoryStatus:result.balance.inventoryStatus,
+ toLocation:result.balance.toLocation,
+ balance:result.balance,
+ balanceQty:result.balance.qty,
+ packQty:result.package.packQty,
+ packUnit:result.package.packUnit,
+ uom:result.balance.uom,
+ // packList:[{
+ // scaned : true,
+ // handleQty : Number(result.label.qty),
+ // toLocationCode : result.balance.toLocationCode,
+ // }]
+ })
+ console.log(999,detail)
+ detail.handleQty = 0
+ detail.qty = 0
+ detail.subList.forEach(item=>{
+ detail.handleQty = calc.add(detail.handleQty,item.handleQty)
+ detail.qty = calc.add(detail.qty,item.qty)
+ // item.packList.forEach(cur=>{
+ // cur.handleQty = calc.add(detail.handleQty,item.handleQty)
+ // })
+ })
+ setTimeout(r => {
+ that.resizeCollapse();
+ that.$forceUpdate()
+ }, 100)
+ } else {
+ if (!isExit.cancleScanedHiht && isExit.scaned) {
+ // this.showMessage("批次【" + batch + "】已经扫描")
+ } else {
+ isExit.scaned = true
+ let qty = 0;
+ if (result.balance != null) {
+ qty = Number(result.balance.qty);
+ } else {
+ qty = Number(result.label.qty);
+ }
+ isExit.handleQty = Number(result.label.qty);
+ isExit.toLocationCode = this.toLocationCode;
+ }
+ itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty);
+ detail.handleQty = 0
+ detail.balance = result.balance,
+ detail.subList.forEach(item=>{
+ detail.handleQty = calc.add(detail.handleQty,item.handleQty)
+ // item.packList.forEach(cur=>{
+ // cur.handleQty = calc.add(detail.handleQty,item.handleQty)
+ // })
+ })
+ // calcHandleQtyAdd(this.detailSource, result.label);
+ }
+ this.continueScan()
+ this.$forceUpdate()
+ } else {
+ var scanedLength = 0;
+ // itemDetail.packList.forEach(res => {
+ // if (res.scaned) {
+ // scanedLength++;
+ // }
+ // })
+ //大哥让加的
+ itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
+
+ if (itemDetail.scaned ) {
+ // this.showMessage("箱码【" + packingNumber + "】已经扫描")
+ // calcHandleQtyAdd(this.detailSource, result.label);
+ itemDetail.balance=result.balance
+ itemDetail.balanceQty=result.balance.qty
+ itemDetail.uom=result.balance.uom,
+ itemDetail.handleQty = calc.add(itemDetail.handleQty,result.label.qty);
+ detail.handleQty = 0
+ detail.subList.forEach(item=>{
+ detail.handleQty = calc.add(detail.handleQty,item.handleQty)
+ })
+ } else {
+ debugger
+ itemDetail.scaned = true;
+ this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序
+ itemDetail.handleQty = result.label.qty;
+ itemDetail.scaned = true
+ itemDetail.balance=result.balance
+ itemDetail.balanceQty=result.balance.qty
+ itemDetail.uom=result.balance.uom
+ itemDetail.packQty=result.package.packQty
+ itemDetail.packUnit=result.package.packUnit
+ itemDetail.fromlocationCode=this.fromLocationCode
+ itemDetail.toLocationCode=this.toLocationCode
+ // itemDetail.toInventoryStatus = "OK"
+ // itemDetail.packList.forEach(pac => {
+ // pac.scaned = true
+ // pac.handleQty = Number(result.label.qty);
+ // pac.toLocationCode = result.balance.toLocationCode;
+ // })
+ detail.handleQty = 0
+ detail.subList.forEach(item=>{
+ detail.handleQty = calc.add(detail.handleQty,item.handleQty)
+ // item.packList.forEach(cur=>{
+ // cur.handleQty = calc.add(detail.handleQty,item.handleQty)
+ // })
+ })
+ // calcTreeHandleQty(this.detailSource);
+ this.continueScan()
+ this.$forceUpdate()
+ }
+ }
+ }
+ this.detailSource.forEach(item => {
+ item.subList.forEach(detail => {
+ detail.packingNumber = ''
+ })
+ })
+ } catch (e) {
+ this.showMessage(e.message)
+ }
+ },
+ //继续扫描
+ continueScan() {
+ this.scanCount = getScanCount(this.subList);
+ if (this.scanCount == this.subList.length) {
+ this.closeScanPopup();
+ } else {
+ this.scanPopupGetFocus();
+ }
+ },
submit() {
uni.showLoading({
title: "提交中....",
@@ -223,103 +426,168 @@
//目前任务只到一个库位
var itemCodes = []
- let locationCode = this.detailSource[0].toLocationCode
- this.detailSource.forEach(toLocationCode => {
- toLocationCode.Items.forEach(item => {
- itemCodes.push(item.itemCode)
- })
+ //目前任务只到一个库位
+ var itemCodes = []
+ let locationCode = this.detailSource[0].subList[0].toLocationCode
+ this.detailSource.forEach(toLocation => {
+ itemCodes.push(toLocation.itemCode)
})
-
- //使用在途库,不查询管理模式
- if (locationCode == null) {
- this.submitJob();
- } else {
- //获取管理模式,封装参数
- getManagementPrecisions(itemCodes, locationCode, res => {
- if (res.success) {
- this.managementList = res.list;
- this.submitJob();
- } else {
- uni.hideLoading();
- this.showErrorMessage(res.message);
- }
- });
- }
+ console.log( this.detailSource)
+
+ //获取管理模式,封装参数
+ getManagementPrecisions(itemCodes, locationCode, res => {
+ if (res.success) {
+ this.managementList = res.list;
+ console.log(res)
+ this.managementType = this.managementList && this.managementList[0] ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
+
+ this.submitJob();
+ } else {
+ uni.hideLoading();
+ // this.showErrorMessage(res.message);
+ }
+ });
+ // //使用在途库,不查询管理模式
+ // if (locationCode == null) {
+ // this.submitJob();
+ // } else {
+ // //获取管理模式,封装参数
+ // getManagementPrecisions(itemCodes, locationCode, res => {
+ // if (res.success) {
+ // this.managementList = res.list;
+ // this.submitJob();
+ // } else {
+ // uni.hideLoading();
+ // this.showErrorMessage(res.message);
+ // }
+ // });
+ // }
},
-
- checkCount(){
- let str=""
- this.detailSource.forEach(detail => {
- detail.Items.forEach(item => {
- var taskQty =0;
- item.taskQty =calc.add(taskQty,item.qty)
- var totalQty =0;
- item.Locations.forEach(lco => {
- lco.Batchs.forEach(batch => {
- batch.Records.forEach(record => {
- // if (batch.qty != record.qty) {
- // var tempHandleQty = 0
- // if (record.qty) {
- // tempHandleQty = record.qty
- // } else {
- // tempHandleQty = 0
- // }
- // if (batch.qty != 0) {
- // str +=
- // `包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n`
- // }
- // }
- if(record){
- var hanleQty =record.qty?record.qty:0
- totalQty = calc.add(totalQty,hanleQty)
- }
-
- })
+
+ checkCount() {
+ let str=""
+ this.detailSource.forEach(detail => {
+ detail.Items.forEach(item => {
+ var taskQty =0;
+ item.taskQty =calc.add(taskQty,item.qty)
+ var totalQty =0;
+ item.Locations.forEach(lco => {
+ lco.Batchs.forEach(batch => {
+ batch.Records.forEach(record => {
+ if(record){
+ var hanleQty =record.qty?record.qty:0
+ totalQty = calc.add(totalQty,hanleQty)
+ }
+
})
})
- //实际扫描的数量
- item.totalQty =totalQty
-
})
+ //实际扫描的数量
+ item.totalQty =totalQty
+
})
- //如果允许部分提交任务有扫描记录就可以直接提交;如果不允许部分执行,任务数量和提交数量不一致给出提示
- this.detailSource.forEach(detail=>{
- detail.Items.forEach(item=>{
- if(this.jobContent.allowPartialComplete=="FALSE"){
- if(item.taskQty!=item.totalQty){
- str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与实际提交数量【${item.totalQty}】不一致\n`
- }
+ })
+ //如果允许部分提交任务有扫描记录就可以直接提交;如果不允许部分执行,任务数量和提交数量不一致给出提示
+ this.detailSource.forEach(detail=>{
+ detail.Items.forEach(item=>{
+ if(this.jobContent.allowPartialComplete=="FALSE"){
+ if(item.taskQty!=item.totalQty){
+ str += `物料号【${item.itemCode}】任务数量【${item.taskQty}】与实际提交数量【${item.totalQty}】不一致\n`
}
+ }
+ })
+ })
+
+ if(str){
+ str = '不允许提交\n' + str
+ this.showErrorMessage(str)
+ }
+
+ return str?false:true
+ },
+ checkCountBatch() {
+ let str = ""
+ let str1 = ""
+ let str2 = ""
+ this.detailSource.forEach(detail => {
+ var taskQty = 0;
+ var totalQty = 0;
+ detail.subList.forEach(item => {
+ if(item.scaned){
+ item.taskQty=0
+ item.totalQty=0
+ item.taskQty =calc.add(item.taskQty,item.qty)
+ item.totalQty =calc.add(item.totalQty,item.handleQty)
+ if (this.jobContent.allowPartialComplete == "FALSE") {
+ if(item.handleQty!=item.taskQty){
+ str += `批次【${item.batch}】提交数量【${item.handleQty}】与任务物料数量【${item.taskQty}】不一致\n`
+ }
+ }
+ if (this.allowBiggerQty == 'FALSE') {
+ if ( item.taskQty < item.totalQty) {
+ str1 += '数量[' + item.totalQty + ']不允许大于任务数量[' + item.taskQty + ']'
+ }
+ }
+ if(item.handleQty>item.balance.qty){
+ str2 += `批次【${item.batch}】提交数量【${item.handleQty}】不可以大于库存数量【${item.balance.qty}】`
+ }
+ }
+
})
})
-
- if(str){
+
+
+ if (str) {
str = '不允许提交\n' + str
this.showErrorMessage(str)
}
-
- return str?false:true
-
+ if (str1) {
+ str1 = '不允许提交\n' + str1
+ this.showErrorMessage(str1)
+ }
+ if (str2) {
+ str2 = '不允许提交\n' + str2
+ this.showErrorMessage(str2)
+ }
+ return str || str1 || str2 ? false : true
+
},
submitJob() {
var params = this.setParams()
- console.log("提交参数", JSON.stringify(params));
-
- if (params.subList.length == 0) {
- uni.hideLoading()
- this.$refs.comMessage.showConfirmMessageModal('请扫描箱码')
- return
+ console.log("提交参数", params);
+ const isTrue = params.subList.some(item=>{
+ console.log(item.recordList.some(cur=>cur.scaned))
+ return item.recordList.some(cur=>cur.scaned) == true
+ })
+ if(!isTrue){
+ uni.hideLoading()
+ this.showErrorMessage("请扫描您需要提交的发货任务")
+ return
}
-
- if(!this.checkCount()){
- uni.hideLoading()
- return ;
+ // return;
+ // if (params.subList.length == 0) {
+ // uni.hideLoading()
+ // this.$refs.comMessage.showConfirmMessageModal('请扫描箱码')
+ // return
+ // }
+ if(this.managementType == "BY_BATCH" ||this.managementType == "BY_QUANTITY" ){
+ if (!this.checkCountBatch()) {
+ uni.hideLoading()
+ return;
+ }
+ }else{
+ if (!this.checkCount()) {
+ uni.hideLoading()
+ return;
+ }
}
-
+ debugger
+
deliverJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
+
this.showCommitSuccessMessage("提交成功\n生成发货记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
@@ -334,55 +602,34 @@
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
+ console.log(222,this.detailSource)
this.detailSource.forEach(toLocationCode => {
- toLocationCode.Items.forEach(item => {
- item.Locations.forEach(fromLocation => {
- fromLocation.Batchs.forEach(batch => {
- let subItem = batch.detail;
- subItem.recordList = [];
- if (batch.Records.length > 0) {
- batch.Records.forEach(r => {
- let record = {};
- record.handleQty = r.qty;
- record.fromPackingNumber = r
- .packingNumber;
- record.toContainerNumber = r
- .ContainerNumber;
- record.toInventoryStatus = r
- .inventoryStatus;
- // record.toLocationCode = subItem
- // .toLocationCode;
- record.toLocationCode = this.toLocationCode;
- record.supplierCode = r.supplierCode;
-
- //使用在途库不改变管理模式
- if (this.toLocationCode == null) {
- record.toPackingNumber = r
- .packingNumber;
- record.toBatch = r.batch;
- } else {
- var info =
- getPackingNumberAndBatch(
- this.managementList, r
- .itemCode,
- r.packingNumber, r
- .batch);
- record.toPackingNumber = info
- .packingNumber;
- record.toBatch = info.batch;
- }
- record.fromParentPackingNumber = r
- .parentPackingNumber;
- subItem.toLocationCode = this.toLocationCode
- subItem.recordList.push(record);
- })
- subList.push(deepCopyData(subItem));
- }
- })
- })
+ let obj = {...toLocationCode}
+ delete obj.subList
+ obj.recordList = []
+ let obj1 ={}
+ let arr = toLocationCode.subList.filter(item=>item.scaned)
+ arr.forEach(record=>{
+ obj1.scaned =record.scaned;
+ obj1.handleQty =record.handleQty;
+ obj1.fromLocationCode =record.fromLocationCode;
+ obj1.fromInventoryStatus =record.fromInventoryStatus;
+ obj1.copyContent =record.copyContent;
+ obj1.toContainerNumber = record.ContainerNumber;
+ obj1.toInventoryStatus =record.inventoryStatus;
+ obj1.toLocationCode = record.toLocationCode;
+ obj1.supplierCode = record.supplierCode;
+ obj1.toPackingNumber ='';
+ obj1.packingNumber = ''
+ obj1.fromPackingNumber = '';
+ obj1.toBatch = record.batch;
+ obj1.toPackingNumber = '';
+ obj1.packingNumber = '';
+ obj1.fromPackingNumber ='';
+ obj.recordList.push(obj1)
})
+ subList.push(obj)
})
-
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
@@ -420,30 +667,12 @@
},
updateData(record) {
- let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode);
- let item = requestLocation.Items.find(r => r.itemCode == record.itemCode);
- let itemHandleQty = 0;
- if (item != undefined) {
- item.Locations.forEach(l => {
- let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b
- .packingNumber == null || b.packingNumber == '') && b.batch ==
- record.batch);
- let handleQty = 0;
- if (batch != undefined) {
- batch.Records.forEach(res => {
- handleQty = calc.add(handleQty, res.qty)
- })
- batch.handleQty = handleQty;
- itemHandleQty = calc.add(itemHandleQty, handleQty)
- }
- })
- }
- // item.handleQty=itemHandleQty;
+ calcHandleQty(this.detailSource);
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
- this.$refs.scanPopup.getfocus();
+ this.$refs.scanPopup.packGetFocus();
}
},
@@ -496,15 +725,42 @@
this.dataContent = result;
this.$forceUpdate();
},
- openScanDetailPopup() {
- var datacontent = {}
- //克隆对象,深度克隆,防止双向绑定同一个变量
- // Object.assign(datacontent, this.detailSource);
- this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent);
- },
+ // openScanDetailPopup() {
+ // var datacontent = {}
+ // //克隆对象,深度克隆,防止双向绑定同一个变量
+ // // Object.assign(datacontent, this.detailSource);
+ // this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent);
+ // },
closeScanPopup() {
- this.updateCommitBtn();
+ // this.updateCommitBtn();
+ },
+ openScanPopup() {
+ let fromLocationCode = '';
+ let fromlocationList = [];
+ for (var i = 0; i < this.detailSource.length; i++) {
+ let item = this.detailSource[i];
+ item.subList.forEach(l => {
+ //重复的库位不往里面插入
+ var location = fromlocationList.find(res => res == l.fromLocationCode)
+ if (location == undefined) {
+ fromlocationList.push(l.fromLocationCode);
+ }
+ //来源库位赋默认值
+ if (fromLocationCode == '') {
+ if (!l.scaned) {
+ fromLocationCode = l.fromLocationCode;
+ }
+ }
+ })
+ }
+ this.fromLocationCode = fromLocationCode
+ console.log(this.fromLocationCode)
+ this.$refs.scanPopup.openScanPopupForJob(fromLocationCode, fromlocationList, this.jobContent);
},
+
+ },
+ confirmFromLocation(fromLocationCodeParams){
+ this.fromlocationCode = fromLocationCodeParams
}
};
From 5b8ed79ef0abbea85262a09bb054f02dfc340d58 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 13:42:59 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E5=8E=BB=E6=8E=89console?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/deliver/job/deliverDetailBatch.vue | 11 -----------
src/pages/issue/job/issueDetailBatch.vue | 6 ------
2 files changed, 17 deletions(-)
diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue
index d3b89425..6e0b0731 100644
--- a/src/pages/deliver/job/deliverDetailBatch.vue
+++ b/src/pages/deliver/job/deliverDetailBatch.vue
@@ -203,8 +203,6 @@
that.subList = res.data.subList;
// that.detailSource = res.data;
that.detailSource = getThreeDataSource(that.jobContent)
- console.log(999,that.detailSource)
-
that.toLocationCode = that.subList[0].toLocationCode
that.allowBiggerQty = res.data.allowBiggerQty;
that.resizeCollapse();
@@ -231,7 +229,6 @@
getScanResult(result, managementTypeParams) {
- console.log(222,result)
this.managementType = managementTypeParams
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.setDataBatch(result)
@@ -253,7 +250,6 @@
this.showMessage("没有库存余额")
return;
}
- console.log(9558,result)
// var inventoryStatus = "OK";
var detail = this.detailSource.find(r => r.itemCode == itemCode);
@@ -285,7 +281,6 @@
if (isExit == undefined) {
// this.showErrorMessage("批次【" + batch + "】库位【" + result
// .fromLocationCode + "】不在列表中")
- console.log(222,this.fromLocationCode)
detail.subList.push({
scaned:true,
fromLocationCode:this.fromLocationCode,
@@ -306,7 +301,6 @@
// toLocationCode : result.balance.toLocationCode,
// }]
})
- console.log(999,detail)
detail.handleQty = 0
detail.qty = 0
detail.subList.forEach(item=>{
@@ -369,7 +363,6 @@
detail.handleQty = calc.add(detail.handleQty,item.handleQty)
})
} else {
- debugger
itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); //按扫描信息排序
itemDetail.handleQty = result.label.qty;
@@ -432,13 +425,11 @@
this.detailSource.forEach(toLocation => {
itemCodes.push(toLocation.itemCode)
})
- console.log( this.detailSource)
//获取管理模式,封装参数
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
- console.log(res)
this.managementType = this.managementList && this.managementList[0] ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
this.submitJob();
@@ -602,7 +593,6 @@
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
- console.log(222,this.detailSource)
this.detailSource.forEach(toLocationCode => {
let obj = {...toLocationCode}
delete obj.subList
@@ -754,7 +744,6 @@
})
}
this.fromLocationCode = fromLocationCode
- console.log(this.fromLocationCode)
this.$refs.scanPopup.openScanPopupForJob(fromLocationCode, fromlocationList, this.jobContent);
},
diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue
index 9785b03b..df6ab80f 100644
--- a/src/pages/issue/job/issueDetailBatch.vue
+++ b/src/pages/issue/job/issueDetailBatch.vue
@@ -221,7 +221,6 @@
that.jobStatus = res.data.status
that.subList = res.data.subList;
that.detailSource = getThreeDataSource(that.jobContent)
- console.log(455,that.detailSource)
that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode
that.fromLocationCode = that.subList[0].fromLocationCode
//任务中已经扫描,模拟扫描赋值
@@ -261,7 +260,6 @@
},
getScanResult(result, managementTypeParams) {
- console.log(222,result)
this.managementType = managementTypeParams
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.setDataBatch(result)
@@ -283,7 +281,6 @@
this.showMessage("没有库存余额")
return;
}
- console.log(9558,result)
// var inventoryStatus = "OK";
var detail = this.detailSource.find(r => r.itemCode == itemCode);
@@ -335,7 +332,6 @@
// toLocationCode : result.balance.toLocationCode,
// }]
})
- console.log(999,detail)
detail.handleQty = 0
detail.qty = 0
detail.subList.forEach(item=>{
@@ -592,7 +588,6 @@
let str1=""
var totalQty =0;
var taskQty =0;
- console.log(this.detailSource)
this.detailSource.forEach(detail => {
detail.subList.forEach(item => {
if(item.scaned){
@@ -611,7 +606,6 @@
if(str){
str = '任务明细未全部完成,是否提交?\n' + str
}
- console.log(333,str1)
if(str1){
this.$refs.comMessage.showQuestionMessage1(str1, 'red', res => {
From cd452e8403848342e8921fa14b446feda8468e4f Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 13:43:29 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E5=8E=BB=E6=8E=89debugger?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/deliver/job/deliverDetailBatch.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/pages/deliver/job/deliverDetailBatch.vue b/src/pages/deliver/job/deliverDetailBatch.vue
index 6e0b0731..0db4d140 100644
--- a/src/pages/deliver/job/deliverDetailBatch.vue
+++ b/src/pages/deliver/job/deliverDetailBatch.vue
@@ -573,8 +573,6 @@
return;
}
}
- debugger
-
deliverJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
From 629f352f9b6b59e23b034ed568328297d674dc66 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 13:46:29 +0800
Subject: [PATCH 4/9] =?UTF-8?q?YT-631pda=E9=A2=84=E7=94=9F=E4=BA=A7?=
=?UTF-8?q?=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1=EF=BC=8C=E7=9B=AE=E6=A0=87?=
=?UTF-8?q?=E5=BA=93=E4=BD=8D=E5=BA=94=E5=B8=A6=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/unPlanned/job/receiptJobDetail.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/pages/unPlanned/job/receiptJobDetail.vue b/src/pages/unPlanned/job/receiptJobDetail.vue
index a5b94d1e..0cca45bd 100644
--- a/src/pages/unPlanned/job/receiptJobDetail.vue
+++ b/src/pages/unPlanned/job/receiptJobDetail.vue
@@ -366,8 +366,6 @@
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
- return
-
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
From a16b01305e7de2263b12a909929feeeaa24327cf Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 14:24:14 +0800
Subject: [PATCH 5/9] =?UTF-8?q?YT-631pda=E9=A2=84=E7=94=9F=E4=BA=A7?=
=?UTF-8?q?=E6=94=B6=E8=B4=A7=E4=BB=BB=E5=8A=A1=EF=BC=8C=E7=9B=AE=E6=A0=87?=
=?UTF-8?q?=E5=BA=93=E4=BD=8D=E5=BA=94=E5=B8=A6=E5=87=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/productReceipt/job/productReceiptDetail.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue
index 087661be..2a34cef8 100644
--- a/src/pages/productReceipt/job/productReceiptDetail.vue
+++ b/src/pages/productReceipt/job/productReceiptDetail.vue
@@ -230,6 +230,7 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
+ console.log(344,that.jobContent.allowModifyLocation)
that.subList = res.data.subList;
that.jobStatus = res.data.status;
that.jobToLocationCode = that.subList[0].toLocationCode;
@@ -295,7 +296,7 @@
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
- itemDetail.toLocationCode = this.toLocationCode;
+ // itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
this.continueScan()
this.$forceUpdate()
From 0ccfa31daa1f9614d76f087a5c96b15366187622 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 14:51:50 +0800
Subject: [PATCH 6/9] =?UTF-8?q?YT-634=E5=8F=91=E6=96=99=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=EF=BC=8C=E6=89=AB=E6=8F=8F=E6=95=B0=E9=87=8F=E5=A4=A7=E4=BA=8E?=
=?UTF-8?q?=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F=EF=BC=8C=E6=B2=A1=E6=9C=89?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=8C=E5=BA=94=E4=B8=8D=E8=83=BD=E5=A4=A7?=
=?UTF-8?q?=E4=BA=8E=E5=BA=93=E5=AD=98=E6=95=B0=E9=87=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/issue/job/issueDetailBatch.vue | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/pages/issue/job/issueDetailBatch.vue b/src/pages/issue/job/issueDetailBatch.vue
index df6ab80f..346ed891 100644
--- a/src/pages/issue/job/issueDetailBatch.vue
+++ b/src/pages/issue/job/issueDetailBatch.vue
@@ -473,13 +473,15 @@
const isTrue = params.subList.some(item=>{
return item.recordList.some(cur=>cur.scaned) == true
})
+
if(!isTrue){
uni.hideLoading()
this.showErrorMessage("请扫描您需要提交的发料任务")
return
}
- // return
+
console.log("提交参数", params);
+ return
issueJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
@@ -588,6 +590,7 @@
let str1=""
var totalQty =0;
var taskQty =0;
+ console.log(877,this.detailSource)
this.detailSource.forEach(detail => {
detail.subList.forEach(item => {
if(item.scaned){
@@ -603,15 +606,18 @@
})
})
- if(str){
- str = '任务明细未全部完成,是否提交?\n' + str
- }
if(str1){
- this.$refs.comMessage.showQuestionMessage1(str1, 'red', res => {
-
- })
+ this.$refs.comMessage.showMessage(str1, res => {
+ if (res) {
+ this.afterCloseMessage()
+ }
+ });
return
}
+ if(str){
+ str = '任务明细未全部完成,是否提交?\n' + str
+ }
+
if(totalQty!=taskQty){
str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交"
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
From 5a55c1a43e98888d6429327863d7ffd32d028c03 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 16:02:19 +0800
Subject: [PATCH 7/9] =?UTF-8?q?=E7=89=A9=E6=96=99=E9=9A=94=E7=A6=BB?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../coms/comInventoryDetailCard.vue | 10 +-
.../coms/comInventoryDetailCardBatch.vue | 203 ------------------
.../inventoryMove/job/inventoryMoveDetail.vue | 11 +-
3 files changed, 11 insertions(+), 213 deletions(-)
delete mode 100644 src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue
diff --git a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
index bb58c12c..4ffc3a1b 100644
--- a/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
+++ b/src/pages/inventoryMove/coms/comInventoryDetailCard.vue
@@ -3,7 +3,11 @@
-
+
+
+
@@ -27,6 +31,7 @@
-
-
\ No newline at end of file
diff --git a/src/pages/inventoryMove/job/inventoryMoveDetail.vue b/src/pages/inventoryMove/job/inventoryMoveDetail.vue
index eca6f03f..7c91522e 100644
--- a/src/pages/inventoryMove/job/inventoryMoveDetail.vue
+++ b/src/pages/inventoryMove/job/inventoryMoveDetail.vue
@@ -12,15 +12,10 @@
-
-
+ @openDetail="openDetail">
@@ -81,7 +76,6 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.vue'
- import comInventoryDetailCardBatch from '@/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@@ -93,7 +87,6 @@
winScanButton,
winScanPack,
comInventoryDetailCard,
- comInventoryDetailCardBatch,
winScanPackAndLocation,
detailInfoPopup,
jobTop
@@ -292,6 +285,7 @@
calcHandleQty() {
calcHandleQty(this.detailSource)
+ console.log(this.detailSource)
this.continueScan()
this.$forceUpdate();
},
@@ -354,6 +348,7 @@
if (itemDetail.scaned) {
// this.showMessage("批次【" + batch + "】已经扫描")
itemDetail.handleQty =calc.add(itemDetail.handleQty,Number(result.label.qty));
+ this.calcHandleQty();
} else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
From 2671100352f022c3aebfb1b8455646264200c5ab Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 1 Nov 2024 16:36:14 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=A4=96=E5=87=BA?=
=?UTF-8?q?=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/balance.js | 2 +-
.../detail/comRecommendDetailCardBatch.vue | 103 +++++-------------
.../unPlanned/coms/comReceiptDetailCard.vue | 11 +-
src/pages/unPlanned/job/issueJobDetail.vue | 10 +-
4 files changed, 42 insertions(+), 84 deletions(-)
diff --git a/src/common/balance.js b/src/common/balance.js
index 7e682098..8ddae8f2 100644
--- a/src/common/balance.js
+++ b/src/common/balance.js
@@ -403,7 +403,7 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
filters.push({
column: "batch",
action: "==",
- value: null
+ value: label.batch?label.batch:null
})
filters.push({
column: "locationCode",
diff --git a/src/mycomponents/detail/comRecommendDetailCardBatch.vue b/src/mycomponents/detail/comRecommendDetailCardBatch.vue
index acfc3d3b..5452b913 100644
--- a/src/mycomponents/detail/comRecommendDetailCardBatch.vue
+++ b/src/mycomponents/detail/comRecommendDetailCardBatch.vue
@@ -1,50 +1,45 @@
-
+
+
+
-
+
-
-
- 推
+
+
+ 推
荐
-
-
-
-
-
- 复制
+
+
-
-
- 实
+
+
+ 实
际
-
-
-
-
-
-
+
+
+
-
+
+
@@ -57,14 +52,9 @@
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
- import location from '@/mycomponents/balance/location.vue'
- import toLocation from '@/mycomponents/balance/toLocation.vue'
- import batch from '@/mycomponents/balance/batch.vue'
- import config from '@/static/config.js'
-
import {
- getRemoveOption,
- getEditRemoveOption
+ getDetailOption,
+ getPurchaseReceiptOption
} from '@/common/array.js';
export default {
@@ -73,11 +63,7 @@
itemCompareQty,
recommend,
balanceQtyEdit,
- winScanLocation,
- location,
- toLocation,
- itemCompareQty,
- batch,
+ winScanLocation
},
props: {
dataContent: {
@@ -112,10 +98,6 @@
type: Boolean,
default: true
},
- isEdit: {
- type: Boolean,
- default: true
- },
},
watch: {
dataContent: {
@@ -142,18 +124,18 @@
locatonItem: {},
editItem: {},
detailOptions: [],
- scanOptions: [],
-
- options: [],
- removeOptions: [],
- editAndRemoveOptions: []
+ scanOptions: []
}
},
mounted() {
+ if (this.detailOptions.length == 0) {
+ this.detailOptions = getDetailOption();
+ }
+ if (this.scanOptions.length == 0) {
+ this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, false)
+ }
- this.removeOptions = getRemoveOption();
- this.editAndRemoveOptions = getEditRemoveOption()
// this.showLocation();
},
@@ -204,35 +186,6 @@
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
- isDevlement() {
- return config.isDevelopment;
- },
- copy(detail) {
- console.log(detail)
- // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
- var content = "HPQ;V1.0;I" + detail.itemCode + ";P" + detail.packingNumber + ";B" + detail
- .batch + ";Q" + detail.qty
- // #ifdef H5
- this.$copyText(content).then(
- res => {
- uni.showToast({
- title: '复制采购标签成功',
- icon: 'none'
- })
- }
- )
- // #endif
- // #ifndef H5
- uni.setClipboardData({
- data: content,
- success: () => {
- uni.showToast({
- title: '复制采购标签成功'
- })
- }
- })
- // #endif
- },
}
}
diff --git a/src/pages/unPlanned/coms/comReceiptDetailCard.vue b/src/pages/unPlanned/coms/comReceiptDetailCard.vue
index 804ae2be..a60fd6a2 100644
--- a/src/pages/unPlanned/coms/comReceiptDetailCard.vue
+++ b/src/pages/unPlanned/coms/comReceiptDetailCard.vue
@@ -3,8 +3,11 @@
-
-
+
+
+
@@ -30,6 +33,7 @@
-
-
\ No newline at end of file
diff --git a/src/pages/unPlanned/job/issueJobDetail.vue b/src/pages/unPlanned/job/issueJobDetail.vue
index 78408dbb..62290121 100644
--- a/src/pages/unPlanned/job/issueJobDetail.vue
+++ b/src/pages/unPlanned/job/issueJobDetail.vue
@@ -18,11 +18,8 @@
-
-
+ @remove="updateData" @updateData="updateData" @openDetail="openDetail">
@@ -84,7 +81,6 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comRecommendDetailCard from "@/mycomponents/detail/comRecommendDetailCard.vue"
- import comRecommendDetailCardBatch from "@/mycomponents/detail/comRecommendDetailCardBatch.vue"
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@@ -94,7 +90,6 @@
winScanButton,
winScanPackAndLocation,
comRecommendDetailCard,
- comRecommendDetailCardBatch,
detailInfoPopup,
jobTop
},