|
|
|
@ -14,9 +14,7 @@
|
|
|
|
|
<span
|
|
|
|
|
style="margin: 10px;color: #2d8cf0;font-size: 14px;"
|
|
|
|
|
>部门 : {{ this.userInfo.deptName }}</span>
|
|
|
|
|
<span
|
|
|
|
|
style="margin-right: 18px;margin-left:8px;color: #2d8cf0;font-size: 14px;"
|
|
|
|
|
>仓库 : {{ this.userInfo.inv }}</span>
|
|
|
|
|
|
|
|
|
|
<span style="font-weight: 500;color:rgb(51 48 48); font-size: 14px;">用户 : {{
|
|
|
|
|
this.userInfo.companyName
|
|
|
|
|
}}</span>
|
|
|
|
@ -45,11 +43,11 @@
|
|
|
|
|
<!-->草稿保存-->
|
|
|
|
|
<!--</el-button>-->
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="chooseDraftOrder()" :loading="submitLoading"
|
|
|
|
|
v-if="splitType=='out'"style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
v-if="splitType=='out'" style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>选入草稿单据
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="draftOrder()" :loading="submitLoading"
|
|
|
|
|
v-if="splitType=='out'"style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
v-if="splitType=='out'" style="margin-right: 8px;border-radius: 5%;"
|
|
|
|
|
>草稿保存
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
|
|
|
|
@ -157,7 +155,7 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" v-if="splitType=='out'">
|
|
|
|
|
<el-form-item prop="fifoSplit" class="query-form-item" label="上货方式:">
|
|
|
|
|
<el-radio-group v-model="orderFormData.fifoSplit">
|
|
|
|
|
<el-radio-group v-model="orderFormData.fifoSplit" :disabled="fifoSplitEnable">
|
|
|
|
|
<el-radio :label="1">拆零上货</el-radio>
|
|
|
|
|
<el-radio :label="2">整取上货</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
@ -313,6 +311,7 @@ import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage";
|
|
|
|
|
import {printSplitLabel} from "@/api/collect/splitCreateOrder";
|
|
|
|
|
import {findInvRemind} from "@/api/inout/splitCode";
|
|
|
|
|
import chooseDraftOrderDialog from "./chooseDraftOrderDialog"
|
|
|
|
|
import {getUserBindWork} from '@/api/basic/collectPoint/userWorkplace'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "ioCreateOrder",
|
|
|
|
@ -367,6 +366,7 @@ export default {
|
|
|
|
|
inv: this.$store.getters.locInvName,
|
|
|
|
|
deptName: this.$store.getters.locDeptName,
|
|
|
|
|
userName: this.$store.getters.name,
|
|
|
|
|
userId: this.$store.getters.userId,
|
|
|
|
|
companyName: this.$store.getters.companyName,
|
|
|
|
|
},
|
|
|
|
|
workplaceId: null,
|
|
|
|
@ -517,7 +517,9 @@ export default {
|
|
|
|
|
scanResultType: "success",
|
|
|
|
|
msgTip: "当前工位存量提醒:",
|
|
|
|
|
splitType: null,
|
|
|
|
|
rowData: {}
|
|
|
|
|
rowData: {},
|
|
|
|
|
curWorkPlace: null,
|
|
|
|
|
fifoSplitEnable: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
@ -525,23 +527,20 @@ export default {
|
|
|
|
|
codeDetailPanel,
|
|
|
|
|
editCodeDialog,
|
|
|
|
|
DialogCreateOrderSelect,
|
|
|
|
|
DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct,chooseDraftOrderDialog
|
|
|
|
|
DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct, chooseDraftOrderDialog
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
changeInvRemind(val) {
|
|
|
|
|
let post = {
|
|
|
|
|
workPlaceCode: val
|
|
|
|
|
}
|
|
|
|
|
this.defaultSplitType()
|
|
|
|
|
findInvRemind(post).then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.msgTip = response.data
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
successCloseData() {
|
|
|
|
|
let workPlaceCode = this.orderFormData.workPlaceCode
|
|
|
|
@ -566,10 +565,21 @@ export default {
|
|
|
|
|
sickerAdNum: null,
|
|
|
|
|
workPlaceCode: null,
|
|
|
|
|
fifoSplit: 1,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.orderFormData.workPlaceCode = workPlaceCode
|
|
|
|
|
this.scanCode = "";
|
|
|
|
|
this.corpOrderIdDisabled = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.splitType = this.$route.query.splitType;
|
|
|
|
|
if (this.splitType == "search") {
|
|
|
|
|
} else if (this.splitType == "out") {
|
|
|
|
|
this.orderFormData.action = 'SC72197936495755';
|
|
|
|
|
} else if (this.splitType == "return") {
|
|
|
|
|
this.orderFormData.action = 'SC72249388338364';
|
|
|
|
|
}
|
|
|
|
|
this.orderFormData.fromCorp = "72198012799726";
|
|
|
|
|
this.refreshCodesPanel()
|
|
|
|
|
},
|
|
|
|
|
//获取用户仓库列表
|
|
|
|
@ -592,6 +602,16 @@ export default {
|
|
|
|
|
.catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
defaultSplitType() {
|
|
|
|
|
this.curWorkPlace = this.curWorkPlaces.find(item => item.workplaceId == this.orderFormData.workPlaceCode);
|
|
|
|
|
this.orderFormData.fifoSplit = this.curWorkPlace.workplaceType
|
|
|
|
|
if (this.curWorkPlace.workplaceType == 1 || this.curWorkPlace.workplaceType == 2) {
|
|
|
|
|
this.fifoSplitEnable = true;
|
|
|
|
|
} else {
|
|
|
|
|
this.orderFormData.fifoSplit = 1;
|
|
|
|
|
this.fifoSplitEnable = false;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//仓库改变
|
|
|
|
|
changeInv(row) {
|
|
|
|
|
this.orderFormData.action = null;
|
|
|
|
@ -934,16 +954,17 @@ export default {
|
|
|
|
|
//获取当前货位
|
|
|
|
|
findCurWorkPlaces(val) {
|
|
|
|
|
let query = {
|
|
|
|
|
key: val,
|
|
|
|
|
status: 1,
|
|
|
|
|
// invCode: this.orderFormData.invCode,
|
|
|
|
|
// key: val,
|
|
|
|
|
// status: 1,
|
|
|
|
|
userId: this.userInfo.userId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 100,
|
|
|
|
|
}
|
|
|
|
|
listPage(query).then((res) => {
|
|
|
|
|
getUserBindWork(query).then((res) => {
|
|
|
|
|
this.curWorkPlaces = res.data.list || [];
|
|
|
|
|
if (this.curWorkPlaces.length == 1) {
|
|
|
|
|
if (this.curWorkPlaces.length == 1 && this.$isNotBlank(this.orderFormData.workPlaceCode)) {
|
|
|
|
|
this.orderFormData.workPlaceCode = this.curWorkPlaces[0].workplaceId;
|
|
|
|
|
this.defaultSplitType()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -1220,6 +1241,10 @@ export default {
|
|
|
|
|
|
|
|
|
|
refreshOrder(orderQuery) {
|
|
|
|
|
this.orderFormData = orderQuery;
|
|
|
|
|
this.scanCode = "";
|
|
|
|
|
this.result = "";
|
|
|
|
|
this.refreshCodesPanel()
|
|
|
|
|
this.init();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//撤回单据
|
|
|
|
@ -1444,7 +1469,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//选入草稿单据
|
|
|
|
|
chooseDraftOrder(){
|
|
|
|
|
chooseDraftOrder() {
|
|
|
|
|
if (this.$isBlank(this.orderFormData.workPlaceCode)) {
|
|
|
|
|
this.$message.warning("请选择工位!");
|
|
|
|
|
return;
|
|
|
|
@ -1453,12 +1478,12 @@ export default {
|
|
|
|
|
this.rowData.fifoSplit = this.orderFormData.fifoSplit
|
|
|
|
|
this.chooseDraftOrderVisible = true
|
|
|
|
|
},
|
|
|
|
|
closeChooseDialog(){
|
|
|
|
|
closeChooseDialog() {
|
|
|
|
|
this.chooseDraftOrderVisible = false
|
|
|
|
|
},
|
|
|
|
|
handleChoose(billNo){
|
|
|
|
|
this.orderFormData.billNo = billNo
|
|
|
|
|
this.refreshCodesPanel();
|
|
|
|
|
handleChoose(currentRow) {
|
|
|
|
|
this.orderQuery = currentRow
|
|
|
|
|
this.refreshOrder(this.orderQuery)
|
|
|
|
|
},
|
|
|
|
|
draftOrder() {
|
|
|
|
|
let tQuery = Object.assign(
|
|
|
|
@ -1720,8 +1745,6 @@ export default {
|
|
|
|
|
init() {
|
|
|
|
|
//页面初始化
|
|
|
|
|
this.codeFormData.code = "";
|
|
|
|
|
|
|
|
|
|
this.splitType = this.$route.query.splitType;
|
|
|
|
|
if (this.splitType == "search") {
|
|
|
|
|
} else if (this.splitType == "out") {
|
|
|
|
|
this.orderFormData.action = 'SC72197936495755';
|
|
|
|
@ -1795,6 +1818,7 @@ export default {
|
|
|
|
|
inputer.focus();
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.splitType = this.$route.query.splitType;
|
|
|
|
|
this.init();
|
|
|
|
|
if (this.$route.query.workplaceId != null) {
|
|
|
|
|
this.corpOrderIdDisabled = true
|
|
|
|
|