修改
This commit is contained in:
parent
f930a80d79
commit
c8e471065b
@ -405,7 +405,7 @@
|
||||
<el-select
|
||||
v-model="aitem.serviceWayName"
|
||||
placeholder="请选择服务方式"
|
||||
@change="changeway($event,index)"
|
||||
@change="changeway($event, index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsway"
|
||||
@ -424,7 +424,7 @@
|
||||
style="margin-left: 10px"
|
||||
v-model="aitem.serviceContent"
|
||||
placeholder="请选择服务内容"
|
||||
@change="changcontent($event,index)"
|
||||
@change="changcontent($event, index)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionscontent[index]"
|
||||
@ -443,9 +443,7 @@
|
||||
<el-select
|
||||
v-model="aitem.serviceFrequencyText"
|
||||
placeholder="请选择服务频次"
|
||||
|
||||
>
|
||||
|
||||
<el-option
|
||||
v-for="item in optionsfrequency[index]"
|
||||
:key="item.id"
|
||||
@ -663,11 +661,9 @@
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="病种名称:" prop="packageVersion">
|
||||
<span style="
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
|
||||
">{{ formdetail.diseaseTypeName }}</span>
|
||||
<span style="display: inline-block; width: 80px">{{
|
||||
formdetail.diseaseTypeName
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务包名称:" prop="packageVersion">
|
||||
<span
|
||||
@ -689,13 +685,11 @@
|
||||
<el-form-item label="价格:" prop="packageVersion">
|
||||
<span>{{ formdetail.packagePrice }}元</span>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<br />
|
||||
<el-form-item label="服务期限:" prop="packageVersion">
|
||||
<span style="
|
||||
display: inline-block;
|
||||
width: 80px;
|
||||
|
||||
">{{ formdetail.packageTermAndUnit }}</span>
|
||||
<span style="display: inline-block; width: 80px">{{
|
||||
formdetail.packageTermAndUnit
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="硬件类型:" prop="packageVersion">
|
||||
<span>{{
|
||||
@ -807,25 +801,25 @@ export default {
|
||||
// 服务内容
|
||||
|
||||
optionscontent: {
|
||||
'0':[],
|
||||
'1':[],
|
||||
'2':[],
|
||||
'3':[],
|
||||
'4':[],
|
||||
'0': [],
|
||||
'1': [],
|
||||
'2': [],
|
||||
'3': [],
|
||||
'4': [],
|
||||
},
|
||||
// 服务频次
|
||||
optionsfrequency:{
|
||||
'0':[],
|
||||
'1':[],
|
||||
'2':[],
|
||||
'3':[],
|
||||
'4':[],
|
||||
optionsfrequency: {
|
||||
'0': [],
|
||||
'1': [],
|
||||
'2': [],
|
||||
'3': [],
|
||||
'4': [],
|
||||
},
|
||||
// optionsfrequency: [
|
||||
// {
|
||||
// value: '',
|
||||
// label: ''
|
||||
// }
|
||||
// {
|
||||
// value: '',
|
||||
// label: ''
|
||||
// }
|
||||
// ],
|
||||
|
||||
optionstype: [{
|
||||
@ -893,7 +887,7 @@ export default {
|
||||
hardwareType: null,
|
||||
whetherRelease: null,
|
||||
},
|
||||
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
formdetail: {},
|
||||
@ -947,7 +941,7 @@ export default {
|
||||
},
|
||||
|
||||
},
|
||||
serviceWayId:'',
|
||||
serviceWayId: '',
|
||||
|
||||
};
|
||||
},
|
||||
@ -1027,38 +1021,38 @@ export default {
|
||||
// console.log(this.optionscontent)
|
||||
var optionscontentPlus = []
|
||||
this.optionscontent[index] = []
|
||||
for(var i = 0;i<5;i++){
|
||||
if(this.optionscontent[i] != []){
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (this.optionscontent[i] != []) {
|
||||
optionscontentPlus.push(this.optionscontent[i])
|
||||
}
|
||||
}
|
||||
// console.log(optionscontentPlus,'打印optionscontentPlus')
|
||||
// console.log(this.optionscontent,'optionscontent')
|
||||
this.optionscontent = {
|
||||
'0':[],
|
||||
'1':[],
|
||||
'2':[],
|
||||
'3':[],
|
||||
'4':[],
|
||||
'0': [],
|
||||
'1': [],
|
||||
'2': [],
|
||||
'3': [],
|
||||
'4': [],
|
||||
}
|
||||
for(var j = 0 ; j<optionscontentPlus.length;j++){
|
||||
for (var j = 0; j < optionscontentPlus.length; j++) {
|
||||
this.optionscontent[j] = optionscontentPlus[j]
|
||||
}
|
||||
var optionsfrequencyPlus = []
|
||||
this.optionsfrequency[index] = []
|
||||
for(var i = 0;i<5;i++){
|
||||
if(this.optionsfrequency[i] != []){
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (this.optionsfrequency[i] != []) {
|
||||
optionsfrequencyPlus.push(this.optionsfrequency[i])
|
||||
}
|
||||
}
|
||||
this.optionsfrequency = {
|
||||
'0':[],
|
||||
'1':[],
|
||||
'2':[],
|
||||
'3':[],
|
||||
'4':[],
|
||||
'0': [],
|
||||
'1': [],
|
||||
'2': [],
|
||||
'3': [],
|
||||
'4': [],
|
||||
}
|
||||
for(var j = 0 ; j<optionsfrequencyPlus.length;j++){
|
||||
for (var j = 0; j < optionsfrequencyPlus.length; j++) {
|
||||
this.optionsfrequency[j] = optionsfrequencyPlus[j]
|
||||
}
|
||||
},
|
||||
@ -1068,7 +1062,7 @@ export default {
|
||||
var obj = {
|
||||
serviceWayName: null,
|
||||
serviceContent: null,
|
||||
serviceFrequencyText:null,
|
||||
serviceFrequencyText: null,
|
||||
idd: this.idd
|
||||
};
|
||||
if (this.form.voList.length == 5) {
|
||||
@ -1094,18 +1088,18 @@ export default {
|
||||
});
|
||||
},
|
||||
// 服务方式点击事件
|
||||
changeway(e,index) {
|
||||
changeway(e, index) {
|
||||
this.serviceWayId = this.optionsway.find(f => f.serviceWayName == e).id
|
||||
serviccontent(this.serviceWayId).then(response => {
|
||||
this.optionscontent[index] = response.rows;
|
||||
});
|
||||
this.form.voList[index].serviceContent = null
|
||||
this.form.voList[index].serviceFrequencyText = null
|
||||
this.form.voList[index].serviceContent = null
|
||||
this.form.voList[index].serviceFrequencyText = null
|
||||
|
||||
},
|
||||
|
||||
// 服务内容点击事件
|
||||
changcontent(e,index) {
|
||||
changcontent(e, index) {
|
||||
var id = null
|
||||
this.form.voList[index].serviceFrequencyText = null
|
||||
id = this.optionscontent[index].find(f => f.serviceContent == e).id
|
||||
@ -1113,7 +1107,7 @@ export default {
|
||||
this.optionsfrequency[index].forEach(el => {
|
||||
if (el.serviceFrequencyType == "DIGIT") {
|
||||
el.serviceFrequencyText = el.serviceFrequencyStart + '~' + el.serviceFrequencyEnd
|
||||
}
|
||||
}
|
||||
else if (el.serviceFrequencyType == "serviceFrequencyType") {
|
||||
this.optionsfrequency[index] = this.optionscontent[index].find(f => f.id == e).serviceWayFrequencyList
|
||||
}
|
||||
@ -1260,27 +1254,27 @@ export default {
|
||||
|
||||
// this.optionscontent = [],
|
||||
this.optionscontent = {
|
||||
'0':[],
|
||||
'1':[],
|
||||
'2':[],
|
||||
'3':[],
|
||||
'4':[],
|
||||
},
|
||||
this.optionsfrequency={
|
||||
'0':[],
|
||||
'1':[],
|
||||
'2':[],
|
||||
'3':[],
|
||||
'4':[],
|
||||
}
|
||||
// 服务频次
|
||||
// this.optionsfrequency = [
|
||||
// {
|
||||
// value: '',
|
||||
// label: ''
|
||||
// }
|
||||
// ],
|
||||
this.resetForm("form");
|
||||
'0': [],
|
||||
'1': [],
|
||||
'2': [],
|
||||
'3': [],
|
||||
'4': [],
|
||||
},
|
||||
this.optionsfrequency = {
|
||||
'0': [],
|
||||
'1': [],
|
||||
'2': [],
|
||||
'3': [],
|
||||
'4': [],
|
||||
}
|
||||
// 服务频次
|
||||
// this.optionsfrequency = [
|
||||
// {
|
||||
// value: '',
|
||||
// label: ''
|
||||
// }
|
||||
// ],
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
@ -1308,7 +1302,7 @@ export default {
|
||||
{
|
||||
serviceWayName: null,
|
||||
serviceContent: null,
|
||||
serviceFrequencyText:null,
|
||||
serviceFrequencyText: null,
|
||||
serviceFrequencyStart: null,
|
||||
serviceFrequencyEnd: null,
|
||||
idd: this.idd,
|
||||
@ -1415,51 +1409,63 @@ export default {
|
||||
// return
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.voList) {
|
||||
var obj = JSON.parse(JSON.stringify(this.form))
|
||||
obj.voList.forEach(e => {
|
||||
if (e.serviceFrequencyText.includes('~')) {
|
||||
const str = e.serviceFrequencyText;
|
||||
const parts = str.split('~');
|
||||
e.serviceFrequencyStart = parts[0];
|
||||
e.serviceFrequencyEnd = parts[1];
|
||||
e.serviceFrequencyText = null
|
||||
} else {
|
||||
e.serviceFrequencyText = e.serviceFrequencyText
|
||||
}
|
||||
|
||||
if (this.form.id != null) {
|
||||
this.form.departmentName = this.departmentName
|
||||
this.form.diseaseTypeName = this.diseaseTypeName
|
||||
updateServicepackage(obj).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
if (this.form.id != null) {
|
||||
this.form.departmentName = this.departmentName
|
||||
this.form.diseaseTypeName = this.diseaseTypeName
|
||||
if (this.form.voList) {
|
||||
var obj = JSON.parse(JSON.stringify(this.form))
|
||||
obj.voList.forEach(e => {
|
||||
if (e.serviceFrequencyText.includes('~')) {
|
||||
const str = e.serviceFrequencyText;
|
||||
const parts = str.split('~');
|
||||
e.serviceFrequencyStart = parts[0];
|
||||
e.serviceFrequencyEnd = parts[1];
|
||||
e.serviceFrequencyText = null
|
||||
} else {
|
||||
e.serviceFrequencyText = e.serviceFrequencyText
|
||||
}
|
||||
})
|
||||
updateServicepackage(obj).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
||||
if (this.diseaseTypeName == "请选择病种") {
|
||||
this.form.diseaseTypeName == null
|
||||
} else {
|
||||
|
||||
if (this.diseaseTypeName == "请选择病种") {
|
||||
this.form.diseaseTypeName == null
|
||||
} else {
|
||||
this.form.diseaseTypeName = this.diseaseTypeName
|
||||
}
|
||||
if (this.itemname) {
|
||||
this.form.departmentName = this.departmentName
|
||||
this.form.departmentId = this.itemname
|
||||
|
||||
} else {
|
||||
this.form.departmentName = this.departmentName
|
||||
|
||||
}
|
||||
addServicepackage(obj).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.Departmentlist()
|
||||
});
|
||||
|
||||
this.form.diseaseTypeName = this.diseaseTypeName
|
||||
}
|
||||
})
|
||||
if (this.itemname) {
|
||||
this.form.departmentName = this.departmentName
|
||||
this.form.departmentId = this.itemname
|
||||
|
||||
} else {
|
||||
this.form.departmentName = this.departmentName
|
||||
}
|
||||
if (this.form.voList) {
|
||||
var obj = JSON.parse(JSON.stringify(this.form))
|
||||
obj.voList.forEach(e => {
|
||||
if (e.serviceFrequencyText.includes('~')) {
|
||||
const str = e.serviceFrequencyText;
|
||||
const parts = str.split('~');
|
||||
e.serviceFrequencyStart = parts[0];
|
||||
e.serviceFrequencyEnd = parts[1];
|
||||
e.serviceFrequencyText = null
|
||||
} else {
|
||||
e.serviceFrequencyText = e.serviceFrequencyText
|
||||
}
|
||||
})
|
||||
addServicepackage(obj).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.Departmentlist()
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user