第三方业务单据类型,第三方仓库修改

master
anthonyywj2 3 years ago
parent 7c93cd4df4
commit 78be99f437

@ -1,6 +1,6 @@
{ {
"UDI_SYNC_SERVER_IP": "http://127.0.0.1:9995/", "UDI_SYNC_SERVER_IP": "http://192.168.0.109:9995/",
"BASE_URL":"http://127.0.0.1:9991/", "BASE_URL":"http://192.168.0.109:9991/",
"SERVER_IP": "http://127.0.0.1:9991/", "SERVER_IP": "http://192.168.0.109:9991/",
"WEBSOCKET_URL": "ws://127.0.0.1:9991/UDI_WMS_MC/api/websocket/" "WEBSOCKET_URL": "ws://192.168.0.109:9991/UDI_WMS_MC/api/websocket/"
} }

@ -91,7 +91,7 @@
</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"

@ -36,7 +36,27 @@
<span>第三方单据类型:&nbsp;</span> <span>第三方单据类型:&nbsp;</span>
</div> </div>
<el-select v-model="inputQuery.originAction" placeholder="请选择第三方系统单据类型" clearable="true"> <!-- <el-select v-model="inputQuery.originAction" placeholder="请选择第三方系统单据类型" clearable="true">-->
<!-- <el-option-->
<!-- v-for="item in originTypes"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.action">-->
<!-- <span style="float: left;font-size: 13px">{{ item.name }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{-->
<!-- item.action-->
<!-- }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<el-select
v-model="inputQuery.originAction"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择第三方系统单据类型"
:loading="loading"
>
<el-option <el-option
v-for="item in originTypes" v-for="item in originTypes"
:key="item.name" :key="item.name"
@ -44,11 +64,12 @@
:value="item.action"> :value="item.action">
<span style="float: left;font-size: 13px">{{ item.name }}</span> <span style="float: left;font-size: 13px">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{ <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.thirdSysName item.action
}}</span> }}</span>
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
@ -101,7 +122,8 @@
<el-col :span="4" class="el-col"> <el-col :span="4" class="el-col">
<div class="text item"> <div class="text item">
<el-checkbox v-model="inputQuery.preIn" @change="preInChange" <el-checkbox v-model="inputQuery.preIn" @change="preInChange"
:disabled="inputQuery.mainAction=='WareHouseOut' || inputQuery.mainAction==null">预验收</el-checkbox> :disabled="inputQuery.mainAction=='WareHouseOut' || inputQuery.mainAction==null">预验收
</el-checkbox>
</div> </div>
</el-col> </el-col>
@ -269,6 +291,7 @@ export default {
}, },
changeList: [], changeList: [],
visibleChange: false, visibleChange: false,
loading: false,
} }
}, },
methods: { methods: {
@ -299,8 +322,11 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
getTypes() { getTypes(query) {
getOriginBusType() let tQuery = {
key: query,
}
getOriginBusType(tQuery)
.then((response) => { .then((response) => {
this.originTypes = response.data.list || []; this.originTypes = response.data.list || [];
}) })
@ -308,6 +334,17 @@ export default {
}); });
this.getBusTypes(); this.getBusTypes();
}, },
findMethod(query){
let tQuery = {
key: query,
}
getOriginBusType(tQuery)
.then((response) => {
this.originTypes = response.data.list || [];
})
.catch(() => {
});
},
preInChange() { preInChange() {
if (this.inputQuery.preIn) { if (this.inputQuery.preIn) {
this.inputQuery.changeEnable = false; this.inputQuery.changeEnable = false;

@ -1,124 +1,129 @@
<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.key"
placeholder="业务类型" placeholder="业务类型"
style="width: 400px" style="width: 400px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange"> <el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange">
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.value" :key="item.value"
:label="item.thirdName" :label="item.thirdName"
:value="item.thirdId"> :value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span> <span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span> <span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option> </el-option>
</el-select> </el-select>
</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 type="primary" icon="search" @click="updateDownload"></el-button> <el-button type="primary" icon="search" @click="updateDownload"></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="55"></el-table-column> <el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column label="单据类型名称" prop="name"></el-table-column> <el-table-column label="单据类型名称" prop="name"></el-table-column>
<el-table-column label="单据类型代码" prop="action"></el-table-column> <el-table-column label="单据类型代码" prop="action"></el-table-column>
<el-table-column label="第三方系统" prop="thirdSys"></el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="handleDeleteClick(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog <el-table-column prop="thirdName" label="第三方系统名称">
title="新增第三方单据类型" <template slot-scope="scope">
:visible.sync="addDialogVisible" <span>{{ getThirdSysFkName(scope.row.thirdSys) }}</span>
width="70%" </template>
:close-on-click-modal="false" </el-table-column>
:close-on-press-escape="false" <el-table-column label="备注" prop="remark"></el-table-column>
v-if="addDialogVisible" <el-table-column label="操作" width="100" fixed="right">
> <template slot-scope="scope">
<modifyDialog :inputQuery="inputQuery"></modifyDialog> <el-button
<div style="text-align: center"> type="text"
<el-button type="primary" size="small" icon="search" @click="onAddSubmit" size="small"
>提交 @click.native.stop="handleModifyClick(scope.row)"
</el-button >编辑
> </el-button
<el-button type="primary" size="small" icon="search" @click="cancelDialog" >
>取消 <el-button
</el-button type="text"
> size="small"
</div> @click.native.stop="handleDeleteClick(scope.row)"
</el-dialog> >删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog <el-dialog
title="编辑第三方单据类型" title="新增第三方单据类型"
:visible.sync="modifyDialogVisible" :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="modifyDialogVisible" 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="onModifySubmit" <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-pagination
:page-size="filterQuery.limit" <el-dialog
@current-change="handleCurrentChange" title="编辑第三方单据类型"
layout="prev, pager, next" :visible.sync="modifyDialogVisible"
:total="total" width="70%"
></el-pagination> :close-on-click-modal="false"
</el-card> :close-on-press-escape="false"
</div> v-if="modifyDialogVisible"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onModifySubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</el-card>
</div>
</template> </template>
<script> <script>
import { import {
getOriginBusType, getOriginBusType,
updateBussinessType, delBussinessType, updateBussinessType, delBussinessType,
insertBussinessType, downloadBussinessType insertBussinessType, downloadBussinessType
} from "../../api/basic/busOriginType"; } from "../../api/basic/busOriginType";
import modifyDialog from "./BussinessTypeThirdModify"; import modifyDialog from "./BussinessTypeThirdModify";
@ -126,216 +131,222 @@ import axios from "axios";
import {getBasicThirdSys} from "@/api/basic/basicThirdSys"; import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
export default { export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
name: "", key: "",
page: 1, page: 1,
limit: 20, limit: 20,
}, },
addDialogVisible: false, addDialogVisible: false,
modifyDialogVisible: false, modifyDialogVisible: false,
list: [], list: [],
inputQuery: { inputQuery: {
action: "", action: "",
name: "", name: "",
enable: "", enable: "",
remark: "", remark: "",
thirdSys: null, thirdSys: null,
thirdSysName: null, thirdSysName: null,
},
enableMap: {
true: "是",
false: "否",
},
thirdSys: [],
total: 0,
multipleSelection: [],
uploadFileUrl: null,
loading: false,
};
},
methods: { },
onReset() { enableMap: {
this.$router.push({ true: "是",
path: "", false: "否",
}); },
this.filterQuery = { thirdSys: [],
thirdSys: "thirdId", total: 0,
name: null, multipleSelection: [],
enable: null, uploadFileUrl: null,
page: 1, loading: false,
limit: 20, };
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
}, },
getList() { methods: {
this.loading = true; onReset() {
getOriginBusType(this.filterQuery) this.$router.push({
.then((response) => { path: "",
this.loading = false; });
this.list = response.data.list || []; this.filterQuery = {
this.total = response.data.total || 0; thirdSys: "thirdId",
}) name: null,
.catch(() => { enable: null,
this.loading = false; page: 1,
this.list = []; limit: 20,
this.total = 0; };
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSys = this.thirdSys[0].thirdId;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
updateDownload() {
let query = {
thirdSys: this.filterQuery.thirdSys,
}
downloadBussinessType(query)
.then((response) => {
this.loading = false;
this.getList(); this.getList();
}) },
.catch(() => { cancelDialog() {
this.loading = false; this.modifyDialogVisible = false;
}); this.addDialogVisible = false;
}, },
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
onAddSubmit() { getList() {
this.loading = true;
getOriginBusType(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;
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSys = this.thirdSys[0].thirdId;
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
updateDownload() {
let query = {
thirdSys: this.filterQuery.thirdSys,
}
downloadBussinessType(query)
.then((response) => {
this.loading = false;
this.getList();
})
.catch(() => {
this.loading = false;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
onAddSubmit() {
insertBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
onModifySubmit() { insertBussinessType(this.inputQuery)
updateBussinessType(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(); });
}); },
},
handleModifyClick(row) { onModifySubmit() {
updateBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
this.inputQuery = { handleModifyClick(row) {
id: row.id,
remark: row.remark,
action: row.action,
name: row.name,
enable: row.enable,
thirdSys: row.thirdSys,
thirdSysName: row.thirdSysName
};
this.modifyDialogVisible = true;
},
this.inputQuery = {
id: row.id,
remark: row.remark,
action: row.action,
name: row.name,
enable: row.enable,
thirdSys: row.thirdSys,
thirdSysName: row.thirdSysName
};
this.modifyDialogVisible = true;
},
handleDeleteClick(row) {
this.deleteDialog(row.id)
},
handleAddClick() { handleDeleteClick(row) {
this.inputQuery = { this.deleteDialog(row.id)
action: "", },
name: "",
enable: "", handleAddClick() {
remark: "", this.inputQuery = {
thirdSys: null, action: "",
thirdSysName: null name: "",
}; enable: "",
this.addDialogVisible = true; remark: "",
}, thirdSys: null,
thirdSysName: null
};
this.addDialogVisible = true;
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该单据类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
id: rowId,
}
delBussinessType(query)
.then((response) => {
this.getList();
})
.catch(() => {
});
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该单据类型信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
id: rowId,
}
delBussinessType(query)
.then((response) => {
this.getList();
}) })
.catch(() => { .catch(() => {
}); });
},
thirdSysChange() {
this.getList();
},
getThirdSysFkName(thirdSys) {
for (let i = 0; i < this.thirdSys.length; i++) {
if (this.thirdSys[i].thirdId === thirdSys) {
return this.thirdSys[i].thirdName;
}
}
},
}) init() {
.catch(() => { axios.get("./config.json").then(res => {
}); //
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "udiwms/busstiness/file/upload";
});
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
}
},
}, },
components: {
thirdSysChange() { modifyDialog,
this.getList();
}, },
mounted() {
init() {
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "udiwms/busstiness/file/upload";
});
}, },
handleChange(response, files, fileList) { created() {
console.log(response); this.init();
if (response.code != 20000) { this.getBasicThirdSys();
this.$message.error(response.message);
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList(); this.getList();
}
},
},
components: {
modifyDialog,
},
mounted() {
},
created() {
this.init();
this.getBasicThirdSys();
this.getList();
}, },
}; };
</script> </script>

