新增出入库优化

prod
曹晨晨 2 years ago
parent bfb6b7eb28
commit 9064b1351c

@ -188,11 +188,15 @@
<el-row v-if="documentShow"> <el-row v-if="documentShow">
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="acceptance" label="预验收单据:"> <el-form-item prop="acceptance" label="预验收单据:">
<el-input <el-select style="width: 90%" v-model="orderFormData.checkPreInOrders" multiple placeholder="请选入单据">
style="width:90%" <el-option
:disabled="true" v-for="(item,index) in orderFormData.checkPreInOrders"
v-model="orderFormData.checkPreInOrders" :key="item.index"
></el-input> :label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -292,6 +296,7 @@
<dialog-create-order-select <dialog-create-order-select
@giveselectbox="giveselectbox" @giveselectbox="giveselectbox"
:closeDialogtwo="closeDialogtwo" :closeDialogtwo="closeDialogtwo"
:checkPreInOrders="orderFormData.checkPreInOrders"
> >
</dialog-create-order-select> </dialog-create-order-select>
</el-dialog> </el-dialog>
@ -399,9 +404,9 @@ export default {
action: [ action: [
{ required: true, message: "请选择单据类型", trigger: "change" }, { required: true, message: "请选择单据类型", trigger: "change" },
], ],
acceptance:[ acceptance: [
{required: true, message: "请选入预验收单据", trigger: "blur"}, { required: true, message: "请选入预验收单据", trigger: "blur" },
] ],
}, },
isScan: true, isScan: true,
scanText: "扫码录入:", scanText: "扫码录入:",
@ -431,7 +436,7 @@ export default {
viewCodeVisible: false, viewCodeVisible: false,
viewCodeDetailVisible: false, viewCodeDetailVisible: false,
documentShow:false,// documentShow: false, //
}; };
}, },
components: { components: {
@ -459,15 +464,16 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
// //
giveselectbox(val) { giveselectbox(val) {
this.orderFormData.checkPreInOrders = val; this.orderFormData.checkPreInOrders = JSON.parse(JSON.stringify(val))
}, },
// //
changeInv() { changeInv() {
this.orderFormData.action = null; this.orderFormData.action = null;
if(this.documentShow=true){ this.orderFormData.checkPreInOrders=null
this.documentShow=false if ((this.documentShow = true)) {
this.documentShow = false;
} }
this.getBusTypeByInv(); this.getBusTypeByInv();
}, },
@ -547,6 +553,8 @@ export default {
// //
actionChange(item) { actionChange(item) {
this.orderFormData.checkPreInOption=null
this.orderFormData.checkPreInOrders=null
this.curAction = this.getActionItem(item); this.curAction = this.getActionItem(item);
if ( if (
(this.curAction.checkEnable && this.curAction.checkWebNew) || (this.curAction.checkEnable && this.curAction.checkWebNew) ||
@ -568,14 +576,13 @@ export default {
this.orderFormData.fromInvCode = null; this.orderFormData.fromInvCode = null;
this.findFromInvList(); this.findFromInvList();
} }
if(this.curAction.scanPreIn = true && this.curAction.backPreinType == 1){ if (
this.documentShow=true (this.curAction.scanPreIn = true && this.curAction.backPreinType == 1)
} ) {
else{ this.documentShow = true;
this.documentShow=false } else {
this.documentShow = false;
} }
this.giveselectbox();
}, },
// //

@ -117,15 +117,20 @@
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table <el-table
ref="multipleTable" ref="multipleTable"
@select="select" @select-all="handleAll"
:header-cell-class-name="leftheaderStyle"
@selection-change="handleSelectionChange"
v-loading="loading" v-loading="loading"
:data="list" :data="list"
style="width: 100%" style="width: 100%"
highlight-current-row highlight-current-row
border border
@row-click="handleSelectionChange"
> >
<!-- <el-table-column type="selection" width="55"></el-table-column> --> <el-table-column
type="selection"
:selectable="checkSelection"
width="55"
></el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="扫码单据类型" label="扫码单据类型"
@ -245,6 +250,10 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
checkPreInOrders: {
type: Array,
required: true,
},
}, },
data() { data() {
return { return {
@ -361,8 +370,9 @@ export default {
resultTotal: 0, resultTotal: 0,
resultDetailLoading: false, resultDetailLoading: false,
resultDetailList: [], resultDetailList: [],
selectboxs: [], multipleSelection: [],
selectbox: "", selectbox: [],
selectRow: null,
}; };
}, },
components: {}, components: {},
@ -402,20 +412,23 @@ export default {
// //
combine() { combine() {
this.closeDialogtwo(); this.closeDialogtwo();
this.$emit("giveselectbox", this.currentRow.billNo); this.$emit("giveselectbox", this.selectbox);
}, },
// //
// select(selection,row){
// // console.log(row); //
// this.selectboxs.push(row) checkSelection(row, index) {
// let nerArr = JSON.parse(JSON.stringify(this.selectboxs)) let flag = true;
// let qwe = nerArr.map(item=>{ if (this.checkPreInOrders.length === 0) {
// // flag = true;
// return item.billNo } else {
// }) if (this.checkPreInOrders.includes(row.billNo)) {
// this.selectbox=qwe flag = false;
// }, } else {
flag = true;
}
}
return flag;
},
// //
closeLocalDialog() {}, closeLocalDialog() {},
hideSearch() { hideSearch() {
@ -432,10 +445,21 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
//
handleSelectionChange(val) { handleSelectionChange(val) {
this.currentRow = val; let checkboxs = JSON.parse(JSON.stringify(val));
console.log(this.currentRow.billNo); this.multipleSelection = checkboxs.map((item) => {
this.getOrderDetails(); return item.billNo;
});
let hebin = [...this.checkPreInOrders, ...this.multipleSelection];
let boxarry = Array.from(new Set(hebin));
this.selectbox = boxarry;
},
//
handleAll(selection) {
if(selection.length==0){
this.$refs.multipleTable.clearSelection()
}
}, },
// //
getOrderDetails() { getOrderDetails() {
@ -726,4 +750,5 @@ export default {
</script> </script>
<style type="text/scss" lang="scss"> <style type="text/scss" lang="scss">
</style> </style>

@ -35,9 +35,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.166:9991/`,
target: `http://192.168.0.66:9150/UDI_WMS_MC/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",

Loading…
Cancel
Save