1.修复bug

master
x_z 3 years ago
parent 18e5dfb618
commit 06084ae2de

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

@ -347,7 +347,6 @@ export default {
limit: 10 limit: 10
}, },
detailQuery: { detailQuery: {
orderIdFk: "",
orderId: "", orderId: "",
page: 1, page: 1,
limit: 20 limit: 20
@ -709,7 +708,7 @@ export default {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
let tQuery = { let tQuery = {
id: row.id id: row.orderId
}; };
this.detailLoading = true; this.detailLoading = true;
copyStockOrderDetail(tQuery) copyStockOrderDetail(tQuery)

Loading…
Cancel
Save