|
|
|
@ -611,10 +611,7 @@ export default {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
let tQuery = this.formData;
|
|
|
|
|
tQuery.status = status;
|
|
|
|
|
// if (!this.orderEditor) {
|
|
|
|
|
tQuery.subErpOrders = this.codeArray;
|
|
|
|
|
// }
|
|
|
|
|
console.log(tQuery);
|
|
|
|
|
insertStockOrderWeb(tQuery)
|
|
|
|
|
.then(response => {
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -680,14 +677,12 @@ export default {
|
|
|
|
|
this.thisData.formData = this.formData;
|
|
|
|
|
this.selectProductVisible = true;
|
|
|
|
|
let item = this.getActionItem(this.formData.billType);
|
|
|
|
|
console.log(item.mainAction + "----" + this.formData.noInvOut);
|
|
|
|
|
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true)//内部单
|
|
|
|
|
{
|
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.selectProductVisible = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.code = this.code.trim();
|
|
|
|
@ -709,7 +704,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
stockOrderDetailQueryProduct(tQuery).then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
console.log(response)
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
if (response.data.getType === "1") {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -729,35 +723,6 @@ export default {
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// let tQuery2 = {
|
|
|
|
|
// id: response.data.getId
|
|
|
|
|
// };
|
|
|
|
|
// if (this.orderEditor) {
|
|
|
|
|
// tQuery2.orderId = this.formData.id;
|
|
|
|
|
// console.log(tQuery2)
|
|
|
|
|
// addStockOrderDetailFromCodeById(tQuery2).then((response) => {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// if (response.code === 20000) {
|
|
|
|
|
// this.closeDialogC2(response);
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message.error(response.message);
|
|
|
|
|
// }
|
|
|
|
|
// }).catch(() => {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// getStockOrderDetailInstrumentById(tQuery2).then((response) => {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// if (response.code === 20000) {
|
|
|
|
|
// this.closeDialogC2(response.data);
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message.error(response.message);
|
|
|
|
|
// }
|
|
|
|
|
// }).catch(() => {
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
} else {
|
|
|
|
|
this.thisData = response.data;
|
|
|
|
|
this.thisData.code = this.code;
|
|
|
|
@ -770,7 +735,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning(response.message);
|
|
|
|
|
// this.focusNext('inputRef');
|
|
|
|
|
if (this.$isNotBlank(event)) {
|
|
|
|
|
event.target.select();
|
|
|
|
|
}
|
|
|
|
@ -786,7 +750,6 @@ export default {
|
|
|
|
|
this.thisData = {};
|
|
|
|
|
|
|
|
|
|
if (this.$isNotBlank(rData)) {
|
|
|
|
|
console.log(rData);
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
rData.forEach((obj, index) => {
|
|
|
|
|
if (this.codeArray.length === 0) {
|
|
|
|
@ -799,40 +762,7 @@ export default {
|
|
|
|
|
this.currentRow = this.codeArray[0];
|
|
|
|
|
this.selectedIndex = 0;
|
|
|
|
|
this.focusNext('iCount');
|
|
|
|
|
|
|
|
|
|
// this.closeConfirmFunction(true);
|
|
|
|
|
}
|
|
|
|
|
// if (this.orderEditor) {
|
|
|
|
|
// this.getStockOrderDetailList();
|
|
|
|
|
// if (this.$isNotBlank(rData)) {
|
|
|
|
|
// this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
|
|
|
|
|
// this.currentRow = this.codeArray[0];
|
|
|
|
|
// this.selectedIndex = 0;
|
|
|
|
|
// this.focusNext('iCount');
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// if (this.$isNotBlank(rData)) {
|
|
|
|
|
// // for (let i = 0; i < this.codeArray.length; i++) {
|
|
|
|
|
// // if (this.codeArray[i].productId === rData.productId) {
|
|
|
|
|
// // this.$alert("已添加", '提示', {
|
|
|
|
|
// // confirmButtonText: '确定',
|
|
|
|
|
// // type: 'warning',
|
|
|
|
|
// // closeOnClickModal: true,
|
|
|
|
|
// // callback: action => {
|
|
|
|
|
// // this.$refs.inputRef.focus();
|
|
|
|
|
// // }
|
|
|
|
|
// // });
|
|
|
|
|
// // break;
|
|
|
|
|
// // }
|
|
|
|
|
// // if (i + 1 === this.codeArray.length) {
|
|
|
|
|
// // this.codeArray.push(rData);
|
|
|
|
|
// // this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
|
|
|
|
|
// // this.currentRow = this.codeArray[0];
|
|
|
|
|
// // this.selectedIndex = 0;
|
|
|
|
|
// // }
|
|
|
|
|
// // }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
rowChange(val) {
|
|
|
|
|
this.currentRow = val;
|
|
|
|
@ -840,23 +770,8 @@ export default {
|
|
|
|
|
this.iCount = val.reCount;
|
|
|
|
|
|
|
|
|
|
this.focusNext('iCount');
|
|
|
|
|
|
|
|
|
|
// let sc = this.selectedIndex + 'reCount';
|
|
|
|
|
// const _this = this;
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// setTimeout(function() {
|
|
|
|
|
// console.log(sc);
|
|
|
|
|
// console.log(_this.$refs[sc]);
|
|
|
|
|
// console.log(_this.$refs[sc].focus());
|
|
|
|
|
// _this.$refs[sc].focus();
|
|
|
|
|
// }, 1)
|
|
|
|
|
// // this.$refs['inputBatchNoRef'][0].focus()
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
iCountChange() {
|
|
|
|
|
// console.log(this.iCount)
|
|
|
|
|
// this.currentRow.count = this.iCount;
|
|
|
|
|
// this.currentRow.reCount = this.iCount;
|
|
|
|
|
},
|
|
|
|
|
iCountEnterFunction() {
|
|
|
|
|
if (this.$isNotBlank(this.currentRow)) {
|
|
|
|
@ -867,7 +782,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
tableCountChange(row) {
|
|
|
|
|
if (this.$isNotBlank(row)) {
|
|
|
|
|
// row.count = row.reCount;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
tableRowClassName({row, rowIndex}) {
|
|
|
|
@ -889,7 +803,6 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
getBasicUnitMaintains2(tQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.sLoading = false;
|
|
|
|
|
this.sOptions = response.data.list;
|
|
|
|
|
})
|
|
|
|
@ -1110,7 +1023,6 @@ export default {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
stockOrderDetail(this.query) //查找该单号下的所有条码
|
|
|
|
|
.then((response) => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
this.codeArray = response.data.list || [];
|
|
|
|
|
this.total = response.data.total || 0;
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -1176,7 +1088,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
findStorageMethod(query) {
|
|
|
|
|
console.log(query);
|
|
|
|
|
this.fromStorageOptions = [];
|
|
|
|
|
let cQuery = {
|
|
|
|
|
key: query,
|
|
|
|
|