新增出入库优化并合并ccc

prod
曹晨晨 2 years ago
commit b3ae0076b2

@ -16,13 +16,13 @@
type="primary"
v-if="documentShow"
@click.native="OptionalDocument()"
>选入预验收库单
>选入预验收库单
</el-button>
<el-button size="mini" type="primary" @click.native="saveOrder()"
>草稿保存
>草稿保存
</el-button>
<el-button size="mini" type="primary" @click.native="submit()"
>立即提交
>立即提交
</el-button>
</el-button-group>
<el-row>
@ -92,8 +92,8 @@
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.warehouseName
}}</span>
item.warehouseName
}}</span>
</el-option>
</el-select>
</el-form-item>
@ -153,8 +153,8 @@
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
item.code
}}</span>
</el-option>
</el-select>
</el-form-item>
@ -188,11 +188,20 @@
<el-row v-if="documentShow">
<el-col :span="11">
<el-form-item prop="acceptance" label="预验收单据:">
<el-input
style="width:90%"
:disabled="true"
<el-select
style="width: 90%"
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-col>
</el-row>
@ -223,7 +232,7 @@
size="mini"
@click.native.stop="addCode()"
style="margin-left: 15px"
>添加
>添加
</el-button>
</el-col>
</el-row>
@ -292,6 +301,7 @@
<dialog-create-order-select
@giveselectbox="giveselectbox"
:closeDialogtwo="closeDialogtwo"
:checkPreInOrders="orderFormData.checkPreInOrders"
>
</dialog-create-order-select>
</el-dialog>
@ -308,9 +318,9 @@ import {
updateCodeBindSup,
enterCodeWeb,
} from "../../api/inout/order";
import {findByFrom, findInvByUser} from "../../api/system/invSubWarehouse";
import {parseTime} from "../../utils/coTools";
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain";
import { findByFrom, findInvByUser } from "../../api/system/invSubWarehouse";
import { parseTime } from "../../utils/coTools";
import { getBasicUnitMaintains } from "../../api/basic/basicUnitMaintain";
import editCodeDialog from "./DialogEditCode";
import DialogCreateOrderSelect from "./DialogCreateOrderSelect";
@ -318,7 +328,7 @@ import codesPanel from "./PanelCreateOrderCodes";
import codeDetailPanel from "./PanelCreateOrderCodeDetail";
import bizDetailPanel from "./PanelCreateOrderBizDetail";
import A from "../../plugins/KeyScaner";
import {findByInvUser} from "@/api/basic/busType";
import { findByInvUser } from "@/api/basic/busType";
export default {
name: "ioCreateOrder",
@ -388,20 +398,20 @@ export default {
formRules: {
corpOrderId: [
{required: true, message: "请输入单据号", trigger: "blur"},
{ required: true, message: "请输入单据号", trigger: "blur" },
],
createTime: [
{required: true, message: "请选择创建时间", trigger: "blur"},
{ required: true, message: "请选择创建时间", trigger: "blur" },
],
invCode: [
{required: true, message: "请选择当前仓库", trigger: "change"},
{ required: true, message: "请选择当前仓库", trigger: "change" },
],
action: [
{required: true, message: "请选择单据类型", trigger: "change"},
{ required: true, message: "请选择单据类型", trigger: "change" },
],
acceptance: [
{required: true, message: "请选入预验收单据", trigger: "blur"},
]
{ required: true, message: "请选入预验收单据", trigger: "blur" },
],
},
isScan: true,
scanText: "扫码录入:",
@ -430,8 +440,7 @@ export default {
viewBizVisible: false,
viewCodeVisible: false,
viewCodeDetailVisible: false,
documentShow: false,//
documentShow: false, //
};
},
components: {
@ -457,18 +466,18 @@ export default {
this.getBusTypeByInv();
}
})
.catch(() => {
});
.catch(() => {});
},
//
//
giveselectbox(val) {
this.orderFormData.checkPreInOrders = val;
this.orderFormData.checkPreInOrders = JSON.parse(JSON.stringify(val));
},
//
changeInv() {
this.orderFormData.action = null;
if (this.documentShow = true) {
this.documentShow = false
this.orderFormData.checkPreInOrders = null;
if ((this.documentShow = true)) {
this.documentShow = false;
}
this.getBusTypeByInv();
},
@ -482,8 +491,7 @@ export default {
.then((response) => {
this.busTypeOptions = response.data || [];
})
.catch(() => {
});
.catch(() => {});
},
//
closeDialogtwo() {
@ -515,8 +523,7 @@ export default {
this.bizShow = true;
} else this.bizShow = false;
})
.catch(() => {
});
.catch(() => {});
},
//
@ -550,6 +557,8 @@ export default {
//
actionChange(item) {
this.orderFormData.checkPreInOption = null;
this.orderFormData.checkPreInOrders = null;
this.curAction = this.getActionItem(item);
if (
(this.curAction.checkEnable && this.curAction.checkWebNew) ||
@ -571,13 +580,13 @@ export default {
this.orderFormData.fromInvCode = null;
this.findFromInvList();
}
if (this.curAction.scanPreIn && this.curAction.backPreinType == 1) {
this.documentShow = true
if (
(this.curAction.scanPreIn = true && this.curAction.backPreinType == 1)
) {
this.documentShow = true;
} else {
this.documentShow = false
this.documentShow = false;
}
this.giveselectbox();
},
//
@ -592,8 +601,7 @@ export default {
this.orderFormData.fromInvCode = this.fromInvOptions[0].code;
}
})
.catch(() => {
});
.catch(() => {});
},
//
@ -666,8 +674,7 @@ export default {
confirmButtonText: "确定",
type: "warning",
closeOnClickModal: true,
callback: (action) => {
},
callback: (action) => {},
});
}
this.corpOrderIdDisabled = true;
@ -697,8 +704,7 @@ export default {
tQuery.ignoreExpire = true;
this.addCodeSubmit(tQuery);
})
.catch(() => {
});
.catch(() => {});
} else if (response.code == 505) {
this.$confirm(response.message, "提示", {
confirmButtonText: "确定",
@ -709,29 +715,24 @@ export default {
tQuery.ignoreRecentExpire = true;
this.addCodeSubmit(tQuery);
})
.catch(() => {
});
.catch(() => {});
} else if (response.code == 605) {
this.$confirm(response.message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
}).catch(() => {
});
})
.then(() => {})
.catch(() => {});
return;
} else if (response.code == 604) {
this.$confirm(response.message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
}).catch(() => {
});
})
.then(() => {})
.catch(() => {});
return;
} else if (response.code == 507) {
this.editOriginCodeVisible = true;
@ -925,8 +926,7 @@ export default {
this.$message.error(response.message);
}
})
.catch(() => {
});
.catch(() => {});
},
closeCodeDialog() {
this.editOriginCodeVisible = false;

@ -64,15 +64,20 @@
<el-divider style="margin: 15px"></el-divider>
<el-table
ref="multipleTable"
@select="select"
@select-all="handleAll"
:header-cell-class-name="leftheaderStyle"
@selection-change="handleSelectionChange"
v-loading="loading"
:data="list"
style="width: 100%"
highlight-current-row
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="扫码单据类型"
@ -192,6 +197,10 @@ export default {
type: Function,
required: true,
},
checkPreInOrders: {
type: Array,
required: true,
},
},
data() {
return {
@ -306,8 +315,9 @@ export default {
resultTotal: 0,
resultDetailLoading: false,
resultDetailList: [],
selectboxs: [],
selectbox: "",
multipleSelection: [],
selectbox: [],
selectRow: null,
};
},
components: {},
@ -345,20 +355,23 @@ export default {
//
combine() {
this.closeDialogtwo();
this.$emit("giveselectbox", this.currentRow.billNo);
this.$emit("giveselectbox", this.selectbox);
},
// //
// select(selection,row){
// // console.log(row);
// this.selectboxs.push(row)
// let nerArr = JSON.parse(JSON.stringify(this.selectboxs))
// let qwe = nerArr.map(item=>{
// //
// return item.billNo
// })
// this.selectbox=qwe
// },
//
checkSelection(row, index) {
let flag = true;
if (this.checkPreInOrders.length === 0) {
flag = true;
} else {
if (this.checkPreInOrders.includes(row.billNo)) {
flag = false;
} else {
flag = true;
}
}
return flag;
},
//
closeLocalDialog() {
},
@ -377,10 +390,21 @@ export default {
.catch(() => {
});
},
//
handleSelectionChange(val) {
this.currentRow = val;
console.log(this.currentRow.billNo);
this.getOrderDetails();
let checkboxs = JSON.parse(JSON.stringify(val));
this.multipleSelection = checkboxs.map((item) => {
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() {
@ -644,4 +668,5 @@ export default {
</script>
<style type="text/scss" lang="scss">
</style>

Loading…
Cancel
Save