diff --git a/src/common/record.js b/src/common/record.js
index 10c6e606..de6c44e7 100644
--- a/src/common/record.js
+++ b/src/common/record.js
@@ -48,7 +48,23 @@ export function createDetailInfo(balance, pack) {
return detail;
}
+export function createDetailInfoForLabel(balance, pack,label) {
+ balance.scaned = true;
+ // data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
+ // data.inventoryStatus = data.inventoryStatus;
+ let detail = deepCopyData(balance);
+ detail.balanceQty = new Decimal(detail.qty).toNumber()
+ detail.qty = new Decimal(detail.qty).toNumber();
+ detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
+ detail.packUnit = pack.packUnit
+ console.log(988,label.qty)
+ detail.handleQty = new Decimal(label.qty).toNumber();
+ detail.package = pack;
+ detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
+ detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
+ return detail;
+}
export function createDetailByPackInfo(pack) {
diff --git a/src/mycomponents/package/packageCard.vue b/src/mycomponents/package/packageCard.vue
index 6c1f9269..8e583b13 100644
--- a/src/mycomponents/package/packageCard.vue
+++ b/src/mycomponents/package/packageCard.vue
@@ -6,7 +6,7 @@
-
+
diff --git a/src/mycomponents/qty/balanceQtyEdit.vue b/src/mycomponents/qty/balanceQtyEdit.vue
index 250d0a48..319ef2b9 100644
--- a/src/mycomponents/qty/balanceQtyEdit.vue
+++ b/src/mycomponents/qty/balanceQtyEdit.vue
@@ -44,7 +44,7 @@
库存数量 :
- {{Number(dataContent.balanceQty)}}
+ {{Number(dataContent.balanceQty)}}
diff --git a/src/mycomponents/qty/packUnit.vue b/src/mycomponents/qty/packUnit.vue
index e076def7..1ae100d1 100644
--- a/src/mycomponents/qty/packUnit.vue
+++ b/src/mycomponents/qty/packUnit.vue
@@ -1,5 +1,5 @@
-
+
diff --git a/src/mycomponents/record/recordComDetailCard.vue b/src/mycomponents/record/recordComDetailCard.vue
index c712871e..bd6736cf 100644
--- a/src/mycomponents/record/recordComDetailCard.vue
+++ b/src/mycomponents/record/recordComDetailCard.vue
@@ -4,7 +4,7 @@
-
+
{
diff --git a/src/pages.json b/src/pages.json
index 9e882972..8d0db267 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -254,6 +254,62 @@
}
}
},
+ {
+ "path": "pages/purchaseReceipt/job/purchaseReceiptTool",
+ "style": {
+ "navigationBarTitleText": "协定品收货",
+ "enablePullDownRefresh": true,
+ "titleNView": {
+ // "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "path": "pages/purchaseReceipt/job/purchaseReceiptDevelop",
+ "style": {
+ "navigationBarTitleText": "号试品收货",
+ "enablePullDownRefresh": true,
+ "titleNView": {
+ // "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
+ }
+ }
+ },
{
"path": "pages/purchaseReceipt/job/purchaseReject",
"style": {
diff --git a/src/pages/customerReturn/job/returnDetail.vue b/src/pages/customerReturn/job/returnDetail.vue
index b89836b9..88d360ad 100644
--- a/src/pages/customerReturn/job/returnDetail.vue
+++ b/src/pages/customerReturn/job/returnDetail.vue
@@ -79,6 +79,10 @@
calcHandleQty,
getScanCount
} from '@/common/detail.js';
+
+ import {
+ calc
+ } from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@@ -246,7 +250,7 @@
},
openScanPopup() {
- this.$refs.scanPopup.openScanPopup();
+ this.$refs.scanPopup.openScanPopup( this.fromLocationCode );
},
closeScanPopup() {
@@ -254,13 +258,59 @@
},
getScanResult(result) {
+ console.log(result)
+ this.managementType ==result.managementType
+ if(result.managementType == "BY_BATCH" || result.managementType == "BY_QUANTITY" ){
+ this.setDataBatch(result)
+ }else{
+ this.setData(result)
+ }
+
+ },
+ setDataBatch(result){
try {
var packingNumber = result.package.number;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
-
+
+ if (detail == undefined) {
+ this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
+ } else {
+ console.log(366,batch)
+ console.log(366,detail.subList)
+ var itemDetail = detail.subList.find(r => {
+ return r.batch == batch
+ })
+ if (itemDetail == undefined) {
+ this.showErrorMessage( "批次[" + batch + "]不在列表中")
+ } else {
+ if (itemDetail.scaned) {
+ // this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
+ itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty)
+ } else {
+ itemDetail.scaned = true;
+ itemDetail.handleQty = Number(result.label.qty)
+ itemDetail.packQty = Number(result.package.packQty)
+ itemDetail.packUnit = result.package.packUnit
+ this.calcHandleQty();
+
+ }
+ }
+ }
+ } catch (e) {
+ this.showMessage(e.message)
+ }
+ },
+ setData(result){
+ try {
+ var packingNumber = result.package.number;
+ var batch = result.label.batch;
+ var qty = result.label.qty;
+ var itemCode = result.label.itemCode;
+ var detail = this.detailSource.find(r => r.itemCode == itemCode);
+
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
@@ -279,7 +329,7 @@
itemDetail.packQty = Number(result.package.packQty)
itemDetail.packUnit = result.package.packUnit
this.calcHandleQty();
-
+
}
}
}
@@ -287,7 +337,6 @@
this.showMessage(e.message)
}
},
-
scanLocationCode(location, code) {
this.toLocationCode = code
this.detailSource.forEach(item => {
@@ -310,12 +359,20 @@
// //扫描数量和任务数量相等,直接提交
if (this.scanCount == this.subList.length) {
- this.checkCount();
+ if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
+ this.checkCountBatch()
+ }else{
+ this.checkCount();
+ }
} else if (this.scanCount < this.subList.length) {
//扫描数量小于任务数量,判断是否允许部分提交
if (this.jobContent.allowPartialComplete == "TRUE") {
//提交
- this.checkCount();
+ if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
+ this.checkCountBatch()
+ }else{
+ this.checkCount();
+ }
} else {
//不允许部分提交,提示
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@@ -354,7 +411,51 @@
this.submitJob()
}
},
-
+ checkCountBatch(){
+ // 提交的数量和任务数量不一致提示
+ let str = ''
+ let str1 = ''
+ let str2 = ''
+ 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
+ }
+ str += `批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
+ }
+ if(cur.handleQty > cur.qty){
+ str1 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于推荐数量【${cur.qty}】`
+ }
+ if(cur.handleQty < cur.qty){
+ str2 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以小于推荐数量【${cur.qty}】`
+ }
+ })
+ })
+ this.jobContent.allowBiggerQty = 'FALSE'
+ if(this.jobContent.allowBiggerQty == 'FALSE' &&str1){
+ this.$refs.comMessage.showConfirmWarningModal(str1)
+ return
+ }
+ if(this.jobContent.allowSmallerQty == 'FALSE' && str2){
+ this.$refs.comMessage.showConfirmWarningModal(str2)
+ return
+ }
+ if (str) {
+ str = '任务明细未全部完成,是否提交?\n'+str
+ this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
+ if (res) {
+ this.submitJob()
+ }
+ });
+ } else {
+ this.submitJob()
+ }
+
+ },
submitJob() {
uni.showLoading({
title: "提交中....",
@@ -370,6 +471,7 @@
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
+
customerReturnJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/customerReturn/record/returnRecord.vue b/src/pages/customerReturn/record/returnRecord.vue
index 3c321a2c..19eec7c8 100644
--- a/src/pages/customerReturn/record/returnRecord.vue
+++ b/src/pages/customerReturn/record/returnRecord.vue
@@ -211,6 +211,7 @@
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.packingNumber =pack.number
+ newDetail.handleQty =result.label.qty
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@@ -314,7 +315,13 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
- console.log("提交" + JSON.stringify(params))
+ console.log("提交" ,params)
+ let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
+ if(obj){
+ this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
+ uni.hideLoading()
+ return
+ }
customerReturnRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/deliver/record/deliverRecord.vue b/src/pages/deliver/record/deliverRecord.vue
index 0b10be85..1cf8f54e 100644
--- a/src/pages/deliver/record/deliverRecord.vue
+++ b/src/pages/deliver/record/deliverRecord.vue
@@ -175,10 +175,6 @@
} else {
this.setData(result)
}
-
-
-
-
},
setData(result){
@@ -343,7 +339,13 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
- console.log("提交" + JSON.stringify(params))
+ console.log("提交",params)
+ let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
+ if(obj){
+ this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
+ uni.hideLoading()
+ return
+ }
deliverRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/inventoryMove/coms/comMoveRecord.vue b/src/pages/inventoryMove/coms/comMoveRecord.vue
index e256104c..a3948b52 100644
--- a/src/pages/inventoryMove/coms/comMoveRecord.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecord.vue
@@ -12,7 +12,7 @@
+ :allowEditStatus="allowEditStatus" >
@@ -35,7 +35,7 @@
-
+
{
+ setTimeout(()=>{
if(this.showOnePop){
+ this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
+ this.$refs.okToHoldRecordPackRef.itemCode = ''
+ this.$refs.okToHoldRecordPackRef.batch = ''
+ this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = true
+
}else{
this.$refs.scanFromLocationCode.openScanPopup();
}
- })
+ },200)
},
getFromLocation(location) {
this.fromLocationCode = location.code;
@@ -267,20 +268,19 @@
this.toLocationCode = code;
this.toLocationInfo = location;
},
- getScanResult(result,managementType) {
+ getScanResult(result,managementTypeParams) {
+ this.managementType = managementTypeParams
if(this.showOnePop){
- this.itemCode= result.balance.itemCode
- this.batch = result.balance.batch
- this.isClearItemCode = false
- debugger
+ this.$refs.okToHoldRecordPackRef.itemCode= result.balance.itemCode
+ this.$refs.okToHoldRecordPackRef.batch = result.balance.batch
this.getResult = result//存储接受的结果
this.$refs.scanPopup.closeScanPopup()
}else{
- if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){
- this.getScanResultAfterBatch(result)
+ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
+ this.getScanResultAfterBatch(result,managementTypeParams)
}else{
- this.getScanResultAfter(result)
+ this.getScanResultAfter(result,managementTypeParams)
}
}
@@ -302,7 +302,7 @@
// this.getResult.fromLocationCode = obj.fromLocationCode
this.getResult.label.batch = obj.handleQty
this.getResult.label.qty = obj.handleQty
- this.getScanResultAfterBatch(this.getResult)
+ this.getScanResultAfterBatch(this.getResult,this.managementType)
},
getScanResultAfter(result){
var balance = result.balance;
@@ -364,7 +364,7 @@
}
calcHandleQty(this.detailSource);
},
- getScanResultAfterBatch(result){
+ getScanResultAfterBatch(result,managementTypeParams){
var balance = result.balance;
this.balanceInfo = result.balance;
var pack = result.package;
@@ -387,18 +387,35 @@
newDetail.toInventoryStatus = this.toInventoryStatus;
}
newDetail.toLocationCode = this.toLocationCode;
+ newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty)
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
+
+ this.clearFromLocation()
+ this.$refs.okToHoldRecordPackRef.handleQty = 0
+ this.$refs.okToHoldRecordPackRef.showOne = false
} else {
- var detail = item.subList.find(r => {
- if (r.batch == pack.batch &&
- r.fromLocationCode == balance.locationCode &&
- r.scaned == true) {
- return r;
- }
- })
+ var detail = ''
+ console.log(9988,managementTypeParams)
+ if(managementTypeParams == 'BY_QUANTITY'){
+ detail = item.subList.find(r => {
+ if (r.fromLocationCode == balance.locationCode &&
+ r.scaned == true) {
+ return r;
+ }
+ })
+ }else if(managementTypeParams == 'BY_BATCH'){
+ detail = item.subList.find(r => {
+ if (r.batch == pack.batch &&
+ r.fromLocationCode == balance.locationCode &&
+ r.scaned == true) {
+ return r;
+ }
+ })
+ }
+ console.log(detail)
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus;
@@ -412,10 +429,24 @@
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = this.toLocationCode;
+ newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
+ this.clearFromLocation()
+ this.$refs.okToHoldRecordPackRef.handleQty = 0
+ this.$refs.okToHoldRecordPackRef.showOne = false
} else {
- detail.handleQty =calc.add(detail.handleQty, result.label.qty)
+ // console.log(999,detail.handleQty)
+ // detail.handleQty =calc.add(detail.handleQty, result.label.qty)
+ if(managementTypeParams == 'BY_QUANTITY'){
+ this.showErrorMessage(
+ "批次[]\n" + "库位[" + detail.fromLocationCode + "]\n" +
+ "已经存在")
+ }else if(managementTypeParams == 'BY_BATCH'){
+ this.showErrorMessage(
+ "批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
+ "已经存在")
+ }
}
}
calcHandleQty(this.detailSource);
@@ -426,17 +457,17 @@
},
// 清除来源库位
clearFromLocation(fromLocationCodeParams){
- this.fromLocationCode = fromLocationCodeParams
- this.itemCode =''
- this.batch =''
- this.isClearFromLocationCode = true
+ this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
+ this.$refs.okToHoldRecordPackRef.itemCode =''
+ this.$refs.okToHoldRecordPackRef.batch =''
+ // this.isClearFromLocationCode = true
},
- // 清除零件
+ // 清除批次和物料
clearItemCode(label){
- this.itemCode = label.itemCode
- this.batch =''
- this.isClearItemCode = true
+ this.$refs.okToHoldRecordPackRef.itemCode =''
+ this.$refs.okToHoldRecordPackRef.batch =''
},
+
showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
@@ -547,7 +578,12 @@
}
// if(this.balanceInfo)
console.log("提交" ,params)
-
+ let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
+ if(obj){
+ this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
+ uni.hideLoading()
+ return
+ }
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
diff --git a/src/pages/inventoryMove/coms/comMoveRecordCard.vue b/src/pages/inventoryMove/coms/comMoveRecordCard.vue
index 8c0449b2..496893f6 100644
--- a/src/pages/inventoryMove/coms/comMoveRecordCard.vue
+++ b/src/pages/inventoryMove/coms/comMoveRecordCard.vue
@@ -16,9 +16,9 @@
-
+ :isShowLocation="true" :allowEditStatus='allowEditStatus' :isShowPack='item.managementTypeParams == "BY_PACKAGING"' >
diff --git a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
index 2142f178..013b738e 100644
--- a/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
+++ b/src/pages/inventoryMove/coms/okToHoldRecordPack.vue
@@ -9,14 +9,20 @@
来源库位:
-
+
+
+
+
零件:
-
+
+
+
+
@@ -25,6 +31,7 @@
批次:
+
@@ -62,7 +69,7 @@
components: {
winScanLocation
},
- emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'],
+ emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult','clearFromLocationCode','clickBtnClearItemCode'],
data() {
return {
handleQty:0,
@@ -73,31 +80,11 @@
}
},
props: {
- fromLocationCodeProps:{
- type: String,
- default: ''
- },
// 是否显示第一层弹窗
showOnePop: {
type: Boolean,
default: false
},
- itemCodeProps:{
- type: String,
- default: ''
- },
- batchProps:{
- type: String,
- default: ''
- },
- isClearFromLocationCode:{
- type: Boolean,
- default: false
- },
- isClearItemCode:{
- type: Boolean,
- default: false
- },
},
mounted() {
},
@@ -128,12 +115,15 @@
this.$emit("confirm",obj);
},
fromLocationScanMsg(){
+ if (this.fromLocationCode) {
console.log(111,this.fromLocationCode)
this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg'
this.handelScanMsg()
+ }
},
itemCodeScanMsg(){
+ if (this.itemCode) {
if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
@@ -141,6 +131,7 @@
this.fromWitch = 'itemCodeScanMsg'
this.scanMsg = this.itemCode
this.handelScanMsg()
+ }
},
handelScanMsg() {
//点击了回车
@@ -154,7 +145,7 @@
// that.scanMsg =that.scanMsg + "\n";
// }
console.log(that.scanMsg.includes('\n'))
- // if (that.scanMsg.includes('\n')) {
+ if (that.scanMsg) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
that.losefocus();
@@ -192,7 +183,7 @@
}
});
}, 200);
- // }
+ }
},
losefocus() {
let that = this;
@@ -200,38 +191,15 @@
that.boxfocus = false;
});
},
- onClear(){
- console.log(111)
- }
- },
- watch: {
- fromLocationCodeProps:{
- handler(newVal, oldVal) {
- if(this.isClearFromLocationCode){
- this.fromLocationCode=''
- }else{
- this.fromLocationCode = newVal
- }
- },
- // deep: true,
- // immediate: true
- },
- itemCodeProps: {
- handler(newVal, oldVal) {
- if(this.isClearItemCode){
- this.itemCode=''
- }else{
- this.itemCode = newVal
- }
- },
+ clickBtnClearFromLocation(){
+ this.$emit("clickBtnClearFromLocation");
},
- batchProps(newVal) {
- if(this.isClearItemCode){
- this.batch=''
- }else{
- this.batch = newVal
- }
+ clickBtnClearItemCode(){
+ this.$emit("clickBtnClearItemCode");
},
+ },
+ watch: {
+
}
}
diff --git a/src/pages/inventoryMove/record/holdToOkRecord.vue b/src/pages/inventoryMove/record/holdToOkRecord.vue
index d708cc99..224a5c05 100644
--- a/src/pages/inventoryMove/record/holdToOkRecord.vue
+++ b/src/pages/inventoryMove/record/holdToOkRecord.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/pages/issue/record/directIssueByBatch.vue b/src/pages/issue/record/directIssueByBatch.vue
index 5192bdc7..d559cf4d 100644
--- a/src/pages/issue/record/directIssueByBatch.vue
+++ b/src/pages/issue/record/directIssueByBatch.vue
@@ -81,6 +81,7 @@
createItemInfo,
createDetailInfo,
calcHandleQty,
+ createDetailInfoForLabel
} from '@/common/record.js';
import {
@@ -251,7 +252,7 @@
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
- let newDetail = createDetailInfo(balance, pack); //
+ let newDetail = createDetailInfoForLabel(balance, pack,label);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@@ -263,7 +264,7 @@
}
})
if (detail == undefined) {
- let newDetail = createDetailInfo(balance, pack);
+ let newDetail = createDetailInfoForLabel(balance, pack,label);
item.subList.push(newDetail);
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
diff --git a/src/pages/purchaseReceipt/job/purchaseReceipt.vue b/src/pages/purchaseReceipt/job/purchaseReceipt.vue
index 9d8042b8..60eda37e 100644
--- a/src/pages/purchaseReceipt/job/purchaseReceipt.vue
+++ b/src/pages/purchaseReceipt/job/purchaseReceipt.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue b/src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue
new file mode 100644
index 00000000..eecfd51e
--- /dev/null
+++ b/src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/purchaseReceipt/job/purchaseReceiptTool.vue b/src/pages/purchaseReceipt/job/purchaseReceiptTool.vue
new file mode 100644
index 00000000..58f46eca
--- /dev/null
+++ b/src/pages/purchaseReceipt/job/purchaseReceiptTool.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue
index a96f9c75..43b5ff0d 100644
--- a/src/pages/purchaseReceipt/job/receiptDetail.vue
+++ b/src/pages/purchaseReceipt/job/receiptDetail.vue
@@ -176,7 +176,8 @@
switchCode1: "",
isCheckLocation: 'purchaseReceiptLocationCodeValidate', //校验收货库位
reasonText: "",
- packingNumberList:[],
+ packingNumberList:[],
+ source_type:'',
// printDeafult: {}, //默认打印机
// templateDeafult: {} //默认的模板
};
@@ -187,7 +188,8 @@
this.id = option.id;
this.scanMessage = option.scanMessage;
this.operation = option.operation;
- this.status = option.status;
+ this.status = option.status;
+ this.source_type = option.source_type;
this.switchCode = "purchasereceiptPrintPDA" //采购收货PDA打印开关
this.switchCode1 = "EnableQms" //根据开关中是否启用QMS去判断,如果为TRUE显示检验指引单,如果为FALSE不显示检验指引单
},
@@ -467,6 +469,7 @@
}
}
} else if (result.label.labelType == "PurchaseLabel") {
+ debugger
var packingNumber = result.package.number;
var parentpackingNumber = result.package.parentNumber;
var batch = result.label.batch;
@@ -492,7 +495,7 @@
} else {
let isScan = false
if(packingNumber){
- isScan = this.packingNumberList.some(item=>item == packingNumber)
+ isScan = this.packList.some(item=>item == packingNumber)
}else{
isScan = false
}
@@ -502,7 +505,8 @@
pack.handleQty = calc.add(pack.handleQty,result.label.qty)
} else {
- this.packingNumberList.push(packingNumber)
+ this.packList.push(packingNumber)
+ pack.packList.push(packingNumber)
pack.scaned = true
pack.scanDate = new Date();
pack.handleQty = Number(result.label.qty);
@@ -851,7 +855,8 @@
let that = this
console.log(877,params)
// return;
- purchaseReceiptJobSubmit(params).then(res => {
+ purchaseReceiptJobSubmit(params).then(res => {
+
if (res.data) {
let isCheckPrint = getSwitchInfoByCode(this.switchCode)//是否显示上架指引单
let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)//是否显示采购收货检验指引单
@@ -863,7 +868,7 @@
})
}else if(!isCheckPrint1 && !isCheckPrint){
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
- }else {
+ }else if(that.source_type!='TOOL'&&that.source_type!='Develop'){
// if (res.data == '打印任务已发送,等待打印机处理!') {
// this.showCommitSuccessMessage(res.data)
// const purchaseReceiptDetailPointParams = {
@@ -873,12 +878,13 @@
// uni.setStorageSync('purchaseReceiptDetailPointParams', purchaseReceiptDetailPointParams)
// } else {
// this.showErrorMessage(res.data)
- // }
+ // }
+
uni.showLoading({
title: "提交成功,将跳转到打印页面",
mask: true
- });
-
+ });
+
// 获取上架任务
let timerCount = 0
const timer1 = setInterval(async () => {
@@ -936,6 +942,9 @@
})
}, 2000)
+ }else if(that.source_type=='TOOL'||that.source_type=='Develop'){
+ uni.hideLoading()
+ this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
}
} else {
diff --git a/src/pages/purchaseReceipt/job/receiptJob.vue b/src/pages/purchaseReceipt/job/receiptJob.vue
index cd90837b..c2769bb2 100644
--- a/src/pages/purchaseReceipt/job/receiptJob.vue
+++ b/src/pages/purchaseReceipt/job/receiptJob.vue
@@ -101,6 +101,10 @@
title: {
type: String,
default: ''
+ },
+ source_type: {
+ type: String,
+ default: ''
},
},
@@ -198,7 +202,15 @@
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
- })
+ })
+ if(this.source_type){
+ filters.push({
+ column: "source_type",
+ action: "==",
+ value: this.source_type
+ })
+ }
+
var params = {
filters: filters,
@@ -298,7 +310,7 @@
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
- .operation + '&scanMessage=' + scanMessage
+ .operation + '&scanMessage=' + scanMessage + '&source_type=' + this.source_type
});
this.scanMessage = ""
},
diff --git a/src/pages/scrap/job/scrapJobDetail.vue b/src/pages/scrap/job/scrapJobDetail.vue
index 6be9eb41..bf8a9fe7 100644
--- a/src/pages/scrap/job/scrapJobDetail.vue
+++ b/src/pages/scrap/job/scrapJobDetail.vue
@@ -1,13 +1,14 @@