Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-56b9ff36.6d279f2c.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
18 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-56b9ff36"],{"0d44":function(e,t,a){"use strict";a.r(t);var n=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(e._s(e.$t("merchantManage.queryCondition")))])]),t("div",{},[t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.merchantManageInfo.conditions}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("merchantManage.inputStoreId"),clearable:""},model:{value:e.merchantManageInfo.conditions.storeId,callback:function(t){e.$set(e.merchantManageInfo.conditions,"storeId",t)},expression:"merchantManageInfo.conditions.storeId"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("merchantManage.inputName"),clearable:""},model:{value:e.merchantManageInfo.conditions.name,callback:function(t){e.$set(e.merchantManageInfo.conditions,"name",t)},expression:"merchantManageInfo.conditions.name"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("merchantManage.inputTel"),clearable:""},model:{value:e.merchantManageInfo.conditions.tel,callback:function(t){e.$set(e.merchantManageInfo.conditions,"tel",t)},expression:"merchantManageInfo.conditions.tel"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e._queryMerchantMethod}},[t("i",{staticClass:"el-icon-search"}),e._v(" "+e._s(e.$t("merchantManage.search"))+" ")]),t("el-button",{on:{click:e._resetMerchantMethod}},[t("i",{staticClass:"el-icon-refresh"}),e._v(" "+e._s(e.$t("merchantManage.reset"))+" ")])],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(e._s(e.$t("merchantManage.merchantCompany")))]),t("div",[t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.vc.toDoc("/pages/mall/shop/openShop_mall.html")}}},[e._v(" "+e._s(e.$t("merchantManage.document"))+" ")]),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._openAddMerchantModal}},[t("i",{staticClass:"el-icon-plus"}),e._v(" "+e._s(e.$t("merchantManage.add"))+" ")])],1)]),t("div",{},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.merchantManageInfo.propertyCompanys,border:""}},[t("el-table-column",{attrs:{prop:"storeId",label:e.$t("merchantManage.id"),align:"center"}}),t("el-table-column",{attrs:{prop:"name",label:e.$t("merchantManage.name"),align:"center"}}),t("el-table-column",{attrs:{prop:"address",label:e.$t("merchantManage.address"),align:"center"}}),t("el-table-column",{attrs:{prop:"tel",label:e.$t("merchantManage.admin"),align:"center"}}),t("el-table-column",{attrs:{prop:"tel",label:e.$t("merchantManage.tel"),align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:e.$t("merchantManage.createTime"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("merchantManage.operation"),align:"center",width:"300"},scopedSlots:e._u([{key:"default",fn:function(a){return["48002"!=a.row.state?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openUpdateStoreStateModel(a.row,"48002")}}},[e._v(" "+e._s(e.$t("merchantManage.limitLogin"))+" ")]):t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openUpdateStoreStateModel(a.row,"48001")}}},[e._v(" "+e._s(e.$t("merchantManage.recoverLogin"))+" ")]),t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._resetStaffPwd(a.row)}}},[e._v(" "+e._s(e.$t("merchantManage.resetPwd"))+" ")]),t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._toStoreShopPage(a.row)}}},[e._v(" "+e._s(e.$t("merchantManage.manageShop"))+" ")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteMerchantModel(a.row)}}},[e._v(" "+e._s(e.$t("merchantManage.delete"))+" ")])]}}])})],1),t("div",{staticClass:"pagination-container"},[t("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:e.merchantManageInfo.total,"page-size":e.merchantManageInfo.conditions.row},on:{"current-change":e.handleCurrentChange}})],1)],1)]),t("add-merchant-shop",{ref:"addMerchantShop",on:{refresh:e._listMerchants}}),t("update-store-state",{ref:"updateStoreState",on:{refresh:e._listMerchants}}),t("reset-staff-pwd",{ref:"resetStaffPwd"}),t("delete-merchant",{ref:"deleteMerchant",on:{refresh:e._listMerchants}})],1)},o=[],r=a("f86c"),s=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("addMerchantShop.add"),visible:e.dialogVisible,width:"70%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.addMerchantShopInfo,"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("addMerchantShop.companyName"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("addMerchantShop.requiredCompanyName")},model:{value:e.addMerchantShopInfo.name,callback:function(t){e.$set(e.addMerchantShopInfo,"name",t)},expression:"addMerchantShopInfo.name"}})],1),t("el-form-item",{attrs:{label:e.$t("addMerchantShop.shopType"),prop:"shopType"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("addMerchantShop.selectShopType")},model:{value:e.addMerchantShopInfo.shopType,callback:function(t){e.$set(e.addMerchantShopInfo,"shopType",t)},expression:"addMerchantShopInfo.shopType"}},e._l(e.addMerchantShopInfo.shopTypes,(function(e){return t("el-option",{key:e.shopTypeId,attrs:{label:e.typeName,value:e.shopTypeId}})})),1)],1),t("el-form-item",{attrs:{label:e.$t("addMerchantShop.shopArea")}},[t("el-row",{attrs:{gutter:10}},[t("el-col",{attrs:{span:6}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("addMerchantShop.selectProvince")},on:{change:e.getProv},model:{value:e.addMerchantShopInfo.selectProv,callback:function(t){e.$set(e.addMerchantShopInfo,"selectProv",t)},expression:"addMerchantShopInfo.selectProv"}},e._l(e.addMerchantShopInfo.provs,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1)],1),t("el-col",{attrs:{span:6}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("addMerchantShop.selectCity"),disabled:!e.addMerchantShopInfo.selectProv},on:{change:e.getCity},model:{value:e.addMerchantShopInfo.selectCity,callback:function(t){e.$set(e.addMerchantShopInfo,"selectCity",t)},expression:"addMerchantShopInfo.selectCity"}},e._l(e.addMerchantShopInfo.citys,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1)],1),t("el-col",{attrs:{span:6}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("addMerchantShop.selectDistrict"),disabled:!e.addMerchantShopInfo.selectCity},on:{change:e.getArea},model:{value:e.addMerchantShopInfo.selectArea,callback:function(t){e.$set(e.addMerchantShopInfo,"selectArea",t)},expression:"addMerchantShopInfo.selectArea"}},e._l(e.addMerchantShopInfo.areas,(function(e){return t("el-option",{key:e.areaCode,attrs:{label:e.areaName,value:e.areaCode}})})),1)],1)],1)],1),t("el-form-item",{attrs:{label:e.$t("addMerchantShop.shopName"),prop:"shopName"}},[t("el-input",{attrs:{placeholder:e.$t("addMerchantShop.requiredShopName")},model:{value:e.addMerchantShopInfo.shopName,callback:function(t){e.$set(e.addMerchantShopInfo,"shopName",t)},expression:"addMerchantShopInfo.shopName"}})],1),t("el-form-item",{attrs:{label:e.$t("addMerchantShop.address"),prop:"address"}},[t("el-input",{attrs:{placeholder:e.$t("addMerchantShop.requiredAddress")},model:{value:e.addMerchantShopInfo.address,callback:function(t){e.$set(e.addMerchantShopInfo,"address",t)},expression:"addMerchantShopInfo.address"}})],1),t("el-form-item",{attrs:{label:e.$t("addMerchantShop.tel"),prop:"tel"}},[t("el-input",{attrs:{placeholder:e.$t("addMerchantShop.requiredTel")},model:{value:e.addMerchantShopInfo.tel,callback:function(t){e.$set(e.addMerchantShopInfo,"tel",t)},expression:"addMerchantShopInfo.tel"}})],1),t("el-alert",{attrs:{title:e.$t("addMerchantShop.tips"),type:"info","show-icon":"",closable:!1}})],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveMerchantShopInfo}},[e._v(" "+e._s(e.$t("common.save"))+" ")])],1)],1)},c=[],i=a("b775");function l(e){return new Promise((t,a)=>{Object(i["a"])({url:"/area.listAreas",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function d(e){return new Promise((t,a)=>{Object(i["a"])({url:"/shopType.queryShopType",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function h(e){return new Promise((t,a)=>{Object(i["a"])({url:"/shop.adminAddStoreAndShop",method:"post",data:e,headers:{"Content-Type":"application/json"}}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}var p={name:"AddMerchantShop",data(){return{dialogVisible:!1,addMerchantShopInfo:{name:"",shopName:"",address:"",tel:"",storeTypeCd:"800900000005",nearbyLandmarks:"无",areaCode:"",shopType:"",shopTypes:[],areas:[],provs:[],citys:[],selectProv:"",selectCity:"",selectArea:""}}},methods:{open(){this.dialogVisible=!0,this._initArea("101","0"),this._listShopTypes()},handleClose(){this.$refs.form.resetFields(),this.addMerchantShopInfo={name:"",shopName:"",address:"",tel:"",storeTypeCd:"800900000005",nearbyLandmarks:"无",areaCode:"",shopType:"",shopTypes:[],areas:[],provs:[],citys:[],selectProv:"",selectCity:"",selectArea:""}},async saveMerchantShopInfo(){try{const e=await h(this.addMerchantShopInfo);this.$message.success(e.msg),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e)}},getProv(e){this._initArea("202",e)},getCity(e){this._initArea("303",e)},getArea(e){this.addMerchantShopInfo.areaCode=e,this.addMerchantShopInfo.areaAddress="";const t=this.addMerchantShopInfo.provs.find(e=>e.areaCode===this.addMerchantShopInfo.selectProv);t&&(this.addMerchantShopInfo.areaAddress+=t.areaName);const a=this.addMerchantShopInfo.citys.find(e=>e.areaCode===this.addMerchantShopInfo.selectCity);a&&(this.addMerchantShopInfo.areaAddress+=a.areaName);const n=this.addMerchantShopInfo.areas.find(e=>e.areaCode===this.addMerchantShopInfo.selectArea);n&&(this.addMerchantShopInfo.areaAddress+=n.areaName)},async _initArea(e,t){try{const a=await l({areaLevel:e,parentAreaCode:t});"101"===e?this.addMerchantShopInfo.provs=a.data:"202"===e?this.addMerchantShopInfo.citys=a.data:this.addMerchantShopInfo.areas=a.data}catch(a){console.error(a),this.$message.error(this.$t("addMerchantShop.getAreaFailed"))}},async _listShopTypes(){try{const e=await d({page:1,row:100});this.addMerchantShopInfo.shopTypes=e.data}catch(e){console.error(e)}}}},f=p,u=a("2877"),m=Object(u["a"])(f,s,c,!1,null,null,null),M=m.exports,S=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("updateStoreState.confirmOperation"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(" "+e._s(e.$t("updateStoreState.confirmWhether"))+" "+e._s(e.updateStoreStateInfo.stateName)+"! ")])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("updateStoreState.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e._updateStoreState}},[e._v(" "+e._s(e.$t("updateStoreState.confirm"))+" ")])],1)])},g=[];function b(e){return new Promise((t,a)=>{Object(i["a"])({url:"/storeApi.updateStoreState",method:"post",data:e,headers:{"Content-Type":"application/json"}}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}var y={name:"UpdateStoreState",data(){return{dialogVisible:!1,updateStoreStateInfo:{storeId:"",state:"",stateName:""}}},methods:{open(e){this.updateStoreStateInfo={...e},this.dialogVisible=!0},handleClose(){this.updateStoreStateInfo={storeId:"",state:"",stateName:""}},async _updateStoreState(){try{const{code:e,msg:t}=await b(this.updateStoreStateInfo);if(0!=e)return void this.$message.error(t);this.$message.success(t),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e)}}}},I=y,v=Object(u["a"])(I,S,g,!1,null,null,null),_=v.exports,$=a("cbfd"),w=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("deleteMerchant.confirmOperation"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("deleteMerchant.confirmDeleteMerchant")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("deleteMerchant.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteMerchant}},[e._v(" "+e._s(e.$t("deleteMerchant.confirmDelete"))+" ")])],1)])},C=[];function k(e){return new Promise((t,a)=>{Object(i["a"])({url:"/store.deleteStore",method:"post",data:e,headers:{"Content-Type":"application/json"}}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}var P={name:"DeleteMerchant",data(){return{dialogVisible:!1,deleteMerchantInfo:{storeId:"",storeTypeCd:""}}},methods:{open(e){this.deleteMerchantInfo={...e},this.dialogVisible=!0},handleClose(){this.deleteMerchantInfo={storeId:"",storeTypeCd:""}},async deleteMerchant(){try{const{code:e,msg:t}=await k(this.deleteMerchantInfo);if(0!=e)return void this.$message.error(t);this.$message.success(t),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e),this.$message.error(e.message)}}}},T=P,j=Object(u["a"])(T,w,C,!1,null,null,null),x=j.exports,A={name:"MerchantManage",components:{AddMerchantShop:M,UpdateStoreState:_,ResetStaffPwd:$["a"],DeleteMerchant:x},data(){return{merchantManageInfo:{propertyCompanys:[],total:0,conditions:{storeId:"",name:"",tel:"",storeTypeCd:"800900000005",page:1,row:10}}}},created(){this._listMerchants()},methods:{async _listMerchants(e=1,t=10){this.merchantManageInfo.conditions.page=e,this.merchantManageInfo.conditions.row=t;try{const e=await Object(r["b"])(this.merchantManageInfo.conditions);this.merchantManageInfo.propertyCompanys=e.data,this.merchantManageInfo.total=e.total}catch(a){console.error(a)}},_queryMerchantMethod(){this._listMerchants()},_resetMerchantMethod(){this.merchantManageInfo.conditions={storeId:"",name:"",tel:"",storeTypeCd:"800900000005",page:1,row:10},this._listMerchants()},_openAddMerchantModal(){this.$refs.addMerchantShop.open()},_openDeleteMerchantModel(e){this.$refs.deleteMerchant.open({storeId:e.storeId,storeTypeCd:e.storeTypeCd})},_toStoreShopPage(e){this.$router.push("/pages/admin/merchantShop?storeId="+e.storeId)},_openUpdateStoreStateModel(e,t){this.$refs.updateStoreState.open({storeId:e.storeId,state:t,stateName:"48002"===t?this.$t("merchantManage.limitLogin"):this.$t("merchantManage.recoverLogin")})},async _resetStaffPwd(e){try{const t=await Object(r["a"])({page:1,row:1,relCd:"600311000001",storeId:e.storeId});t.data&&t.data.length>0&&this.$refs.resetStaffPwd.open({username:t.data[0].staffName,userId:t.data[0].staffId,curUserName:t.data[0].staffName})}catch(t){console.error(t)}},handleCurrentChange(e){this._listMerchants(e,this.merchantManageInfo.conditions.row)}}},O=A,N=(a("3acb"),Object(u["a"])(O,n,o,!1,null,"43568c8e",null));t["default"]=N.exports},"3acb":function(e,t,a){"use strict";a("459d")},"459d":function(e,t,a){},"7cad":function(e,t,a){},"94d1":function(e,t,a){"use strict";a.d(t,"d",(function(){return r})),a.d(t,"e",(function(){return s})),a.d(t,"f",(function(){return c})),a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return l})),a.d(t,"g",(function(){return d})),a.d(t,"c",(function(){return h}));var n=a("b775"),o=a("7323");function r(e){return new Promise((t,a)=>{Object(n["a"])({url:"/query.staff.infos",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function s(e){return new Promise((t,a)=>{Object(n["a"])({url:"/user.staff.modify",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function c(e){return e.shopId=Object(o["f"])(),new Promise((t,a)=>{Object(n["a"])({url:"/user.resetStaffPwd",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function i(e){return new Promise((t,a)=>{Object(n["a"])({url:"/user.staff.add",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function l(e){return new Promise((t,a)=>{Object(n["a"])({url:"/user.staff.delete",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function d(e){return new Promise((t,a)=>{Object(n["a"])({url:"/upload/uploadFile",method:"post",headers:{"Content-Type":"multipart/form-data"},data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function h(e){return new Promise((t,a)=>{Object(n["a"])({url:"/org.listOrgs",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}},9974:function(e,t,a){"use strict";a("7cad")},cbfd:function(e,t,a){"use strict";var n=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("resetStaffPwd.confirmOperation"),visible:e.dialogVisible,width:"30%",center:""},on:{"update:visible":function(t){e.dialogVisible=t}}},[t("div",{staticClass:"text-center"},[t("p",[e._v(e._s(e.$t("resetStaffPwd.confirmReset")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.close}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.resetStaffPwd}},[e._v(e._s(e.$t("common.confirm")))])],1)])},o=[],r=a("94d1"),s=a("7323"),c={name:"ResetStaffPwd",data(){return{dialogVisible:!1,staffInfo:{}}},methods:{open(e){this.staffInfo=e,this.dialogVisible=!0},close(){this.dialogVisible=!1},async resetStaffPwd(){try{const e={shopId:Object(s["f"])(),staffId:this.staffInfo.userId},t=await Object(r["f"])(e);0==t.code?(this.$message.success(this.$t("resetStaffPwd.resetSuccess",{pwd:t.pwd}),1e4),this.close()):this.$message.error(t.msg)}catch(e){this.$message.error(e.message)}}}},i=c,l=(a("9974"),a("2877")),d=Object(l["a"])(i,n,o,!1,null,"c36de4c8",null);t["a"]=d.exports},f86c:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return r}));var n=a("b775");function o(e){return new Promise((t,a)=>{Object(n["a"])({url:"/store.listStores",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function r(e){return new Promise((t,a)=>{Object(n["a"])({url:"/storeStaff.listStoreStaff",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}}}]);
//# sourceMappingURL=chunk-56b9ff36.6d279f2c.js.map