新增出入库优化并合并ccc

prod
曹晨晨 2 years ago
commit b3ae0076b2

@ -188,11 +188,20 @@
<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%" style="width: 90%"
:disabled="true"
v-model="orderFormData.checkPreInOrders" v-model="orderFormData.checkPreInOrders"
></el-input> multiple
placeholder="请选入单据"
>
<el-option
v-for="(item, index) in orderFormData.checkPreInOrders"
:key="item.index"
:label="item"
:value="item"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -292,6 +301,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>
@ -308,9 +318,9 @@ import {
updateCodeBindSup, updateCodeBindSup,
enterCodeWeb, enterCodeWeb,
} from "../../api/inout/order"; } from "../../api/inout/order";
import {findByFrom, findInvByUser} from "../../api/system/invSubWarehouse"; import { findByFrom, findInvByUser } from "../../api/system/invSubWarehouse";
import {parseTime} from "../../utils/coTools"; import { parseTime } from "../../utils/coTools";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"; import { getBasicUnitMaintains } from "../../api/basic/basicUnitMaintain";
import editCodeDialog from "./DialogEditCode"; import editCodeDialog from "./DialogEditCode";
import DialogCreateOrderSelect from "./DialogCreateOrderSelect"; import DialogCreateOrderSelect from "./DialogCreateOrderSelect";
@ -318,7 +328,7 @@ import codesPanel from "./PanelCreateOrderCodes";
import codeDetailPanel from "./PanelCreateOrderCodeDetail"; import codeDetailPanel from "./PanelCreateOrderCodeDetail";
import bizDetailPanel from "./PanelCreateOrderBizDetail"; import bizDetailPanel from "./PanelCreateOrderBizDetail";
import A from "../../plugins/KeyScaner"; import A from "../../plugins/KeyScaner";
import {findByInvUser} from "@/api/basic/busType"; import { findByInvUser } from "@/api/basic/busType";
export default { export default {
name: "ioCreateOrder", name: "ioCreateOrder",
@ -388,20 +398,20 @@ export default {
formRules: { formRules: {
corpOrderId: [ corpOrderId: [
{required: true, message: "请输入单据号", trigger: "blur"}, { required: true, message: "请输入单据号", trigger: "blur" },
], ],
createTime: [ createTime: [
{required: true, message: "请选择创建时间", trigger: "blur"}, { required: true, message: "请选择创建时间", trigger: "blur" },
], ],
invCode: [ invCode: [
{required: true, message: "请选择当前仓库", trigger: "change"}, { required: true, message: "请选择当前仓库", trigger: "change" },
], ],
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: "扫码录入:",
@ -430,8 +440,7 @@ export default {
viewBizVisible: false, viewBizVisible: false,
viewCodeVisible: false, viewCodeVisible: false,
viewCodeDetailVisible: false, viewCodeDetailVisible: false,
documentShow: false, //
documentShow: false,//
}; };
}, },
components: { components: {
@ -457,18 +466,18 @@ export default {
this.getBusTypeByInv(); this.getBusTypeByInv();
} }
}) })
.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();
}, },
@ -482,8 +491,7 @@ export default {
.then((response) => { .then((response) => {
this.busTypeOptions = response.data || []; this.busTypeOptions = response.data || [];
}) })
.catch(() => { .catch(() => {});
});
}, },
// //
closeDialogtwo() { closeDialogtwo() {
@ -515,8 +523,7 @@ export default {
this.bizShow = true; this.bizShow = true;
} else this.bizShow = false; } else this.bizShow = false;
}) })
.catch(() => { .catch(() => {});
});
}, },
// //
@ -550,6 +557,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) ||
@ -571,13 +580,13 @@ export default {
this.orderFormData.fromInvCode = null; this.orderFormData.fromInvCode = null;
this.findFromInvList(); this.findFromInvList();
} }
if (this.curAction.scanPreIn && this.curAction.backPreinType == 1) { if (
this.documentShow = true (this.curAction.scanPreIn = true && this.curAction.backPreinType == 1)
) {
this.documentShow = true;
} else { } else {
this.documentShow = false this.documentShow = false;
} }
this.giveselectbox();
}, },
// //
@ -592,8 +601,7 @@ export default {
this.orderFormData.fromInvCode = this.fromInvOptions[0].code; this.orderFormData.fromInvCode = this.fromInvOptions[0].code;
} }
}) })
.catch(() => { .catch(() => {});
});
}, },
// //
@ -666,8 +674,7 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
type: "warning", type: "warning",
closeOnClickModal: true, closeOnClickModal: true,
callback: (action) => { callback: (action) => {},
},
}); });
} }
this.corpOrderIdDisabled = true; this.corpOrderIdDisabled = true;
@ -697,8 +704,7 @@ export default {
tQuery.ignoreExpire = true; tQuery.ignoreExpire = true;
this.addCodeSubmit(tQuery); this.addCodeSubmit(tQuery);
}) })
.catch(() => { .catch(() => {});
});
} else if (response.code == 505) { } else if (response.code == 505) {
this.$confirm(response.message, "提示", { this.$confirm(response.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -709,29 +715,24 @@ export default {
tQuery.ignoreRecentExpire = true; tQuery.ignoreRecentExpire = true;
this.addCodeSubmit(tQuery); this.addCodeSubmit(tQuery);
}) })
.catch(() => { .catch(() => {});
});
} else if (response.code == 605) { } else if (response.code == 605) {
this.$confirm(response.message, "提示", { this.$confirm(response.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {})
}).catch(() => { .catch(() => {});
});
return; return;
} else if (response.code == 604) { } else if (response.code == 604) {
this.$confirm(response.message, "提示", { this.$confirm(response.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { })
.then(() => {})
}).catch(() => { .catch(() => {});
});
return; return;
} else if (response.code == 507) { } else if (response.code == 507) {
this.editOriginCodeVisible = true; this.editOriginCodeVisible = true;
@ -925,8 +926,7 @@ export default {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {});
});
}, },
closeCodeDialog() { closeCodeDialog() {
this.editOriginCodeVisible = false; this.editOriginCodeVisible = false;

@ -64,15 +64,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="扫码单据类型"
@ -192,6 +197,10 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
checkPreInOrders: {
type: Array,
required: true,
},
}, },
data() { data() {
return { return {
@ -306,8 +315,9 @@ export default {
resultTotal: 0, resultTotal: 0,
resultDetailLoading: false, resultDetailLoading: false,
resultDetailList: [], resultDetailList: [],
selectboxs: [], multipleSelection: [],
selectbox: "", selectbox: [],
selectRow: null,
}; };
}, },
components: {}, components: {},
@ -345,20 +355,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() {
}, },
@ -377,10 +390,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() {
@ -644,4 +668,5 @@ export default {
</script> </script>
<style type="text/scss" lang="scss"> <style type="text/scss" lang="scss">
</style> </style>

Loading…
Cancel
Save