bug修复

fencang
anthonywj 3 years ago
parent 1d83f5e1fa
commit ac7124d4c7

@ -1,315 +1,316 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini"> <el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
v-model="filterQuery.name" v-model="filterQuery.name"
style="width: 250px" style="width: 250px"
placeholder="单据类型名称" placeholder="单据类型名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group style="margin-left: 10px;display:flex;"> <el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button> <el-button type="primary" icon="search" @click="getList"></el-button>
<el-button type="primary" icon="search" @click="handleAddClick" <el-button type="primary" icon="search" @click="handleAddClick"
>新增 >新增
</el-button </el-button
> >
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table v-loading="loading" :data="list" style="width: 100%"> <el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index" width="60" fixed></el-table-column> <el-table-column label="序号" type="index" width="60" fixed></el-table-column>
<el-table-column label="扫码单据类型" prop="curName" fixed></el-table-column> <el-table-column label="扫码单据类型" prop="curName" fixed></el-table-column>
<el-table-column label="当前仓库" prop="curInvName" fixed></el-table-column> <el-table-column label="当前仓库" prop="curInvName" fixed></el-table-column>
<el-table-column label="当前分库" prop="invWarehouseName" fixed></el-table-column> <el-table-column label="当前分库" prop="invWarehouseName" fixed></el-table-column>
<el-table-column label="委托验收仓库" prop="entrustInvName" fixed></el-table-column> <el-table-column label="委托验收仓库" prop="entrustInvName" fixed></el-table-column>
<el-table-column label="委托验收分库" prop="entrustSubInvName" fixed></el-table-column> <el-table-column label="委托验收分库" prop="entrustSubInvName" fixed></el-table-column>
<el-table-column label="委托验收人" prop="employeeName" fixed> <el-table-column label="委托验收人" prop="employeeName" fixed>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="handleModifyClick(scope.row)" @click.native.stop="handleModifyClick(scope.row)"
>编辑 >编辑
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="deleteDialog(scope.row)" @click.native.stop="deleteDialog(scope.row)"
>删除 >删除
</el-button </el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog <el-dialog
title="新增委托验收" title="新增委托验收"
:visible.sync="addDialogVisible" :visible.sync="addDialogVisible"
width="70%" width="70%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="addDialogVisible" v-if="addDialogVisible"
> >
<modifyDialog :inputQuery="inputQuery"></modifyDialog> <modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit" <el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交 >提交
</el-button </el-button
> >
<el-button type="primary" size="small" icon="search" @click="cancelDialog" <el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消 >取消
</el-button </el-button
> >
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="编辑委托验收" title="编辑委托验收"
:visible.sync="modifyDialogVisible" :visible.sync="modifyDialogVisible"
width="70%" width="70%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="modifyDialogVisible" v-if="modifyDialogVisible"
> >
<modifyDialog :inputQuery="inputQuery"></modifyDialog> <modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit" <el-button type="primary" size="small" icon="search" @click="onModifySubmit"
>提交 >提交
</el-button </el-button
> >
<el-button type="primary" size="small" icon="search" @click="cancelDialog" <el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消 >取消
</el-button </el-button
> >
</div> </div>
</el-dialog> </el-dialog>
<el-pagination <el-pagination
:page-size="filterQuery.limit" :page-size="filterQuery.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { import {
getEntrustRece, getEntrustRece,
deleteEntrustRece, deleteEntrustRece,
updateEntrustRece, updateEntrustRece,
insertEntrustRece, insertEntrustRece,
} from "../../api/basic/EntrustRece"; } from "../../api/basic/EntrustRece";
import modifyDialog from "./BasicEntrutsReceModify"; import modifyDialog from "./BasicEntrutsReceModify";
export default { export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
name: "", name: "",
page: 1, page: 1,
limit: 20, limit: 20,
}, },
loading: false, loading: false,
addDialogVisible: false, addDialogVisible: false,
modifyDialogVisible: false, modifyDialogVisible: false,
list: [], list: [],
inputQuery: { inputQuery: {
action: "", action: "",
name: "", name: "",
entrustInv: "", entrustInv: "",
entrustUser: "", entrustUser: "",
entrustAction: null, entrustAction: null,
finishRece: false, finishRece: false,
curInv: "", curInv: "",
entrustSubInv: "", entrustSubInv: "",
invWarehouseCode: "", invWarehouseCode: "",
}, userId: null,
enableMap: { },
true: "是", enableMap: {
false: "否", true: "是",
}, false: "否",
mainActionMap: { },
WareHouseIn: "入库", mainActionMap: {
WareHouseOut: "出库" WareHouseIn: "入库",
}, WareHouseOut: "出库"
fileList: [], },
total: 0, fileList: [],
multipleSelection: [], total: 0,
uploadFileUrl: null, multipleSelection: [],
headers: {}, uploadFileUrl: null,
headers: {},
}; };
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
name: "",
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
getList() {
this.loading = true;
getEntrustRece(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
}, },
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
name: "",
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
getList() {
this.loading = true;
getEntrustRece(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
onAddSubmit() {
if (this.$isBlank(this.inputQuery.action)) { onAddSubmit() {
this.$message.error("单据类型不能为空!");
return; if (this.$isBlank(this.inputQuery.action)) {
} this.$message.error("单据类型不能为空!");
if (this.$isBlank(this.inputQuery.curInv)) { return;
this.$message.error("请输入委托仓库!"); }
return; if (this.$isBlank(this.inputQuery.curInv)) {
} this.$message.error("请输入委托仓库!");
if (this.$isBlank(this.inputQuery.entrustInv)) { return;
this.$message.error("请输入接受委托仓库!"); }
return; if (this.$isBlank(this.inputQuery.entrustInv)) {
} this.$message.error("请输入接受委托仓库!");
if (this.$isBlank(this.inputQuery.entrustUser)) { return;
this.$message.error("请输入接受委托人!"); }
return; if (this.$isBlank(this.inputQuery.entrustUser)) {
} this.$message.error("请输入接受委托人!");
return;
}
if (this.$isBlank(this.inputQuery.invWarehouseCode)) { if (this.$isBlank(this.inputQuery.invWarehouseCode)) {
this.$message.error("当前分库不能为空!"); this.$message.error("当前分库不能为空!");
return; return;
} }
if (this.$isBlank(this.inputQuery.entrustSubInv)) { if (this.$isBlank(this.inputQuery.entrustSubInv)) {
this.$message.error("请输入接受委托分库!"); this.$message.error("请输入接受委托分库!");
return; return;
} }
insertEntrustRece(this.inputQuery) insertEntrustRece(this.inputQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.cancelDialog(); this.cancelDialog();
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.cancelDialog(); this.cancelDialog();
}); });
}, },
onModifySubmit() { onModifySubmit() {
if (this.$isBlank(this.inputQuery.action)) { if (this.$isBlank(this.inputQuery.action)) {
this.$message.error("单据类型不能为空!"); this.$message.error("单据类型不能为空!");
return; return;
} }
if (this.$isBlank(this.inputQuery.curInv)) { if (this.$isBlank(this.inputQuery.curInv)) {
this.$message.error("请输入委托仓库!"); this.$message.error("请输入委托仓库!");
return; return;
} }
if (this.$isBlank(this.inputQuery.entrustInv)) { if (this.$isBlank(this.inputQuery.entrustInv)) {
this.$message.error("请输入接受委托仓库!"); this.$message.error("请输入接受委托仓库!");
return; return;
} }
if (this.$isBlank(this.inputQuery.entrustInv)) { if (this.$isBlank(this.inputQuery.entrustInv)) {
this.$message.error("请输入接受委托人!"); this.$message.error("请输入接受委托人!");
return; return;
} }
insertEntrustRece(this.inputQuery) insertEntrustRece(this.inputQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.cancelDialog(); this.cancelDialog();
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.cancelDialog(); this.cancelDialog();
}); });
}, },
handleAddClick() { handleAddClick() {
this.inputQuery = {enable: true, expireTip: true}; this.inputQuery = {enable: true, expireTip: true};
this.addDialogVisible = true; this.addDialogVisible = true;
}, },
handleModifyClick(row) { handleModifyClick(row) {
this.inputQuery = row; this.inputQuery = row;
this.modifyDialogVisible = true; this.modifyDialogVisible = true;
}, },
deleteDialog(rowId) { deleteDialog(rowId) {
this.$confirm("此操作将永久删除该委托验收信息, 是否继续?", "提示", { this.$confirm("此操作将永久删除该委托验收信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.deleteOrders(rowId); this.deleteOrders(rowId);
}) })
.catch(() => { .catch(() => {
}); });
}, },
deleteOrders(data) { deleteOrders(data) {
this.loading = true; this.loading = true;
let tquery = { let tquery = {
id: data.id + "", id: data.id + "",
}; };
deleteEntrustRece(tquery) deleteEntrustRece(tquery)
.then((response) => { .then((response) => {
this.getList(); this.getList();
if (response.code == 20000) { if (response.code == 20000) {
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",
}); });
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
}); });
},
},
components: {
modifyDialog,
},
mounted() {
},
created() {
this.getList();
}, },
},
components: {
modifyDialog,
},
mounted() {
},
created() {
this.getList();
},
}; };
</script> </script>

