Browse Source

修改提示

wms3.0_pda
lijuncheng 1 year ago
parent
commit
8d19082840
  1. 2
      pages/count/job/countDetail.vue
  2. 2
      pages/count/record/countRecord.vue
  3. 2
      pages/customerReturn/job/returnDetail.vue
  4. 166
      pages/customerReturn/record/returnRecord.vue
  5. 2
      pages/deliver/job/deliverDetail.vue
  6. 133
      pages/deliver/record/deliverRecord.vue
  7. 2
      pages/inventoryMove/job/inventoryMoveDetail.vue
  8. 4
      pages/issue/record/issueRecord.vue
  9. 2
      pages/issue/request/issueRequestSubmit.vue
  10. 2
      pages/package/record/mergePackageRecord.vue
  11. 2
      pages/package/record/mergePackageRecord.vue.b17252
  12. 2
      pages/package/record/mergePackageRecord.vue.y17252
  13. 2
      pages/package/record/overPackageRecord.vue
  14. 2
      pages/package/record/splitPackageRecord.vue
  15. 2
      pages/productDismantle/job/productDismantleDetail.vue
  16. 2
      pages/productDismantle/record/productDismantleRecord.vue
  17. 2
      pages/productPutaway/job/productPutawayDetail.vue
  18. 108
      pages/productPutaway/record/productPutawayRecord.vue
  19. 2
      pages/productReceipt/job/productReceiptDetail.vue
  20. 2
      pages/productReceipt/record/productReceiptRecord.vue
  21. 2
      pages/productionReceipt/job/productionReceiptDetail.vue
  22. 2
      pages/productionReceipt/record/productionReceiptRecord.vue
  23. 192
      pages/productionReturn/coms/comReturn.vue
  24. 2
      pages/productionReturn/job/returnDetail.vue
  25. 9
      pages/productionReturn/record/returnToHold.vue
  26. 10
      pages/productionReturn/record/returnToStore.vue
  27. 9
      pages/purchaseReturn/coms/comReturnJobCard.vue
  28. 8
      pages/purchaseReturn/job/returnDetail.vue
  29. 2
      pages/putaway/job/putawayDetail.vue
  30. 4
      pages/putaway/record/putawayRecord.vue
  31. 2
      pages/repleinsh/job/repleinshDetail.vue
  32. 4
      pages/repleinsh/record/repleinshRecord.vue
  33. 2
      pages/scrap/job/scrapJobDetail.vue
  34. 4
      pages/scrap/record/scrapRecord.vue
  35. 4
      pages/transfer/coms/comTransferRecord.vue
  36. 2
      pages/transfer/job/issueDetail.vue
  37. 2
      pages/transfer/job/receiptDetail.vue
  38. 2
      pages/transfer/job/transferDetail.vue
  39. 2
      pages/unPlanned/job/issueJobDetail.vue
  40. 2
      pages/unPlanned/job/receiptJobDetail.vue
  41. 4
      pages/unPlanned/record/issueRecord.vue
  42. 112
      pages/unPlanned/record/receiptRecord.vue
  43. 2
      static/config.json

2
pages/count/job/countDetail.vue

@ -498,7 +498,7 @@
// // if (res.data) { // // if (res.data) {
// // this.showCommitSuccessMessage("<br>" + res.data.Number, ) // // this.showCommitSuccessMessage("<br>" + res.data.Number, )
// // } else { // // } else {
// // this.showErrorMessage("") // // this.showErrorMessage("[" + res.msg + "]")
// // } // // }
// // uni.hideLoading() // // uni.hideLoading()
// // }).catch(error => { // // }).catch(error => {

2
pages/count/record/countRecord.vue

@ -397,7 +397,7 @@
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/customerReturn/job/returnDetail.vue

@ -371,7 +371,7 @@
// this.showCommitSuccessMessage("" + hint) // this.showCommitSuccessMessage("" + hint)
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

166
pages/customerReturn/record/returnRecord.vue

