1.调整单据页面样式及查询参数

prod
x_z 2 years ago
parent 0e5acf54e7
commit 1113eab6c3

@ -5,7 +5,7 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="单号:"> <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%" style="width: 90%"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
@ -37,10 +37,10 @@
<el-form-item class="query-form-item" label="所属仓库:"> <el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true" <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%" style="width: 90%"
@change="subInvChange" @change="invChange"
> >
<el-option <el-option
v-for="item in subInvList" v-for="item in invList"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
@ -245,7 +245,7 @@
v-show="bizTotal>0" v-show="bizTotal>0"
:total="bizTotal" :total="bizTotal"
:page.sync="bizQuery.page" :page.sync="bizQuery.page"
:limit.sync="codeQuery.limit" :limit.sync="bizQuery.limit"
@pagination="getBizDetailList" @pagination="getBizDetailList"
/> />
</el-tab-pane> </el-tab-pane>
@ -452,9 +452,8 @@ import {
deleteByOrderId, deleteByOrderId,
getOrderList getOrderList
} from "../../api/inout/order"; } from "../../api/inout/order";
import {filterAllByUser} from "@/api/system/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType"; import {getLocalJoinByUser} from "@/api/basic/busType";
import {filterSubByInv} from "@/api/system/invSubWarehouse"; import {getInvListByUser} from "@/api/system/invWarehouse";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {selectSysParamByKey} from "@/api/param/systemParamConfig"; import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {getBizDetailList} from "@/api/inout/orderDetailBiz"; import {getBizDetailList} from "@/api/inout/orderDetailBiz";
@ -475,25 +474,28 @@ export default {
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
id: "", id: "",
billNo: null,
statusType: "audited",
mainAction: null, mainAction: null,
action: null, action: null,
page: 1, page: 1,
status: 10,
limit: 10, limit: 10,
startTime: null, startTime: null,
endTime: null, endTime: null,
invCode: this.$store.getters.locInvCode, invCode: this.$store.getters.locInvCode,
}, },
checkStatus: { checkStatus: {
'-1': "草稿", 1: "草稿",
// 1: "", 2: "等待处理",
1: "等待处理", 3: "等待校验",
2: "等待校验", 4: "处理异常",
3: "校验异常", 5: "校验成功",
4: "校验成功", 6: "校验异常",
7: "审核通过",
8: "审核拒绝"
}, },
storageList: [], invList: [],
subInvList: [], list: [],
total: 0, total: 0,
loading: false, loading: false,
index: null, index: null,
@ -587,9 +589,16 @@ export default {
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
status: 10, id: "",
billNo: null,
statusType: "audited",
mainAction: null,
action: null,
page: 1, page: 1,
limit: 10, limit: 10,
startTime: null,
endTime: null,
invCode: this.$store.getters.locInvCode,
}; };
this.getList(); this.getList();
}, },
@ -608,57 +617,19 @@ export default {
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
getBusType() { getBusType() {
if (this.subInvList.length > 0) {
this.filterQuery.locStorageCode = this.subInvList.find(item => item.code == this.filterQuery.invWarehouseCode).parentId
}
let query = { let query = {
code: this.filterQuery.invWarehouseCode, code: this.filterQuery.invCode,
enabled: true, enabled: true,
}; };
getLocalJoinByUser(query) getLocalJoinByUser(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action; this.filterQuery.action = this.busTypes[0].action;
})
.catch(() => {
});
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.getSubInvList();
this.getList();
}
}) })
.catch(() => { .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;
}
}
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.currentRow = val; this.currentRow = val;
this.getOrderDetails(); this.getOrderDetails();
@ -684,7 +655,7 @@ export default {
// //
getList() { getList() {
this.loading = true; this.loading = true;
this.currentRow = null; this.currentRow = {billNo: ""};
this.clearDetailList(); this.clearDetailList();
getOrderList(this.filterQuery) getOrderList(this.filterQuery)
.then((response) => { .then((response) => {
@ -737,33 +708,17 @@ export default {
}); });
}, },
invChange() { invChange() {
this.subInvList = []; this.filterQuery.action = null;
this.filterQuery.invWarehouseCode = ""; this.getBusType();
let query = {
pcode: this.filterQuery.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
}, },
getSubInvList() { getInvList() {
let query = { getInvListByUser()
filter: 3,
};
filterSubByInv(query)
.then((response) => { .then((response) => {
this.subInvList = response.data || []; this.invList = response.data || [];
this.getList();
}) })
.catch(() => { .catch(() => {
}); });
}, },
subInvChange() {
this.getBusType();
},
checkOrder(orderId) { checkOrder(orderId) {
}, },
onBizReset() { onBizReset() {
@ -903,7 +858,7 @@ export default {
}; };
}, },
created() { created() {
this.getSubInvList(); this.getInvList();
this.getBusType(); this.getBusType();
let query = this.$route.query; let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query); this.filterQuery = Object.assign(this.filterQuery, query);

@ -245,7 +245,7 @@
v-show="bizTotal>0" v-show="bizTotal>0"
:total="bizTotal" :total="bizTotal"
:page.sync="bizQuery.page" :page.sync="bizQuery.page"
:limit.sync="codeQuery.limit" :limit.sync="bizQuery.limit"
@pagination="getBizDetailList" @pagination="getBizDetailList"
/> />
</el-tab-pane> </el-tab-pane>
@ -486,12 +486,14 @@ export default {
invCode: this.$store.getters.locInvCode, invCode: this.$store.getters.locInvCode,
}, },
checkStatus: { checkStatus: {
'-1': "草稿", 1: "草稿",
// 1: "", 2: "等待处理",
1: "等待处理", 3: "等待校验",
2: "等待校验", 4: "处理异常",
3: "校验异常", 5: "校验成功",
4: "校验成功", 6: "校验异常",
7: "审核通过",
8: "审核拒绝"
}, },
storageList: [], storageList: [],
subInvList: [], subInvList: [],
@ -646,20 +648,6 @@ export default {
.catch(() => { .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;
}
}
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.currentRow = val; this.currentRow = val;
this.getOrderDetails(); this.getOrderDetails();
@ -685,7 +673,7 @@ export default {
// //
getList() { getList() {
this.loading = true; this.loading = true;
this.currentRow = null; this.currentRow = {billNo: ""};
this.clearDetailList(); this.clearDetailList();
getOrderList(this.filterQuery) getOrderList(this.filterQuery)
.then((response) => { .then((response) => {

@ -5,7 +5,7 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item class="query-form-item" label="单号:"> <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%" style="width: 90%"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
@ -37,10 +37,10 @@
<el-form-item class="query-form-item" label="所属仓库:"> <el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true" <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%" style="width: 90%"
@change="subInvChange" @change="invChange"
> >
<el-option <el-option
v-for="item in subInvList" v-for="item in invList"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
@ -140,8 +140,8 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="reviewOrder(scope.row)" @click.native.stop="checkOrder(scope.row.id)"
>单据 >验单据
</el-button </el-button
> >
</template> </template>
@ -245,7 +245,7 @@
v-show="bizTotal>0" v-show="bizTotal>0"
:total="bizTotal" :total="bizTotal"
:page.sync="bizQuery.page" :page.sync="bizQuery.page"
:limit.sync="codeQuery.limit" :limit.sync="bizQuery.limit"
@pagination="getBizDetailList" @pagination="getBizDetailList"
/> />
</el-tab-pane> </el-tab-pane>
@ -444,40 +444,21 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog
title="单据验收"
:visible.sync="acceptOrderVisible"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="acceptOrderVisible"
>
<accept-order
:closeDialog="closeAcceptDialog"
:orderQuery="acceptQuery"
v-on:childByValue="parentByFn"
></accept-order>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
getDraft,
deleteByOrderId, deleteByOrderId,
getOrderList getOrderList
} from "../../api/inout/order"; } from "../../api/inout/order";
import {filterAllByUser} from "@/api/system/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busType"; import {getLocalJoinByUser} from "@/api/basic/busType";
import {filterSubByInv} from "@/api/system/invSubWarehouse"; import {getInvListByUser} from "@/api/system/invWarehouse";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {selectSysParamByKey} from "@/api/param/systemParamConfig"; import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {getBizDetailList} from "@/api/inout/orderDetailBiz"; import {getBizDetailList} from "@/api/inout/orderDetailBiz";
import {getCodeDetailList} from "@/api/inout/orderDetailCode"; import {getCodeDetailList} from "@/api/inout/orderDetailCode";
import {getResultDetailList} from "@/api/inout/orderDetailResult"; import {getResultDetailList} from "@/api/inout/orderDetailResult";
import AcceptOrder from "@/views/inout/IoReviewOrder";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -487,16 +468,17 @@ const formJson = {
}; };
export default { export default {
name: "IoCheckSuccessOrder", name: "IoUnCheckedOrder",
data() { data() {
return { return {
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
id: "", id: "",
billNo: null,
mainAction: null, mainAction: null,
action: null, action: null,
statusType: "checkSuccess",
page: 1, page: 1,
status: 6,
limit: 10, limit: 10,
startTime: null, startTime: null,
endTime: null, endTime: null,
@ -510,9 +492,9 @@ export default {
3: "校验异常", 3: "校验异常",
4: "校验成功", 4: "校验成功",
}, },
list: [],
storageList: [], storageList: [],
subInvList: [], invList: [],
list: [],
total: 0, total: 0,
loading: false, loading: false,
index: null, index: null,
@ -539,7 +521,9 @@ export default {
formData: formJson, formData: formJson,
deleteLoading: false, deleteLoading: false,
busTypes: [], busTypes: [],
currentRow: {}, currentRow: {
billNo: ""
},
actDateRange: [], actDateRange: [],
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
@ -597,22 +581,25 @@ export default {
resultTotal: 0, resultTotal: 0,
resultDetailLoading: false, resultDetailLoading: false,
resultDetailList: [], resultDetailList: [],
acceptQuery: null,
acceptOrderVisible: false,
}; };
}, },
components: {AcceptOrder}, components: {},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
status: 10, id: "",
billNo: null,
mainAction: null,
action: null,
page: 1, page: 1,
statusType: "unCheck",
limit: 10, limit: 10,
startTime: null,
endTime: null,
invCode: this.$store.getters.locInvCode,
}; };
this.getList(); this.getList();
}, },
@ -631,57 +618,23 @@ export default {
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
handleSizeChange(val) { invChange() {
this.filterQuery.limit = val; this.filterQuery.action = null;
this.getList(); this.getBusType();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
}, },
getBusType() { getBusType() {
if (this.subInvList.length > 0) {
this.filterQuery.locStorageCode = this.subInvList.find(item => item.code == this.filterQuery.invWarehouseCode).parentId
}
let query = { let query = {
code: this.filterQuery.invWarehouseCode, code: this.filterQuery.invCode,
enabled: true, enabled: true,
}; };
getLocalJoinByUser(query) getLocalJoinByUser(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action; this.filterQuery.action = this.busTypes[0].action;
})
.catch(() => {
});
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.getSubInvList();
this.getList();
}
}) })
.catch(() => { .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;
}
}
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.currentRow = val; this.currentRow = val;
this.getOrderDetails(); this.getOrderDetails();
@ -706,9 +659,10 @@ export default {
}, },
// //
getList() { getList() {
this.loading = true; this.loading = true;
getDraft(this.filterQuery) this.currentRow = {billNo: ""};
this.clearDetailList();
getOrderList(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
@ -724,34 +678,12 @@ export default {
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
// this.loading = true;
// this.currentRow = null;
// this.clearDetailList();
// getOrderList(this.filterQuery)
// .then((response) => {
// this.loading = false;
// if (response.code === 20000) {
// this.list = response.data.list || [];
// this.total = response.data.total || 0;
// } else {
// this.$message.error(response.message);
// }
// })
// .catch((error) => {
// this.$message.error(error.message)
// this.loading = false;
// this.list = [];
// this.total = 0;
// });
}, },
deleteOrders(data) { deleteOrders(data) {
this.loading = true; this.loading = true;
this.deleteData.id = data; this.deleteData.id = data;
deleteByOrderId(this.deleteData) deleteByOrderId(this.deleteData)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.getList(); this.getList();
this.$message({ this.$message({
@ -779,34 +711,14 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
invChange() { getInvList() {
this.subInvList = []; getInvListByUser()
this.filterQuery.invWarehouseCode = "";
let query = {
pcode: this.filterQuery.locStorageCode
};
filterSubByInv(query)
.then((response) => { .then((response) => {
this.subInvList = response.data || []; this.invList = response.data || [];
}) })
.catch(() => { .catch(() => {
}); });
}, },
getSubInvList() {
let query = {
filter: 3,
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
this.getList();
})
.catch(() => {
});
},
subInvChange() {
this.getBusType();
},
checkOrder(orderId) { checkOrder(orderId) {
}, },
onBizReset() { onBizReset() {
@ -929,22 +841,6 @@ export default {
editResultDialog(row) { editResultDialog(row) {
}, },
//
closeAcceptDialog() {
this.acceptOrderVisible = false;
},
//
reviewOrder(row) {
this.acceptQuery = row;
this.acceptOrderVisible = true;
},
parentByFn: function (childValue) {
this.getList();
},
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {
@ -962,7 +858,7 @@ export default {
}; };
}, },
created() { created() {
this.getSubInvList(); this.getInvList();
this.getBusType(); this.getBusType();
let query = this.$route.query; let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query); this.filterQuery = Object.assign(this.filterQuery, query);
@ -973,7 +869,7 @@ export default {
this.enableDept = true; this.enableDept = true;
} }
} }
}) });
}, },
}; };
</script> </script>