@ -320,7 +320,6 @@ export default {
entrustInvChange() { entrustInvChange() {
this.inputQuery.entrustSubInv = null; this.inputQuery.entrustSubInv = null;
this.findEntrustSubInvByInv(); this.findEntrustSubInvByInv();
this.$forceUpdate();
}, },
@ -359,10 +358,9 @@ export default {
this.getList(); this.getList();
this.getStorage(); this.getStorage();
// if (this.$isNotBlank(this.inputQuery.entrustInv)) {
if (this.$isNotBlank(this.inputQuery.entrustInv)) { // this.findEntrustSubInvByInv();
this.entrustInvChange(this.inputQuery.entrustInv); // }
}
}, },
}; };

@ -646,7 +646,6 @@ export default {
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success(response.data); this.$message.success(response.data);
for (let i = 0; i < this.list.length; i++) { for (let i = 0; i < this.list.length; i++) {
debugger
if (idQuery.orderId === this.list[i].id) { if (idQuery.orderId === this.list[i].id) {
this.list.splice(i, 1); this.list.splice(i, 1);
break; break;

@ -680,7 +680,7 @@ export default {
this.$message.error('当前往来单位不能为空'); this.$message.error('当前往来单位不能为空');
return; 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('当前往来分库不能为空');
return; return;
@ -1158,6 +1158,11 @@ export default {
// //
// this.getCodeList(); // this.getCodeList();
} }
this.formData.invWarehouseCode = this.$store.getters.locSubInvCode;
this.formData.locStorageCode = this.$store.getters.locInvCode;
if (this.$isNotBlank(this.formData.locStorageCode)) {
this.findStorageMethod();
}
} }

Loading…
Cancel
Save