@ -17,7 +17,7 @@
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer"> <view class="page-footer">
@ -51,9 +51,14 @@
getInventoryStatusDesc, getInventoryStatusDesc,
getDirectoryItemArray getDirectoryItemArray
} from '@/common/directory.js'; } from '@/common/directory.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import { import {
goHome, goHome,
updateTitle updateTitle,
getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -109,12 +114,15 @@
allowModifyLocation: false, allowModifyLocation: false,
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
fromType :"" fromType :"",
showToLoaction:true
}; };
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType this.fromType = option.fromType
if(this.fromType=="requestType"){ updateTitle("客户退货申请") }else { updateTitle("客户退货记录") } if(this.fromType=="requestType"){ updateTitle("客户退货申请")
this.showToLoaction = false; }else { updateTitle("客户退货记录")
this.showToLoaction = true; }
var typeCode = "Customerreturn" var typeCode = "Customerreturn"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -255,95 +263,97 @@
}, },
commit() { commit() {
if (this.toLocationCode == "") { if (this.showToLoaction &&this.toLocationCode == "") {
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
return; return;
} }
//
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
var params = this.setParams(); if(this.fromType=="requestType"){
console.log("提交" + JSON.stringify(params)) var params = this.setParams(false)
// (this.id, params).then(res => { console.log("提交" + JSON.stringify(params))
// uni.hideLoading() // putawayRequestSubmit(params).then(res => {
// if (res.data) { // uni.hideLoading()
// var hint = res.data.Number; // if (res.data) {
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// } else { // this.showErrorMessage("[" + res.msg + "]")
// this.showErrorMessage("") // }
// } // }).catch(error => {
// }).catch(error => { // uni.hideLoading()
// uni.hideLoading() // this.showErrorMessage(error)
// this.showErrorMessage(error) // })
// }) }else {
//
}, var itemCodes = []
this.detailSource.forEach(item => {
setParams() { itemCodes.push(item.itemCode)
var params = { })
requestNumber: this.jobContent.requestNumber, //
jobNumber: "", getManagementPrecisions(itemCodes, this.toLocationCode, res => {
asnNumber: this.jobContent.asnNumber, if (res.success) {
ppNumber: this.jobContent.ppNumber, this.managementList = res.list;
supplierCode: this.jobContent.supplierCode, var params = this.setParams(true)
ReceiptDock: this.jobContent.ReceiptDock, console.log("提交参数", JSON.stringify(params));
carrierCode: this.jobContent.carrierCode,
transferMode: this.jobContent.transferMode, // putawayRecordSubmit(params).then(res => {
vehiclePlateNumber: this.jobContent.vehiclePlateNumber, // uni.hideLoading()
fromWarehouseCode: this.toLocationInfo.WarehouseCode, // if (res.data) {
toWarehouseCode: this.toLocationInfo.WarehouseCode, // this.showCommitSuccessMessage("<br>" + res.data, )
OutTransaction: this.businessType.OutTransactionType, // // } else {
InTransaction: this.businessType.InTransactionType, // // this.showErrorMessage("[" + res.msg + "]")
executeTime: "2023-08-4 16:30:11", // // }
activeDate: "2023-08-4 16:30:11", // // }).catch(error => {
available: "1", // 0,1 // uni.hideLoading()
requestTime: this.jobContent.requestTime, // this.showErrorMessage(error)
dueTime: "2023-08-4 16:30:11", // // })
departmentCode: this.jobContent.departmentCode, } else {
UserPositionCode: "", // uni.hideLoading();
interfaceType: "jklxPURCHASE_RECEIPT", // this.showErrorMessage(res.message);
Number: this.jobContent.Number, }
businessType: this.jobContent.businessType, });
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
subList: [
],
} }
this.detailSource.forEach(res => { },
res.subList.forEach(res1 => {
if (res1.scaned) { setParams(queryModel) {
res1.record.FromLocationGroupCode = ""; var subList = []
res1.record.FromAreaCode = ""; var creator = this.$store.state.user.id
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode; this.detailSource.forEach(item => {
res1.record.ToAreaCode = this.toLocationInfo.AreaCode; item.subList.forEach(detail => {
res1.record.VisualInspectResult = ""; // if (detail.scaned) {
res1.record.VisualInspectPhotos = ""; // // var subItem = {};
res1.record.FailedReason = ""; // // Object.assign(subItem, detail)
res1.record.MassDefect = ""; // if (queryModel) {
res1.record.SinglePrice = ""; // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
res1.record.Amount = ""; // detail.packingNumber, detail.batch);
res1.record.Code = ""; detail.toPackingNumber = info.packingNumber;;
res1.record.JobDetailID = res1.record.id; detail.toContainerNumber = detail.containerNumber
res1.record.interfaceType = "jklxPURCHASE_RECEIPT"; detail.toBatch = info.batch;
params.subList.push(res1.record) detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
} else {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
}
subList.push(detail)
} }
}) })
}) })
this.jobContent.subList = subList
return params; this.jobContent.creator = creator;
return this.jobContent;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) {} if (res) {}

