1.修复医院客户页面数据回显错误等问题

master
x_z 3 years ago
parent d851c931f7
commit 6c41304bd6

@ -60,4 +60,12 @@ export function unbindPlatform(query) {
});
}
export function getTargetActions(query) {
return axios({
url: "/udims/platform/getTargetActions",
method: "get",
params: query
});
}

@ -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
});
}

@ -92,7 +92,7 @@
v-model="editLogin.corpName"
style="width: 65%"
@change="intentPlatform"
placeholder="请选择自助平台"
placeholder="请选择医院客户"
>
<el-option
v-for="item in corpNamesList"
@ -135,8 +135,7 @@
<el-select
v-model="editLogin.sourceAction"
style="width: 65%"
@change="intentPlatform"
placeholder="请选择自助平台"
placeholder="请选择本地单据类型"
>
<el-option
v-for="item in bussinessTypes"
@ -157,8 +156,7 @@
<el-select
v-model="editLogin.targetAction"
style="width: 65%"
@change="intentPlatform"
placeholder="请选择自助平台"
placeholder="请选择目标单据类型"
>
<el-option
v-for="item in targetActions"
@ -178,6 +176,7 @@
<el-form-item label="账号:" prop="platformUsername">
<el-input
v-model="editLogin.platformUsername"
placeholder="请输入账号"
style="width: 78%"
size="small"
@input="change()"
@ -192,6 +191,7 @@
<el-form-item label="密码:" prop="platformPassword">
<el-input
v-model="editLogin.platformPassword"
placeholder="请输入密码"
style="width: 78%"
size="small"
type="password"
@ -219,16 +219,18 @@
<script>
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
};

@ -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);

Loading…
Cancel
Save