@ -511,7 +511,7 @@
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" 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="thirdQuery.name" v-model="thirdQuery.key"
clearable clearable
placeholder="仓库名称" placeholder="仓库名称"
style="width: 400px" style="width: 400px"
@ -682,7 +682,7 @@ export default {
thirdSysVisible: false, thirdSysVisible: false,
total: 0, total: 0,
thirdQuery: { thirdQuery: {
name:null, key:null,
page: 1, page: 1,
limit: 10 limit: 10
, thirdSysFk: "thirdId", , thirdSysFk: "thirdId",

@ -4,9 +4,9 @@
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" 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="query.name" v-model="query.key"
clearable clearable
placeholder="仓库名称" placeholder="关键字搜索"
style="width: 400px" style="width: 400px"
></el-input> ></el-input>
</el-form-item> </el-form-item>
@ -388,7 +388,6 @@ export default {
}) })
}, },
getThirdSysFkName(thirdSys) { getThirdSysFkName(thirdSys) {
for (let i = 0; i < this.thirdSys.length; i++) { for (let i = 0; i < this.thirdSys.length; i++) {
if (this.thirdSys[i].thirdId === thirdSys) { if (this.thirdSys[i].thirdId === thirdSys) {
return this.thirdSys[i].thirdName; return this.thirdSys[i].thirdName;

Loading…
Cancel
Save