@ -441,20 +441,9 @@ export default {
this.filterQuery.page = val; this.filterQuery.page = val;
this.getList(); this.getList();
}, },
handleUnitClick(row) {
this.curIndex = row.id;
this.dialogTableVisible = true;
},
closeDetailDialog(val) { closeDetailDialog(val) {
this.codeDetailVisible = false; this.codeDetailVisible = false;
}, },
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].name;
}
}
},
getBusType() { getBusType() {
let query = { let query = {
code: this.filterQuery.invCode, code: this.filterQuery.invCode,

@ -245,7 +245,7 @@
v-show="bizTotal>0" v-show="bizTotal>0"
:total="bizTotal" :total="bizTotal"
:page.sync="bizQuery.page" :page.sync="bizQuery.page"
:limit.sync="codeQuery.limit" :limit.sync="bizQuery.limit"
@pagination="getBizDetailList" @pagination="getBizDetailList"
/> />
</el-tab-pane> </el-tab-pane>
@ -454,8 +454,6 @@ import {
} from "../../api/inout/order"; } from "../../api/inout/order";
import {getLocalJoinByUser} from "@/api/basic/busType"; import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser} from "@/api/system/invWarehouse"; import {getInvListByUser} from "@/api/system/invWarehouse";
import {findInvByUser} from "@/api/system/invSubWarehouse";
import {filterSubByInv} from "@/api/system/invSubWarehouse";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {selectSysParamByKey} from "@/api/param/systemParamConfig"; import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {getBizDetailList} from "@/api/inout/orderDetailBiz"; import {getBizDetailList} from "@/api/inout/orderDetailBiz";
@ -479,8 +477,8 @@ export default {
billNo: null, billNo: null,
mainAction: null, mainAction: null,
action: null, action: null,
page: 1,
statusType: "unCheck", statusType: "unCheck",
page: 1,
limit: 10, limit: 10,
startTime: null, startTime: null,
endTime: null, endTime: null,
@ -663,7 +661,7 @@ export default {
// //
getList() { getList() {
this.loading = true; this.loading = true;
this.currentRow = null; this.currentRow = {billNo: ""};
this.clearDetailList(); this.clearDetailList();
getOrderList(this.filterQuery) getOrderList(this.filterQuery)
.then((response) => { .then((response) => {
@ -687,7 +685,6 @@ export default {
this.deleteData.id = data; this.deleteData.id = data;
deleteByOrderId(this.deleteData) deleteByOrderId(this.deleteData)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.getList(); this.getList();
this.$message({ this.$message({
@ -719,11 +716,9 @@ export default {
getInvListByUser() getInvListByUser()
.then((response) => { .then((response) => {
this.invList = response.data || []; this.invList = response.data || [];
console.log(this.invList)
// this.getList();
}) })
.catch(() => { .catch(() => {
}) });
}, },
checkOrder(orderId) { checkOrder(orderId) {
}, },
@ -875,7 +870,7 @@ export default {
this.enableDept = true; this.enableDept = true;
} }
} }
}) });
}, },
}; };
</script> </script>

Loading…
Cancel
Save