|
|
|
@ -24,12 +24,10 @@
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit()"
|
|
|
|
|
>立即提交
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit(1)"
|
|
|
|
|
v-if="curAction.checkWebNew == 3"
|
|
|
|
|
>未配货提交
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
</el-button-group>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="11">
|
|
|
|
@ -211,6 +209,58 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row v-if="preSpaceShow">
|
|
|
|
|
<el-col :span="11">
|
|
|
|
|
<el-form-item prop="checkPreInInvCode" label="预验收仓库:">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="orderFormData.checkPreInInvCode"
|
|
|
|
|
placeholder="预验收仓库"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
:disabled="corpOrderIdDisabled"
|
|
|
|
|
@change="changePreInInv"
|
|
|
|
|
filterable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in curPreInInvOptions"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
>
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
|
|
item.code
|
|
|
|
|
}}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="11">
|
|
|
|
|
<el-form-item prop="checkPreInSpaceCode" label="预验收货位:">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="orderFormData.checkPreInSpaceCode"
|
|
|
|
|
placeholder="预验收货位"
|
|
|
|
|
style="width: 90%"
|
|
|
|
|
:disabled="corpOrderIdDisabled"
|
|
|
|
|
filterable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in curPreInSpaceOptions"
|
|
|
|
|
:key="item.name"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.code"
|
|
|
|
|
>
|
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
|
|
item.code
|
|
|
|
|
}}</span>
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row v-if="errView == 1">
|
|
|
|
|
<el-col :span="20">
|
|
|
|
|
<el-form-item prop="errMsg" label="异常信息:">
|
|
|
|
@ -324,7 +374,7 @@ import {
|
|
|
|
|
updateCodeBindSup,
|
|
|
|
|
enterCodeWeb, submitAllocateBiz,
|
|
|
|
|
} from "../../api/inout/order";
|
|
|
|
|
import {findByFrom, findInvByUser} from "../../api/system/invSubWarehouse";
|
|
|
|
|
import {filterSubAll, findByFrom, findInvByUser} from "../../api/system/invSubWarehouse";
|
|
|
|
|
import {parseTime} from "../../utils/coTools";
|
|
|
|
|
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain";
|
|
|
|
|
import editCodeDialog from "./DialogEditCode";
|
|
|
|
@ -335,6 +385,7 @@ import codeDetailPanel from "./PanelCreateOrderCodeDetail";
|
|
|
|
|
import bizDetailPanel from "./PanelCreateOrderBizDetail";
|
|
|
|
|
import A from "../../plugins/KeyScaner";
|
|
|
|
|
import {findByInvUser} from "@/api/basic/busType";
|
|
|
|
|
import {getInvSpaceList} from "@/api/inventory/invSpace";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "ioCreateOrder",
|
|
|
|
@ -371,6 +422,8 @@ export default {
|
|
|
|
|
fromType: 2,
|
|
|
|
|
errMsg: null,
|
|
|
|
|
checkPreInOrders: null,
|
|
|
|
|
checkPreInInvCode: null,
|
|
|
|
|
checkPreInSpaceCode: null,
|
|
|
|
|
},
|
|
|
|
|
checkPreInArray: [],
|
|
|
|
|
errView: 0,
|
|
|
|
@ -388,6 +441,12 @@ export default {
|
|
|
|
|
curInvOptions: [],
|
|
|
|
|
busTypeOptions: [],
|
|
|
|
|
fromInvOptions: [],
|
|
|
|
|
|
|
|
|
|
preSpaceShow: false, //是否显示选择预验收界面
|
|
|
|
|
curPreInInvOptions: [], //预验收仓库
|
|
|
|
|
curPreInSpaceOptions: [], //预验收货位
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
curAction: {
|
|
|
|
|
corpType: 0,
|
|
|
|
|
genUnit: false,
|
|
|
|
@ -577,7 +636,8 @@ export default {
|
|
|
|
|
this.orderFormData.checkPreInOrders = null;
|
|
|
|
|
this.checkPreInArray = [];
|
|
|
|
|
this.curAction = this.getActionItem(item);
|
|
|
|
|
if ((this.curAction.checkEnable && this.curAction.checkWebNew!=0) || this.viewType == 1) {
|
|
|
|
|
debugger
|
|
|
|
|
if ((this.curAction.checkEnable && this.curAction.checkWebNew != 0) || this.viewType == 1) {
|
|
|
|
|
//单据类型需要一次校验 或 单据类型为1,显示业务单据页面
|
|
|
|
|
this.bizShow = true;
|
|
|
|
|
} else this.bizShow = false;
|
|
|
|
@ -596,8 +656,12 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
if (this.curAction.scanPreIn && this.curAction.backPreinType == 1 && this.curAction.preInBack) {
|
|
|
|
|
this.documentShow = true;
|
|
|
|
|
} else if (this.curAction.scanPreIn && this.curAction.backPreinType == 2 && this.curAction.preInBack) {
|
|
|
|
|
this.preSpaceShow = true;
|
|
|
|
|
this.findPreInInvList();
|
|
|
|
|
} else {
|
|
|
|
|
this.documentShow = false;
|
|
|
|
|
this.preSpaceShow = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -626,6 +690,36 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//切换预验收仓库
|
|
|
|
|
changePreInInv(row) {
|
|
|
|
|
this.findPreInSpaceList(row.code);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//获取预验收仓库
|
|
|
|
|
findPreInInvList() {
|
|
|
|
|
let query = {
|
|
|
|
|
advanceType: 2,
|
|
|
|
|
}
|
|
|
|
|
filterSubAll(query)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.curPreInInvOptions = response.data || [];
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//获取预验收货位
|
|
|
|
|
findPreInSpaceList(val) {
|
|
|
|
|
let query = {
|
|
|
|
|
invStorageCode: val,
|
|
|
|
|
status: 1,
|
|
|
|
|
}
|
|
|
|
|
getInvSpaceList(query).then((res) => {
|
|
|
|
|
this.curPreInSpaceOptions = res.data.list || [];
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加条码
|
|
|
|
|
addCode(event) {
|
|
|
|
|
this.originCode = "";
|
|
|
|
@ -643,20 +737,20 @@ export default {
|
|
|
|
|
this.$message.warning("请选择单据类型!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(this.curAction.corpType === 0 || this.curAction.corpType === 2 || (this.curAction.corpType === 1 && !this.curAction.genUnit)){
|
|
|
|
|
if(this.$isBlank(this.orderFormData.fromCorp)){
|
|
|
|
|
if (this.curAction.corpType === 0 || this.curAction.corpType === 2 || (this.curAction.corpType === 1 && !this.curAction.genUnit)) {
|
|
|
|
|
if (this.$isBlank(this.orderFormData.fromCorp)) {
|
|
|
|
|
this.$message.warning("请选择往来单位!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(this.curAction.corpType == 3){
|
|
|
|
|
if(this.$isBlank(this.orderFormData.fromInvCode)){
|
|
|
|
|
if (this.curAction.corpType == 3) {
|
|
|
|
|
if (this.$isBlank(this.orderFormData.fromInvCode)) {
|
|
|
|
|
this.$message.warning("请选择往来单位!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(this.curAction.corpType === 1 && this.curAction.genUnit){
|
|
|
|
|
if(this.$isBlank(this.orderFormData.fromCorp)){
|
|
|
|
|
if (this.curAction.corpType === 1 && this.curAction.genUnit) {
|
|
|
|
|
if (this.$isBlank(this.orderFormData.fromCorp)) {
|
|
|
|
|
this.$message.warning("请选择往来单位!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|