|
|
|
@ -40,13 +40,13 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="billdate">
|
|
|
|
|
<!-- <el-input v-model="formData.billdate" auto-complete="off"></el-input>-->
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="formData.billdate"
|
|
|
|
|
type="date"
|
|
|
|
|
type="datetime"
|
|
|
|
|
placeholder="选择日期"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
:clearable="false"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
>
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -81,31 +81,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item class="query-form-item" prop="corpName"
|
|
|
|
|
v-if="curAction.corpType ==0 || curAction.corpType == 3 || (curAction.corpType == 2 && !curAction.genUnit)">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formData.corpName"
|
|
|
|
|
filterable
|
|
|
|
|
remote
|
|
|
|
|
clearable="true"
|
|
|
|
|
reserve-keyword
|
|
|
|
|
placeholder="请输入往来单位"
|
|
|
|
|
:remote-method="findMethod"
|
|
|
|
|
:loading="loading"
|
|
|
|
|
@change="selectOne"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in fromOptions"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item"
|
|
|
|
|
>
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp"
|
|
|
|
|
v-if="curAction.corpType ==1">
|
|
|
|
|
<el-form-item class="query-form-item" prop="fromCorp">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="formData.corpName"
|
|
|
|
|
filterable
|
|
|
|
@ -129,13 +105,6 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<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"
|
|
|
|
|
clearable
|
|
|
|
|
placeholder="请输入病人住院号"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
@ -161,7 +130,31 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>当前分库:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="invWarehouseCode">
|
|
|
|
|
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
|
|
|
|
|
:disabled="codeArray.length>0"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in subInvList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: -10px;">
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span></span>
|
|
|
|
@ -170,15 +163,12 @@
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<el-form-item prop="type" style="margin-right: 20px;"
|
|
|
|
|
v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)">
|
|
|
|
|
<el-checkbox v-model="formData.noInvOut">允许无库存出库</el-checkbox>
|
|
|
|
|
<el-checkbox v-model="formData.noInvOut" :disabled="codeArray.length>0">允许无库存出库
|
|
|
|
|
</el-checkbox>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" style="margin-top: -10px;">
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
<el-card>
|
|
|
|
@ -360,6 +350,7 @@ import dialogInvProduct from "../inventory/DialogInvProduct"
|
|
|
|
|
import {getOriginJoinBusType} from "@/api/basic/busOriginType";
|
|
|
|
|
import {inserThrOrderWeb} from "@/api/thrsys/thrOrderReceive";
|
|
|
|
|
import {getThrOrderDetails} from "@/api/thrsys/thrOrder";
|
|
|
|
|
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "idQuery",
|
|
|
|
@ -385,7 +376,18 @@ export default {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10,
|
|
|
|
|
},
|
|
|
|
|
formData: {noInvOut: false, locStorageCode: null},
|
|
|
|
|
formData: {
|
|
|
|
|
noInvOut: false,
|
|
|
|
|
locStorageCode: null,
|
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
fromSubInvCode: null,
|
|
|
|
|
billNo: null,
|
|
|
|
|
billdate: "",
|
|
|
|
|
billType: "",
|
|
|
|
|
type: null,
|
|
|
|
|
corpName: "",
|
|
|
|
|
corpId: "",
|
|
|
|
|
},
|
|
|
|
|
formRules: {
|
|
|
|
|
corpName: [
|
|
|
|
|
{required: true, message: "请输入供应商", trigger: "blur"}
|
|
|
|
@ -404,6 +406,7 @@ export default {
|
|
|
|
|
// ],
|
|
|
|
|
},
|
|
|
|
|
codeArray: [],
|
|
|
|
|
subInvList: [],
|
|
|
|
|
fromOptions: [],
|
|
|
|
|
fromStorageOptions: [],
|
|
|
|
|
total: 0,
|
|
|
|
@ -533,6 +536,7 @@ export default {
|
|
|
|
|
filterAllByUser()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
this.findSubInvs();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
@ -546,7 +550,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
findStorageMethod(query) {
|
|
|
|
|
console.log(query);
|
|
|
|
|
if (this.formData.locStorageCode == null)
|
|
|
|
|
return;
|
|
|
|
|
this.fromStorageOptions = [];
|
|
|
|
@ -624,22 +627,6 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
this.selectInvProductVisible = true;
|
|
|
|
|
|
|
|
|
|
// this.thisData.formData.billType = this.curAction.localAction;
|
|
|
|
|
// if (this.curAction.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) {
|
|
|
|
|
//
|
|
|
|
|
// } else if (this.curAction.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) {
|
|
|
|
|
//
|
|
|
|
|
// this.invQueryData = {
|
|
|
|
|
// locStorageCode: this.formData.corpId,
|
|
|
|
|
//
|
|
|
|
|
// };
|
|
|
|
|
// console.log("his.invQueryData " + this.invQueryData.locStorageCode);
|
|
|
|
|
// this.selectInvProductVisible = true;
|
|
|
|
|
// } else {
|
|
|
|
|
// this.selectProductVisible = true;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -893,23 +880,7 @@ export default {
|
|
|
|
|
intentBack() {
|
|
|
|
|
this.$router.go(-1);
|
|
|
|
|
},
|
|
|
|
|
generateBillNo() {
|
|
|
|
|
let tQuery = {
|
|
|
|
|
action: this.formData.billType
|
|
|
|
|
}
|
|
|
|
|
// this.loading = true;
|
|
|
|
|
generateBillNoInt(tQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.formData.billNo = response.data;
|
|
|
|
|
this.formData.billdate = new Date();
|
|
|
|
|
} else {
|
|
|
|
|
this.closeDialog(true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getBusType(invCode) {
|
|
|
|
|
getBusType() {
|
|
|
|
|
let query = {
|
|
|
|
|
enabled: true,
|
|
|
|
|
corpType: 1,
|
|
|
|
@ -974,19 +945,36 @@ export default {
|
|
|
|
|
actionChange(item) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
this.curAction = this.getActionItem(item);
|
|
|
|
|
// this.formData.locStorageCode = this.curAction.storageCode;
|
|
|
|
|
console.log(this.curAction.corpType + "---" + "-----" + this.curAction.action);
|
|
|
|
|
this.locInChange();
|
|
|
|
|
this.findMethod();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
locInChange(item) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
if (this.formData.invWarehouseCode != null) {
|
|
|
|
|
this.formData.invWarehouseCode = "";
|
|
|
|
|
}
|
|
|
|
|
this.formData.locStorageCode = item;
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
this.getBusType(item);
|
|
|
|
|
this.findStorageMethod();
|
|
|
|
|
},
|
|
|
|
|
findSubInvs() {
|
|
|
|
|
this.subInvList = [];
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: this.formData.locStorageCode
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.subInvList = response.data || [];
|
|
|
|
|
if (this.subInvList != null && this.subInvList.length == 1) {
|
|
|
|
|
this.formData.invWarehouseCode = this.subInvList[0].code;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
filters: {},
|
|
|
|
|
mounted() {
|
|
|
|
@ -996,11 +984,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getBusType("NOCODE");
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.formData = {};
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
this.closeConfirmFunction(false);
|
|
|
|
|
|
|
|
|
|
if (this.$isNotBlank(this.idQuery.id)) {
|
|
|
|
|
this.query.limit = 100;
|
|
|
|
|
this.query.orderIdFk = this.idQuery.id;
|
|
|
|
@ -1010,15 +994,28 @@ export default {
|
|
|
|
|
this.getStockOrderDetailList();
|
|
|
|
|
} else {
|
|
|
|
|
this.formData = {
|
|
|
|
|
billNo: null,
|
|
|
|
|
billdate: "",
|
|
|
|
|
customerId: store.getters.customerId,
|
|
|
|
|
billType: "",
|
|
|
|
|
type: "2",
|
|
|
|
|
corpName: "",
|
|
|
|
|
corpId: "",
|
|
|
|
|
noInvOut: "",
|
|
|
|
|
locStorageCode: "",
|
|
|
|
|
invWarehouseCode: "",
|
|
|
|
|
};
|
|
|
|
|
this.iCount = 0;
|
|
|
|
|
this.orderEditor = false;
|
|
|
|
|
this.generateBillNo();
|
|
|
|
|
// this.generateBillNo();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getBusType();
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.findSubInvByInv();
|
|
|
|
|
this.findSubStorageMethod();
|
|
|
|
|
this.codeArray = [];
|
|
|
|
|
this.closeConfirmFunction(false);
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|