2
pages/deliver/job/deliverDetail.vue

@ -377,7 +377,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

133
pages/deliver/record/deliverRecord.vue

@ -120,17 +120,15 @@
businessType: {}, businessType: {},
customerList: [], customerList: [],
customer: "", customer: "",
fromType: "" fromType: "",
showToLoaction: true
}; };
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType this.fromType = option.fromType
if (this.fromType == "requestType") { this.updateTitle();
updateTitle("制品发货申请")
} else { var typeCode = "DeliverRequest"
updateTitle("制品发货记录")
}
var typeCode = "Deliver"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
@ -168,6 +166,15 @@
mounted() {}, mounted() {},
methods: { methods: {
updateTitle() {
if (this.fromType == "requestType") {
updateTitle("制品发货申请")
} else {
updateTitle("制品发货记录")
}
},
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
@ -283,81 +290,56 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => { if (this.fromType == "requestType") {
// uni.hideLoading() // deliverRequestSubmit(params).then(res => {
// if (res.data) { // uni.hideLoading()
// var hint = res.data.Number; // if (res.data) {
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// } else { // this.showErrorMessage("[" + res.msg + "]")
// this.showErrorMessage("") // }
// } // }).catch(error => {
// }).catch(error => { // uni.hideLoading()
// uni.hideLoading() // this.showErrorMessage(error)
// this.showErrorMessage(error) // })
// }) } else {
// deliverRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
}
}, },
setParams() { setParams() {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, var creator = this.$store.state.user.id
jobNumber: "", this.detailSource.forEach(item => {
asnNumber: this.jobContent.asnNumber, item.subList.forEach(detail => {
ppNumber: this.jobContent.ppNumber, if (detail.scaned) {
supplierCode: this.jobContent.supplierCode, // var subItem = {};
receiptDock: this.jobContent.receiptDock, // Object.assign(subItem, detail)
carrierCode: this.jobContent.carrierCode, detail.toPackingNumber = detail.packingNumber;
transferMode: this.jobContent.transferMode, detail.toContainerNumber = detail.containerNumber
vehiclePlateNumber: this.jobContent.vehiclePlateNumber, detail.toBatch = detail.toBatch;
fromWarehouseCode: this.toLocationInfo.WarehouseCode, detail.toInventoryStatus = detail.inventoryStatus
toWarehouseCode: this.toLocationInfo.WarehouseCode, detail.toLocationCode = ""
OutTransaction: this.businessTypeInfo.OutTransactionType, //
InTransaction: this.businessTypeInfo.InTransactionType, // subList.push(detail)
executeTime: "2023-08-4 16:30:11", //
activeDate: "2023-08-4 16:30:11", //
available: "1", // 0,1
requestTime: this.jobContent.requestTime,
dueTime: "2023-08-4 16:30:11", //
departmentCode: this.jobContent.departmentCode,
UserPositionCode: "", //
interfaceType: "jklxPURCHASE_RECEIPT", //
Number: this.jobContent.Number,
businessType: this.jobContent.businessType,
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
subList: [
],
}
this.detailSource.forEach(res => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.subList.push(res1.record)
} }
}) })
}) })
this.jobContent.subList = subList
return params; this.jobContent.creator = creator;
return this.jobContent;
}, },
showMessage(message) { showMessage(message) {
@ -400,7 +382,6 @@
}) })
return return
} }
this.ToLocationCodeInfo = location;
this.toLocationCode = code; this.toLocationCode = code;
}, },

