chunk-0f24.e2a8a9d0.js 15.2 KB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0f24","chunk-4f9a"],{"1pU5":function(e,t,i){"use strict";i.r(t);var a={components:{detail:i("JvZc").default},props:{params:{type:Object,default:function(){return{}}},fn:{type:Function},gfn:{type:Function}},data:function(){return{}},watch:{},methods:{}},s=(i("OaDt"),i("KHd+")),n=Object(s.a)(a,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"service-edit"},[t("detail",{ref:"detail",attrs:{params:this.params,fn:this.fn,gfn:this.gfn}})],1)},[],!1,null,null,null);n.options.__file="index.vue",t.default=n.exports},"76qn":function(e,t,i){"use strict";i.r(t);var a=i("4d7F"),s=i.n(a),n=i("P2sY"),r=i.n(n),c=i("XEwT"),l=i("tVFF"),o=i("s+7F"),d=i("7NVX"),p=i("rm1f"),h=i("1pU5"),u=i("hZMg"),v={name:"serviceManage",components:{SearchTop:c.a,permissionButton:p.a,AddDialog:d.a,detail:h.default,SearchTree:l.a,SearchTreeNoAsyc:o.a},data:function(){return{CONSTANTSSTATUS:this.$Constants.STORESTATUS,pageIndex:1,pageSize:10,totalCount:0,listData:[],listHeadData:[{prop:"serviceCode",label:"服务商编号",minWidth:100},{prop:"serviceName",label:"服务商名称",minWidth:150},{prop:"serviceType",label:"技能",minWidth:200},{prop:"serviceAddress",label:"服务范围",minWidth:200},{prop:"serviceStatus",label:"状态",minWidth:100}],loading:!0,loading_check:!0,searchForm:{storeCode:"",serverType:""},searchFormAsyc:{conditions:"",userStatus:""},searchData:[{modelValue:"storeCode",label:"条件搜索",type:"input",placeholder:"请输入服务商编号/名称/技能/服务范围"},{modelValue:"serverType",label:"状态",type:"select",optionValue:""}],searchBtn:[{type:"primary",name:"查询",pType:"search",callback:this.handleSearch},{type:"",name:"重置",pType:"reset"}],listBtnData:[],diaWidth:"30%",diaEditWidth:"60%",isShowConfirm:!1,isLoadServiceDetail:!1,isServiceDetailVisible:!1,serviceData:[],isLoadServiceEdit:!1,isServiceEditVisible:!1,serviceTitle:"编辑服务商",serviceParmas:{id:void 0},pisOrginationVisible:!1,porginaTitle:"选择归属集团",ptreeClickVal:"",ptreeClickValId:"",ptreeClickValType:"",ptreeSelectedData:[],ptreeIsAysc:!0,ptreeProps:{label:"name",children:"children"},ptreeNoAsycSearchData:[],pisShowInput:!1,serviceTypeOptions:[]}},watch:{pisOrginationVisible:function(e){var t=this;e?(Object(u.yc)({orgStatus:1}).then(function(e){t.ptreeNoAsycSearchData=e.data}).catch(function(e){}),this.pisShowInput=!0):this.pisShowInput=!1}},methods:{addNewTreeNode:function(e,t){var i=[];e.map(function(e,t){i.push({name:e.name,id:e.id,orgType:e.orgType})}),t(i)},pshowOrginaDialog:function(){this.pisOrginationVisible=!0},phideOrginaDialog:function(){this.pisOrginationVisible=!1,this.ptreeClickVal="",this.ptreeClickValId="",this.ptreeClickValType=""},porginaComfrimClick:function(){2!=this.ptreeClickValType?this.$message({type:"warning",message:"层级不可选择,请选择机构!"}):(this.$set(this,"serviceParmas",{gId:this.ptreeClickValId,gName:this.ptreeClickVal,gType:this.ptreeClickValType}),this.phideOrginaDialog())},ptreeNodeLoad:function(e,t){var i,a=this;i=e?e.key?{id:e.key,orgStatus:1}:{orgStatus:1}:"",Object(u.yc)(i).then(function(e){a.addNewTreeNode(e.data,t)}).catch(function(e){})},ptreeNodeClick:function(e){this.ptreeClickVal=e.name,this.ptreeClickValId=e.id,this.ptreeClickValType=e.orgType},ptreeSearchClick:function(e){var t=this;Object(u.yc)({name:e,orgStatus:1}).then(function(e){t.ptreeNoAsycSearchData=e.data}).catch(function(e){})},serviceHideDialog:function(){this.hideSerFn()},showSerFn:function(e,t){var i=this;this.setDetailID(e,t),this.isLoadServiceDetail=!0,this.$nextTick(function(){i.isServiceDetailVisible=!0,i.getCheckDetail(i.listData[e].detailID)})},hideSerFn:function(){var e=this;this.isLoadServiceDetail=!1,this.$nextTick(function(){e.isServiceDetailVisible=!1,e.clearDetailID()})},clearDetailID:function(){this.$set(this,"serviceParmas",{id:void 0})},setDetailID:function(e,t){"edit"==t&&this.$set(this,"serviceParmas",{id:this.listData[e].detailID})},serviceEditComfrimClick:function(){this.$refs.detail.$refs.detail.comfirmDetail()},showSerEditFn:function(e,t){var i=this;this.setDetailID(e,t),this.isLoadServiceEdit=!0,this.$nextTick(function(){i.isServiceEditVisible=!0})},hideSerEditFn:function(e){var t=this;this.isLoadServiceEdit=!1,this.$nextTick(function(){t.isServiceEditVisible=!1,e&&t.getList(),t.clearDetailID()})},handleSizeChange:function(e){this.pageSize=e,this.getList()},handleCurrentChange:function(e){this.pageIndex=e,this.getList()},toggleSelection:function(e){var t=this;e?e.forEach(function(e){t.$refs.multipleTable.toggleRowSelection(e)}):this.$refs.multipleTable.clearSelection()},handleSelectionChange:function(e){this.multipleSelection=e},rowClick:function(e,t,i){this.$Common.rowClick(this,e,i,"btn")},getList:function(e){this.listData=[],this.loading=!0;var t={};(t=r()(t,this.searchFormAsyc)).pageSize=this.pageSize,t.pageIndex=this.pageIndex,t.treeId=this.treeClickVal;var a=this;Object(u.gc)(t).then(function(e){var i=[];e.data.items.forEach(function(e){var t={detailID:e.id,serviceCode:e.id,serviceName:e.providerName,serviceType:e.serviceItems?e.serviceItems.split("/"):"",serviceStatus:e.userStatus,serviceAddress:e.ranges?e.ranges.split(","):""};i.push(t)}),a.listData=i,a.totalCount=e.data.page.totalCount,a.pageSize=e.data.page.pageSize,a.pageIndex=e.data.page.pageIndex,a.loading=!1}).catch(function(e){})},listBtnClick:function(e,t,i,a){this.btnClick(e,t,a)},handleSearch:function(e){this.pageIndex=1;var t=this.searchDataToAyscData(e);this.$set(this,"searchFormAsyc",t),this.getList()},searchDataToAyscData:function(e){var t={};return t.conditions=e.storeCode,t.userStatus=e.serverType,t},btnClick:function(e,t,i){switch(e){case"add":this.serviceTitle="新增服务商",this.isShowConfirm=!0,this.showSerEditFn(t,"add");break;case"edit":this.serviceTitle="编辑服务商",this.isShowConfirm=!0,this.showSerEditFn(t,"edit");break;case"detail":this.isShowConfirm=!1,this.showSerFn(t,"detail")}},getDictDataListByKey:function(){this.searchData[1].optionValue=[{value:"",label:"全部"},{value:"sys_user_status_normal",label:"启用"},{value:"sys_user_status_nonuse",label:"禁用"}]},getServiceItemGetAllDown:function(){var a=this;return new s.a(function(i){Object(u.Cb)({},"serviceItemGetAllDown","get").then(function(e){var t=[];e.data.map(function(e){t.push({value:e.serviceCode,label:e.serviceName,disabled:!1})}),a.serviceTypeOptions=t,i()}).catch(function(e){})})},setDropDownDisabled:function(t){var i="";return this.serviceTypeOptions.forEach(function(e){e.value==t&&(i=e.label)}),i},getCheckDetail:function(e){var o=this;this.loading_check=!0,Object(u.fc)({providerId:e}).then(function(e){if(o.loading_check=!1,e&&200==e.code){var t=e.data,i=o,a=(n=[],r=[],c=[],l="",(s=t).serviceFee&&s.serviceFee.forEach(function(e,t){c.push(e),(0!=t&&(t+1)%3==0||t==s.serviceFee.length-1)&&(r.push(c),c=[])}),r.forEach(function(e,t){if(e){var i={serviceType:o.setDropDownDisabled(e[0]&&e[0].serviceCode),serviceTypeId:e[0]&&e[0].serviceCode,servicePrice1:e[0]&&"¥"+e[0].serviceFee,servicePrice2:e[2]&&"¥"+e[2].serviceFee,servicePrice3:e[1]&&"¥"+e[1].serviceFee};l+=i.serviceTypeId+"|"+i.servicePrice1+"|"+i.servicePrice2+"|"+i.servicePrice3+",",n.push(i)}}),{serServiceTable:n,serviceFeeString:l});o.serviceData=[{name:"服务商名称:",class:"",type:"",txt:t.providerName},{name:"归属集团:",class:"",type:"",txt:t.organization},{name:"状态:",class:"oneRow",type:"status",txt:"sys_user_status_normal"==t.userStatus?"1":"0"},{name:"登录账号:",class:"",type:"",txt:t.username},{name:"登录密码:",class:"",type:"",txt:"********"},{name:"联系人:",class:"",type:"",txt:t.contactPerson},{name:"联系方式:",class:"",type:"",txt:t.phone},{name:"电子邮箱:",class:"",type:"",txt:t.email},{name:"身份证号:",class:"",type:"",txt:t.idcard},{name:"服务商地址:",class:"",type:"",txt:(t.area?i.$Common.fliterAddress(t.area)[0]:"")+t.addressDetail},{name:"银行卡号:",class:"",type:"",txt:t.bankCardNo},{name:"技能:",class:"",type:"",txt:t.serviceItems?t.serviceItems.split("/").join(" 、"):""},{name:"开户银行:",class:"",type:"",txt:t.bankName},{name:"服务范围:",class:"",type:"array",txt:t.ranges?t.ranges.split(","):"无"},{name:"开户银行城市:",class:"",type:"",txt:t.bankProvince+t.bankCity+t.bankDistrict},{name:"新增订单:",class:"oneRow",type:"",txt:1==t.createOrderType?"安装单":"关闭"},{name:"服务定价:",class:"oneRow",type:"list",txt:a.serServiceTable||[{type:"gpsxxx",servicePrice1:"¥100.0",servicePrice2:"¥10000.0",servicePrice3:"¥1000.0"},{type:"gpsxxx",servicePrice1:"¥100.0",servicePrice2:"¥10000.0",servicePrice3:"¥1000.0"}]},{name:"自动生成对账单:",class:"oneRow",type:"",txt:1==t.generateCheckSheet?"已开启":"未开启"}]}var s,n,r,c,l})}},mounted:function(){var i=this;this.getList(),this.getDictDataListByKey(),this.getServiceItemGetAllDown();var e=this.$Common.filterAsycRouter(this.$store.getters.asycRouters,"/service");e&&0<e.length&&(this.listBtnData=[],e.map(function(e){"edit"!=e.pType&&"detail"!=e.pType||i.listBtnData.push({type:"text",name:e.name,pType:e.pType})}),e.map(function(e){var t=i;"add"==e.pType&&i.searchBtn.unshift({type:"primary",name:e.name,pType:e.pType,callback:function(){t.listBtnClick("add","","all")}})}))}},f=(i("JAD+"),i("cdj8"),i("KHd+")),m=Object(f.a)(v,function(){var i=this,e=i.$createElement,a=i._self._c||e;return a("div",{staticClass:"service-container"},[a("div",{staticClass:"user-container"},[a("div",{staticClass:"user-search"},[a("search-top",{attrs:{searchTopBtnStyle:"fr",showType:"oneRow",noClearAttr:!0,searchBtn:i.searchBtn,searchForm:i.searchForm,searchData:i.searchData},on:{search:i.handleSearch}})],1),i._v(" "),a("div",{staticClass:"user-list"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:i.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:i.listData,"header-cell-style":{background:"#f5f7fa"}},on:{"selection-change":i.handleSelectionChange,"row-click":i.rowClick}},[i._l(i.listHeadData,function(t,e){return a("el-table-column",{key:e,ref:t.ref,refInFor:!0,attrs:{prop:t.prop,width:t.width,"min-width":t.minWidth,label:t.label},scopedSlots:i._u([{key:"default",fn:function(e){return["serviceType"===t.prop?[i.listData[e.$index][t.prop]?[i._v("\n                  "+i._s(i.listData[e.$index][t.prop].join(", "))+"\n\t\t\t\t\t\t\t\t")]:[i._v("\n\t\t\t\t\t\t\t\t\t--\n\t\t\t\t\t\t\t\t")]]:"serviceAddress"===t.prop?[i.listData[e.$index][t.prop]?[i._v("\n                  "+i._s(i.listData[e.$index][t.prop].join(", "))+"\n\t\t\t\t\t\t\t\t")]:[i._v("\n\t\t\t\t\t\t\t\t\t--\n\t\t\t\t\t\t\t\t")]]:"serviceStatus"===t.prop?[a("span",{staticClass:"dot",class:i.CONSTANTSSTATUS[i.listData[e.$index][t.prop]].split(",")[1]}),i._v(" "),a("span",{staticClass:"statusText"},[i._v(i._s(i.CONSTANTSSTATUS[i.listData[e.$index][t.prop]].split(",")[0]))])]:[i._v("\n                "+i._s(i.listData[e.$index][t.prop]?i.listData[e.$index][t.prop]:"--")+"\n              ")]]}}])})}),i._v(" "),a("el-table-column",{attrs:{width:"170",fixed:"right",prop:"btn",label:"操作"},scopedSlots:i._u([{key:"default",fn:function(e){return[a("permission-button",{attrs:{btnType:"single",rowIndex:String(e.$index),btnData:i.listBtnData},on:{btnClick:i.listBtnClick}})]}}])})],2)],1),i._v(" "),a("div",{staticClass:"user-page"},[a("el-pagination",{staticStyle:{padding:"20px"},attrs:{background:"","current-page":i.pageIndex,"page-sizes":[10,20,30,40,50],"page-size":i.pageSize,layout:"total,slot,->, prev, pager, next, sizes,jumper",total:i.totalCount},on:{"size-change":i.handleSizeChange,"current-change":i.handleCurrentChange}},[a("span",{staticClass:"el-pagination__total"},[i._v("第"+i._s(i.pageIndex)+"/"+i._s(Math.ceil(i.totalCount/i.pageSize))+"页")])])],1),i._v(" "),i.isLoadServiceDetail?[a("add-dialog",{ref:"serviceDetail",attrs:{title:"查看服务商",center:"editCenter","is-visible":i.isServiceDetailVisible,"dia-width":i.diaEditWidth,"is-close-no-comfrim-again":!0,isShowConfirm:i.isShowConfirm},on:{hideDialog:i.serviceHideDialog}},[a("div",{staticClass:"scrollbar",attrs:{slot:"center"},slot:"center"},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:i.loading_check,expression:"loading_check"}],staticClass:"demo-table-expand ",attrs:{"label-position":"right",inline:""}},i._l(i.serviceData,function(e,t){return a("el-form-item",{key:t,class:e.class,attrs:{label:e.name}},["status"==e.type?a("span",[i._v("\n                    "+i._s("1"==e.txt?"已启用":"已禁用")+"\n                  ")]):"array"==e.type?a("span",i._l(e.txt,function(e,t){return a("p",{key:t,staticClass:"margin_0 height_25"},[i._v("\n                      "+i._s(e||"--")+"\n                    ")])})):"list"==e.type?a("span",[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.txt,"header-cell-style":{background:"#f5f7fa"}}},[a("el-table-column",{attrs:{label:"服务项目",align:"center",width:"180",prop:"serviceType"},scopedSlots:i._u([{key:"default",fn:function(e){return[i._v("\n                          "+i._s(e.row.serviceType?e.row.serviceType:"--")+"\n                        ")]}}])}),i._v(" "),a("el-table-column",{attrs:{label:"安装价",align:"center",width:"150",prop:"servicePrice1"},scopedSlots:i._u([{key:"default",fn:function(e){return[i._v("\n                          "+i._s(e.row.servicePrice1?e.row.servicePrice1:"--")+"\n                        ")]}}])}),i._v(" "),a("el-table-column",{attrs:{label:"检修价",align:"center",width:"150",prop:"servicePrice2"},scopedSlots:i._u([{key:"default",fn:function(e){return[i._v("\n                          "+i._s(e.row.servicePrice2?e.row.servicePrice2:"--")+"\n                        ")]}}])}),i._v(" "),a("el-table-column",{attrs:{label:"拆除价",align:"center",width:"150",prop:"servicePrice3"},scopedSlots:i._u([{key:"default",fn:function(e){return[i._v("\n                          "+i._s(e.row.servicePrice3?e.row.servicePrice3:"--")+"\n                        ")]}}])})],1)],1):a("span",[i._v("\n                    "+i._s(e.txt?e.txt:"--")+"\n                  ")])])}))],1)])]:i._e(),i._v(" "),i.isLoadServiceEdit?[a("add-dialog",{ref:"serviceEdit",attrs:{title:i.serviceTitle,center:"editCenter",heightClass:"move-dialog-height",footerName:"提交","is-visible":i.isServiceEditVisible,"dia-width":i.diaEditWidth,"is-close-no-comfrim-again":!0,isShowConfirm:i.isShowConfirm},on:{"comfrim-click":i.serviceEditComfrimClick,hideDialog:i.hideSerEditFn}},[a("div",{attrs:{slot:"center"},slot:"center"},[a("detail",{ref:"detail",attrs:{params:i.serviceParmas,fn:i.hideSerEditFn,gfn:i.pshowOrginaDialog}})],1)])]:i._e(),i._v(" "),[a("add-dialog",{attrs:{"is-visible":i.pisOrginationVisible,title:i.porginaTitle,"dia-width":i.diaWidth,"is-close-no-comfrim-again":!0},on:{"comfrim-click":i.porginaComfrimClick,hideDialog:i.phideOrginaDialog}},[a("div",{attrs:{slot:"center"},slot:"center"},[a("search-tree",{ref:"orderSearchTree",attrs:{"is-show":i.pisShowInput,parentIsAysc:i.ptreeIsAysc,parentTreeProps:i.ptreeProps,parentNoAsycData:i.ptreeNoAsycSearchData},on:{searchClick:i.ptreeSearchClick,nodeLoad:i.ptreeNodeLoad,nodeClick:i.ptreeNodeClick}})],1)])]],2)])},[],!1,null,"71024976",null);m.options.__file="index.vue",t.default=m.exports},"JAD+":function(e,t,i){"use strict";var a=i("s2zG");i.n(a).a},NmFq:function(e,t,i){},OaDt:function(e,t,i){"use strict";var a=i("jJdF");i.n(a).a},cdj8:function(e,t,i){"use strict";var a=i("NmFq");i.n(a).a},jJdF:function(e,t,i){},s2zG:function(e,t,i){}}]);