|
|
|
@ -5,7 +5,7 @@
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item class="query-form-item" label="单号:">
|
|
|
|
|
<el-input v-model="filterQuery.billNo" placeholder="单号:"
|
|
|
|
|
<el-input v-model="filterQuery.billNo" placeholder="单号"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
clearable="true"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -37,10 +37,10 @@
|
|
|
|
|
<el-form-item class="query-form-item" label="所属仓库:">
|
|
|
|
|
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
@change="subInvChange"
|
|
|
|
|
@change="invChange"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in subInvList"
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code">
|
|
|
|
@ -85,7 +85,6 @@
|
|
|
|
|
>
|
|
|
|
|
<el-button type="primary" icon="el-icon-s-unfold" @click="mergesOrders">合并单据</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="addOrders">新增单据</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-error" @click="errOrders">异常单据</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
<el-divider style="margin: 15px"></el-divider>
|
|
|
|
@ -139,6 +138,14 @@
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
v-if="scope.row.status === 4"
|
|
|
|
|
@click.native.stop="errorMsgDialog(scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
@ -165,9 +172,9 @@
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="70%"
|
|
|
|
|
>
|
|
|
|
|
<el-form :inline="true" :model="unitquery" class="query-form" size="mini">
|
|
|
|
|
<el-form :inline="true" :model="unitQuery" class="query-form" size="mini">
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="unitquery.key" placeholder="搜索"></el-input>
|
|
|
|
|
<el-input v-model="unitQuery.key" placeholder="搜索"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button
|
|
|
|
@ -182,7 +189,7 @@
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="unitlist"
|
|
|
|
|
:data="unitList"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
@row-click="selectUnit"
|
|
|
|
|
>
|
|
|
|
@ -210,16 +217,6 @@
|
|
|
|
|
<el-table-column label="类型" prop="type"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="异常订单"
|
|
|
|
|
:visible.sync="errOrderVisible"
|
|
|
|
|
width="80%"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
>
|
|
|
|
|
<ioErrorOrder
|
|
|
|
|
></ioErrorOrder>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="新增单据"
|
|
|
|
|
:visible.sync="addOrderVisible"
|
|
|
|
@ -273,9 +270,8 @@ import draggable from "vuedraggable";
|
|
|
|
|
// import ioErrorOrder from "./IOErrorOrder";todo
|
|
|
|
|
import addOrder from "./IoCreateOrder";
|
|
|
|
|
import store from "../../store";
|
|
|
|
|
import {filterAllByUser} from "@/api/system/invWarehouse";
|
|
|
|
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
|
|
|
|
import {getLocalJoinByUser} from "@/api/basic/busType";
|
|
|
|
|
import {filterSubByInv} from "@/api/system/invSubWarehouse";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
|
|
|
|
|
|
|
|
|
@ -290,14 +286,14 @@ export default {
|
|
|
|
|
name: "IoNewOrder",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterQuery: {
|
|
|
|
|
id: "",
|
|
|
|
|
billNo: null,
|
|
|
|
|
mainAction: null,
|
|
|
|
|
action: null,
|
|
|
|
|
page: 1,
|
|
|
|
|
statusType: "draft",
|
|
|
|
|
statusType: "newOrder",
|
|
|
|
|
limit: 10,
|
|
|
|
|
invCode: this.$store.getters.locInvCode
|
|
|
|
|
},
|
|
|
|
@ -312,8 +308,8 @@ export default {
|
|
|
|
|
8: "审核拒绝"
|
|
|
|
|
},
|
|
|
|
|
curIndex: "",
|
|
|
|
|
unitquery: {key: "", page: 1, limit: 20},
|
|
|
|
|
unitlist: [],
|
|
|
|
|
unitQuery: {key: "", page: 1, limit: 20},
|
|
|
|
|
unitList: [],
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
unitUpdateQuery: {
|
|
|
|
|
id: "",
|
|
|
|
@ -322,8 +318,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
idQuery: {},
|
|
|
|
|
storageList: [],
|
|
|
|
|
subInvList: [],
|
|
|
|
|
errOrderVisible: false,
|
|
|
|
|
invList: [],
|
|
|
|
|
list: [],
|
|
|
|
|
adId: [],
|
|
|
|
|
adSelectList: [],
|
|
|
|
@ -336,7 +331,7 @@ export default {
|
|
|
|
|
loading: false,
|
|
|
|
|
index: null,
|
|
|
|
|
formName: null,
|
|
|
|
|
errorDetail: "1111111111111",
|
|
|
|
|
errorDetail: "",
|
|
|
|
|
formMap: {
|
|
|
|
|
add: "新增",
|
|
|
|
|
edit: "编辑",
|
|
|
|
@ -411,6 +406,7 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
this.filterQuery = {
|
|
|
|
|
id: "",
|
|
|
|
|
billNo: null,
|
|
|
|
|
mainAction: null,
|
|
|
|
|
action: null,
|
|
|
|
|
page: 1,
|
|
|
|
@ -460,57 +456,24 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getBusType() {
|
|
|
|
|
if (this.subInvList.length > 0) {
|
|
|
|
|
this.filterQuery.locStorageCode = this.subInvList.find(item => item.code == this.filterQuery.invWarehouseCode).parentId
|
|
|
|
|
}
|
|
|
|
|
let query = {
|
|
|
|
|
code: this.filterQuery.invWarehouseCode,
|
|
|
|
|
code: this.filterQuery.invCode,
|
|
|
|
|
enabled: true,
|
|
|
|
|
};
|
|
|
|
|
getLocalJoinByUser(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.busTypes = response.data.list || [];
|
|
|
|
|
this.filterQuery.billAction = this.busTypes[0].action;
|
|
|
|
|
// this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getStorage() {
|
|
|
|
|
this.storageList = [];
|
|
|
|
|
filterAllByUser()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.storageList = response.data || [];
|
|
|
|
|
if (this.storageList.length > 0) {
|
|
|
|
|
this.getSubInvList();
|
|
|
|
|
this.getList();
|
|
|
|
|
}
|
|
|
|
|
this.filterQuery.action = this.busTypes[0].action;
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getStorageName(code) {
|
|
|
|
|
for (let i = 0; i < this.storageList.length; i++) {
|
|
|
|
|
if (this.storageList[i].code === code) {
|
|
|
|
|
return this.storageList[i].name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getSubStorageName(code) {
|
|
|
|
|
for (let i = 0; i < this.subInvList.length; i++) {
|
|
|
|
|
if (this.subInvList[i].code === code) {
|
|
|
|
|
return this.subInvList[i].name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addOrders(row) {
|
|
|
|
|
this.idQuery = {};
|
|
|
|
|
this.idQuery = row;
|
|
|
|
|
this.addOrderVisible = true;
|
|
|
|
|
},
|
|
|
|
|
errOrders() {
|
|
|
|
|
this.errOrderVisible = true;
|
|
|
|
|
},
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.addOrderVisible = false;
|
|
|
|
|
this.addHosOrderVisible = false;
|
|
|
|
@ -518,10 +481,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
getUnitList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getBasicUnitMaintains(this.unitquery)
|
|
|
|
|
getBasicUnitMaintains(this.unitQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.unitlist = response.data.list || [];
|
|
|
|
|
this.unitList = response.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -684,33 +647,17 @@ export default {
|
|
|
|
|
this.idQuery.id = row.id;
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
invChange() {
|
|
|
|
|
this.subInvList = [];
|
|
|
|
|
this.filterQuery.invWarehouseCode = "";
|
|
|
|
|
let query = {
|
|
|
|
|
pcode: this.filterQuery.locStorageCode
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.subInvList = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getSubInvList() {
|
|
|
|
|
let query = {
|
|
|
|
|
// pcode: this.filterQuery.locStorageCode
|
|
|
|
|
filter: 3,
|
|
|
|
|
};
|
|
|
|
|
filterSubByInv(query)
|
|
|
|
|
getInvList() {
|
|
|
|
|
getInvListByUser()
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.subInvList = response.data || [];
|
|
|
|
|
this.invList = response.data || [];
|
|
|
|
|
this.getList();
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
subInvChange() {
|
|
|
|
|
invChange() {
|
|
|
|
|
this.filterQuery.action = null;
|
|
|
|
|
this.getBusType();
|
|
|
|
|
},
|
|
|
|
|
init() {
|
|
|
|
@ -720,6 +667,13 @@ export default {
|
|
|
|
|
this.uploadFileUrl = response + "/udiwms/orders/file/upload";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
errorMsgDialog(row) {
|
|
|
|
|
this.$alert(row.remark, '错误信息', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
callback: action => {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
|
statusFilterType(status) {
|
|
|
|
@ -737,7 +691,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getSubInvList();
|
|
|
|
|
this.getInvList();
|
|
|
|
|
this.getBusType();
|
|
|
|
|
let query = this.$route.query;
|
|
|
|
|
this.filterQuery = Object.assign(this.filterQuery, query);
|
|
|
|
|