2
pages/inventoryMove/job/inventoryMoveDetail.vue

@ -333,7 +333,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data) // this.showCommitSuccessMessage("<br>" + res.data)
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

4
pages/issue/record/issueRecord.vue

@ -172,7 +172,7 @@
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料申请" + res.data) this.showCommitSuccessMessage("提交成功<br>生成发料申请" + res.data)
} else { } else {
this.showErrorMessage("提交失败" + res.msg) this.showErrorMessage("提交失败[" + res.msg + "]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
@ -186,7 +186,7 @@
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录" + res.data) this.showCommitSuccessMessage("提交成功<br>生成发料记录" + res.data)
} else { } else {
this.showErrorMessage("提交失败" + res.msg) this.showErrorMessage("提交失败[" + res.msg + "]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

2
pages/issue/request/issueRequestSubmit.vue

@ -164,7 +164,7 @@
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料申请" + res.data) this.showCommitSuccessMessage("提交成功<br>生成发料申请" + res.data)
} else { } else {
this.showErrorMessage("提交失败" + res.msg) this.showErrorMessage("提交失败[" + res.msg + "]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

2
pages/package/record/mergePackageRecord.vue

@ -255,7 +255,7 @@
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/package/record/mergePackageRecord.vue.b17252

@ -250,7 +250,7 @@
// this.showCommitSuccessMessage("提交成功" + hint, ) // this.showCommitSuccessMessage("提交成功" + hint, )
// } else { // } else {
// this.showErrorMessage("提交失败") // this.showErrorMessage("提交失败[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/package/record/mergePackageRecord.vue.y17252

@ -254,7 +254,7 @@
// this.showCommitSuccessMessage("提交成功" + hint, ) // this.showCommitSuccessMessage("提交成功" + hint, )
// } else { // } else {
// this.showErrorMessage("提交失败") // this.showErrorMessage("提交失败[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/package/record/overPackageRecord.vue

@ -279,7 +279,7 @@
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/package/record/splitPackageRecord.vue

@ -279,7 +279,7 @@
// this.showCommitSuccessMessage("" + hint, ) // this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/productDismantle/job/productDismantleDetail.vue

@ -356,7 +356,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data.Number, ) // this.showCommitSuccessMessage("<br>" + res.data.Number, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// uni.hideLoading() // uni.hideLoading()
// }).catch(error => { // }).catch(error => {

2
pages/productDismantle/record/productDismantleRecord.vue

@ -246,7 +246,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/productPutaway/job/productPutawayDetail.vue

@ -388,7 +388,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data) // this.showCommitSuccessMessage("<br>" + res.data)
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

108
pages/productPutaway/record/productPutawayRecord.vue

@ -18,7 +18,7 @@
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer"> <view class="page-footer">
@ -49,7 +49,12 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
updateTitle,
getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import { import {
getInventoryStatusDesc, getInventoryStatusDesc,
@ -109,10 +114,13 @@
allowModifyLocation: false, allowModifyLocation: false,
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {} businessType: {},
showToLoaction:true
}; };
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType;
this.updateTitle();
var typeCode = "ProductPutaway" var typeCode = "ProductPutaway"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -124,6 +132,7 @@
this.$refs.comMessage.showBreakMessage(res.message ); this.$refs.comMessage.showBreakMessage(res.message );
} }
}); });
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@ -139,6 +148,16 @@
mounted() { mounted() {
}, },
methods: { methods: {
updateTitle(){
if(this.fromType=="requestType"){
this.showToLoaction=false
updateTitle("制品上架申请")
}else {
updateTitle("制品上架记录")
this.showToLoaction=true
}
},
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
@ -237,47 +256,96 @@
}, },
commit() { commit() {
if (this.toLocationCode == "") { if (this.showToLoaction &&this.toLocationCode == "") {
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
return; return;
} }
//
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setParams(false)
console.log("提交" + JSON.stringify(params))
// productPutawayRequestSubmit(params).then(res => { // productPutawayRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // this.showErrorMessage(error)
// }) // })
}else { }else {
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
//
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams(true)
console.log("提交参数", JSON.stringify(params));
// productPutawayRecordSubmit(params).then(res => { // productPutawayRecordSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage(""+res.msg)
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // this.showErrorMessage(error)
// }) // })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
} }
}, },
setParams(queryModel) {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var subItem = {};
// Object.assign(subItem, detail)
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
} else {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
}
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
},
showMessage(message) { showMessage(message) {

2
pages/productReceipt/job/productReceiptDetail.vue

@ -337,7 +337,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/productReceipt/record/productReceiptRecord.vue

@ -237,7 +237,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/productionReceipt/job/productionReceiptDetail.vue

@ -381,7 +381,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data) // this.showCommitSuccessMessage("<br>" + res.data)
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/productionReceipt/record/productionReceiptRecord.vue

@ -244,7 +244,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

192
pages/productionReturn/coms/comReturn.vue

@ -17,7 +17,7 @@
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation title="目标库位" :locationCode="toLocationCode" :isShowEdit="true" <requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" :isShowEdit="true"
:locationTypeList="tolocationTypeList"></requiredLocation> :locationTypeList="tolocationTypeList"></requiredLocation>
<u-line></u-line> <u-line></u-line>
@ -48,7 +48,9 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome goHome,
updateTitle,
getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -61,6 +63,9 @@
createDetailInfo, createDetailInfo,
calcHandleQty calcHandleQty
} from '@/common/record.js'; } from '@/common/record.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
@ -99,6 +104,17 @@
}, },
watch: {
fromType: {
handler(newName, oldName) {
this.updateTitle()
},
immediate: true,
deep: true
}
},
data() { data() {
return { return {
id: '', id: '',
@ -113,6 +129,7 @@
toLocationCode: '', toLocationCode: '',
tolocationTypeList: [], tolocationTypeList: [],
businessType: {}, businessType: {},
showToLoaction:false
}; };
}, },
@ -135,7 +152,10 @@
this.$refs.comMessage.showBreakMessage(res.message); this.$refs.comMessage.showBreakMessage(res.message);
} }
}); });
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
@ -150,6 +170,25 @@
}, },
methods: { methods: {
updateTitle(){
if(this.businessTypeCode=='returnToStore'){
if(this.fromType == 'requestType'){
updateTitle("合格退料申请")
this.showToLoaction=false
}else {
updateTitle("合格退料记录")
this.showToLoaction=true
}
}else if(this.businessTypeCode=='returnToHold'){
if(this.fromType == 'requestType'){
updateTitle("隔离退料申请")
this.showToLoaction=false
}else {
updateTitle("隔离退料记录")
this.showToLoaction=true
}
}
},
showFromLocationPopup() { showFromLocationPopup() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.scanFromLocationCode.openScanPopup(); this.$refs.scanFromLocationCode.openScanPopup();
@ -208,7 +247,6 @@
}, },
removePack() { removePack() {
for (var i = 0; i < this.detailSource.length; i++) { for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i]; var item = this.detailSource[i];
@ -236,103 +274,97 @@
}, },
commit() { commit() {
if (this.toLocationCode == "") { if (this.showToLoaction &&this.toLocationCode == "") {
this.showMessage("请先选择目标库位") this.showMessage("请先选择目标库位")
return; return;
} }
//
if (this.jobContent.allowPartialComplete == "TRUE") { uni.showLoading({
uni.showLoading({ title: "提交中....",
title: "提交中....", mask: true
mask: true });
});
if(this.fromType=="requestType"){
var params = this.setParams(); var params = this.setParams(false)
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => { // productionReturnRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// var hint = res.data.Number; // this.showCommitSuccessMessage("<br>" + res.data, )
// this.showCommitSuccessMessage("" + hint, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // this.showErrorMessage(error)
// }) // })
} else { }else {
this.calcScanCount(); //
if (this.scanCount < this.subList.length) { var itemCodes = []
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length + this.detailSource.forEach(item => {
"]"); itemCodes.push(item.itemCode)
} })
//
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams(true)
console.log("提交参数", JSON.stringify(params));
// productionReturnRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, )
// } else {
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
} }
}, },
setParams() { setParams(queryModel) {
var params = { var subList = []
requestNumber: this.jobContent.requestNumber, var creator = this.$store.state.user.id
jobNumber: "", this.detailSource.forEach(item => {
asnNumber: this.jobContent.asnNumber, item.subList.forEach(detail => {
ppNumber: this.jobContent.ppNumber, if (detail.scaned) {
supplierCode: this.jobContent.supplierCode, // var subItem = {};
ReceiptDock: this.jobContent.ReceiptDock, // Object.assign(subItem, detail)
carrierCode: this.jobContent.carrierCode, if (queryModel) {
transferMode: this.jobContent.transferMode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
vehiclePlateNumber: this.jobContent.vehiclePlateNumber, detail.packingNumber, detail.batch);
fromWarehouseCode: this.toLocationInfo.WarehouseCode, detail.toPackingNumber = info.packingNumber;;
toWarehouseCode: this.toLocationInfo.WarehouseCode, detail.toContainerNumber = detail.containerNumber
OutTransaction: this.businessType.OutTransactionType, // detail.toBatch = info.batch;
InTransaction: this.businessType.InTransactionType, // detail.toInventoryStatus = detail.inventoryStatus
executeTime: "2023-08-4 16:30:11", // detail.toLocationCode = this.toLocationCode
activeDate: "2023-08-4 16:30:11", // } else {
available: "1", // 0,1 detail.toPackingNumber = detail.packingNumber;
requestTime: this.jobContent.requestTime, detail.toContainerNumber = detail.containerNumber
dueTime: "2023-08-4 16:30:11", // detail.toBatch = detail.toBatch;
departmentCode: this.jobContent.departmentCode, detail.toInventoryStatus = detail.inventoryStatus
UserPositionCode: "", // detail.toLocationCode = ""
interfaceType: "jklxPURCHASE_RECEIPT", // }
Number: this.jobContent.Number,
businessType: this.jobContent.businessType, subList.push(detail)
remark: this.jobContent.remark,
creationTime: this.jobContent.creationTime,
Creatorld: this.jobContent.Creatorld,
creatorName: this.jobContent.creatorName,
extraProperties: this.jobContent.extraProperties,
Siteld: this.jobContent.Siteld,
Code: "",
subList: [
],
}
this.detailSource.forEach(res => {
res.subList.forEach(res1 => {
if (res1.scaned) {
res1.record.FromLocationGroupCode = "";
res1.record.FromAreaCode = "";
res1.record.ToLocationGroupCode = this.toLocationInfo.LocationGroupCode;
res1.record.ToAreaCode = this.toLocationInfo.AreaCode;
res1.record.VisualInspectResult = ""; //
res1.record.VisualInspectPhotos = ""; //
res1.record.FailedReason = ""; //
res1.record.MassDefect = ""; //
res1.record.SinglePrice = ""; //
res1.record.Amount = ""; //
res1.record.Code = "";
res1.record.JobDetailID = res1.record.id;
res1.record.interfaceType = "jklxPURCHASE_RECEIPT";
params.subList.push(res1.record)
} }
}) })
}) })
this.jobContent.subList = subList
return params; this.jobContent.creator = creator;
return this.jobContent;
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus(); this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {

2
pages/productionReturn/job/returnDetail.vue

@ -365,7 +365,7 @@
// this.showCommitSuccessMessage("" + hint) // this.showCommitSuccessMessage("" + hint)
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

9
pages/productionReturn/record/returnToHold.vue

@ -1,11 +1,11 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<com-return returnType="returnToHold"> </com-return> <comReturn businessTypeCode="returnToHold" :fromType ="fromType"> </comReturn>
</view> </view>
</template> </template>
<script> <script>
import comReturn from '@/pages/productionreturn/coms/comReturn.vue' import comReturn from '@/pages/productionReturn/coms/comReturn.vue'
export default { export default {
components: { components: {
@ -21,8 +21,9 @@
} }
}, },
onLoad(optins) { onLoad(option) {
this.fromType=optins.fromType this.fromType=option.fromType
console.log("申请类型",this.fromType)
}, },
methods: { methods: {

10
pages/productionReturn/record/returnToStore.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comReturn businessTypeCode="returnToStore"> </comReturn> <comReturn businessTypeCode="returnToStore" :fromType ="fromType"> </comReturn>
</view> </view>
</template> </template>
@ -16,11 +16,15 @@
return { return {
settingParam: { settingParam: {
} },
fromType:""
} }
}, },
onLoad() {}, onLoad(option) {
this.fromType=option.fromType
console.log("申请类型",this.fromType)
},
methods: { methods: {
} }

9
pages/purchaseReturn/coms/comReturnJobCard.vue

@ -11,14 +11,7 @@
<view class="task_item"> <view class="task_item">
<view class="task_text"> <view class="task_text">
<view class=""> <view class="">
供应商 : {{dataContent.supplierName}} 供应商 : {{dataContent.supplierCode}}
</view>
</view>
</view>
<view class="task_item">
<view class="task_text">
<view class="">
物品代码 : {{dataContent.itemCode}}
</view> </view>
</view> </view>
</view> </view>

8
pages/purchaseReturn/job/returnDetail.vue

@ -5,7 +5,7 @@
发货单{{jobContent.asnNumber}} 发货单{{jobContent.asnNumber}}
</view> </view>
<view class="" style="font-size: 35rpx;margin-top: 20rpx;margin-left: 10rpx;"> <view class="" style="font-size: 35rpx;margin-top: 20rpx;margin-left: 10rpx;">
供应商{{jobContent.supplierName}} 供应商{{jobContent.supplierCode}}
</view> </view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line> <u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
</view> </view>
@ -341,6 +341,12 @@
// detail.packingNumber, detail.batch); // detail.packingNumber, detail.batch);
// detail.toPackingNumber = info.packingNumber; // detail.toPackingNumber = info.packingNumber;
// detail.toBatch = info.batch; // detail.toBatch = info.batch;
detail.singlePrice = detail.balance.singlePrice;
detail.amount = detail.balance.singlePrice * detail.handleQty;
detail.arriveDate = detail.balance.arriveDate;
detail.produceDate = detail.balance.produceDate;
detail.expireDate = detail.balance.expireDate;
subList.push(detail) subList.push(detail)
} }
}) })

