|
|
@ -560,9 +560,9 @@ export default {
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
|
|
|
|
// if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
|
|
|
|
return this.$message.error('生产日期与失效日期不能全部为空');
|
|
|
|
// return this.$message.error('生产日期与失效日期不能全部为空');
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -740,7 +740,6 @@ export default {
|
|
|
|
selectProductFunction(event) {
|
|
|
|
selectProductFunction(event) {
|
|
|
|
|
|
|
|
|
|
|
|
if (event == null) {
|
|
|
|
if (event == null) {
|
|
|
|
// this.$refs.inputRef.focus();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
event.target.select();
|
|
|
|
event.target.select();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -771,12 +770,14 @@ export default {
|
|
|
|
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) {
|
|
|
|
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) {
|
|
|
|
this.invQueryData = {
|
|
|
|
this.invQueryData = {
|
|
|
|
locStorageCode: this.formData.locStorageCode,
|
|
|
|
locStorageCode: this.formData.locStorageCode,
|
|
|
|
|
|
|
|
invWarehouseCode: this.formData.invWarehouseCode,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
} else if (item.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) {
|
|
|
|
} else if (item.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) {
|
|
|
|
|
|
|
|
|
|
|
|
this.invQueryData = {
|
|
|
|
this.invQueryData = {
|
|
|
|
locStorageCode: this.formData.corpId,
|
|
|
|
locStorageCode: this.formData.corpId,
|
|
|
|
|
|
|
|
invWarehouseCode: this.formData.fromSubInvCode,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -800,7 +801,6 @@ export default {
|
|
|
|
code: this.code,
|
|
|
|
code: this.code,
|
|
|
|
customerId: store.getters.customerId,
|
|
|
|
customerId: store.getters.customerId,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
stockOrderDetailQueryProduct(tQuery).then((response) => {
|
|
|
|
stockOrderDetailQueryProduct(tQuery).then((response) => {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
if (response.code === 20000) {
|
|
|
|
if (response.code === 20000) {
|
|
|
@ -835,12 +835,9 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.warning(response.message);
|
|
|
|
this.$message.warning(response.message);
|
|
|
|
// this.focusNext('inputRef');
|
|
|
|
|
|
|
|
if (this.$isNotBlank(event)) {
|
|
|
|
if (this.$isNotBlank(event)) {
|
|
|
|
event.target.select();
|
|
|
|
event.target.select();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// event.target.select();
|
|
|
|
|
|
|
|
// event.currentTarget.select();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -870,35 +867,13 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
this.focusNext('iCount');
|
|
|
|
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() {
|
|
|
|
iCountEnterFunction() {
|
|
|
|
if (this.$isNotBlank(this.currentRow)) {
|
|
|
|
if (this.$isNotBlank(this.currentRow)) {
|
|
|
|
this.currentRow.count = this.iCount;
|
|
|
|
this.currentRow.count = this.iCount;
|
|
|
|
// this.currentRow.reCount = this.iCount;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.focusNext('inputRef');
|
|
|
|
this.focusNext('inputRef');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
tableCountChange(row) {
|
|
|
|
|
|
|
|
if (this.$isNotBlank(row)) {
|
|
|
|
|
|
|
|
// row.count = row.reCount;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tableRowClassName({row, rowIndex}) {
|
|
|
|
tableRowClassName({row, rowIndex}) {
|
|
|
|
row.index = rowIndex;
|
|
|
|
row.index = rowIndex;
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -990,13 +965,6 @@ export default {
|
|
|
|
if (this.$isBlank(row.batchNo)) {
|
|
|
|
if (this.$isBlank(row.batchNo)) {
|
|
|
|
return this.$message.error('批次号不能为空');
|
|
|
|
return this.$message.error('批次号不能为空');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// if (this.$isBlank(row.productDate)) {
|
|
|
|
|
|
|
|
// return this.$message.error('生产日期不能为空');
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (this.$isBlank(row.expireDate)) {
|
|
|
|
|
|
|
|
// return this.$message.error('失效日期不能为空');
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$refs.multipleTable.setCurrentRow();
|
|
|
|
this.$refs.multipleTable.setCurrentRow();
|
|
|
|
this.currentRow = {};
|
|
|
|
this.currentRow = {};
|
|
|
|
this.selectedIndex = "";
|
|
|
|
this.selectedIndex = "";
|
|
|
@ -1035,7 +1003,6 @@ export default {
|
|
|
|
this.detailLoading = false;
|
|
|
|
this.detailLoading = false;
|
|
|
|
if (response.code === 20000) {
|
|
|
|
if (response.code === 20000) {
|
|
|
|
this.$message.success(response.data);
|
|
|
|
this.$message.success(response.data);
|
|
|
|
// this.getStockOrderDetailList();
|
|
|
|
|
|
|
|
this.codeArray.splice(index, 1);
|
|
|
|
this.codeArray.splice(index, 1);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(response.message);
|
|
|
|
this.$message.error(response.message);
|
|
|
@ -1062,21 +1029,6 @@ export default {
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: "warning",
|
|
|
|
type: "warning",
|
|
|
|
}).then(() => {
|
|
|
|
}).then(() => {
|
|
|
|
// let tQuery = {
|
|
|
|
|
|
|
|
// id: row.id
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// this.detailLoading = true;
|
|
|
|
|
|
|
|
// copyStockOrderDetail(tQuery)
|
|
|
|
|
|
|
|
// .then((response) => {
|
|
|
|
|
|
|
|
// this.detailLoading = false;
|
|
|
|
|
|
|
|
// if (response.code === 20000) {
|
|
|
|
|
|
|
|
// this.$message.success("复制成功");
|
|
|
|
|
|
|
|
// this.getStockOrderDetailList();
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(response.message);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let rData = JSON.parse(JSON.stringify(row));
|
|
|
|
let rData = JSON.parse(JSON.stringify(row));
|
|
|
|
rData.id = null;
|
|
|
|
rData.id = null;
|
|
|
|
if (this.codeArray.length === 0) {
|
|
|
|
if (this.codeArray.length === 0) {
|
|
|
@ -1128,23 +1080,6 @@ export default {
|
|
|
|
intentBack() {
|
|
|
|
intentBack() {
|
|
|
|
this.$router.go(-1);
|
|
|
|
this.$router.go(-1);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// generateBillNo() {
|
|
|
|
|
|
|
|
// let tQuery = {
|
|
|
|
|
|
|
|
// action: this.formData.billType
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// this.loading = true;
|
|
|
|
|
|
|
|
// stockOrderGenerateBillNo(tQuery)
|
|
|
|
|
|
|
|
// .then((response) => {
|
|
|
|
|
|
|
|
// this.loading = false;
|
|
|
|
|
|
|
|
// if (response.code === 20000) {
|
|
|
|
|
|
|
|
// this.formData.billNo = response.data;
|
|
|
|
|
|
|
|
// // this.formData.billdate = parseTime(new Date(), '{y}{m}{d}');
|
|
|
|
|
|
|
|
// this.formData.billdate = new Date();
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.closeDialog(true);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
getBusType() {
|
|
|
|
getBusType() {
|
|
|
|
let query = {
|
|
|
|
let query = {
|
|
|
|
code: this.formData.invWarehouseCode,
|
|
|
|
code: this.formData.invWarehouseCode,
|
|
|
@ -1233,8 +1168,6 @@ export default {
|
|
|
|
this.getBusType();
|
|
|
|
this.getBusType();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
invChange() {
|
|
|
|
invChange() {
|
|
|
|
/*if (this.$isNotBlank(this.formData.invWarehouseCode))
|
|
|
|
|
|
|
|
this.formData.invWarehouseCode = null;*/
|
|
|
|
|
|
|
|
this.findSubInvs();
|
|
|
|
this.findSubInvs();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -1289,7 +1222,6 @@ export default {
|
|
|
|
this.iCount = 0;
|
|
|
|
this.iCount = 0;
|
|
|
|
this.orderEditor = false;
|
|
|
|
this.orderEditor = false;
|
|
|
|
this.formData.billdate = new Date();
|
|
|
|
this.formData.billdate = new Date();
|
|
|
|
// this.generateBillNo();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.findMethod();
|
|
|
|
this.findMethod();
|
|
|
|
this.getBusType();
|
|
|
|
this.getBusType();
|
|
|
|