1.修复盘点页面部分bug

feature-order-fix
x_z 3 years ago
parent 7eba377238
commit ad911c7f99

@ -56,6 +56,7 @@
</el-table>
</el-card>
<el-pagination
:current-page="filterQuery.page"
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
@ -65,7 +66,7 @@
<el-dialog
:title="formMap[formName]"
:visible.sync="modifySpaceVisible"
width="50%"
width="65%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
@ -73,20 +74,20 @@
>
<el-form :model="formData" :rules="rules" ref="formData">
<el-row :gutter="20">
<el-col :span="2">
<el-col :span="3">
<span>货位编码</span>
</el-col>
<el-col :span="10">
<el-col :span="8">
<el-form-item prop="code">
<el-input v-model="formData.code" auto-complete="off"
placeholder="请输入货位编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-col :span="3">
<span>货位名称</span>
</el-col>
<el-col :span="10">
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="formData.name" auto-complete="off"
placeholder="请输入货位名称"></el-input>
@ -95,20 +96,20 @@
</el-row>
<el-row :gutter="20">
<el-col :span="2">
<el-col :span="3">
<span>货位分类</span>
</el-col>
<el-col :span="10">
<el-col :span="8">
<el-form-item prop="remark">
<el-input v-model="formData.type" auto-complete="off"
placeholder="请输入货位分类"></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-col :span="3">
<span>启用状态</span>
</el-col>
<el-col :span="10">
<el-col :span="8">
<el-form-item prop="status">
<el-radio v-model="formData.status" :label="0"></el-radio>
<el-radio v-model="formData.status" :label="1"></el-radio>
@ -117,10 +118,10 @@
</el-row>
<el-row :gutter="20">
<el-col :span="2">
<el-col :span="3">
<span>备注</span>
</el-col>
<el-col :span="10">
<el-col :span="8">
<el-form-item prop="remark">
<el-input v-model="formData.remark" auto-complete="off"
placeholder="请输入备注内容"></el-input>
@ -133,7 +134,7 @@
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="modifySpaceVisible = false"
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
@ -175,7 +176,6 @@ export default {
loading: true,
index: null,
dialogTableVisible: false,
invWarehouseDisabled: true,
statusMap: {
0: "禁用",
1: "启用"
@ -220,7 +220,6 @@ export default {
page: 1,
limit: 20,
};
this.invChange();
this.getList();
},
onSubmit() {
@ -259,13 +258,17 @@ export default {
this.$message.success("删除成功!");
this.getList();
} else {
this.$message.error(res.data);
this.$message.error(res.message);
}
})
})
.catch(() => {
});
},
cancelDialog() {
this.modifySpaceVisible = false
this.getList();
},
getStorage() {
this.storageList = [];
filterUplLocInv()
@ -275,24 +278,6 @@ export default {
.catch(() => {
});
},
invChange() {
this.filterQuery.invWarehouseCode = "";
this.subInvList = [];
if (this.filterQuery.invStorageCode != null && this.filterQuery.invStorageCode != "") {
this.invWarehouseDisabled = false;
let query = {
pcode: this.filterQuery.invStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
} else {
this.invWarehouseDisabled = true;
}
},
resetForm() {
if (this.$refs["formData"]) {
//
@ -334,7 +319,7 @@ export default {
this.getList();
this.modifySpaceVisible = false;
} else {
this.$message.error(res.data.message);
this.$message.error(res.message);
}
})
}

@ -320,15 +320,19 @@ export default {
props: {
closeDialog: {
type: Function,
required: true,
required: true
},
countOrder: {
type: Object,
required: true,
required: true
},
countType: {
type: Number,
required: true
},
getCountOrderList: {
type: Function,
required: true
}
},
data() {
@ -396,20 +400,22 @@ export default {
this.$message.success("保存成功");
if (type != null) {
//
let product = this.countProductList[0];
let detailData = {
orderIdFk: this.formData.orderId,
productId: product.relIdFk,
nameCode: product.nameCode,
batchNo: product.batchNo,
produceDate: product.productionDate,
expireDate: product.expireDate
};
addCountOrderDetail(detailData).then((result) => {
if (result.code === 20000) {
this.getCountOrderDetail();
}
});
this.countProductList.forEach(product => {
let detailData = {
orderIdFk: this.formData.orderId,
productId: product.relIdFk,
nameCode: product.nameCode,
batchNo: product.batchNo,
produceDate: product.productionDate,
expireDate: product.expireDate
};
addCountOrderDetail(detailData).then((result) => {
if (result.code === 20000) {
this.getCountOrderDetail();
this.getCountOrderList();
}
});
})
} else {
this.closeDialog();
}

@ -124,7 +124,7 @@
></el-pagination>
<el-dialog
:title="formMap[formName]"
:title="formName"
:visible.sync="addCountOrderVisible"
width="70%"
:close-on-click-modal="false"
@ -134,6 +134,7 @@
<addCountOrder
:closeDialog="closeAddDialog"
:countOrder="countOrder"
:getCountOrderList="getList"
:countType="countType"
></addCountOrder>
</el-dialog>
@ -178,10 +179,7 @@ export default {
addCountOrderVisible: false,
countOrder: null,
formName: null,
formMap: {
add: "新增盘点单",
edit: "编辑盘点单"
},
formType: null,
countType: null
};
},
@ -297,7 +295,14 @@ export default {
this.addCountOrderVisible = true;
this.countOrder = {};
this.countType = type;
this.formName = 'add';
this.formType = 'add';
if (this.countType === 0) {
this.formName = "新增整库盘点单";
} else if (this.countType === 1) {
this.formName = "新增货位盘点单";
} else if (this.countType === 2) {
this.formName = "新增部分盘点单";
}
},
closeAddDialog() {
this.addCountOrderVisible = false;
@ -306,7 +311,14 @@ export default {
editOrder(row) {
this.addCountOrderVisible = true;
this.countOrder = row;
this.formName = 'edit';
this.formType = 'edit';
if (this.countOrder.countType === 0) {
this.formName = "编辑整库盘点单";
} else if (this.countOrder.countType === 1) {
this.formName = "编辑货位盘点单";
} else if (this.countOrder.countType === 2) {
this.formName = "编辑部分盘点单";
}
},
},
components: {

Loading…
Cancel
Save