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

master
anthonyywj2 3 years ago
parent 7c93cd4df4
commit 78be99f437

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

@ -91,7 +91,7 @@
</el-dialog>
<el-dialog
title="编辑业务类型关联"
title="编辑业务单据类型关联"
:visible.sync="modifyDialogVisible"
width="70%"
:close-on-click-modal="false"

@ -36,7 +36,27 @@
<span>第三方单据类型:&nbsp;</span>
</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
v-for="item in originTypes"
:key="item.name"
@ -44,11 +64,12 @@
: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.thirdSysName
item.action
}}</span>
</el-option>
</el-select>
</div>
</el-col>
@ -101,7 +122,8 @@
<el-col :span="4" class="el-col">
<div class="text item">
<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>
</el-col>
@ -269,6 +291,7 @@ export default {
},
changeList: [],
visibleChange: false,
loading: false,
}
},
methods: {
@ -299,8 +322,11 @@ export default {
.catch(() => {
});
},
getTypes() {
getOriginBusType()
getTypes(query) {
let tQuery = {
key: query,
}
getOriginBusType(tQuery)
.then((response) => {
this.originTypes = response.data.list || [];
})
@ -308,6 +334,17 @@ export default {
});
this.getBusTypes();
},
findMethod(query){
let tQuery = {
key: query,
}
getOriginBusType(tQuery)
.then((response) => {
this.originTypes = response.data.list || [];
})
.catch(() => {
});
},
preInChange() {
if (this.inputQuery.preIn) {
this.inputQuery.changeEnable = false;

@ -1,124 +1,129 @@
<template>
<div>
<el-card>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.name"
placeholder="业务类型"
style="width: 400px"
></el-input>
</el-form-item>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.key"
placeholder="业务类型"
style="width: 400px"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<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="search" @click="getList"></el-button>
<el-button type="primary" icon="search" @click="handleAddClick"
>新增
</el-button
>
<el-button type="primary" icon="search" @click="updateDownload"></el-button>
</el-button-group>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.thirdSys" placeholder="请选择第三方系统" @change="thirdSysChange">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<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="search" @click="getList"></el-button>
<el-button type="primary" icon="search" @click="handleAddClick"
>新增
</el-button
>
<el-button type="primary" icon="search" @click="updateDownload"></el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-form-item>
</el-form>
<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="单据类型名称" prop="name"></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-table v-loading="loading" :data="list" style="width: 100%">
<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="action"></el-table-column>
<el-dialog
title="新增第三方单据类型"
:visible.sync="addDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-table-column prop="thirdName" label="第三方系统名称">
<template slot-scope="scope">
<span>{{ getThirdSysFkName(scope.row.thirdSys) }}</span>
</template>
</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
title="编辑第三方单据类型"
:visible.sync="modifyDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
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>
<el-dialog
title="新增第三方单据类型"
:visible.sync="addDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="addDialogVisible"
>
<modifyDialog :inputQuery="inputQuery"></modifyDialog>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</el-dialog>
<el-dialog
title="编辑第三方单据类型"
:visible.sync="modifyDialogVisible"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
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>
<script>
import {
getOriginBusType,
updateBussinessType, delBussinessType,
insertBussinessType, downloadBussinessType
getOriginBusType,
updateBussinessType, delBussinessType,
insertBussinessType, downloadBussinessType
} from "../../api/basic/busOriginType";
import modifyDialog from "./BussinessTypeThirdModify";
@ -126,216 +131,222 @@ import axios from "axios";
import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
export default {
data() {
return {
filterQuery: {
name: "",
page: 1,
limit: 20,
},
addDialogVisible: false,
modifyDialogVisible: false,
list: [],
inputQuery: {
action: "",
name: "",
enable: "",
remark: "",
thirdSys: null,
thirdSysName: null,
},
enableMap: {
true: "是",
false: "否",
},
thirdSys: [],
total: 0,
multipleSelection: [],
uploadFileUrl: null,
loading: false,
};
},
data() {
return {
filterQuery: {
key: "",
page: 1,
limit: 20,
},
addDialogVisible: false,
modifyDialogVisible: false,
list: [],
inputQuery: {
action: "",
name: "",
enable: "",
remark: "",
thirdSys: null,
thirdSysName: null,
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thirdSys: "thirdId",
name: null,
enable: null,
page: 1,
limit: 20,
};
this.getList();
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
enableMap: {
true: "是",
false: "否",
},
thirdSys: [],
total: 0,
multipleSelection: [],
uploadFileUrl: null,
loading: false,
};
},
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;
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
thirdSys: "thirdId",
name: null,
enable: null,
page: 1,
limit: 20,
};
this.getList();
})
.catch(() => {
this.loading = false;
});
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
},
cancelDialog() {
this.modifyDialogVisible = false;
this.addDialogVisible = false;
},
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() {
updateBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
insertBussinessType(this.inputQuery)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
})
.catch(() => {
this.loading = false;
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 = {
id: row.id,
remark: row.remark,
action: row.action,
name: row.name,
enable: row.enable,
thirdSys: row.thirdSys,
thirdSysName: row.thirdSysName
};
this.modifyDialogVisible = true;
},
handleModifyClick(row) {
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() {
this.inputQuery = {
action: "",
name: "",
enable: "",
remark: "",
thirdSys: null,
thirdSysName: null
};
this.addDialogVisible = true;
},
handleDeleteClick(row) {
this.deleteDialog(row.id)
},
handleAddClick() {
this.inputQuery = {
action: "",
name: "",
enable: "",
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(() => {
});
},
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;
}
}
},
})
.catch(() => {
});
init() {
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();
}
},
},
thirdSysChange() {
this.getList();
components: {
modifyDialog,
},
init() {
axios.get("./config.json").then(res => {
//
let response = res.data.BASE_URL;
this.uploadFileUrl = response + "udiwms/busstiness/file/upload";
});
mounted() {
},
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);
created() {
this.init();
this.getBasicThirdSys();
this.getList();
}
},
},
components: {
modifyDialog,
},
mounted() {
},
created() {
this.init();
this.getBasicThirdSys();
this.getList();
},
},
};
</script>

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

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

Loading…
Cancel
Save