1.修改部分字段文字显示

2.调整关联客户平台操作逻辑和错误提示
master
x_z 3 years ago
parent 401a9a493b
commit f9c16c5401

@ -14,18 +14,21 @@
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
clearable
v-model="filterQuery.cpmctymc" v-model="filterQuery.cpmctymc"
placeholder="产品通用名" placeholder="产品通用名"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
clearable
v-model="filterQuery.ggxh" v-model="filterQuery.ggxh"
placeholder="规格型号" placeholder="规格型号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
clearable
v-model="filterQuery.cpms" v-model="filterQuery.cpms"
placeholder="产品描述" placeholder="产品描述"
></el-input> ></el-input>
@ -33,7 +36,7 @@
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
v-model="filterQuery.zczbhhzbapzbh" v-model="filterQuery.zczbhhzbapzbh"
placeholder="注册/备案号" placeholder="注册/备案凭证号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
@ -41,18 +44,21 @@
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
clearable
v-model="filterQuery.ylqxzcrbarmc" v-model="filterQuery.ylqxzcrbarmc"
placeholder="注册/备案人" placeholder="医疗器械注册人"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
clearable
v-model="filterQuery.manufactory" v-model="filterQuery.manufactory"
placeholder="生产企业" placeholder="生产企业"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input <el-input
clearable
v-model="filterQuery.thirdId" v-model="filterQuery.thirdId"
placeholder="第三方产品编码" placeholder="第三方产品编码"
></el-input> ></el-input>

