From 6c41304bd6924efa91d6da8b73ef1839c02dc826 Mon Sep 17 00:00:00 2001 From: x_z Date: Wed, 20 Apr 2022 23:38:02 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=8C=BB=E9=99=A2=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=AD=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth/platform.js | 8 +++ src/api/warehouse/order.js | 2 +- src/views/sys/bindPlatform.vue | 96 ++++++++++++++++++------------ src/views/warehouse/ioUdiTrace.vue | 5 +- 4 files changed, 68 insertions(+), 43 deletions(-) diff --git a/src/api/auth/platform.js b/src/api/auth/platform.js index 1163e04..92c82b1 100644 --- a/src/api/auth/platform.js +++ b/src/api/auth/platform.js @@ -60,4 +60,12 @@ export function unbindPlatform(query) { }); } +export function getTargetActions(query) { + return axios({ + url: "/udims/platform/getTargetActions", + method: "get", + params: query + }); +} + diff --git a/src/api/warehouse/order.js b/src/api/warehouse/order.js index 4ef1cb9..92baf16 100644 --- a/src/api/warehouse/order.js +++ b/src/api/warehouse/order.js @@ -290,7 +290,7 @@ export function exportJson(query) { url: "/warehouse/inout/order/exportXml", method: "post", data: query, - headers: { "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" }, + headers: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}, responseType: "arraybuffer" //一定要设置响应类型,否则页面会是空白pdf }); } diff --git a/src/views/sys/bindPlatform.vue b/src/views/sys/bindPlatform.vue index 1ac3675..6d4ce01 100644 --- a/src/views/sys/bindPlatform.vue +++ b/src/views/sys/bindPlatform.vue @@ -92,7 +92,7 @@ v-model="editLogin.corpName" style="width: 65%" @change="intentPlatform" - placeholder="请选择自助平台" + placeholder="请选择医院客户" > import { getUnbindUnitMaintain, + getUnitMaintain, addUnit, modifyUnit } from "../../api/receipts/unitMaintain"; import { - getUnbindPlatform, + getPlatform, linkPlatform, getLinkPlatformList, - unbindPlatform + unbindPlatform, + getTargetActions } from "../../api/auth/platform"; -import { getJoinBussinessType } from "../../api/basic/bussinessType"; +import {getBusTypeByUser} from "@/api/warehouse/BusRole"; export default { data() { @@ -270,22 +272,22 @@ export default { targetActions: [], platformRules: { corpName: [ - { required: true, message: "请选择往来单位", trigger: "change" } + {required: true, message: "请选择往来单位", trigger: "change"} ], platformId: [ - { required: true, message: "请选择自助平台", trigger: "change" } + {required: true, message: "请选择自助平台", trigger: "change"} ], platformUsername: [ - { required: true, message: "请输入账号", trigger: "change" } + {required: true, message: "请输入账号", trigger: "change"} ], platformPassword: [ - { required: true, message: "请输入密码", trigger: "change" } + {required: true, message: "请输入密码", trigger: "change"} ], sourceAction: [ - { required: true, message: "请选择本地单据类型", trigger: "change" } + {required: true, message: "请选择本地单据类型", trigger: "change"} ], targetAction: [ - { required: true, message: "请选择目标单据类型", trigger: "change" } + {required: true, message: "请选择目标单据类型", trigger: "change"} ] }, @@ -350,6 +352,11 @@ export default { this.editType = 2; this.editLoginVisible = true; this.editLogin = row; + + this.getUnitMaintain(); + this.getPlatformList(); + this.getLocalBussinessType(); + this.getTargetActions(row.platformId); }).catch(() => { }); } else { @@ -375,48 +382,60 @@ export default { sourceAction: null, targetAction: null }; + this.getLocalBussinessType(); + this.getUnitMaintain(); + this.getPlatformList(); + }, + change() { + }, + getUnitMaintain() { let unitQuery = { customerId: this.$store.getters.customerId, page: 1, limit: 20 }; - getUnbindUnitMaintain(unitQuery) + getUnitMaintain(unitQuery) .then((response) => { this.corpNamesList = response.data.list || []; }) .catch(() => { this.loading = false; }); - - let tQuery = { - enable: 1, - page: 1, - limit: 20, - customerId: this.$store.getters.customerId - }; - getJoinBussinessType(tQuery).then((res) => { - this.bussinessTypes = res.data.list || []; - }).catch((error) => { - this.$message.error(error.message); - }); - }, - change() { }, //获取自助平台数据 getPlatformList() { this.loading = true; - getUnbindPlatform() - .then((response) => { - this.loading = false; - this.platformList = response.data || []; - }) - .catch(() => { - this.loading = false; - this.platformList = []; - }); + getPlatform().then((response) => { + this.loading = false; + this.platformList = response.data.list || []; + }).catch(() => { + this.loading = false; + this.platformList = []; + }); }, intentPlatform(value) { this.editPlatfromQuery.id = value; + //拉取对应平台的单据类型 + this.getTargetActions(value); + }, + getTargetActions(platformId) { + this.targetActions = []; + let query = { + platformId: platformId + }; + getTargetActions(query).then((res) => { + this.targetActions = res.data.list || []; + }).catch((error) => { + this.$message.error("获取自助平台单据类型失败"); + }); + }, + getLocalBussinessType() { + let tQuery = {}; + getBusTypeByUser(tQuery).then((res) => { + this.bussinessTypes = res.data.list || []; + }).catch((error) => { + this.$message.error(error.message); + }); }, //获取往来单位集合 formSubmit() { @@ -465,6 +484,7 @@ export default { type: "warning" }).then(() => { this.loading = true; + console.log(row) let query = { corpId: row.id }; diff --git a/src/views/warehouse/ioUdiTrace.vue b/src/views/warehouse/ioUdiTrace.vue index 03d0c25..1ffa711 100644 --- a/src/views/warehouse/ioUdiTrace.vue +++ b/src/views/warehouse/ioUdiTrace.vue @@ -235,7 +235,7 @@ export default { queryAdIdAsyncLoading: false, codeDetailVisible: false, total: 0, - loading: true, + loading: false, busTypes: [], index: null, formName: null, @@ -495,7 +495,6 @@ export default { }, selectUnit(row) { - console.log(row.id); this.unitUpdateQuery.id = this.curIndex; this.unitUpdateQuery.fromCorp = row.name; this.unitUpdateQuery.fromCorpId = row.unitid; @@ -747,8 +746,6 @@ export default { let query = this.$route.query; this.query = Object.assign(this.query, query); this.query.limit = parseInt(this.query.limit); - // 加载表格数据 - this.getList(); let end = new Date(); let start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);