修改服务包

This commit is contained in:
闫晓茹 2024-03-06 13:52:43 +08:00
parent 2b5707b00e
commit bb6b65b83a
2 changed files with 54 additions and 13 deletions

View File

@ -336,16 +336,30 @@
<!-- 添加或修改服务方式内容对话框 --> <!-- 添加或修改服务方式内容对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="70px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<!-- <el-form-item label="服务方式名称" prop="serviceWayName"> <!-- <el-form-item label="服务方式名称" prop="serviceWayName">
<el-input v-model="form.serviceWayName" placeholder="请输入服务方式名称" /> <el-input v-model="form.serviceWayName" placeholder="请输入服务方式名称" />
</el-form-item> </el-form-item>
<el-form-item label="服务方式编码" prop="serviceWayCode"> <el-form-item label="服务方式编码" prop="serviceWayCode">
<el-input v-model="form.serviceWayCode" placeholder="请输入服务方式编码" /> <el-input v-model="form.serviceWayCode" placeholder="请输入服务方式编码" />
</el-form-item>
<el-form-item label="所属服务方式id" prop="serviceWayId">
<el-input v-model="form.serviceWayId" placeholder="请输入所属服务方式id" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="所属服务方式" prop="serviceWayId">
<el-select
v-model="form.serviceWayId"
clearable
placeholder="请选择服务方式"
style="width: 250px"
@change="change"
>
<el-option
v-for="item in DepartmentoList"
:key="item.id"
:label="item.serviceWayName"
:value="item.id"
></el-option>
</el-select>
<!-- <el-input v-model="form.serviceWayId" placeholder="请输入所属服务方式id" /> -->
</el-form-item>
<el-form-item label="服务内容" prop="serviceContent" label-width="80"> <el-form-item label="服务内容" prop="serviceContent" label-width="80">
<el-input <el-input
type="textarea" type="textarea"
@ -514,6 +528,7 @@ export default {
// ], // ],
}, },
itemname: null, itemname: null,
serviceWayName:null,
querydepartmen: { querydepartmen: {
serviceWayName: "", serviceWayName: "",
}, },
@ -605,11 +620,15 @@ export default {
this.DepartmentoList = response.data; this.DepartmentoList = response.data;
// this.count=this.DepartmentoList.length // this.count=this.DepartmentoList.length
console.log(this.DepartmentoList); console.log(this.DepartmentoList);
// this.Option
// this.total = response.total; // this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
change(e){
console.log(e)
// this.form.serviceWayId=e
},
// //
itemdata(item) { itemdata(item) {
if (item) { if (item) {
@ -620,10 +639,12 @@ export default {
// this.disabled=true // this.disabled=true
// } // }
this.itemname = item.id; this.itemname = item.id;
this.serviceWayName=item.serviceWayName
this.form.serviceWayId = item.id;
// this.departmentName = item.serviceWayName; // this.departmentName = item.serviceWayName;
this.loading = true; this.loading = true;
this.queryParams.serviceWayId = item.id; this.queryParams.serviceWayId = item.id;
this.form.serviceWayId=item.id
this.getList(); this.getList();
} else { } else {
this.queryParams.serviceWayId = ""; this.queryParams.serviceWayId = "";
@ -712,6 +733,16 @@ export default {
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
console.log(this.itemname,'itemname')
if (this.itemname) {
this.form.serviceWayName = this.serviceWayName
this.form.serviceWayId = this.itemname
console.log( this.form,' this.form')
}
// else if (this.itemname == null) {
// this.form.serviceWayId = ""
// }
this.form.serviceFrequencyType = "DIGIT"; this.form.serviceFrequencyType = "DIGIT";
this.open = true; this.open = true;
this.title = "添加服务方式内容"; this.title = "添加服务方式内容";
@ -720,10 +751,11 @@ export default {
handleUpdate(row) { handleUpdate(row) {
console.log(row,'99999'); console.log(row,'99999');
this.reset(); this.reset();
// const id = row.id
getServicewaycontent(row.valuePlusMax).then((response) => { getServicewaycontent(row.valuePlusMax).then((response) => {
this.form = response.data; this.form = response.data;
// this.form.serviceWayId=row.serviceWayId
this.form.id = response.data.serviceFrequencyId; this.form.id = response.data.serviceFrequencyId;
this.form.serviceWayId=response.data.serviceWayId
// ---------- // ----------
if (response.data.serviceFrequencyType == "DIGIT") { if (response.data.serviceFrequencyType == "DIGIT") {
@ -744,7 +776,6 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
console.log(this.form)
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
@ -761,7 +792,9 @@ this.$message.error("请输入服务频次起始值和结束值")
}else if(this.form.serviceFrequencyType!="TEXT"&&this.form.serviceFrequencyType!="DIGIT"){ }else if(this.form.serviceFrequencyType!="TEXT"&&this.form.serviceFrequencyType!="DIGIT"){
this.$message.error("请选择数字还是文本")}else{ this.$message.error("请选择数字还是文本")}else{
console.log(this.form.id, "555555"); console.log(this.form, "555555");
console.log(this.form.serviceWayId)
if (this.form.serviceContentId != null) { if (this.form.serviceContentId != null) {
updateServicewaycontent(this.form).then((response) => { updateServicewaycontent(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

View File

@ -642,8 +642,8 @@ export default {
agencyName: [ agencyName: [
{ required: true, message: "机构名称能为空", trigger: "blur" }, { required: true, message: "机构名称能为空", trigger: "blur" },
], ],
// areaCode:[{ required: true, message: "", trigger: "blur" }, areaCode:[{ required: true, message: "行政区划不能为空", trigger: "blur" },
// ], ],
}, },
treeOptionsagencyCategoryId: [], treeOptionsagencyCategoryId: [],
treeOptions: [], treeOptions: [],
@ -747,7 +747,7 @@ export default {
// //
clickstreet(item) { clickstreet(item) {
// this.form.areaCode = item.areaCode; this.form.communityName =''
getSecondaryLevelInfo(item.id).then((res) => { getSecondaryLevelInfo(item.id).then((res) => {
this.streetlists = res.data; this.streetlists = res.data;
}); });
@ -760,6 +760,9 @@ export default {
clickarea(item) { clickarea(item) {
this.form.areaCode = ""; this.form.areaCode = "";
this.form.streetCode = ""; this.form.streetCode = "";
// this.form.streetName=''
this.form.communityCode =''
getSecondaryLevelInfo(item.id).then((res) => { getSecondaryLevelInfo(item.id).then((res) => {
this.streetlist = res.data; this.streetlist = res.data;
}); });
@ -769,6 +772,10 @@ export default {
this.form.regionName = ""; this.form.regionName = "";
this.form.areaCode = ""; this.form.areaCode = "";
this.form.streetCode = ""; this.form.streetCode = "";
this.form.streetName = "";
this.form.communityCode =''
getSecondaryLevelInfo(item.id).then((res) => { getSecondaryLevelInfo(item.id).then((res) => {
this.arealist = res.data; this.arealist = res.data;
}); });
@ -782,7 +789,8 @@ export default {
// //
province(item) { province(item) {
this.form.cityName = ""; this.form.cityName = "";
this.form.streeName = ""; // this.form.streeName = "";
// this.form.communityCode =''
this.form.areaName = ""; this.form.areaName = "";
this.form.communityName = ""; this.form.communityName = "";