@ -5,14 +5,6 @@
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="query.key" style="width: 300px;" placeholder="搜索"></el-input> <el-input v-model="query.key" style="width: 300px;" placeholder="搜索"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="query.corpType" placeholder="往来单位类型">
<el-option label="全部" value=""></el-option>
<el-option label="客户" value="1"></el-option>
<el-option label="供应商" value="2"></el-option>
<el-option label="特殊往来" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button <el-button
@ -42,11 +34,6 @@
<el-table-column label="序号" type="index" fixed></el-table-column> <el-table-column label="序号" type="index" fixed></el-table-column>
<el-table-column label="往来单位编码" prop="unitId" fixed></el-table-column> <el-table-column label="往来单位编码" prop="unitId" fixed></el-table-column>
<el-table-column label="往来单位名称" prop="corpName" fixed></el-table-column> <el-table-column label="往来单位名称" prop="corpName" fixed></el-table-column>
<el-table-column label="往来单位类型" prop="coryType" fixed>
<template slot-scope="scope">
<span>{{ coryTypeArr[scope.row.corpType] }}</span>
</template>
</el-table-column>
<el-table-column label="拼音码" prop="pinyinCode" fixed></el-table-column> <el-table-column label="拼音码" prop="pinyinCode" fixed></el-table-column>
<el-table-column label="医院客户名称" prop="platformName" fixed></el-table-column> <el-table-column label="医院客户名称" prop="platformName" fixed></el-table-column>
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
@ -218,256 +205,334 @@
</template> </template>
<script> <script>
import { import {
getUnbindUnitMaintain, getUnbindUnitMaintain,
getUnitMaintain, getUnitMaintain,
addUnit, addUnit,
modifyUnit modifyUnit
} from "../../api/receipts/unitMaintain"; } from "../../api/receipts/unitMaintain";
import { import {
getPlatform, getPlatform,
linkPlatform, linkPlatform,
getLinkPlatformList, getLinkPlatformList,
unbindPlatform, unbindPlatform,
getTargetActions getTargetActions
} from "../../api/auth/platform"; } from "../../api/auth/platform";
import {getBusTypeByUser} from "@/api/warehouse/BusRole"; import {getBusTypeByUser} from "@/api/warehouse/BusRole";
export default { export default {
data() { data() {
return { return {
query: { query: {
key: "", key: "",
coryType: null, coryType: null,
customerId: this.$store.getters.customerId, customerId: this.$store.getters.customerId,
page: 1, page: 1,
limit: 20 limit: 20
}, },
editLogin: { editLogin: {
id: null, id: null,
corpName: null, corpName: null,
platformId: null, platformId: null,
platformUsername: null, platformUsername: null,
platformPassword: null, platformPassword: null,
appid: null, appid: null,
appKey: null, appKey: null,
sceretKey: null, sceretKey: null,
sourceAction: null, sourceAction: null,
targetAction: null targetAction: null
}, },
editPlatfromQuery: { editPlatfromQuery: {
id: null, id: null,
name: null, name: null,
host: null host: null
}, },
loading: false, loading: false,
editLoginVisible: false, editLoginVisible: false,
checked: false,
editDialogVisible: false,
list: [],
total: 0,
multipleSelection: [],
platformList: [],
corpNamesList: [],
bussinessTypes: [],
targetActions: [],
platformRules: {
corpName: [
{required: true, message: "请选择往来单位", trigger: "change"}
],
platformId: [
{required: true, message: "请选择自助平台", trigger: "change"}
],
platformUsername: [
{required: true, message: "请输入账号", trigger: "change"}
],
platformPassword: [
{required: true, message: "请输入密码", trigger: "change"}
],
sourceAction: [
{required: true, message: "请选择本地单据类型", trigger: "change"}
],
targetAction: [
{required: true, message: "请选择目标单据类型", trigger: "change"}
]
checked: false, },
editDialogVisible: false, editType: 0,
list: [], corpTypeList: [
total: 0, {
multipleSelection: [], value: 1,
platformList: [], label: "客户"
corpNamesList: [], },
bussinessTypes: [], {
targetActions: [], value: 2,
platformRules: { label: "供应商"
corpName: [ },
{required: true, message: "请选择往来单位", trigger: "change"} {
], value: 4,
platformId: [ label: "特殊往来"
{required: true, message: "请选择自助平台", trigger: "change"} }
],
platformUsername: [
{required: true, message: "请输入账号", trigger: "change"}
],
platformPassword: [
{required: true, message: "请输入密码", trigger: "change"}
],
sourceAction: [
{required: true, message: "请选择本地单据类型", trigger: "change"}
],
targetAction: [
{required: true, message: "请选择目标单据类型", trigger: "change"}
] ]
};
},
methods: {
onReset() {
this.$router.push({
path: ""
});
this.query = {
key: "",
coryType: null,
customerId: this.$store.getters.customerId,
page: 1,
limit: 20
};
this.getList();
}, },
editType: 0, getList() {
corpTypeList: [ this.loading = true;
{ getLinkPlatformList(this.query).then((res) => {
value: 1, this.loading = false;
label: "客户" this.list = res.data || [];
}, }).catch(() => {
{ this.loading = false;
value: 2, this.list = [];
label: "供应商" });
}, },
{ cancelDialog() {
value: 4, this.editLoginVisible = false;
label: "特殊往来" },
handleModifyClick(row) {
if (row.platformId != null) {
//
this.$confirm("是否需要重新关联自助平台?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.editType = 2;
this.editLoginVisible = true;
this.editLogin = row;
this.editDialogVisible = true;
this.getUnitMaintain();
this.getPlatformList();
this.getLocalBussinessType();
this.getTargetActions(row.platformId);
}).catch(() => {
});
} else {
this.editType = 2;
this.editLoginVisible = true;
this.editLogin = row;
} }
], },
coryTypeArr: { handleAddClick() {
1: "客户", this.editType = 0;
2: "供应商", this.editLoginVisible = true;
4: "特殊往来" this.editDialogVisible = false;
}
};
},
methods: { //
onReset() { this.editLogin = {
this.$router.push({ id: null,
path: "" corpName: null,
}); platformId: null,
this.query = { platformUsername: null,
key: "", platformPassword: null,
coryType: null, appid: null,
customerId: this.$store.getters.customerId, appKey: null,
page: 1, sceretKey: null,
limit: 20 sourceAction: null,
}; targetAction: null
this.getList(); };
}, this.getLocalBussinessType();
getList() { this.getUnitMaintain();
this.loading = true; this.getPlatformList();
getLinkPlatformList(this.query).then((res) => { },
this.loading = false; change() {
this.list = res.data || []; },
}).catch(() => { getUnitMaintain() {
this.loading = false; let unitQuery = {
this.list = []; customerId: this.$store.getters.customerId,
}); corpType: 1,
}, page: 1,
cancelDialog() { limit: 20
this.editLoginVisible = false; };
}, getUnitMaintain(unitQuery)
handleModifyClick(row) { .then((response) => {
if (row.platformId != null) { this.corpNamesList = response.data.list || [];
// })
this.$confirm("是否需要重新关联自助平台?", "提示", { .catch(() => {
this.loading = false;
});
},
//
getPlatformList() {
this.loading = true;
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() {
this.$refs["editQuery"].validate((valid) => {
if (valid) {
if (this.editType == 0) {
addUnit(this.editQuery)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "添加成功"
});
this.cancelDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
} else {
modifyUnit(this.editQuery)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "修改成功"
});
this.cancelDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
}
}
});
},
unbindDialog(row) {
this.$confirm("此操作将解除绑定, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.editType = 2; this.loading = true;
this.editLoginVisible = true; console.log(row)
this.editLogin = row; let query = {
this.editDialogVisible = true; corpId: row.id
this.getUnitMaintain(); };
this.getPlatformList(); unbindPlatform(query).then((res) => {
this.getLocalBussinessType(); this.loading = false;
this.getTargetActions(row.platformId); this.getList();
this.$message.success("解绑成功");
}).catch((error) => {
this.loading = false;
this.$message.error("解绑失败");
});
}).catch(() => { }).catch(() => {
}); });
} else { },
this.editType = 2; linkSubmit() {
this.editLoginVisible = true; //
this.editLogin = row; let corpId = this.editLogin.corpName;
} if (!this.editDialogVisible) {
}, let corpNameTemp = null;
handleAddClick() { this.corpNamesList.forEach(item => {
this.editType = 0; if (item.id == this.editLogin.corpName) {
this.editLoginVisible = true; corpNameTemp = item.name;
this.editDialogVisible = false; corpId = item.id;
return;
}
});
// let flag = false;
this.editLogin = { //
id: null, this.list.forEach(item => {
corpName: null, if (item.corpName == corpNameTemp) {
platformId: null, flag = true;
platformUsername: null, return;
platformPassword: null, }
appid: null, });
appKey: null,
sceretKey: null, if (flag) {
sourceAction: null, this.$message.error('“' + corpNameTemp + '”' + " 已经关联");
targetAction: null return;
}; }
this.getLocalBussinessType();
this.getUnitMaintain(); } else {
this.getPlatformList(); let corpNameTemp = null;
}, this.corpNamesList.forEach(item => {
change() { if (item.name == this.editLogin.corpName) {
}, corpNameTemp = item.name;
getUnitMaintain() { corpId = item.id;
let unitQuery = { return;
customerId: this.$store.getters.customerId, }
page: 1, });
limit: 20 }
};
getUnitMaintain(unitQuery) this.$refs["editLogin"].validate((valid) => {
.then((response) => { if (valid) {
this.corpNamesList = response.data.list || []; this.editLogin.id = corpId;
}) linkPlatform(this.editLogin)
.catch(() => {
this.loading = false;
});
},
//
getPlatformList() {
this.loading = true;
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() {
this.$refs["editQuery"].validate((valid) => {
if (valid) {
if (this.editType == 0) {
addUnit(this.editQuery)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "添加成功"
});
this.cancelDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
} else {
modifyUnit(this.editQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.getList(); this.getList();
this.$message({ this.$message({
type: "success", type: "success",
message: "修改成功" message: "关联成功"
}); });
this.cancelDialog(); this.cancelDialog();
} else { } else {
@ -477,70 +542,25 @@ export default {
.catch(() => { .catch(() => {
}); });
} }
}
});
},
unbindDialog(row) {
this.$confirm("此操作将解除绑定, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.loading = true;
console.log(row)
let query = {
corpId: row.id
};
unbindPlatform(query).then((res) => {
this.loading = false;
this.getList();
this.$message.success("解绑成功");
}).catch((error) => {
this.loading = false;
this.$message.error("解绑失败");
}); });
}).catch(() => { },
}); exportTxt() {
}, },
linkSubmit() { handleSelectionChange(val) {
this.$refs["editLogin"].validate((valid) => { this.multipleSelection = val;
if (valid) { },
this.editLogin.id = this.editLogin.corpName; handleCurrentChange(val) {
linkPlatform(this.editLogin) this.query.page = val;
.then((response) => { this.getList();
if (response.code == 20000) { }
this.getList();
this.$message({
type: "success",
message: "关联成功"
});
this.cancelDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
}
});
},
exportTxt() {
}, },
handleSelectionChange(val) { mounted() {
this.multipleSelection = val;
}, },
handleCurrentChange(val) { created() {
this.query.page = val;
this.getList(); this.getList();
this.getPlatformList();
} }
}, };
mounted() {
},
created() {
this.getList();
this.getPlatformList();
}
};
</script> </script>
<style> <style>

