1.修复盘点页面部分bug

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

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

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

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

Loading…
Cancel
Save