Merge remote-tracking branch 'origin/orderChange' into zhairh

zhairh
x_z 2 years ago
commit 2517ddc762

@ -3,7 +3,6 @@
<el-form :model="formData" :rules="formRules" ref="dataForm"> <el-form :model="formData" :rules="formRules" ref="dataForm">
<el-button-group style="display: flex;margin: -50px 0 10px 80%; height: 35px"> <el-button-group style="display: flex;margin: -50px 0 10px 80%; height: 35px">
<el-button <el-button
type="primary" type="primary"
@click.native="saveOrder()" @click.native="saveOrder()"
@ -17,7 +16,6 @@
</el-button </el-button
> >
</el-button-group> </el-button-group>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="2"> <el-col :span="2">
<div class="ao-text"> <div class="ao-text">
@ -49,7 +47,6 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="2"> <el-col :span="2">
<div class="ao-text"> <div class="ao-text">
<span>单据类型</span> <span>单据类型</span>
@ -73,13 +70,13 @@
<el-col :span="2"> <el-col :span="2">
<div class="ao-text"> <div class="ao-text">
<span>当前</span> <span>当前</span>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="invWarehouseCode"> <el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前库信息" <el-select v-model="formData.invWarehouseCode" placeholder="当前库信息"
:disabled="corpOrderIdDisabled" @change="findSubStorageMethod" filterable> :disabled="corpOrderIdDisabled" @change="findSubStorageMethod" filterable>
<el-option <el-option
v-for="item in subInvList" v-for="item in subInvList"
@ -87,14 +84,15 @@
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{
item.warehouseName
}}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
@ -120,6 +118,7 @@
:loading="loading" :loading="loading"
:disabled="corpOrderIdDisabled" :disabled="corpOrderIdDisabled"
@change="unitChange" @change="unitChange"
@focus="findMethod('')"
> >
<el-option <el-option
v-for="item in fromOptions" v-for="item in fromOptions"
@ -135,8 +134,8 @@
v-if="curAction.corpType ==1" v-if="curAction.corpType ==1"
> >
<el-select v-model="formData.fromSubInvCode" placeholder="请选择库" clearable="true" <el-select v-model="formData.fromSubInvCode" placeholder="请选择库" clearable="true"
:disabled="corpOrderIdDisabled" @change="getFormCorp" filterable :disabled="corpOrderIdDisabled" filterable @change="getFormStorageCode"
> >
<el-option <el-option
v-for="item in fromSubStorageOptions" v-for="item in fromSubStorageOptions"
@ -144,7 +143,9 @@
:label="item.name" :label="item.name"
:value="item.code"> :value="item.code">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{
item.warehouseName
}}</span>
<!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>--> <!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>-->
</el-option> </el-option>
</el-select> </el-select>
@ -158,7 +159,10 @@
placeholder="请输入病人住院号" placeholder="请输入病人住院号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" v-if="enableDept"> <el-row :gutter="20" v-if="enableDept">
@ -194,27 +198,27 @@
</el-row> </el-row>
<!-- <el-row :gutter="20">--> <!-- <el-row :gutter="20">-->
<!-- <el-col :span="20" class="el-col">--> <!-- <el-col :span="20" class="el-col">-->
<!-- <div class="text item">--> <!-- <div class="text item">-->
<!-- <el-checkbox v-model="formData.outChangeEnable"--> <!-- <el-checkbox v-model="formData.outChangeEnable"-->
<!-- :disabled="!curAction.changeEnable || corpOrderIdDisabled">允许出库自动缺量补单--> <!-- :disabled="!curAction.changeEnable || corpOrderIdDisabled">允许出库自动缺量补单-->
<!-- </el-checkbox>--> <!-- </el-checkbox>-->
<!-- <el-checkbox v-model="formData.preCheck"--> <!-- <el-checkbox v-model="formData.preCheck"-->
<!-- :disabled="corpOrderIdDisabled || curAction.corpType !=2"--> <!-- :disabled="corpOrderIdDisabled || curAction.corpType !=2"-->
<!-- >出入库必须校验预验收库--> <!-- >出入库必须校验预验收库-->
<!-- </el-checkbox>--> <!-- </el-checkbox>-->
<!-- <el-checkbox v-model="formData.vailInv"--> <!-- <el-checkbox v-model="formData.vailInv"-->
<!-- >是否查询库存--> <!-- >是否查询库存-->
<!-- </el-checkbox>--> <!-- </el-checkbox>-->
<!-- <el-checkbox v-model="formData.codeFillCheck"--> <!-- <el-checkbox v-model="formData.codeFillCheck"-->
<!-- >采集UDI码时进行三期校验--> <!-- >采集UDI码时进行三期校验-->
<!-- </el-checkbox>--> <!-- </el-checkbox>-->
<!-- </div>--> <!-- </div>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- </el-row>--> <!-- </el-row>-->
<el-row :gutter="20" style="margin-top: 12px"> <el-row :gutter="20" style="margin-top: 12px">
<el-col :span="2"> <el-col :span="2">
<div class="ao-text"> <div class="ao-text">
@ -246,12 +250,9 @@
</el-button </el-button
> >
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="14" style="margin-left: 40px"> <el-col :span="14" style="margin-left: 40px">
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<div class="text item" style="margin-left: 30px"> 条码数量{{ total }} <div class="text item" style="margin-left: 30px"> 条码数量{{ total }}
@ -357,6 +358,8 @@
<el-dialog <el-dialog
:title="selectUnitTitle" :title="selectUnitTitle"
:visible.sync="dialogTableVisible" :visible.sync="dialogTableVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="dialogTableVisible" v-if="dialogTableVisible"
width="70%" width="70%"
append-to-body append-to-body
@ -371,6 +374,8 @@
:title="selectRlTitle" :title="selectRlTitle"
:visible.sync="selectRlVisible" :visible.sync="selectRlVisible"
width="80%" width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="selectRlVisible" v-if="selectRlVisible"
append-to-body append-to-body
> >
@ -385,9 +390,9 @@
<el-dialog <el-dialog
:title="editTitle" :title="editTitle"
:visible.sync="editCodeVisible" :visible.sync="editCodeVisible"
append-to-body width="70%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
append-to-body width="70%"
v-if="editCodeVisible" v-if="editCodeVisible"
> >
<editCodeDialog <editCodeDialog
@ -401,6 +406,8 @@
:title="editTitle" :title="editTitle"
:visible.sync="editOriginCodeVisible" :visible.sync="editOriginCodeVisible"
append-to-body width="70%" append-to-body width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="editOriginCodeVisible"> v-if="editOriginCodeVisible">
<editCodeDialog <editCodeDialog
:closeCodeDialog="closeCodeDialog" :closeCodeDialog="closeCodeDialog"
@ -432,6 +439,7 @@ import selectRlDialog from "./DialogSelectRl";
import editCodeDialog from "./editCode"; import editCodeDialog from "./editCode";
import A from "../../plugin/KeyScaner" import A from "../../plugin/KeyScaner"
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {filterDepts} from "@/api/auth/authDept";
import {selectSysParamByKey} from "@/api/param/systemParamConfig"; import {selectSysParamByKey} from "@/api/param/systemParamConfig";
@ -484,6 +492,7 @@ export default {
codeFillCheck: null, codeFillCheck: null,
vailInv: null, vailInv: null,
deptCode: null, deptCode: null,
}, },
editOriginCodeVisible: false, editOriginCodeVisible: false,
curId: null, curId: null,
@ -506,6 +515,7 @@ export default {
deleteLoading: false, deleteLoading: false,
orderNo: null, orderNo: null,
fromOptions: [], fromOptions: [],
fromStorageOptions: [],
fromSubStorageOptions: [], fromSubStorageOptions: [],
curAction: { curAction: {
corpType: 0, corpType: 0,
@ -522,6 +532,7 @@ export default {
checkSuccess: false, checkSuccess: false,
codeDetail: null, codeDetail: null,
editTitle: "编辑条码", editTitle: "编辑条码",
fromDeptOptions: [],
enableDept: false enableDept: false
}; };
}, },
@ -540,14 +551,13 @@ export default {
orderId: this.idQuery.id, orderId: this.idQuery.id,
locStorageCode: this.formData.locStorageCode, locStorageCode: this.formData.locStorageCode,
invWarehouseCode: this.formData.invWarehouseCode, invWarehouseCode: this.formData.invWarehouseCode,
invStorageCode:this.formData.invStorageCode,
fromSubInvCode: this.formData.fromSubInvCode, fromSubInvCode: this.formData.fromSubInvCode,
subInvCode: this.formData.subInvCode,
action: this.formData.action, action: this.formData.action,
fromCorp: this.formData.fromCorp, fromCorp: this.formData.fromCorp,
fromCorpId: this.formData.fromCorpId, fromCorpId: this.formData.fromCorpId,
outChangeEnable: this.formData.outChangeEnable, outChangeEnable: this.formData.outChangeEnable,
preCheck: this.formData.preCheck, preCheck: this.formData.preCheck,
deptCode: this.formData.deptCode,
} }
submitOrderWeb(tQuery) submitOrderWeb(tQuery)
.then((response) => { .then((response) => {
@ -561,11 +571,16 @@ export default {
}); });
}, },
saveOrder() { saveOrder() {
if (this.total < 1) {
this.$message.error('未添加条码');
return;
}
if (this.formData.action == null || this.formData.action == '') { if (this.formData.action == null || this.formData.action == '') {
this.$message.error('未选择扫码单据类型'); this.$message.error('未选择扫码单据类型');
return return
} }
if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') { if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') {
this.$message.error('当前分库不能为空'); this.$message.error('当前分库不能为空');
return; return;
@ -583,7 +598,6 @@ export default {
}); });
}, },
closeCodeDialog() { closeCodeDialog() {
//
this.editCodeVisible = false; this.editCodeVisible = false;
this.editOriginCodeVisible = false; this.editOriginCodeVisible = false;
this.getCodeList(); this.getCodeList();
@ -610,7 +624,6 @@ export default {
code: this.formData.code.trim(), code: this.formData.code.trim(),
} }
enterCodeWeb(tQuery).then((response) => { enterCodeWeb(tQuery).then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.$refs.inputRef.focus(); this.$refs.inputRef.focus();
this.$refs.inputRef.select(); this.$refs.inputRef.select();
@ -643,6 +656,7 @@ export default {
} else if (response.code == 508) { } else if (response.code == 508) {
this.originCode = ""; this.originCode = "";
this.formData.code = "01" + response.data.nameCode; this.formData.code = "01" + response.data.nameCode;
this.originCode = this.formData.code;
} else { } else {
this.$alert(response.message, '提示', { this.$alert(response.message, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -659,7 +673,6 @@ export default {
}); });
}, },
addCode(event) { addCode(event) {
this.originCode = ""; this.originCode = "";
this.sictomText = ""; this.sictomText = "";
this.formData.corpOrderId = this.formData.corpOrderId.trim(); this.formData.corpOrderId = this.formData.corpOrderId.trim();
@ -667,10 +680,9 @@ export default {
this.formData.produceDate = ""; this.formData.produceDate = "";
this.formData.expireDate = ""; this.formData.expireDate = "";
this.formData.serialNo = ""; this.formData.serialNo = "";
if (event != null) {
event.target.select();
}
this.actionEnable = true; this.actionEnable = true;
if (event == null) {
} else event.target.select();
this.$refs.inputRef.select(); this.$refs.inputRef.select();
if (this.$isBlank(this.formData.action)) { if (this.$isBlank(this.formData.action)) {
this.$message.warning("请选择单据类型!"); this.$message.warning("请选择单据类型!");
@ -682,11 +694,6 @@ export default {
return; return;
} }
// if (this.$isBlank(this.formData.fromCorp)) {
// this.$message.error('');
// return;
// }
if (this.curAction.corpType == 1) { if (this.curAction.corpType == 1) {
if (this.$isBlank(this.formData.fromSubInvCode)) { if (this.$isBlank(this.formData.fromSubInvCode)) {
this.$message.error('当前往来分库不能为空'); this.$message.error('当前往来分库不能为空');
@ -720,7 +727,6 @@ export default {
}, },
addCodeSubmit(tQuery) { addCodeSubmit(tQuery) {
addOrderWeb(tQuery).then((response) => { addOrderWeb(tQuery).then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.idQuery.id = response.data.orderId; this.idQuery.id = response.data.orderId;
@ -774,8 +780,8 @@ export default {
}); });
} else if (response.code == 507) { } else if (response.code == 507) {
this.editTitle = response.message;
this.editOriginCodeVisible = true; this.editOriginCodeVisible = true;
this.editTitle = response.message;
this.formData.produceDate = response.data.produceDate; this.formData.produceDate = response.data.produceDate;
this.formData.expireDate = response.data.expireDate; this.formData.expireDate = response.data.expireDate;
this.formData.batchNo = response.data.batchNo; this.formData.batchNo = response.data.batchNo;
@ -786,6 +792,10 @@ export default {
message: "提交失败!" + this.editTitle, message: "提交失败!" + this.editTitle,
customClass: 'messageIndex' customClass: 'messageIndex'
}); });
// this.$message.error("" + this.editTitle);
} else { } else {
this.$alert(response.message, '提示', { this.$alert(response.message, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -793,6 +803,7 @@ export default {
closeOnClickModal: true, closeOnClickModal: true,
callback: action => { callback: action => {
this.$refs.inputRef.focus(); this.$refs.inputRef.focus();
this.$refs.inputRef.select();
} }
}); });
} }
@ -806,13 +817,14 @@ export default {
this.formData.fromCorp = row.name; this.formData.fromCorp = row.name;
this.curRow = row; this.curRow = row;
}, },
storageChange(row) { getFormStorageCode(code) {
this.formData.fromSubInvCode = ""; var row= this.fromSubStorageOptions.find(item => item.code == code)
this.formData.fromCorpId = row.code; this.formData.fromSubInvCode = row.code
this.formData.fromCorpId = row.parentId;
this.formData.fromCorp = row.name; this.formData.fromCorp = row.name;
this.findSubStorageMethod();
}, },
deleteCode(index, row) { deleteCode(index, row) {
this.$confirm("是否确定移除一个条码?", "提示", { this.$confirm("是否确定移除一个条码?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@ -876,53 +888,48 @@ export default {
this.$router.go(-1); this.$router.go(-1);
}, },
getBusType() { getBusType() {
this.formData.billType=null;
let query = { let query = {
code: this.formData.invWarehouseCode, code: this.formData.invWarehouseCode,
enabled: true, enabled: true,
type: 1
}; };
if (isBlank(query.code)) {
query.code = this.$store.getters.locSubInvCode;
}
getLocalJoinByUser(query) getLocalJoinByUser(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
if (this.formData.action != null) { if (this.formData.action != null) {
this.curAction = this.getActionItem(this.formData.action); this.curAction = this.getActionItem(this.formData.action);
if (this.curAction != null) { if (this.curAction != null) {
this.formData.vailInv = this.curAction.vailInv; this.formData.vailInv = this.curAction.vailInv;
this.formData.codeFillCheck = this.curAction.codeFillCheck; this.formData.codeFillCheck = this.curAction.codeFillCheck;
}
} else { } else {
this.curAction = {corpType: 0, genUnit: false, changeEnable: false,}; this.curAction = {corpType: 0, genUnit: false, changeEnable: false,};
this.formData.action = null; this.formData.action = null;
} }
} }
) })
.catch(() => { .catch(() => {
}); });
}, },
subStorageChange() {
this.getBusType();
},
geActionName(action) { geActionName(action) {
this.busTypes.forEach((obj) => { this.busTypes.forEach((obj) => {
if (obj.action == action) { if (obj.action == action) {
return obj.name; return obj.name;
} }
}); });
} },
,
locCHange() { locCHange() {
if (this.$isNotBlank(this.formData.invWarehouseCode)) { if (this.$isNotBlank(this.formData.invWarehouseCode)) {
this.formData.invWarehouseCode = ""; this.formData.invWarehouseCode = "";
} }
this.findStorageMethod(); this.findStorageMethod();
this.findSubInvByInv(this.formData.locStorageCode); this.findSubInvByInv(this.formData.locStorageCode);
} },
,
findMethod(query) { findMethod(query) {
this.fromOptions = []; this.fromOptions = [];
@ -959,13 +966,41 @@ export default {
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
} },
,
findDeptMethod() {
let query = {
flag: 1
};
filterDepts(query)
.then((response) => {
this.loading = false;
this.fromDeptOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.fromDeptOptions = [];
});
},
findStorageMethod() {
findSubStorageMethod() { if (this.formData.locStorageCode == null)
this.formData.invStorageCode= this.subInvList.find(item => item.code == this.formData.invWarehouseCode).parentId return;
this.formData.locStorageCode= this.subInvList.find(item => item.code == this.formData.invWarehouseCode).parentId this.fromStorageOptions = [];
let cQuery = {
locInvCode: this.formData.locStorageCode,
};
filterAllByLoc(cQuery)
.then((response) => {
this.fromStorageOptions = response.data || [];
})
.catch(() => {
});
},
findSubStorageMethod(val) {
this.getBusType(); this.getBusType();
let cQuery = { let cQuery = {
code: this.formData.invWarehouseCode, code: this.formData.invWarehouseCode,
@ -973,48 +1008,45 @@ export default {
}; };
filterSubByInv(cQuery) filterSubByInv(cQuery)
.then((response) => { .then((response) => {
this.fromSubStorageOptions = response.data || []; this.fromSubStorageOptions = response.data || [];
if (val == 1) {
} else
this.formData.fromSubInvCode = this.fromSubStorageOptions[0].code;
}) })
.catch(() => { .catch(() => {
}); });
}
,
getFormCorp(){
this.formData.subInvCode= this.fromSubStorageOptions.find(item => item.code == this.formData.fromSubInvCode).parentId
this.formData.fromCorp=this.fromSubStorageOptions.find(item => item.code == this.formData.fromSubInvCode).warehouseName
this.formData.fromCorpId=this.fromSubStorageOptions.find(item => item.code == this.formData.fromSubInvCode).code
}, },
findSubInvByInv(invCode) {
findSubInvByInv() {
this.subInvList = []; this.subInvList = [];
let query = { let query = {
filter:3 filter: 3
}; };
filterSubByInv(query) filterSubByInv(query)
.then((response) => { .then((response) => {
this.subInvList = response.data || []; this.subInvList = response.data || [];
if (this.subInvList != null) { if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
this.getBusType(); this.getBusType();
this.findSubStorageMethod();
} }
}) })
.catch(() => { .catch(() => {
}); });
} },
,
findDeptMethod() {
let query = { getStorage(event) {
flag: 1 this.storageList = [];
}; filterAllByUser()
filterDepts(query)
.then((response) => { .then((response) => {
this.loading = false; this.storageList = response.data || [];
this.fromDeptOptions = response.data.list || [];
}) })
.catch(() => { .catch(() => {
this.loading = false;
this.fromDeptOptions = [];
}); });
}, },
getActionName(action) { getActionName(action) {
@ -1023,16 +1055,14 @@ export default {
return this.busTypes[i].advanceType; return this.busTypes[i].advanceType;
} }
} }
} },
,
getActionItem(action) { getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) { for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action == action) { if (this.busTypes[i].action == action) {
return this.busTypes[i]; return this.busTypes[i];
} }
} }
} },
,
actionChange(item) { actionChange(item) {
this.curAction = this.getActionItem(item); this.curAction = this.getActionItem(item);
@ -1042,21 +1072,25 @@ export default {
this.$set(this.formData, "preCheck", this.curAction.scanPreIn); this.$set(this.formData, "preCheck", this.curAction.scanPreIn);
this.$set(this.formData, "outChangeEnable", this.curAction.ullageFill); this.$set(this.formData, "outChangeEnable", this.curAction.ullageFill);
this.$set(this.formData, "codeFillCheck", this.curAction.codeFillCheck); this.$set(this.formData, "codeFillCheck", this.curAction.codeFillCheck);
this.formData.fromCorp = null;
this.formData.fromSubInvCode = null;
} // this.formData.vailIn = this.curAction.vailInv;
, // this.formData.preCheck = this.curAction.scanPreIn;
// this.formData.outChangeEnable = this.curAction.ullageFill;
// this.formData.codeFillCheck = this.curAction.codeFillCheck;
},
// //
bindRl(val) { bindRl(val) {
this.curRow = val; this.curRow = val;
this.selectRlVisible = true; this.selectRlVisible = true;
} },
,
handleUnitClick(row) { handleUnitClick(row) {
this.curRow = row; this.curRow = row;
this.dialogTableVisible = true; this.dialogTableVisible = true;
} },
,
selectSupUnit(row) { selectSupUnit(row) {
let query = { let query = {
id: this.curRow.id, id: this.curRow.id,
@ -1073,8 +1107,7 @@ export default {
}).catch(() => { }).catch(() => {
}); });
} },
,
selectBindRl(row) { selectBindRl(row) {
@ -1101,30 +1134,25 @@ export default {
}).catch(() => { }).catch(() => {
}); });
} },
,
closeBindDialog(val) { closeBindDialog(val) {
this.selectRlVisible = false; this.selectRlVisible = false;
this.dialogTableVisible = false; this.dialogTableVisible = false;
} },
,
rowStyle({row, rowIndex}) { rowStyle({row, rowIndex}) {
let rowBackground = {}; let rowBackground = {};
if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.relId)) { if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.relId)) {
//rowBackground.background="#f6f5ee";
rowBackground.color = '#f60303'; rowBackground.color = '#f60303';
} }
return rowBackground; return rowBackground;
} },
,
}, },
filters: {} filters: {},
,
mounted() { mounted() {
document.body.ondrop = function (event) { document.body.ondrop = function (event) {
event.preventDefault(); event.preventDefault();
@ -1155,16 +1183,13 @@ export default {
}; };
inputer.focus(); inputer.focus();
} },
,
created() { created() {
this.formData.code = ''; this.formData.code = '';
this.formData.actDate = new Date(); this.formData.actDate = new Date();
this.codeArray = []; this.codeArray = [];
this.getStorage(this.formData.action);
if (this.$isNotBlank(this.idQuery.id)) { if (this.$isNotBlank(this.idQuery.id)) {
this.formData.actDate = new Date(this.idQuery.actDate); this.formData.actDate = new Date(this.idQuery.actDate);
this.formData.corpOrderId = this.idQuery.corpOrderId; this.formData.corpOrderId = this.idQuery.corpOrderId;
@ -1179,7 +1204,7 @@ export default {
this.formData.preCheck = this.idQuery.preCheck; this.formData.preCheck = this.idQuery.preCheck;
this.actionEnable = true; this.actionEnable = true;
this.getCodeList(); this.getCodeList();
this.findSubStorageMethod(); this.findSubStorageMethod(1);
} else { } else {
this.corpOrderIdDisabled = false; this.corpOrderIdDisabled = false;
if (JSON.stringify(this.$route.query) === '{}') { if (JSON.stringify(this.$route.query) === '{}') {
@ -1190,18 +1215,20 @@ export default {
// //
let query = this.$route.query; let query = this.$route.query;
this.orderNo = query.id; this.orderNo = query.id;
this.query = Object.assign(this.query, query); this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit); this.query.limit = parseInt(this.query.limit);
this.query.corpOrderId = query.id; this.query.corpOrderId = query.id;
//
// this.getCodeList();
} }
this.formData.invWarehouseCode = this.$store.getters.locSubInvCode; this.formData.invWarehouseCode = this.$store.getters.locSubInvCode;
this.formData.invStorageCode=this.$store.getters.locInvCode;
this.formData.locStorageCode = this.$store.getters.locInvCode; this.formData.locStorageCode = this.$store.getters.locInvCode;
if (this.$isNotBlank(this.formData.locStorageCode)) {
this.findStorageMethod();
} }
this.findSubInvByInv(this.formData.locStorageCode); }
this.findSubInvByInv();
this.findSubStorageMethod();
this.getBusType();
// //
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => { selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) { if (res.code === 20000) {
@ -1210,13 +1237,13 @@ export default {
} }
} }
}) })
}
},
}; };
</script> </script>
<style> <style>
.messageIndex { .messageIndex {
z-index: 9999 !important; z-index: 9999 !important;
} }

@ -225,7 +225,8 @@
<el-dialog <el-dialog
title="新增单据" title="新增单据"
:visible.sync="addOrderVisible" :visible.sync="addOrderVisible"
width="75%" append-to-body width="75%"
append-to-body
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="addOrderVisible" v-if="addOrderVisible"

Loading…
Cancel
Save