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", url: "/warehouse/inout/order/exportXml",
method: "post", method: "post",
data: query, 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 responseType: "arraybuffer" //一定要设置响应类型否则页面会是空白pdf
}); });
} }

@ -92,7 +92,7 @@
v-model="editLogin.corpName" v-model="editLogin.corpName"
style="width: 65%" style="width: 65%"
@change="intentPlatform" @change="intentPlatform"
placeholder="请选择自助平台" placeholder="请选择医院客户"
> >
<el-option <el-option
v-for="item in corpNamesList" v-for="item in corpNamesList"
@ -135,8 +135,7 @@
<el-select <el-select
v-model="editLogin.sourceAction" v-model="editLogin.sourceAction"
style="width: 65%" style="width: 65%"
@change="intentPlatform" placeholder="请选择本地单据类型"
placeholder="请选择自助平台"
> >
<el-option <el-option
v-for="item in bussinessTypes" v-for="item in bussinessTypes"
@ -157,8 +156,7 @@
<el-select <el-select
v-model="editLogin.targetAction" v-model="editLogin.targetAction"
style="width: 65%" style="width: 65%"
@change="intentPlatform" placeholder="请选择目标单据类型"
placeholder="请选择自助平台"
> >
<el-option <el-option
v-for="item in targetActions" v-for="item in targetActions"
@ -178,6 +176,7 @@
<el-form-item label="账号:" prop="platformUsername"> <el-form-item label="账号:" prop="platformUsername">
<el-input <el-input
v-model="editLogin.platformUsername" v-model="editLogin.platformUsername"
placeholder="请输入账号"
style="width: 78%" style="width: 78%"
size="small" size="small"
@input="change()" @input="change()"
@ -192,6 +191,7 @@
<el-form-item label="密码:" prop="platformPassword"> <el-form-item label="密码:" prop="platformPassword">
<el-input <el-input
v-model="editLogin.platformPassword" v-model="editLogin.platformPassword"
placeholder="请输入密码"
style="width: 78%" style="width: 78%"
size="small" size="small"
type="password" type="password"
@ -219,16 +219,18 @@
<script> <script>
import { import {
getUnbindUnitMaintain, getUnbindUnitMaintain,
getUnitMaintain,
addUnit, addUnit,
modifyUnit modifyUnit
} from "../../api/receipts/unitMaintain"; } from "../../api/receipts/unitMaintain";
import { import {
getUnbindPlatform, getPlatform,
linkPlatform, linkPlatform,
getLinkPlatformList, getLinkPlatformList,
unbindPlatform unbindPlatform,
getTargetActions
} from "../../api/auth/platform"; } from "../../api/auth/platform";
import { getJoinBussinessType } from "../../api/basic/bussinessType"; import {getBusTypeByUser} from "@/api/warehouse/BusRole";
export default { export default {
data() { data() {
@ -270,22 +272,22 @@ export default {
targetActions: [], targetActions: [],
platformRules: { platformRules: {
corpName: [ corpName: [
{ required: true, message: "请选择往来单位", trigger: "change" } {required: true, message: "请选择往来单位", trigger: "change"}
], ],
platformId: [ platformId: [
{ required: true, message: "请选择自助平台", trigger: "change" } {required: true, message: "请选择自助平台", trigger: "change"}
], ],
platformUsername: [ platformUsername: [
{ required: true, message: "请输入账号", trigger: "change" } {required: true, message: "请输入账号", trigger: "change"}
], ],
platformPassword: [ platformPassword: [
{ required: true, message: "请输入密码", trigger: "change" } {required: true, message: "请输入密码", trigger: "change"}
], ],
sourceAction: [ sourceAction: [
{ required: true, message: "请选择本地单据类型", trigger: "change" } {required: true, message: "请选择本地单据类型", trigger: "change"}
], ],
targetAction: [ targetAction: [
{ required: true, message: "请选择目标单据类型", trigger: "change" } {required: true, message: "请选择目标单据类型", trigger: "change"}
] ]
}, },
@ -350,6 +352,11 @@ export default {
this.editType = 2; this.editType = 2;
this.editLoginVisible = true; this.editLoginVisible = true;
this.editLogin = row; this.editLogin = row;
this.getUnitMaintain();
this.getPlatformList();
this.getLocalBussinessType();
this.getTargetActions(row.platformId);
}).catch(() => { }).catch(() => {
}); });
} else { } else {
@ -375,48 +382,60 @@ export default {
sourceAction: null, sourceAction: null,
targetAction: null targetAction: null
}; };
this.getLocalBussinessType();
this.getUnitMaintain();
this.getPlatformList();
},
change() {
},
getUnitMaintain() {
let unitQuery = { let unitQuery = {
customerId: this.$store.getters.customerId, customerId: this.$store.getters.customerId,
page: 1, page: 1,
limit: 20 limit: 20
}; };
getUnbindUnitMaintain(unitQuery) getUnitMaintain(unitQuery)
.then((response) => { .then((response) => {
this.corpNamesList = response.data.list || []; this.corpNamesList = response.data.list || [];
}) })
.catch(() => { .catch(() => {
this.loading = false; 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() { getPlatformList() {
this.loading = true; this.loading = true;
getUnbindPlatform() getPlatform().then((response) => {
.then((response) => { this.loading = false;
this.loading = false; this.platformList = response.data.list || [];
this.platformList = response.data || []; }).catch(() => {
}) this.loading = false;
.catch(() => { this.platformList = [];
this.loading = false; });
this.platformList = [];
});
}, },
intentPlatform(value) { intentPlatform(value) {
this.editPlatfromQuery.id = 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() { formSubmit() {
@ -465,6 +484,7 @@ export default {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.loading = true; this.loading = true;
console.log(row)
let query = { let query = {
corpId: row.id corpId: row.id
}; };

@ -235,7 +235,7 @@ export default {
queryAdIdAsyncLoading: false, queryAdIdAsyncLoading: false,
codeDetailVisible: false, codeDetailVisible: false,
total: 0, total: 0,
loading: true, loading: false,
busTypes: [], busTypes: [],
index: null, index: null,
formName: null, formName: null,
@ -495,7 +495,6 @@ export default {
}, },
selectUnit(row) { selectUnit(row) {
console.log(row.id);
this.unitUpdateQuery.id = this.curIndex; this.unitUpdateQuery.id = this.curIndex;
this.unitUpdateQuery.fromCorp = row.name; this.unitUpdateQuery.fromCorp = row.name;
this.unitUpdateQuery.fromCorpId = row.unitid; this.unitUpdateQuery.fromCorpId = row.unitid;
@ -747,8 +746,6 @@ export default {
let query = this.$route.query; let query = this.$route.query;
this.query = Object.assign(this.query, query); this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit); this.query.limit = parseInt(this.query.limit);
//
this.getList();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);

Loading…
Cancel
Save