|
|
|
@ -101,6 +101,7 @@
|
|
|
|
|
placeholder="请输入往来单位"
|
|
|
|
|
:remote-method="findMethod"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
@focus="findMethod('')"
|
|
|
|
|
@change="selectOne"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
@ -118,8 +119,8 @@
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formData.corpName"
|
|
|
|
|
filterable
|
|
|
|
|
remote :disabled="codeArray.length>0"
|
|
|
|
|
clearable="true"
|
|
|
|
|
remote
|
|
|
|
|
clearable="true" :disabled="codeArray.length>0"
|
|
|
|
|
reserve-keyword
|
|
|
|
|
placeholder="请输入仓库信息"
|
|
|
|
|
:remote-method="findStorageMethod"
|
|
|
|
@ -144,7 +145,7 @@
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in fromSubStorageOptions"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:label="item.name" :disabled="codeArray.length>0"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
|
|
|
|
@ -153,9 +154,9 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp" :disabled="codeArray.length>0"
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp"
|
|
|
|
|
v-if="curAction.corpType ==2 && curAction.genUnit">
|
|
|
|
|
<el-input v-model="formData.corpName" auto-complete="off"
|
|
|
|
|
<el-input v-model="formData.corpName" auto-complete="off" :disabled="codeArray.length>0"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入病人住院号"
|
|
|
|
|
></el-input>
|
|
|
|
@ -531,6 +532,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
saveOrder(status) {
|
|
|
|
|
|
|
|
|
|
this.code = "";
|
|
|
|
|
this.$refs.multipleTable.setCurrentRow();
|
|
|
|
|
this.currentRow = {};
|
|
|
|
@ -646,7 +648,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
findStorageMethod(query) {
|
|
|
|
|
console.log(query);
|
|
|
|
|
if (this.formData.locStorageCode == null)
|
|
|
|
|
return;
|
|
|
|
|
this.fromStorageOptions = [];
|
|
|
|
@ -708,12 +709,10 @@ export default {
|
|
|
|
|
if (status == '3') {
|
|
|
|
|
tQuery.subErpOrders.forEach((obj) => {
|
|
|
|
|
obj.reCount = obj.count;
|
|
|
|
|
console.log(obj.reCount);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(tQuery);
|
|
|
|
|
insertStockOrderWeb(tQuery)
|
|
|
|
|
.then(response => {
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -770,8 +769,8 @@ export default {
|
|
|
|
|
this.$message.error("往来信息和单据类型不能为空!")
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (isBlank(this.formData.invWarehouseCode)) {
|
|
|
|
|
this.$message.error("当前分库未选择!");
|
|
|
|
|
if (this.$isBlank(this.formData.locStorageCode) || this.$isBlank(this.formData.invWarehouseCode)) {
|
|
|
|
|
this.$message.error("当前仓库和当前分库不能为空!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.code = "";
|
|
|
|
@ -798,13 +797,10 @@ export default {
|
|
|
|
|
this.invQueryData = {
|
|
|
|
|
locStorageCode: this.formData.corpId,
|
|
|
|
|
};
|
|
|
|
|
console.log("his.invQueryData " + this.invQueryData.locStorageCode);
|
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.selectProductVisible = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.code = this.code.trim();
|
|
|
|
@ -826,7 +822,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;
|
|
|
|
@ -880,7 +875,6 @@ export default {
|
|
|
|
|
rData.forEach((obj, index) => {
|
|
|
|
|
this.codeArray.unshift(obj);
|
|
|
|
|
});
|
|
|
|
|
console.log(this.codeArray);
|
|
|
|
|
this.$refs.multipleTable.setCurrentRow(this.codeArray[0]);
|
|
|
|
|
this.currentRow = this.codeArray[0];
|
|
|
|
|
this.selectedIndex = 0;
|
|
|
|
@ -1140,7 +1134,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;
|
|
|
|
@ -1154,6 +1147,23 @@ export default {
|
|
|
|
|
intentBack() {
|
|
|
|
|
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() {
|
|
|
|
|
let query = {
|
|
|
|
|
code: this.formData.invWarehouseCode,
|
|
|
|
@ -1175,15 +1185,11 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
selectOne(event) {
|
|
|
|
|
|
|
|
|
|
this.formData.corpName = event.name;
|
|
|
|
|
this.formData.corpId = event.erpId;
|
|
|
|
|
this.formData.unitIdFk = event.erpId;
|
|
|
|
|
// console.log("this.inputQuery.companyId" + item);
|
|
|
|
|
console.log("this.inputQuery.companyId" + event.erpId);
|
|
|
|
|
},
|
|
|
|
|
findMethod(query) {
|
|
|
|
|
console.log(query);
|
|
|
|
|
this.fromOptions = [];
|
|
|
|
|
let cQuery = {
|
|
|
|
|
key: query,
|
|
|
|
@ -1228,23 +1234,25 @@ export default {
|
|
|
|
|
actionChange(item) {
|
|
|
|
|
this.curAction = this.getActionItem(item);
|
|
|
|
|
this.formData.corpName = '';
|
|
|
|
|
|
|
|
|
|
if (this.$isNotBlank(this.formData.fromSubInvCode)) {
|
|
|
|
|
this.formData.fromSubInvCode = '';
|
|
|
|
|
}
|
|
|
|
|
// '';
|
|
|
|
|
this.locInChange();
|
|
|
|
|
this.findMethod();
|
|
|
|
|
},
|
|
|
|
|
locInChange() {
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
// this.getBusType();
|
|
|
|
|
// this.invChange();
|
|
|
|
|
this.invChange();
|
|
|
|
|
this.findStorageMethod();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
subStorageChange() {
|
|
|
|
|
this.getBusType();
|
|
|
|
|
},
|
|
|
|
|
invChange() {
|
|
|
|
|
|
|
|
|
|
if (this.$isNotBlank(this.formData.invWarehouseCode))
|
|
|
|
|
this.formData.invWarehouseCode = null;
|
|
|
|
|
this.findSubInvs();
|
|
|
|
@ -1303,7 +1311,7 @@ export default {
|
|
|
|
|
this.formData.billdate = new Date();
|
|
|
|
|
// this.generateBillNo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.findMethod();
|
|
|
|
|
this.getBusType();
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.findSubInvByInv();
|
|
|
|
|