From a75ab43e14745b11d4128f86d5fdfc089ceb58ac Mon Sep 17 00:00:00 2001
From: mch <1332099529@qq.com>
Date: Wed, 12 Jul 2023 20:21:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/request.js | 2 +-
.../unitGrouping/unitGroupCategory.vue | 100 +++++++++++++-----
.../unitGrouping/unitGroupingTable.vue | 15 +--
src/views/basic-dictionary/BirthPlace.vue | 21 +++-
.../basic-dictionary/DiagnosisPostfix.vue | 6 ++
src/views/basic-dictionary/GuideType.vue | 4 +-
.../basic-dictionary/MedicalConclusion.vue | 54 ++++++----
.../MedicalConclusionType.vue | 13 +++
.../basic-dictionary/MedicalReportType.vue | 5 +-
src/views/basic-dictionary/MedicalType.vue | 5 +-
src/views/basic-dictionary/Nation.vue | 95 ++++++++++-------
src/views/basic-dictionary/PersonnelType.vue | 33 +++---
src/views/basic-dictionary/SampleType.vue | 5 +-
src/views/basic-dictionary/Unit.vue | 7 ++
14 files changed, 244 insertions(+), 121 deletions(-)
diff --git a/src/api/request.js b/src/api/request.js
index d53e156..a4c3beb 100644
--- a/src/api/request.js
+++ b/src/api/request.js
@@ -14,7 +14,7 @@ const instance = axios.create({
//请求拦截
instance.interceptors.request.use(
async function (config) {
- console.log('old token:',localStorage.getItem("token"))
+ // console.log('old token:',localStorage.getItem("token"))
console.log('old expires_in',localStorage.getItem("expires_in"))
await yztoken();
diff --git a/src/components/unitGrouping/unitGroupCategory.vue b/src/components/unitGrouping/unitGroupCategory.vue
index 00961ca..65a87f5 100644
--- a/src/components/unitGrouping/unitGroupCategory.vue
+++ b/src/components/unitGrouping/unitGroupCategory.vue
@@ -69,10 +69,28 @@
width="110"
prop="displayName"
>
-
+
+
+
+
+
+
+
+
+
+
@@ -163,6 +181,7 @@ export default {
copegroupdata: [], //复制分组
addrulst: [], //添加保存的Id
price: "", //价格
+ title: 1,
};
},
computed: {
@@ -173,6 +192,17 @@ export default {
this.getportfolioitems();
},
methods: {
+ changingprices(price) {
+ this.price = price;
+ },
+ discount(index) {
+ console.log(index); //100标准价格
+ this.personnelUnit.nogroupselected[index].price = Math.round(
+ (100 * Number(this.personnelUnit.nogroupselected[index].queueTime)) /
+ 100,
+ 2
+ );
+ },
inputchang(row, newVal) {
this.price = row.price;
console.log(this.price);
@@ -191,6 +221,21 @@ export default {
}
);
}
+ // if (this.title == 2) {
+ // if (!this.personnelUnit.customerOrgGroupId) {
+ // alert("请先选择单位分组");
+ // return;
+ // } else {
+ // console.log(this.personnelUnit.nogroupselected);
+ // postapi(
+ // "/api/app/customer-org-group-detail/many",
+ // this.addrulst
+ // ).then((res) => {
+ // this.$message.success("操作成功");
+ // console.log(this.addrulst);
+ // });
+ // }
+ // }
// console.log(this.addrulst);
// // console.log(this.personnelUnit.form.id);
@@ -217,14 +262,12 @@ export default {
if (this.rightselctedata.length == 0) {
this.$message.warning("已选数据为空无法移动");
} else {
+ // this.title = 2;
let count = this.rightselctedata.length - 1;
for (var i = count; i >= 0; i--) {
- // this.personnelUnit.nogroupselected.splice(i, 1);
- // !this.rightselctedata.includes(this.rightselctedata[i].displayName)
[...new Set(this.rightselctedata)];
this.tabledata.push(this.rightselctedata[i]);
this.personnelUnit.nogroupselected.splice(i, 1);
- // this.tabledata.push(this.rightselctedata[i]);
}
console.log(this.personnelUnit.customerOrgGroupId);
@@ -232,7 +275,7 @@ export default {
this.rightselctedata.forEach((item) => {
this.addrulst.push({
asbitemId: item.id,
- price: price,
+ price: item.price,
// price: this.price,
customerOrgGroupId: this.personnelUnit.customerOrgGroupId,
});
@@ -261,7 +304,7 @@ export default {
if ([...new Set(this.unselecteddata)]) {
// this.unselecteddata.push(this.unselecteddata[i]);
this.personnelUnit.nogroupselected.push(this.unselecteddata[i]);
- this.tabledata.splice(i, 1);
+ this.tabledata.splice(this.tabledata[i], 1);
}
// this.personnelUnit.nogroupselected.push(this.unselecteddata[i]);
}
@@ -280,11 +323,11 @@ export default {
// prices = items.price;
// this.price = item.price;
- console.log(items, "items");
+ // console.log(items, "items");
this.addrulst.push({
- asbitemId:items.id, // "3a0b2f0c-f884-bec4-a350-79b46b455a2d"
- // price: prices,
+ asbitemId: items.id, // "3a0b2f0c-f884-bec4-a350-79b46b455a2d"
price: items.price,
+ // price: this.price == "" ? items.price : this.price,
customerOrgGroupId: this.personnelUnit.customerOrgGroupId,
});
});
@@ -347,19 +390,22 @@ export default {
},
//获取当前列列表数据
- listeninglist() {
+ listeninglist(customerOrgGroupId) {
+ getapi(`/api/app/customer-org-group/${customerOrgGroupId}`).then(
+ (res) => {
+ this.personnelUnit.form = res.data;
+ console.log(res);
+ }
+ );
getapi(
- `/api/app/customer-org-group/${this.personnelUnit.customerOrgGroupId}`
+ `/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`
).then((res) => {
- this.personnelUnit.form = res.data;
- console.log(res);
+ console.log(
+ `/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`,
+ res
+ );
+ this.personnelUnit.nogroupselected = res.data;
});
- // getapi(
- // `/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${this.personnelUnit.form.id}`
- // ).then((res) => {
- // console.log(res, "res");
- // this.personnelUnit.nogroupselected = res.data;
- // });
},
// getapi(`/api/app/customer-org-group/${row.id}`).then((res)
},
@@ -367,10 +413,14 @@ export default {
watch: {
//
"personnelUnit.customerOrgGroupId"(newVal, oldVal) {
- //console.log('patientRegister.addTimes newVal:',newVal,' oldVal:',oldVal)
+ console.log(
+ "watch patientRegister.addTimes newVal:",
+ newVal,
+ " oldVal:",
+ oldVal
+ );
if (newVal != oldVal) {
- console.log("newVal", newVal);
- this.listeninglist();
+ this.listeninglist(newVal);
//
}
},
@@ -382,10 +432,11 @@ export default {
margin-left: 5%;
}
.mainarearightbox {
- width: 30%;
+ width: 35%;
border: 1px solid #000;
height: 300px;
margin-left: 7%;
+ overflow: auto;
}
.mainbutton {
margin-left: 5%;
@@ -401,7 +452,8 @@ export default {
border: 1px solid #000;
height: 300px;
overflow: hidden;
-
+ overflow: auto;
+
margin-left: 7%;
}
.examinationcategory {
diff --git a/src/components/unitGrouping/unitGroupingTable.vue b/src/components/unitGrouping/unitGroupingTable.vue
index 68a2530..05cd864 100644
--- a/src/components/unitGrouping/unitGroupingTable.vue
+++ b/src/components/unitGrouping/unitGroupingTable.vue
@@ -279,13 +279,13 @@ export default {
});
// //
console.log(this.personnelUnit.form.id);
- getapi(
- `/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${this.personnelUnit.form.id}`
- ).then((res) => {
- console.log(res.data, "当前列");
- this.personnelUnit.nogroupselected = res.data;
- console.log(this.personnelUnit.nogroupselected, "我是分组");
- });
+ // getapi(
+ // `/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${this.personnelUnit.form.id}`
+ // ).then((res) => {
+ // console.log(res.data, "当前列");
+ // this.personnelUnit.nogroupselected = res.data;
+ // console.log(this.personnelUnit.nogroupselected, "我是分组");
+ // });
},
//编辑弹框
editgroup() {
@@ -352,6 +352,7 @@ export default {
} else {
this.dialogVisible = true;
this.title = 1;
+ this.form={}
this.obtainsuperior();
}
},
diff --git a/src/views/basic-dictionary/BirthPlace.vue b/src/views/basic-dictionary/BirthPlace.vue
index 02c2a86..306fe1c 100644
--- a/src/views/basic-dictionary/BirthPlace.vue
+++ b/src/views/basic-dictionary/BirthPlace.vue
@@ -81,7 +81,7 @@
:visible.sync="dialogVisible"
width="75%"
>
-
+
@@ -92,14 +92,14 @@
>
-
+
-
+
{
+ if(v){
+
if (this.title == 1) {
if (this.form.displayName != "" && this.form.countryCode != "") {
newplaceofrigin({
@@ -393,11 +404,15 @@ export default {
this.$message.warning("请输入国家标准码");
}
}
+
+ }
+ })
},
//新增弹框
add() {
this.dialogVisible = true;
this.title = 1;
+ this.form={}
},
//
getlist() {
diff --git a/src/views/basic-dictionary/DiagnosisPostfix.vue b/src/views/basic-dictionary/DiagnosisPostfix.vue
index 8e8e582..ac3b544 100644
--- a/src/views/basic-dictionary/DiagnosisPostfix.vue
+++ b/src/views/basic-dictionary/DiagnosisPostfix.vue
@@ -335,6 +335,11 @@ export default {
},
//确定新增或者编辑
addoredit() {
+ if(this.form.displayName==undefined){
+ this.$message.warning('请输入名称')
+ }else{
+
+
if (this.title == 1) {
addDiagnostics({ displayName: this.form.displayName }).then((res) => {
this.$message.success("新增成功");
@@ -350,6 +355,7 @@ export default {
}
);
}
+ }
},
//新增弹框
add() {
diff --git a/src/views/basic-dictionary/GuideType.vue b/src/views/basic-dictionary/GuideType.vue
index ab4cac6..e6dfa81 100644
--- a/src/views/basic-dictionary/GuideType.vue
+++ b/src/views/basic-dictionary/GuideType.vue
@@ -666,11 +666,11 @@ export default {
addoredit() {
if (this.title == 1) {
this.form={}
- if (this.form.displayName == "") {
+ if (this.form.displayName ==undefined) {
this.$message.warning("请输入名称");
} else {
newlyadded({ displayName: this.form.displayName }).then((res) => {
- console.log(res);
+ console.log(this.form.displayName);
this.$message.success("新增成功");
this.form = {};
this.getlists();
diff --git a/src/views/basic-dictionary/MedicalConclusion.vue b/src/views/basic-dictionary/MedicalConclusion.vue
index 82a2183..9643c7a 100644
--- a/src/views/basic-dictionary/MedicalConclusion.vue
+++ b/src/views/basic-dictionary/MedicalConclusion.vue
@@ -219,8 +219,8 @@ export default {
dialogVisible: false,
form: {
displayName: "",
- medicalConclusionTypeId:'',
- ars:'',
+ medicalConclusionTypeId: "",
+ ars: "",
},
Selectacategory: [],
Selectvalue: "",
@@ -290,7 +290,7 @@ export default {
},
isselctvalue(v) {
- this.form.medicalConclusionTypeId=v
+ this.form.medicalConclusionTypeId = v;
console.log(v);
this.pages.TypeId = v;
console.log(v);
@@ -432,31 +432,39 @@ export default {
},
change(v) {
this.selars = v;
- this.form.medicalConclusionTypeId=v
+ this.form.medicalConclusionTypeId = v;
console.log(this.form.ids);
},
//确定新增或者编辑
addoredit() {
- if (this.title == 1) {
- addconclusion({
- displayName: this.form.displayName,
- // medicalConclusionTypeId: this.form.ars,
+ console.log(this.form.displayName);
+ console.log(this.selars);
+ if (this.form.displayName == "") {
+ this.$message.warning("请输入名称");
+ } else if (this.selars == "") {
+ this.$message.warning("请选择类别");
+ } else {
+ if (this.title == 1) {
+ addconclusion({
+ displayName: this.form.displayName,
+ // medicalConclusionTypeId: this.form.ars,
medicalConclusionTypeId: this.form.medicalConclusionTypeId,
- }).then((res) => {
- this.$message.success("新增成功");
- this.getlist();
- this.dialogVisible = false;
- });
- } else if (this.title == 2) {
- //diagnosticediting updateconlus
- xiugaijielun(this.form.id, {
- displayName: this.form.displayName,
- medicalConclusionTypeId: this.selars,
- }).then((res) => {
- this.$message.success("修改成功");
- this.getlist();
- this.dialogVisible = false;
- });
+ }).then((res) => {
+ this.$message.success("新增成功");
+ this.getlist();
+ this.dialogVisible = false;
+ });
+ } else if (this.title == 2) {
+ //diagnosticediting updateconlus
+ xiugaijielun(this.form.id, {
+ displayName: this.form.displayName,
+ medicalConclusionTypeId: this.selars,
+ }).then((res) => {
+ this.$message.success("修改成功");
+ this.getlist();
+ this.dialogVisible = false;
+ });
+ }
}
},
//新增弹框
diff --git a/src/views/basic-dictionary/MedicalConclusionType.vue b/src/views/basic-dictionary/MedicalConclusionType.vue
index fffe107..32df038 100644
--- a/src/views/basic-dictionary/MedicalConclusionType.vue
+++ b/src/views/basic-dictionary/MedicalConclusionType.vue
@@ -333,13 +333,25 @@ export default {
},
//确定新增或者编辑
addoredit() {
+ console.log(this.form.displayName);
+ if(this.form.displayName==''){
+ this.$message.warning('请输入名称')
+ }else{
+
+
if (this.title == 1) {
+ if(this.form.displayName==undefined){
+ this.$message.warning('请输入名称1')
+ }
physicalnew({ displayName: this.form.displayName }).then((res) => {
this.$message.success("新增成功");
this.getlist();
this.dialogVisible = false;
});
} else if (this.title == 2) {
+ if(this.form.displayName==undefined){
+ this.$message.warning('名称不能为空')
+ }
tijianleibiexiugai(this.form.id, {
displayName: this.form.displayName,
}).then((res) => {
@@ -348,6 +360,7 @@ export default {
this.dialogVisible = false;
});
}
+ }
},
//新增弹框
add() {
diff --git a/src/views/basic-dictionary/MedicalReportType.vue b/src/views/basic-dictionary/MedicalReportType.vue
index e666b60..f6b781c 100644
--- a/src/views/basic-dictionary/MedicalReportType.vue
+++ b/src/views/basic-dictionary/MedicalReportType.vue
@@ -414,8 +414,8 @@ export default {
//新增
if (this.title == 1) {
// this.form = {};
- if (this.form.displayName == "") {
- this.$message.error("请输入名称");
+ if (this.form.displayName == undefined) {
+ this.$message.warning("请输入名称");
} else {
newreport({ displayName: this.form.displayName }).then((res) => {
if (res.code == 1) {
@@ -448,6 +448,7 @@ export default {
addll() {
this.dialogVisible = true;
this.title = 1;
+ this.form={}
},
//获取列表
getlist() {
diff --git a/src/views/basic-dictionary/MedicalType.vue b/src/views/basic-dictionary/MedicalType.vue
index f8e0a60..b93bf4a 100644
--- a/src/views/basic-dictionary/MedicalType.vue
+++ b/src/views/basic-dictionary/MedicalType.vue
@@ -331,7 +331,7 @@ export default {
//确定新增或者修改
addoredit() {
if (this.title == 1) {
- if (this.form.displayName != "") {
+ if (this.form.displayName != undefined) {
newphysical({ displayName: this.form.displayName }).then((res) => {
console.log(res);
this.$message.success("新增成功");
@@ -339,7 +339,7 @@ export default {
this.getlist();
this.dialogVisible = false;
});
- } else if (this.form.displayName == "") {
+ } else if (this.form.displayName == undefined) {
this.$message.warning("请输入名称");
}
} else if (this.title == 2) {
@@ -361,6 +361,7 @@ export default {
add() {
this.dialogVisible = true;
this.title = 1;
+ this.form={}
},
//
getlist() {
diff --git a/src/views/basic-dictionary/Nation.vue b/src/views/basic-dictionary/Nation.vue
index 60c56e4..4fc1a93 100644
--- a/src/views/basic-dictionary/Nation.vue
+++ b/src/views/basic-dictionary/Nation.vue
@@ -84,7 +84,7 @@
:visible.sync="dialogVisible"
width="75%"
>
-
+
@@ -96,7 +96,7 @@
-
+
-
+
{
- if (res.code == 1) {
- this.$message.success("新增成功");
- this.getlist();
- this.form = {};
- this.dialogVisible = false;
- }
- });
- } else if (this.title == 2) {
- if (this.form.displayName != "" && this.form.countryCode != "") {
- ethnicmodification(this.form.id, {
- displayName: this.form.displayName,
- countryCode: this.form.countryCode,
- }).then((res) => {
- console.log(res);
- if (res == undefined) {
- this.$message.warning("请重新输入");
- this.getlist();
- this.form = {};
- } else {
- this.$message.success("修改成功");
- this.getlist();
- this.dialogVisible = false;
+ this.$refs.form.validate((v) => {
+ if (v) {
+ if (this.title == 1) {
+ newethnicgroups({
+ displayName: this.form.displayName,
+ countryCode: this.form.countryCode,
+ }).then((res) => {
+ if (res.code == 1) {
+ this.$message.success("新增成功");
+ this.getlist();
+ this.form = {};
+ this.dialogVisible = false;
+ }
+ });
+ } else if (this.title == 2) {
+ if (this.form.displayName != "" && this.form.countryCode != "") {
+ ethnicmodification(this.form.id, {
+ displayName: this.form.displayName,
+ countryCode: this.form.countryCode,
+ }).then((res) => {
+ console.log(res);
+ if (res == undefined) {
+ this.$message.warning("请重新输入");
+ this.getlist();
+ this.form = {};
+ } else {
+ this.$message.success("修改成功");
+ this.getlist();
+ this.dialogVisible = false;
+ }
+ });
+ } else if (this.form.displayName == "") {
+ this.$message.success("请输入名称");
+ } else if (this.form.countryCode == "") {
+ this.$message.success("国家标准码");
}
- });
- } else if (this.form.displayName == "") {
- this.$message.success("请输入名称");
- } else if (this.form.countryCode == "") {
- this.$message.success("国家标准码");
+ }
}
- }
+ });
},
//新增弹框
addll() {
this.dialogVisible = true;
this.title = 1;
- this.form={}
+ this.form = {};
},
//获取列表
getlist() {
diff --git a/src/views/basic-dictionary/PersonnelType.vue b/src/views/basic-dictionary/PersonnelType.vue
index 204cf8e..81e644a 100644
--- a/src/views/basic-dictionary/PersonnelType.vue
+++ b/src/views/basic-dictionary/PersonnelType.vue
@@ -330,26 +330,31 @@ export default {
},
//确定新增或编辑
addoredit() {
- if (this.title == 1) {
- newpersonnel({ displayName: this.form.displayName }).then((res) => {
- this.$message.success("新增成功");
- this.getlist();
- this.dialogVisible = false;
- });
- } else if (this.title == 2) {
- personnelmodif(this.form.id, {
- displayName: this.form.displayName,
- }).then((res) => {
- this.$message.success("修改成功");
- this.getlist();
- this.dialogVisible = false;
- });
+ if (this.form.displayName == undefined) {
+ this.$message.warning("请输入名称");
+ } else {
+ if (this.title == 1) {
+ newpersonnel({ displayName: this.form.displayName }).then((res) => {
+ this.$message.success("新增成功");
+ this.getlist();
+ this.dialogVisible = false;
+ });
+ } else if (this.title == 2) {
+ personnelmodif(this.form.id, {
+ displayName: this.form.displayName,
+ }).then((res) => {
+ this.$message.success("修改成功");
+ this.getlist();
+ this.dialogVisible = false;
+ });
+ }
}
},
//新增弹框
add() {
this.dialogVisible = true;
this.title = 1;
+ this.form = {};
},
getlist() {
personnelcategory(this.pages).then((res) => {
diff --git a/src/views/basic-dictionary/SampleType.vue b/src/views/basic-dictionary/SampleType.vue
index 60d8be5..d3a765f 100644
--- a/src/views/basic-dictionary/SampleType.vue
+++ b/src/views/basic-dictionary/SampleType.vue
@@ -328,15 +328,14 @@ export default {
addoredit() {
if (this.title == 1) {
console.log(this.form);
- if (this.form.displayName != "") {
+ if (this.form.displayName != undefined) {
addedspecimen({ displayName: this.form.displayName }).then((res) => {
this.$message.success("新增成功");
this.getlist();
this.dialogVisible = false;
- this.form = {};
});
} else {
- this.$message.success("请输入名称");
+ this.$message.warning("请输入名称");
}
} else if (this.title == 2) {
editingspecimens(this.form.id, {
diff --git a/src/views/basic-dictionary/Unit.vue b/src/views/basic-dictionary/Unit.vue
index 17aae35..87e3702 100644
--- a/src/views/basic-dictionary/Unit.vue
+++ b/src/views/basic-dictionary/Unit.vue
@@ -356,6 +356,11 @@ export default {
},
//确定新增或者编辑
addoredit() {
+ if(this.form.displayName==undefined){
+ this.$message.warning('请输入名称')
+ }else{
+
+
if (this.title == 1) {
addunit({ displayName: this.form.displayName }).then((res) => {
this.$message.success("新增成功");
@@ -370,7 +375,9 @@ export default {
this.dialogVisible = false;
}
);
+ }
}
+
},
//新增弹框
add() {