2
pages/putaway/job/putawayDetail.vue

@ -403,7 +403,7 @@
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data) this.showCommitSuccessMessage("提交成功<br>生成采购收货记录" + res.data)
} else { } else {
this.showErrorMessage("提交失败" + res.msg) this.showErrorMessage("提交失败[" + res.msg + "]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

4
pages/putaway/record/putawayRecord.vue

@ -268,7 +268,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -292,7 +292,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/repleinsh/job/repleinshDetail.vue

@ -382,7 +382,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

4
pages/repleinsh/record/repleinshRecord.vue

@ -264,7 +264,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -276,7 +276,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/scrap/job/scrapJobDetail.vue

@ -298,7 +298,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data ) // this.showCommitSuccessMessage("<br>" + res.data )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

4
pages/scrap/record/scrapRecord.vue

@ -272,7 +272,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -284,7 +284,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

4
pages/transfer/coms/comTransferRecord.vue

@ -264,7 +264,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -277,7 +277,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/transfer/job/issueDetail.vue

@ -383,7 +383,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data.Number ) // this.showCommitSuccessMessage("<br>" + res.data.Number )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// uni.hideLoading() // uni.hideLoading()
// }).catch(error => { // }).catch(error => {

2
pages/transfer/job/receiptDetail.vue

