1.修改医院客户关联页面

master
x_z 3 years ago
parent 3a718e1014
commit 8d7621ec41

@ -24,3 +24,10 @@ export function saveStackRules(formName, data) {
data: data data: data
}); });
} }
export function getEnableRulesNum() {
return axios({
url: "/udims/stackRules/getEnableRulesNum",
method: "get"
})
}

@ -75,19 +75,19 @@
<el-row :gutter="20" class="el-row" type="flex"> <el-row :gutter="20" class="el-row" type="flex">
<el-col :span="15" class="el-col" type="flex"> <el-col :span="15" class="el-col" type="flex">
<div class="text item"> <div class="text item">
<el-form-item label="医院客户名称" prop="corpName"> <el-form-item label="医院客户名称" prop="unitId">
<el-select <el-select
v-model="editLogin.corpName" v-model="editLogin.unitId"
style="width: 65%" style="width: 65%"
:disabled="editDialogVisible" :disabled="editDialogVisible"
@change="intentPlatform" @change="unitChange"
placeholder="请选择医院客户" placeholder="请选择医院客户"
> >
<el-option <el-option
v-for="item in corpNamesList" v-for="item in corpNamesList"
:key="item.id" :key="item.unitId"
:label="item.name" :label="item.name"
:value="item.id" :value="item.unitId"
> >
</el-option> </el-option>
</el-select> </el-select>
@ -107,7 +107,7 @@
> >
<el-option <el-option
v-for="item in platformList" v-for="item in platformList"
:key="item.platformId" :key="item.id"
:label="item.name" :label="item.name"
:value="item.id" :value="item.id"
> >
@ -287,6 +287,7 @@ export default {
}, },
editLogin: { editLogin: {
id: null, id: null,
unitId: null,
corpName: null, corpName: null,
platformId: null, platformId: null,
platformUsername: null, platformUsername: null,
@ -298,9 +299,10 @@ export default {
targetAction: null, targetAction: null,
invCode: "", invCode: "",
invSubCode: "", invSubCode: "",
customerId: this.$store.getters.customerId
}, },
editPlatfromQuery: { editPlatfromQuery: {
id: null, unitId: null,
name: null, name: null,
host: null host: null
}, },
@ -439,6 +441,7 @@ export default {
// //
this.editLogin = { this.editLogin = {
id: null, id: null,
unitId: null,
corpName: null, corpName: null,
platformId: null, platformId: null,
platformUsername: null, platformUsername: null,
@ -450,13 +453,12 @@ export default {
targetAction: null, targetAction: null,
invCode: "", invCode: "",
invSubCode: "", invSubCode: "",
customerId: this.$store.getters.customerId
}; };
this.getLocalBussinessType(); this.getLocalBussinessType();
this.getUnitMaintain(); this.getUnitMaintain();
this.getPlatformList(); this.getPlatformList();
}, },
change() {
},
getUnitMaintain() { getUnitMaintain() {
let unitQuery = { let unitQuery = {
customerId: this.$store.getters.customerId, customerId: this.$store.getters.customerId,
@ -483,14 +485,17 @@ export default {
this.platformList = []; this.platformList = [];
}); });
}, },
unitChange(value) {
this.editLogin.unitId = value;
},
intentPlatform(value) { intentPlatform(value) {
this.editPlatfromQuery.id = value; this.editPlatfromQuery.id = value;
this.curPlatformId = value; this.curPlatformId = value;
this.targetPlatformEdit = true;
// //
this.getTargetInv(value); this.getTargetInv(value);
}, },
getTargetActions() { getTargetActions() {
this.targetActions = []; this.targetActions = [];
let query = { let query = {
@ -586,7 +591,7 @@ export default {
}).then(() => { }).then(() => {
this.loading = true; this.loading = true;
let query = { let query = {
corpId: row.id id: row.id
}; };
unbindPlatform(query).then((res) => { unbindPlatform(query).then((res) => {
this.loading = false; this.loading = false;
@ -600,46 +605,12 @@ export default {
}); });
}, },
linkSubmit() { linkSubmit() {
// if (this.targetPlatformEdit) {
let corpId = this.editLogin.corpName; this.$message.error("请验证账号!");
if (!this.editDialogVisible) { return;
let corpNameTemp = null;
this.corpNamesList.forEach(item => {
if (item.id == this.editLogin.corpName) {
corpNameTemp = item.name;
corpId = item.id;
return;
}
});
let flag = false;
//
this.list.forEach(item => {
if (item.corpName == corpNameTemp) {
flag = true;
return;
}
});
if (flag) {
this.$message.error('“' + corpNameTemp + '”' + " 已经关联");
return;
}
} else {
let corpNameTemp = null;
this.corpNamesList.forEach(item => {
if (item.name == this.editLogin.corpName) {
corpNameTemp = item.name;
corpId = item.id;
return;
}
});
} }
this.$refs["editLogin"].validate((valid) => { this.$refs["editLogin"].validate((valid) => {
if (valid) { if (valid) {
this.editLogin.id = corpId;
linkPlatform(this.editLogin) linkPlatform(this.editLogin)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {

@ -165,7 +165,7 @@
</template> </template>
<script> <script>
import {getStackRulesList, saveStackRules, deleteStackRules} from "@/api/basic/stackRules"; import {getStackRulesList, saveStackRules, deleteStackRules, getEnableRulesNum} from "@/api/basic/stackRules";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
export default { export default {
@ -268,6 +268,13 @@ export default {
remark: null, remark: null,
customerId: this.$store.getters.customerId customerId: this.$store.getters.customerId
} }
getEnableRulesNum().then((res) => {
if (res.code === 20000) {
if (res.data > 0) {
this.formData.status = 0;
}
}
})
}, },
defaultSetting() { defaultSetting() {
this.formData.startNum = this.getDateStr() + "001"; this.formData.startNum = this.getDateStr() + "001";

@ -307,7 +307,9 @@ export default {
// //
addParam(index, row) { addParam(index, row) {
row.customerId = this.$store.getters.customerId; row.customerId = this.$store.getters.customerId;
addCustomizeParam(row).then((res) => { let params = row;
params.id = null;
addCustomizeParam(params).then((res) => {
this.$message.success("添加成功"); this.$message.success("添加成功");
this.getList(); this.getList();
this.customizeParamList.splice(index, 1); this.customizeParamList.splice(index, 1);

@ -138,6 +138,7 @@
<el-pagination <el-pagination
:current-page="query.page" :current-page="query.page"
:current-page.sync="query.page"
:page-size="query.limit" :page-size="query.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
@ -575,7 +576,7 @@ export default {
} }
}, },
detailHandleCurrentChange(val) { detailHandleCurrentChange(val) {
this.query.page = val; this.detailQuery.page = val;
this.getStockOrderDetailList(); this.getStockOrderDetailList();
}, },
// //

@ -288,7 +288,7 @@ export default {
.then((response) => { .then((response) => {
this.detailLoading = false; this.detailLoading = false;
this.detailList = response.data.list || []; this.detailList = response.data.list || [];
this.detailTotal = response.total; this.detailTotal = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.detailLoading = false; this.detailLoading = false;

@ -140,10 +140,10 @@
@selection-change="changeFun" @selection-change="changeFun"
style="width: 100%"> style="width: 100%">
<el-table-column <!-- <el-table-column
type="selection" type="selection"
width="55"> width="55">
</el-table-column> </el-table-column>-->
<el-table-column type="index" label="序号" width="50"></el-table-column> <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="产品通用名" width="200" prop="productName"></el-table-column> <el-table-column label="产品通用名" width="200" prop="productName"></el-table-column>
@ -697,7 +697,7 @@ export default {
} }
}, },
detailHandleCurrentChange(val) { detailHandleCurrentChange(val) {
this.query.page = val; this.detailQuery.page = val;
this.getStockOrderDetailList(); this.getStockOrderDetailList();
}, },
// //

Loading…
Cancel
Save