Browse Source

修改发料功能

wms3.0_pda
niexiting 12 months ago
parent
commit
b897fb611f
  1. 27
      common/balance.js
  2. 1
      mycomponents/qty/balanceQtyEdit.vue
  3. 1
      mycomponents/record/recordComDetailCard.vue
  4. 8
      pages/issue/coms/comScanIssuePack.vue
  5. 112
      pages/issue/job/issueDetail.vue
  6. 1
      pages/issue/js/issue.js
  7. 1
      pages/productDismantle/record/productDismantleRecord.vue
  8. 2
      static/config.json

27
common/balance.js

@ -1,4 +1,3 @@
import {
getManagementPrecision,
getBalanceByFilter
@ -38,7 +37,7 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
})
}
export function getBalanceByManagementPrecision(label, locationCode,fromInventoryStatuses, callback) {
export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) {
let result = {
list: [],
success: true,
@ -53,25 +52,25 @@ export function getBalanceByManagementPrecision(label, locationCode,fromInventor
let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) {
case 'BY_PACKAGING':
byPacking(label, locationCode,fromInventoryStatuses, res => {
byPacking(label, locationCode, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_BATCH':
byBatch(label, locationCode,fromInventoryStatuses, res => {
byBatch(label, locationCode, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_QUANTITY':
byQuantity(label, locationCode,fromInventoryStatuses, res => {
byQuantity(label, locationCode, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_UNIQUEID':
byUniqueId(label,fromInventoryStatuses, res => {
byUniqueId(label, fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
@ -90,7 +89,7 @@ export function getBalanceByManagementPrecision(label, locationCode,fromInventor
* @param {Object} locationCode
* @param {Object} callback
*/
export function byPacking(label, locationCode,fromInventoryStatuses, callback) {
export function byPacking(label, locationCode, fromInventoryStatuses, callback) {
let result = {
success: true,
message: '',
@ -117,7 +116,7 @@ export function byPacking(label, locationCode,fromInventoryStatuses, callback) {
action: "==",
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
if (fromInventoryStatuses != null && fromInventoryStatuses != "") {
filters.push({
column: "inventoryStatus",
action: "in",
@ -157,7 +156,7 @@ export function byPacking(label, locationCode,fromInventoryStatuses, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byBatch(label, locationCode,fromInventoryStatuses, callback) {
export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
var filters = []
filters.push({
column: "itemCode",
@ -175,7 +174,7 @@ export function byBatch(label, locationCode,fromInventoryStatuses, callback) {
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
if (fromInventoryStatuses != null && fromInventoryStatuses != "") {
filters.push({
column: "inventoryStatus",
action: "in",
@ -218,7 +217,7 @@ export function byBatch(label, locationCode,fromInventoryStatuses, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byQuantity(label, locationCode,fromInventoryStatuses, callback) {
export function byQuantity(label, locationCode, fromInventoryStatuses, callback) {
let result = {
success: true,
message: '',
@ -237,7 +236,7 @@ export function byQuantity(label, locationCode,fromInventoryStatuses, callback)
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
if (fromInventoryStatuses != null && fromInventoryStatuses != "") {
filters.push({
column: "inventoryStatus",
action: "in",
@ -274,7 +273,7 @@ export function byQuantity(label, locationCode,fromInventoryStatuses, callback)
* @param {Object} locationCode
* @param {Object} callback
*/
export function byUniqueId(label, locationCode,fromInventoryStatuses, callback) {
export function byUniqueId(label, locationCode, fromInventoryStatuses, callback) {
let param = {
packingNumber: label.packingNumber
};
@ -291,7 +290,7 @@ export function byUniqueId(label, locationCode,fromInventoryStatuses, callback)
value: label.packingNumber
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
if (fromInventoryStatuses != null && fromInventoryStatuses != "") {
filters.push({
column: "inventoryStatus",
action: "in",

1
mycomponents/qty/balanceQtyEdit.vue

@ -122,7 +122,6 @@
},
methods: {
openEditPopup(item, handleQty) {
debugger;
this.dataContent = item
this.inventoryStatus = this.dataContent.inventoryStatus
this.toInventoryStatus = this.dataContent.toInventoryStatus

1
mycomponents/record/recordComDetailCard.vue

@ -141,7 +141,6 @@
edit(item) {
this.editItem = item;
debugger
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty);
},

8
pages/issue/coms/comScanIssuePack.vue

@ -205,7 +205,6 @@
this.showErrorMessage('发料库位【' + fromlocation + '】不存在')
}
},
onScan(result) {
try {
let that = this;
@ -233,8 +232,7 @@
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, balanceRes => {
getBalanceByManagementPrecision(result.label, that.fromLocationCode, "OK", balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
@ -359,7 +357,7 @@
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode:label.supplierCode
supplierCode: label.supplierCode
}
return record;
},
@ -409,7 +407,7 @@
edit(item) {
this.editItem = item;
// item.balance.balanceQty = item.balance.qty;
item.balance.balanceQty=item.balance.qty;
item.balance.balanceQty = item.balance.qty;
this.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},

112
pages/issue/job/issueDetail.vue

@ -197,43 +197,36 @@
});
},
submit() {
//3.
//:XXX
// var isOutIn = getApp().globalData.feed_configList.filter(
// res => {
// if (res.name == 'feed_isOutIn') {
// return res;
// }
// });
uni.showLoading({
title: '提交中...',
mask: true
})
this.submitJob();
// this.dataContent.itemCodeList.forEach(res => {
// if (res.handleQty > res.recommendQty) {
// this.$refs.modal.showConfirmMessageModal(',?', confirm => {
// if (confirm) {
// //
// uni.showToast({
// title: ""
// })
// }
// })
// } else {
// uni.showToast({
// title: "" + res.handleQty + "][" + res.recommendQty + "]"
// })
// }
// })
},
// submit() {
//3.
//:XXX
// var isOutIn = getApp().globalData.feed_configList.filter(
// res => {
// if (res.name == 'feed_isOutIn') {
// return res;
// }
// });
// this.dataContent.itemCodeList.forEach(res => {
// if (res.handleQty > res.recommendQty) {
// this.$refs.modal.showConfirmMessageModal(',?', confirm => {
// if (confirm) {
// //
// uni.showToast({
// title: ""
// })
// }
// })
// } else {
// uni.showToast({
// title: "" + res.handleQty + "][" + res.recommendQty + "]"
// })
// }
// })
// },
submitJob() {
submit() {
uni.showLoading({
title: "提交中....",
mask: true
@ -248,13 +241,13 @@
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.submit();
this.submitJob();
} else {
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.submit();
this.submitJob();
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
@ -263,6 +256,23 @@
}
},
submitJob() {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueJobSubmit(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() {
var subList = []
var createTime = getCurrDateTime();
@ -316,24 +326,6 @@
return this.jobContent;
},
submit() {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueJobSubmit(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)
})
},
cancel() {
let that = this;
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的零件和目标库位信息?', res => {
@ -415,6 +407,14 @@
this.$refs.comMessage.showCommitSuccess();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({
url: './issueJob'
})
})
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},

1
pages/issue/js/issue.js

@ -33,7 +33,6 @@ export function createDetailInfo(location, detail) {
item.Locations.push(location);
} else {
//在库位下查找批次
debugger;
let batch = location.Batchs.find(r => r.batch == detail.batch);
if (batch == undefined) {
let batch = createBatchInfo(detail);

1
pages/productDismantle/record/productDismantleRecord.vue

@ -137,7 +137,6 @@
mounted() {},
methods: {
getScanResult(result) {
debugger
let balance = result.balance;
let label = result.label;
let pack = result.package;

2
static/config.json

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

Loading…
Cancel
Save