@ -1,69 +1,70 @@
<template> <template>
<div> <div>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini"> <el-card>
<el-row> <el-form :inline="true" :model="filterQuery" size="mini">
<el-form-item class="query-form-item"> <el-row style="width: 100%;">
<el-input v-model="filterQuery.nameCode" placeholder="最小销售产品标识" :clearable="true"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="filterQuery.nameCode" placeholder="最小销售产品标识" :clearable="true"></el-input>
<el-form-item class="query-form-item"> </el-form-item>
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称" :clearable="true"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="filterQuery.cpmctymc" placeholder="产品名称" :clearable="true"></el-input>
<el-form-item class="query-form-item"> </el-form-item>
<el-input v-model="filterQuery.ggxh" placeholder="规格型号" :clearable="true"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="filterQuery.ggxh" placeholder="规格型号" :clearable="true"></el-input>
<el-form-item class="query-form-item"> </el-form-item>
<el-input v-model="filterQuery.batchNo" placeholder="批次号" :clearable="true"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="filterQuery.batchNo" placeholder="批次号" :clearable="true"></el-input>
</el-row> </el-form-item>
<el-row> </el-row>
<el-form-item class="query-form-item"> <el-row style="width: 100%;">
<el-input v-model="filterQuery.manufactory" placeholder="生产厂家" :clearable="true"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="filterQuery.manufactory" placeholder="生产厂家" :clearable="true"></el-input>
<el-form-item class="query-form-item"> </el-form-item>
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="注册/备案证号" :clearable="true"></el-input> <el-form-item class="query-form-item">
</el-form-item> <el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="注册/备案证号" :clearable="true"></el-input>
<el-form-item> </el-form-item>
<el-button-group> <el-form-item>
<el-button <el-button-group>
type="primary" <el-button
icon="el-icon-refresh" type="primary"
@click="onReset" icon="el-icon-refresh"
></el-button> @click="onReset"
<el-button type="primary" icon="search" @click="onSubmit" ></el-button>
>查询 <el-button type="primary" icon="search" @click="onSubmit"
</el-button >查询
> </el-button
</el-button-group> >
</el-form-item> </el-button-group>
</el-row> </el-form-item>
</el-form> </el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品名称" width="200" prop="productsName"></el-table-column>
<el-table-column label="产品标识" width="150" prop="nameCode"></el-table-column>
<el-table-column label="规格型号" width="240" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="结余数量" prop="reCount"></el-table-column>
<el-table-column label="注册/备案证号" width="180" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" width="200" prop="manufactory"></el-table-column>
<el-table-column label="操作" width="80" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="intentDetail(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"></el-table-column>
<el-table-column label="产品名称" width="200" prop="productsName"></el-table-column>
<el-table-column label="产品标识" width="150" prop="nameCode"></el-table-column>
<el-table-column label="规格型号" width="240" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="结余数量" prop="reCount"></el-table-column>
<el-table-column label="注册/备案证号" width="180" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产厂家" width="200" prop="manufactory"></el-table-column>
<el-table-column label="操作" width="80" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="intentDetail(scope.row)"
>详情
</el-button
>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog <el-dialog
title="库存详情" title="库存详情"

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save