@ -359,7 +359,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data.Number, ) // this.showCommitSuccessMessage("<br>" + res.data.Number, )
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// uni.hideLoading() // uni.hideLoading()
// }).catch(error => { // }).catch(error => {

2
pages/transfer/job/transferDetail.vue

@ -390,7 +390,7 @@
this.showCommitSuccessMessage("提交成功" + hint, ) this.showCommitSuccessMessage("提交成功" + hint, )
} else { } else {
this.showErrorMessage("提交失败") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

2
pages/unPlanned/job/issueJobDetail.vue

@ -293,7 +293,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data ) // this.showCommitSuccessMessage("<br>" + res.data )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

2
pages/unPlanned/job/receiptJobDetail.vue

@ -304,7 +304,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data) // this.showCommitSuccessMessage("<br>" + res.data)
// } else { // } else {
// this.showErrorMessage("") // this.showErrorMessage("[" + res.msg + "]")
// } // }
// uni.hideLoading() // uni.hideLoading()
// }).catch(error => { // }).catch(error => {

4
pages/unPlanned/record/issueRecord.vue

@ -230,7 +230,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
@ -242,7 +242,7 @@
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()

112
pages/unPlanned/record/receiptRecord.vue

@ -22,7 +22,7 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationTypeList="tolocationTypeList"></requiredLocation>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
@ -67,7 +67,12 @@
import { import {
goHome, goHome,
updateTitle, updateTitle,
getPackingNumberAndBatch
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
export default { export default {
@ -94,7 +99,8 @@
businessTypeCode: "UnplannedReceipt", businessTypeCode: "UnplannedReceipt",
reason: "", reason: "",
reasonList: [], reasonList: [],
fromType: "" fromType: "",
showToLoaction:true
} }
}, },
@ -114,14 +120,19 @@
onLoad(option) { onLoad(option) {
this.fromType = option.fromType this.fromType = option.fromType
if (this.fromType == "requestType") { this.updateTitle();
updateTitle("计划外入库申请")
} else {
updateTitle("计划外入库记录")
}
}, },
methods: { methods: {
updateTitle(){
if (this.fromType == "requestType") {
updateTitle("计划外入库申请")
this.showToLoaction =false
} else {
updateTitle("计划外入库记录")
this.showToLoaction =true
}
},
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
}, },
@ -183,10 +194,10 @@
detail.scaned = true; detail.scaned = true;
// Object.assign(detail, label) // Object.assign(detail, label)
detail.qty = Number(label.qty) detail.qty = Number(label.qty)
detail.inventoryStatus = "kcztOK" detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty; detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit; detail.stdPackUnit = pack.stdPackUnit;
label.inventoryStatus = "kcztOK"; label.inventoryStatus = "OK";
detail.package = pack; detail.package = pack;
detail.label = label; detail.label = label;
return detail; return detail;
@ -228,8 +239,8 @@
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
}, },
commit() { commit() {
if (this.toLocationCode == '') { if (this.showToLoaction &&this.toLocationCode == "") {
this.showErrorMessage("请扫描目标库位") this.showErrorMessage("请先选择目标库位")
return; return;
} }
if (this.reason == '') { if (this.reason == '') {
@ -238,33 +249,84 @@
} }
if(this.fromType=="requestType"){ if(this.fromType=="requestType"){
var params = this.setParams(false)
console.log("提交" + JSON.stringify(params))
// unPlannedReceiptRequestbSubmit(params).then(res => { // unPlannedReceiptRequestbSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage("[" + res.msg + "]")
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // this.showErrorMessage(error)
// }) // })
}else { }else {
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
//
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams(true)
console.log("提交参数", JSON.stringify(params));
// unPlannedReceiptRecordbSubmit(params).then(res => { // unPlannedReceiptRecordbSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data, )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage(""+res.msg)
// } // }
// }).catch(error => { // }).catch(error => {
// uni.hideLoading() // uni.hideLoading()
// this.showErrorMessage(error) // this.showErrorMessage(error)
// }) // })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
} }
} },
setParams(queryModel) {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
// var subItem = {};
// Object.assign(subItem, detail)
if (queryModel) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
} else {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
}
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
},
} }
} }
</script> </script>

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.157:12080/admin-api", "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2":"http://192.168.0.157:12080/admin-api", "dev2":"http://192.168.0.157:12080/admin-api",
"dev":"http://dev.ccwin-in.com:25100/api/admin-api", "dev":"http://dev.ccwin-in.com:25100/api/admin-api",
"local":"http://localhost:12080", "local":"http://localhost:12080",

Loading…
Cancel
Save