Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-945e2980.2822c6b0.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-945e2980"],{"0736":function(e,t,o){"use strict";o.d(t,"c",(function(){return r})),o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return i}));var s=o("b775");function r(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.updateHousekeepingServ",method:"post",data:e}).then(e=>{const s=e.data;0===s.code?t(s):o(s.msg)}).catch(e=>{o(e)})})}function a(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingType.queryHousekeepingType",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function i(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.queryAdminServ",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}},5267:function(e,t,o){"use strict";o.d(t,"b",(function(){return r})),o.d(t,"d",(function(){return a})),o.d(t,"a",(function(){return i}));var s=o("b775");function r(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.queryHousekeepingServ",method:"get",params:e}).then(e=>{const o=e.data;t(o)}).catch(e=>{o(e)})})}function a(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.saveHousekeepingServ",method:"post",data:e}).then(e=>{const s=e.data;0===s.code?t(s):o(s.msg)}).catch(e=>{o(e)})})}function i(e){return new Promise((t,o)=>{Object(s["a"])({url:"/housekeepingServ.deleteHousekeepingServ",method:"post",data:{servId:e}}).then(e=>{const s=e.data;0===s.code?t(s):o(s.msg)}).catch(e=>{o(e)})})}},"889a":function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("服务信息")])]),t("el-form",{attrs:{"label-width":"120px"}},[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"服务名称"}},[t("el-input",{attrs:{placeholder:"必填,请填写服务名称",clearable:""},model:{value:e.editHousekeepingServInfo.servName,callback:function(t){e.$set(e.editHousekeepingServInfo,"servName",t)},expression:"editHousekeepingServInfo.servName"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"服务描述"}},[t("el-input",{attrs:{placeholder:"必填,请填写服务名称",clearable:""},model:{value:e.editHousekeepingServInfo.servDesc,callback:function(t){e.$set(e.editHousekeepingServInfo,"servDesc",t)},expression:"editHousekeepingServInfo.servDesc"}})],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"关键词"}},[t("el-input",{attrs:{placeholder:"必填,请填写关键词,多个关键词用;分隔",clearable:""},model:{value:e.editHousekeepingServInfo.keyword,callback:function(t){e.$set(e.editHousekeepingServInfo,"keyword",t)},expression:"editHousekeepingServInfo.keyword"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"服务类型"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择服务类型"},model:{value:e.editHousekeepingServInfo.hktId,callback:function(t){e.$set(e.editHousekeepingServInfo,"hktId",t)},expression:"editHousekeepingServInfo.hktId"}},e._l(e.editHousekeepingServInfo.housekeepingTypes,(function(e){return t("el-option",{key:e.hktId,attrs:{label:e.hktName,value:e.hktId}})})),1)],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"销量"}},[t("el-input",{attrs:{placeholder:"选填,请填写销量",clearable:""},model:{value:e.editHousekeepingServInfo.sales,callback:function(t){e.$set(e.editHousekeepingServInfo,"sales",t)},expression:"editHousekeepingServInfo.sales"}})],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"排序"}},[t("el-input",{attrs:{placeholder:"选填,请填写排序",clearable:""},model:{value:e.editHousekeepingServInfo.sort,callback:function(t){e.$set(e.editHousekeepingServInfo,"sort",t)},expression:"editHousekeepingServInfo.sort"}})],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"上架状态"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择上架状态"},model:{value:e.editHousekeepingServInfo.state,callback:function(t){e.$set(e.editHousekeepingServInfo,"state",t)},expression:"editHousekeepingServInfo.state"}},e._l(e.editHousekeepingServInfo.states,(function(e){return t("el-option",{key:e.statusCd,attrs:{label:e.name,value:e.statusCd}})})),1)],1)],1),t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"派单方式"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择派单方式"},model:{value:e.editHousekeepingServInfo.repairWay,callback:function(t){e.$set(e.editHousekeepingServInfo,"repairWay",t)},expression:"editHousekeepingServInfo.repairWay"}},e._l(e.editHousekeepingServInfo.repairWays,(function(e){return t("el-option",{key:e.statusCd,attrs:{label:e.name,value:e.statusCd}})})),1)],1)],1)],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:12}},[t("el-form-item",{attrs:{label:"回访方式"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"必填,请选择回访方式"},model:{value:e.editHousekeepingServInfo.returnVisitFlag,callback:function(t){e.$set(e.editHousekeepingServInfo,"returnVisitFlag",t)},expression:"editHousekeepingServInfo.returnVisitFlag"}},e._l(e.editHousekeepingServInfo.returnVisitFlags,(function(e){return t("el-option",{key:e.statusCd,attrs:{label:e.name,value:e.statusCd}})})),1)],1)],1)],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"20px"}},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("服务图片")])]),t("el-form",{attrs:{"label-width":"120px"}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"服务封面"}},[t("upload-image-url",{ref:"coverUpload",attrs:{"image-count":1},on:{notifyUploadCoverImage:e.handleCoverImage}})],1)],1)],1),t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"服务轮播"}},[t("upload-image-url",{ref:"carouselUpload",attrs:{"image-count":3},on:{notifyUploadCarouselFigureImage:e.handleCarouselImage}})],1)],1)],1)],1)],1),t("el-card",{staticClass:"box-card",staticStyle:{"margin-top":"20px"}},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("服务扩展")])]),t("el-form",{attrs:{"label-width":"120px"}},[t("el-row",[t("el-col",{attrs:{span:24}},[t("el-form-item",{attrs:{label:"服务详情"}},[t("RichTextEditor",{ref:"richTextEditor",on:{input:e.handleContentChange},model:{value:e.editHousekeepingServInfo.context,callback:function(t){e.$set(e.editHousekeepingServInfo,"context",t)},expression:"editHousekeepingServInfo.context"}})],1)],1)],1)],1),t("div",{staticStyle:{"text-align":"right","margin-top":"20px"}},[t("el-button",{attrs:{type:"warning"},on:{click:e.handleCancel}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)],1)},r=[],a=o("5e31"),i=o("e01b"),n=o("7323"),l=o("0736"),u=o("5267"),c={components:{UploadImageUrl:a["a"],RichTextEditor:i["a"]},data(){return{editHousekeepingServInfo:{servId:"",servName:"",servDesc:"",hktId:"",sales:"",sort:"",state:"",repairWay:"",returnVisitFlag:"",keyword:"",coverPhoto:"",context:"",areaCode:"",carouselFigurePhoto:[],housekeepingTypes:[],repairWays:[],states:[],returnVisitFlags:[]}}},created(){this.initData()},methods:{async initData(){this.editHousekeepingServInfo.servId=this.$route.query.servId,await this.getHousekeepingServ(),await this.getHousekeepingTypes(),await this.getDictData()},async getDictData(){try{const{data:e}=await Object(n["e"])("housekeeping_serv","state");this.editHousekeepingServInfo.states=e;const{data:t}=await Object(n["e"])("housekeeping_serv","return_visit_flag");this.editHousekeepingServInfo.returnVisitFlags=t;const{data:o}=await Object(n["e"])("housekeeping_serv","repair_way");this.editHousekeepingServInfo.repairWays=o}catch(e){this.$message.error(e),console.error("获取字典数据失败:",e)}},async getHousekeepingTypes(){try{const e=await Object(u["queryHousekeepingType"])({page:1,row:50,typeCd:1001,shopId:Object(n["f"])()});this.editHousekeepingServInfo.housekeepingTypes=e.data}catch(e){console.error("获取服务类型失败:",e)}},async getHousekeepingServ(){try{const e=await Object(u["b"])({page:1,row:1,shopId:Object(n["f"])(),servId:this.editHousekeepingServInfo.servId}),t=e.data[0];Object.assign(this.editHousekeepingServInfo,t),t.coverPhoto&&this.$refs.coverUpload.setImages([t.coverPhoto]),t.carouselFigurePhoto&&t.carouselFigurePhoto.length>0&&this.$refs.carouselUpload.setImages(t.carouselFigurePhoto),t.context&&this.$refs.richTextEditor.setContent(t.context)}catch(e){console.error("获取服务详情失败:",e)}},handleCoverImage(e){e&&e.length>0?this.editHousekeepingServInfo.coverPhoto=e[0]:this.editHousekeepingServInfo.coverPhoto=""},handleCarouselImage(e){e&&e.length>0?this.editHousekeepingServInfo.carouselFigurePhoto=e:this.editHousekeepingServInfo.carouselFigurePhoto=[]},handleContentChange(e){this.editHousekeepingServInfo.context=e},validateForm(){return this.editHousekeepingServInfo.servName?this.editHousekeepingServInfo.hktId?this.editHousekeepingServInfo.keyword?this.editHousekeepingServInfo.state?this.editHousekeepingServInfo.repairWay?this.editHousekeepingServInfo.returnVisitFlag?!!this.editHousekeepingServInfo.context||(this.$message.error("服务详情不能为空"),!1):(this.$message.error("请选择回访方式"),!1):(this.$message.error("请选择派单方式"),!1):(this.$message.error("请选择上架状态"),!1):(this.$message.error("关键字不能为空"),!1):(this.$message.error("请选择服务类型"),!1):(this.$message.error("服务名称不能为空"),!1)},async handleSubmit(){if(this.validateForm())try{this.editHousekeepingServInfo.shopId=Object(n["f"])(),this.editHousekeepingServInfo.areaCode=Object(n["f"])(),this.editHousekeepingServInfo.coverPhoto&&"object"===typeof this.editHousekeepingServInfo.coverPhoto&&(this.editHousekeepingServInfo.coverPhoto=this.editHousekeepingServInfo.coverPhoto.url||this.editHousekeepingServInfo.coverPhoto),this.editHousekeepingServInfo.carouselFigurePhoto&&this.editHousekeepingServInfo.carouselFigurePhoto.length>0&&(this.editHousekeepingServInfo.carouselFigurePhoto=this.editHousekeepingServInfo.carouselFigurePhoto.map(e=>"object"===typeof e&&e.url||e)),await Object(l["c"])(this.editHousekeepingServInfo),this.$message.success("修改成功"),this.$router.go(-1)}catch(e){console.error("保存失败:",e),this.$message.error(e)}},handleCancel(){this.$router.go(-1)}}},d=c,p=(o("f24c4"),o("2877")),g=Object(p["a"])(d,s,r,!1,null,"20d2bbb6",null);t["default"]=g.exports},c814:function(e,t,o){},f24c4:function(e,t,o){"use strict";o("c814")}}]);
//# sourceMappingURL=chunk-945e2980.2822c6b0.js.map