|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-form :model="formData" :rules="formRules" ref="dataForm">
|
|
|
|
|
<el-form :model="formData" ref="dataForm">
|
|
|
|
|
|
|
|
|
|
<el-button-group style="display: flex;margin: -40px 0 20px 80%; height: 35px">
|
|
|
|
|
|
|
|
|
@ -43,21 +43,20 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>单据类型:</span>
|
|
|
|
|
<span>当前仓库:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item class="query-form-item" prop="billType">
|
|
|
|
|
<el-select v-model="formData.action" placeholder="请选择单据类型"
|
|
|
|
|
@change="actionChange">
|
|
|
|
|
<el-form-item prop="locStorageCode">
|
|
|
|
|
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locCHange">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in busTypes"
|
|
|
|
|
v-for="item in storageList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.action">
|
|
|
|
|
:value="item.code">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -66,25 +65,23 @@
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>当前仓库:</span>
|
|
|
|
|
<span>单据类型:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item prop="locStorageCode">
|
|
|
|
|
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locCHange">
|
|
|
|
|
<el-form-item class="query-form-item" prop="billType">
|
|
|
|
|
<el-select v-model="formData.action" placeholder="请选择单据类型"
|
|
|
|
|
@change="actionChange">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in storageList"
|
|
|
|
|
v-for="item in busTypes"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
|
:value="item.action">
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
|
|
|
@ -151,25 +148,16 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="3">
|
|
|
|
|
<div class="ao-text">
|
|
|
|
|
<span>当前分库:</span>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="detailLoading"
|
|
|
|
|
:data="detailList"
|
|
|
|
|
@selection-change="changeFun"
|
|
|
|
|
style="width: 100%; margin-top: 20px;">
|
|
|
|
|
<el-table-column label="产品通用名" width="200" prop="productName"></el-table-column>
|
|
|
|
|
<el-table-column label="包装规格" width="200" prop="spec"></el-table-column>
|
|
|
|
|
<el-table-column label="批次号" width="100" prop="batchNo"></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="生产日期" width="120" prop="productDate"></el-table-column>
|
|
|
|
|
<el-table-column label="产品通用名" width="200" prop="coName"></el-table-column>
|
|
|
|
|
<el-table-column label="包装规格" width="200" prop="packSpec"></el-table-column>
|
|
|
|
|
<el-table-column label="批次号" width="100" prop="lotno"></el-table-column>
|
|
|
|
|
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
|
|
|
|
|
<el-table-column label="失效日期" width="120" prop="expireDate"></el-table-column>
|
|
|
|
|
<el-table-column label="单据数量" width="100" prop="count"></el-table-column>
|
|
|
|
|
<el-table-column label="实际数量" width="100" prop="reCount"></el-table-column>
|
|
|
|
@ -194,10 +182,11 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
|
|
|
|
|
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
|
|
|
|
import {parseTime} from "@/filtres";
|
|
|
|
|
import {getLocalJoinByUser} from "@/api/basic/busLocalType";
|
|
|
|
|
import {stockOrderChange, stockOrderDetail} from "@/api/warehouse/stockOrder";
|
|
|
|
|
import {getBusTypeByUser} from "@/api/warehouse/BusRole";
|
|
|
|
|
import {unitListBykey} from "@/api/warehouse/unit";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "DialogChangeNewOrder",
|
|
|
|
@ -298,9 +287,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
locCHange() {
|
|
|
|
|
this.findStorageMethod();
|
|
|
|
|
this.formData.action = null;
|
|
|
|
|
this.getBusType();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
findStorageMethod(query) {
|
|
|
|
|
if (this.formData.locStorageCode == null)
|
|
|
|
|
return;
|
|
|
|
@ -333,24 +322,14 @@ export default {
|
|
|
|
|
key: query,
|
|
|
|
|
corpType: null,
|
|
|
|
|
outType: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 100
|
|
|
|
|
};
|
|
|
|
|
if (this.curAction.corpType == 3) {//特殊往来
|
|
|
|
|
cQuery.corpType = 4;
|
|
|
|
|
this.formData.fromCorpId = this.curAction.defaultUnit;
|
|
|
|
|
} else if (this.curAction.corpType == 2)//客户
|
|
|
|
|
{
|
|
|
|
|
cQuery.corpType = 4;
|
|
|
|
|
cQuery.outType = 2;
|
|
|
|
|
|
|
|
|
|
} else if (this.curAction.corpType == 0) {
|
|
|
|
|
cQuery.corpType = 2;
|
|
|
|
|
} else return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getBasicUnitMaintains(cQuery)
|
|
|
|
|
unitListBykey(cQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.fromOptions = response.data.page.list || [];
|
|
|
|
|
this.fromOptions = response.data.list || [];
|
|
|
|
|
if (this.curAction.corpType == 3) {
|
|
|
|
|
for (let i = 0; i < this.fromOptions.length; i++) {
|
|
|
|
|
if (this.fromOptions[i].erpId == this.formData.fromCorpId) {
|
|
|
|
@ -386,16 +365,15 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getBusType() {
|
|
|
|
|
let query = {
|
|
|
|
|
enabled: true,
|
|
|
|
|
};
|
|
|
|
|
getLocalJoinByUser(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.busTypes = response.data.list || [];
|
|
|
|
|
this.filterQuery.billAction = this.busTypes[0].action;
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
let query = {};
|
|
|
|
|
if (!isBlank(this.formData.locStorageCode)) {
|
|
|
|
|
query.locInvCode = this.formData.locStorageCode;
|
|
|
|
|
}
|
|
|
|
|
getBusTypeByUser(query).then((res) => {
|
|
|
|
|
this.busTypes = res.data.list || [];
|
|
|
|
|
this.filterQuery.billAction = this.busTypes[0].action;
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getStorage() {
|
|
|
|
|
this.storageList = [];
|
|
|
|
@ -413,7 +391,7 @@ export default {
|
|
|
|
|
stockOrderDetail(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.detailLoading = false;
|
|
|
|
|
this.detailList = response.data.list || [];
|
|
|
|
|
this.detailList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.detailLoading = false;
|
|
|
|
@ -434,9 +412,8 @@ export default {
|
|
|
|
|
let date = new Date();
|
|
|
|
|
this.formData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10);
|
|
|
|
|
}
|
|
|
|
|
this.getBusType();
|
|
|
|
|
this.getStorage();
|
|
|
|
|
this.getStockOrderDetailList(this.curRow.id);
|
|
|
|
|
this.getStockOrderDetailList(this.curRow.orderId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|