Commit 282ed741 by 无尘

feat: 增加路由

parent 5176abf3
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.28.css><link href=./static/css/app.913b409aa14428d35f4282d3bc56ad9b.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.090aa9ba54927630211a.js></script><script type=text/javascript src=./static/js/vendor.a8492ff9b5740480be69.js></script><script type=text/javascript src=./static/js/app.93df63f686c1d3de2111.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.28.css><link href=./static/css/app.afb1b52bac81d20f1ce12eba2dc56f0c.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script src=//web-1251519181.file.myqcloud.com/components/pagination.1.0.8.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.ea482dd7837f7a4d1aff.js></script><script type=text/javascript src=./static/js/vendor.a8492ff9b5740480be69.js></script><script type=text/javascript src=./static/js/app.93df63f686c1d3de2111.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([9],{ENNC:function(e,t){},HoLU:function(e,t){},gDiB:function(e,t){},mOmb:function(e,t,a){"use strict";var r=a("mvHQ"),s=a.n(r),n=a("P9l9"),o=a("Ch4/"),i=a("PI0u"),l={name:"gic-select-store",props:{width:{type:String,default:function(){return"357px"}},selectData:{type:[Object,Array],default:function(){return[]}},brandId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",enterpriseId:this.brandId,checkAll:!1,isIndeterminate:!1,searchSelect:"",storeVisible:!1,stores:[],storesCopy:[],dailyRuleForm:{stores:[]},pageNum:1,pageSize:200}},methods:{handleCheckAllChange:function(e){this.dailyRuleForm.stores=e?this.stores.map(function(e){return e.storeId}):[],this.isIndeterminate=!1,this.$emit("returnStores",this.dailyRuleForm.stores)},handleStoresChange:function(e){var t=e.length;this.checkAll=t===this.stores.length,this.isIndeterminate=t>0&&t<this.stores.length,this.$emit("returnStores",this.dailyRuleForm.stores)},toInput:Object(i.a)(function(e,t){""!=this.searchSelect&&(this.stores=[],this.pageNum=1,this.getStoreData())},500),changeVisible:function(){},checkStore:function(e){var t=this;if(e.select){e.select=!1;var a=t.dailyRuleForm.stores.indexOf(e.storeId);t.dailyRuleForm.stores.splice(a,1)}else e.select=!0,t.dailyRuleForm.stores.push(e.storeId);t.storesCopy.forEach(function(e){t.dailyRuleForm.stores.includes(e.storeId)&&(e.select=!0)})},clearSearch:function(){this.stores=[],this.pageNum=1,this.getStoreData()},getStoreData:function(){var e=this,t={searchName:e.searchSelect,gicEnterpriseId:e.brandId,pageNum:e.pageNum,pageSize:e.pageSize};Object(n.a)("/haoban-app-customer-web/cardCoupon/get-store-list",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result.result&&a.result.result.forEach(function(t){t.select=!1,e.selectData.includes(t.storeId)&&(t.select=!0)}),1==e.pageNum?(e.stores=JSON.parse(s()(a.result.result))||[],e.storesCopy=JSON.parse(s()(a.result.result))||[]):a.result.result.forEach(function(t){e.stores.push(t),e.storesCopy.push(t)}),void(e.pageNum*e.pageSize<a.result.totalCount&&(e.pageNum++,e.$nextTick(function(){e.getStoreData()})));o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(e){e&&(this.checkAll=!1,this.isIndeterminate=!1,this.stores=[],this.storesCopy=[],this.searchSelect="",this.getStoreData())},selectData:function(e,t){e.length?this.dailyRuleForm.stores=JSON.parse(s()(e)):this.dailyRuleForm.stores=[]}},mounted:function(){this.brandId&&(this.stores=[],this.storesCopy=[],this.getStoreData()),this.selectData.length?this.dailyRuleForm.stores=JSON.parse(s()(this.selectData)):this.dailyRuleForm.stores=[]}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-popover",{attrs:{placement:"bottom",title:"",width:"350",trigger:"click"},model:{value:e.storeVisible,callback:function(t){e.storeVisible=t},expression:"storeVisible"}},[a("div",{staticClass:"daily-store-select"},[a("div",{staticClass:"select-search"},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入门店名称",clearable:""},on:{clear:e.clearSearch},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchSelect);var a}},model:{value:e.searchSelect,callback:function(t){e.searchSelect=t},expression:"searchSelect"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"checkbox border-box",staticStyle:{padding:"15px 20px"}},[a("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")])],1),e._v(" "),a("div",{staticClass:"el-scrollbar define-search-select"},[a("div",{staticClass:"el-select-dropdown__wrap el-scrollbar__wrap",staticStyle:{"margin-bottom":"-5px","margin-right":"-5px"}},[a("el-checkbox-group",{on:{change:e.handleStoresChange},model:{value:e.dailyRuleForm.stores,callback:function(t){e.$set(e.dailyRuleForm,"stores",t)},expression:"dailyRuleForm.stores"}},[a("ul",{staticClass:"el-scrollbar__view el-select-dropdown__list"},[e._l(e.stores,function(t){return a("li",{key:t.storeId,class:["el-select-dropdown__item",t.select?"selected hover":""]},[a("el-checkbox",{attrs:{label:t.storeId}},[e._v(e._s(t.storeName))])],1)}),e._v(" "),e.stores.length?e._e():a("li",{staticClass:"text-center"},[a("span",[e._v("暂无数据")])])],2)])],1),e._v(" "),a("div",{staticClass:"el-scrollbar__bar is-horizontal"},[a("div",{staticClass:"el-scrollbar__thumb",staticStyle:{transform:"translateX(0%)"}})]),e._v(" "),a("div",{staticClass:"el-scrollbar__bar is-vertical"},[a("div",{staticClass:"el-scrollbar__thumb",staticStyle:{transform:"translateY(0%)"}})])])]),e._v(" "),a("div",{staticClass:"show-select-num cursor-pointer w-350",attrs:{slot:"reference"},on:{click:e.changeVisible},slot:"reference"},[e._v("\n 已经选择"+e._s(e.dailyRuleForm.stores.length)+"家门店\n "),a("span",{staticClass:"el-input__suffix"},[a("span",{staticClass:"el-input__suffix-inner"},[a("i",{class:["el-select__caret el-input__icon el-icon-arrow-up",e.storeVisible?"is-reverse":""]})])])])])},staticRenderFns:[]};var u=a("VU/8")(l,c,!1,function(e){a("HoLU")},"data-v-67522a34",null);t.a=u.exports},pqeF:function(e,t){},z3jf:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),s=a.n(r),n=a("mOmb"),o=a("Xxa5"),i=a.n(o),l=a("exGp"),c=a.n(l),u=a("P9l9"),d=a("Ch4/"),p=a("PI0u"),h={name:"gic-select-group",props:{width:{type:String,default:function(){return"357px"}},selectData:{type:[Object,Array],default:function(){return[]}},brandId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",enterpriseId:this.brandId,searchSelect:"",departmentVisible:!1,groupIds:[],groupData:[],groupDataCopy:[],defaultProps:{children:"children",label:"storeGroupName"},checkedKeys:this.selectData.length?this.selectData.map(function(e){return e.departmentId}):[]}},methods:{filterNode:function(e,t){return!e||!t.label||-1!==t.label.indexOf(e)},loadNode:function(e,t){var a=this;return c()(i.a.mark(function r(){var s;return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(s=a,0!==e.level){r.next=5;break}return r.abrupt("return",t(s.getGroup()));case 5:return r.next=7,s.getGroup(e,e.data,t);case 7:case"end":return r.stop()}},r,a)}))()},toInput:Object(p.a)(function(e,t){if(!this.groupDataCopy.length)return!1},500),clearSearch:function(){this.groupData=JSON.parse(s()(this.groupDataCopy))},delDepart:function(e,t){t.splice(e,1);var a=t.map(function(e){return e.storeGroupId});this.setCheckedKeys(a)},checkGroup:function(e){this.groupIds=this.$refs.groupTree.getCheckedNodes(),this.$emit("checkGroupIds",this.$refs.groupTree.getCheckedNodes())},setCheckedKeys:function(e){this.$refs.groupTree.setCheckedKeys(e),this.$emit("checkGroupIds",this.$refs.groupTree.getCheckedNodes())},handleSort:function(e){var t=this;return c()(i.a.mark(function a(){var r,s;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:r=t,s=0;case 2:if(!(s<e.children.length)){a.next=10;break}if(e.children.sort(function(e,t){return e.storeGroupSort-t.storeGroupSort}),!e.children[s].length){a.next=7;break}return a.next=7,r.handleSort(e.children[s]);case 7:s++,a.next=2;break;case 10:case"end":return a.stop()}},a,t)}))()},treeData:function(e){var t=this;return c()(i.a.mark(function a(){var r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(r=e.filter(function(t){var a=e.filter(function(e){return t.storeGroupId==e.parentGroupId});return a.length>0&&(t.children=a),0==t.parentGroupId})).length&&r.sort(function(e,t){return e.storeGroupSort-t.storeGroupSort}),r.forEach(function(e,t){e.children&&e.children.length&&e.children.sort(function(e,t){return e.storeGroupSort-t.storeGroupSort})}),t.abrupt("return",r);case 4:case"end":return t.stop()}},a,t)}))()},getGroup:function(){var e=this;return c()(i.a.mark(function t(){var a,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r={enterpriseId:(a=e).brandId},Object(u.a)("/haoban-manage3-web/gic-department-list",r).then(function(){var t=c()(i.a.mark(function t(r){var n,o;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(1!=(n=r.data).errorCode){e.next=10;break}if(!n.result||!n.result.length){e.next=9;break}return n.result.forEach(function(e){e.label=e.storeGroupName,e.departmentName=e.storeGroupName}),e.next=6,a.treeData(n.result);case 6:o=e.sent,a.$nextTick(function(){a.groupData=JSON.parse(s()(o))||[],a.groupDataCopy=JSON.parse(s()(a.groupData))||[]}),a.$forceUpdate();case 9:return e.abrupt("return");case 10:d.a.errorMsg(n);case 11:case"end":return e.stop()}},t,e)}));return function(e){return t.apply(this,arguments)}}()).catch(function(e){a.$message.error({duration:1e3,message:e.message})});case 3:case"end":return t.stop()}},t,e)}))()}},watch:{selectData:function(e,t){e.length?this.groupIds=e:this.groupIds=[]},searchSelect:function(e){this.$refs.groupTree.filter(e)},brandId:function(e){e&&(this.searchSelect="",this.groupIds=[],this.groupData=[],this.groupDataCopy=[],this.getGroup())}},mounted:function(){this.selectData.length?this.groupIds=this.selectData:this.groupIds=[],this.getGroup()}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-popover",{staticStyle:{"min-width":"357px"},attrs:{placement:"bottom"},model:{value:e.departmentVisible,callback:function(t){e.departmentVisible=t},expression:"departmentVisible"}},[a("div",{staticClass:"select-search"},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入内容"},on:{clear:e.clearSearch},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchSelect);var a}},model:{value:e.searchSelect,callback:function(t){e.searchSelect=t},expression:"searchSelect"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"select-tree-wrap m-t-10"},[a("el-tree",{ref:"groupTree",attrs:{"filter-node-method":e.filterNode,clearable:"",data:e.groupData,"default-checked-keys":e.checkedKeys,"node-key":"storeGroupId","show-checkbox":"","default-expand-all":"",props:e.defaultProps,"expand-on-click-node":!1},on:{check:e.checkGroup},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.node,s=t.data;return a("span",{staticClass:"custom-tree-node"},[a("span",{class:["font-14 p-r-10 iconfont",1==s.isStore?"icondianpu-kuai":"iconqiye-tianchong",1==s.bindFlag?"color-2f54eb":"color-dedfe6"]}),a("span",{staticClass:"font-14 color-606266"},[e._v(e._s(r.label))])])}}])})],1),e._v(" "),a("div",{staticClass:"flex-column item-cell-select inline-block ",attrs:{slot:"reference"},slot:"reference"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",style:{width:e.width}},[e.groupIds.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10",staticStyle:{display:"inline-block","line-height":"32px",color:"#c0c4cc"}},[e._v("请选择门店分组")]),e._v(" "),a("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"348px"}},[a("span",{staticStyle:{display:"block"}},[e._l(e.groupIds,function(t,r){return[a("span",{key:r,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.departmentName))]),e._v(" "),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(r,e.groupIds)}}})])]})],2)])])])])])},staticRenderFns:[]};var g=a("VU/8")(h,f,!1,function(e){a("gDiB")},"data-v-5e24da4b",null).exports,m=a("3E4D"),b={props:{brandId:{type:String,default:function(){return""}},setStoreShow:{type:Boolean,default:function(){return!1}},editRow:{type:Object,default:function(){return{}}},categoryId:{type:Object,default:function(){return""}}},components:{gicSelectGroupMult:g,gicSelectStore:n.a},data:function(){return{editPersion:localStorage.getItem("userInfos")&&JSON.parse(localStorage.getItem("userInfos")).staffDTO?JSON.parse(localStorage.getItem("userInfos")).staffDTO.staffName:"",wxEnterpriseRelatedId:localStorage.getItem("userInfos")?JSON.parse(localStorage.getItem("userInfos")).wxEnterpriseId:"",loading:!1,dialogVisible:this.setStoreShow,formData:{sendRange:"1",selectList:[]},loadingBtn:!1}},methods:{changeRange:function(e){this.formData.selectList=[]},returnStores:function(e){this.formData.selectList=JSON.parse(s()(e))},checkGroupIds:function(e){this.formData.selectList=JSON.parse(s()(e))},toCancel:function(){this.$emit("closeStore")},handleClose:function(e){this.$emit("closeStore")},submitForm:Object(p.a)(function(e){if(("2"==this.formData.sendRange||"3"==this.formData.sendRange)&&!this.formData.selectList.length)return!1;this.loadingBtn=!0,this.postSave()},300),postSave:function(){var e=this,t={enterpriseId:e.brandId,templateId:e.$route.query.templateId,selectType:e.formData.sendRange,groupIds:2==e.formData.sendRange?e.formData.selectList.map(function(e){return e.storeGroupId}).join(","):"",storeIds:3==e.formData.sendRange?e.formData.selectList.join(","):""};Object(u.d)("/haoban-app-customer-web/save-template-store",t).then(function(t){var a=t.data;e.loadingBtn=!1,1==a.errorCode?(m.a.showmsg("操作成功","success"),e.$emit("submitStore")):d.a.errorMsg(a)}).catch(function(t){e.loadingBtn=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{setStoreShow:function(e){this.dialogVisible=e}},mounted:function(){this.dialogVisible=this.setStoreShow}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:(e.editRow.templateId,"可见范围"),visible:e.dialogVisible,width:"873px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{},[a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px",cursor:"pointer"},attrs:{for:"name"}},[e._v("\n 选择范围\n ")]),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"100px"}},[a("el-radio",{attrs:{label:"1"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("所有门店")]),e._v(" "),a("el-radio",{staticClass:"m-l-40 m-r-8",attrs:{label:"2"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分分组")]),e._v(" "),2==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("gic-select-group-mult",{staticClass:"m-l-10",attrs:{brandId:e.brandId,width:213,selectData:e.formData.selectList},on:{checkGroupIds:e.checkGroupIds}})],1):e._e(),e._v(" "),a("el-radio",{staticClass:"m-l-40 m-r-8",attrs:{label:"3"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分门店")]),e._v(" "),3==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("gic-select-store",{attrs:{brandId:e.brandId,selectData:e.formData.selectList},on:{returnStores:e.returnStores}})],1):e._e(),e._v(" "),"2"!=e.formData.sendRange&&"3"!=e.formData.sendRange||e.formData.selectList.length?e._e():a("div",{staticClass:"el-form-item__error"},[e._v("请选择发送范围")])],1)])]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.toCancel}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",loading:e.loadingBtn},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("确定")])],1)])},staticRenderFns:[]};var S=a("VU/8")(b,v,!1,function(e){a("pqeF")},"data-v-72e0b2d4",null).exports,_={name:"app-detail",props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",wxEnterpriseRelatedId:localStorage.getItem("userInfos")?JSON.parse(localStorage.getItem("userInfos")).wxEnterpriseId:"",editPerson:localStorage.getItem("userInfos")&&JSON.parse(localStorage.getItem("userInfos")).staffDTO?JSON.parse(localStorage.getItem("userInfos")).staffDTO.staffName:"",searchInput:"",tableData:[],activeId:"1",loading:!1,multipleSelection:[],currentPage:1,pageSize:20,total:0,setStoreShow:!1,disableSet:!1}},methods:{toSetStore:function(){this.setStoreShow=!0},closeStore:function(){this.setStoreShow=!1},submitStore:function(){this.setStoreShow=!1,this.currentPage=1,this.getTableList()},toInput:Object(p.a)(function(e,t){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSelectionChange:function(e){this.multipleSelection=e},delRow:function(e,t){var a=this;a.$confirm("确认要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(e,t){var a=this,r={storeTemplateRelatedIds:t.storeTemplateRelatedId,enterpriseId:a.activeBrand};Object(u.d)("/haoban-app-customer-web/del-template-store",r).then(function(e){var t=e.data;if(1==t.errorCode)return m.a.showmsg("删除成功","success"),a.currentPage=1,void a.getTableList();d.a.errorMsg(t)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},multDel:function(){if(!this.multipleSelection.length)return this.$message.error({duration:1e3,message:"请选择删除项"}),!1;this.postMultDel()},postMultDel:function(){var e=this,t={enterpriseId:e.activeBrand,storeTemplateRelatedIds:e.multipleSelection.map(function(e){return e.storeTemplateRelatedId}).join(",")||""};Object(u.d)("/haoban-app-customer-web/del-template-store",t).then(function(t){var a=t.data;if(1==a.errorCode)return m.a.showmsg("删除成功","success"),e.currentPage=1,void e.getTableList();d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(e){this.currentPage=1,this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},getTableList:function(e){var t=this,a={search:t.searchInput,templateId:t.$route.query.templateId,enterpriseId:t.brandId,pageNum:t.currentPage,pageSize:t.pageSize};Object(u.d)("/haoban-app-customer-web/get-template-store-list",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.result||[],t.total=a.result.totalCount,t.disableSet=!1,void(t.$route.query.brandId!=t.brandId&&(t.tableData=[],t.total=0,t.disableSet=!0));d.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(e,t){e&&this.getTableList(this.brandId)}},mounted:function(){this.$emit("showTab","12"),this.brandId&&this.getTableList(this.brandId)},components:{setVisiable:S}},I={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"flex flex-space-between"},[a("div",[a("el-input",{staticClass:"w-369",attrs:{placeholder:"搜索门店名称或代码","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchInput);var a}},model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}})],1),e._v(" "),a("div",[a("el-button",{attrs:{disabled:e.disableSet,type:"primary"},on:{click:e.toSetStore}},[e._v("新增门店")]),e._v(" "),a("el-button",{attrs:{type:"danger"},on:{click:e.multDel}},[e._v("批量移除")])],1)]),e._v(" "),a("div",{staticClass:"m-t-20"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",staticClass:"no-empty-icon-table",staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark"},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{label:"门店名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.storeName||"--"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"code","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.storeCode||"--"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"门店分组","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.storeGroupName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.delRow(t.$index,t.row)}}},[e._v("移除")])]}}])}),e._v(" "),a("template",{slot:"empty"},[a("div",[a("span",[e._v("暂无门店分组,")]),a("el-button",{attrs:{disabled:e.disableSet,type:"text"},on:{click:function(t){e.toSetStore()}}},[e._v("去设置")])],1)])],2),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right"},[a("dm-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e(),e._v(" "),0==e.tableData.length?a("div",{staticClass:"text-center table-set-line"},[a("span",{staticClass:"font-14 color-606266"},[e._v("暂无门店分组,")]),a("el-button",{attrs:{disabled:e.disableSet,type:"text"},on:{click:function(t){e.toSetStore()}}},[e._v("去设置")])],1):e._e()],1)]),e._v(" "),a("set-visiable",{attrs:{setStoreShow:e.setStoreShow,brandId:e.brandId},on:{closeStore:e.closeStore,submitStore:e.submitStore}})],1)},staticRenderFns:[]};var y=a("VU/8")(_,I,!1,function(e){a("ENNC")},"data-v-65fec8be",null);t.default=y.exports}});
\ No newline at end of file
webpackJsonp([9],{ENNC:function(e,t){},HoLU:function(e,t){},L99Z:function(e,t){},gDiB:function(e,t){},mOmb:function(e,t,a){"use strict";var r=a("mvHQ"),s=a.n(r),n=a("P9l9"),o=a("Ch4/"),i=a("PI0u"),l={name:"gic-select-store",props:{width:{type:String,default:function(){return"357px"}},selectData:{type:[Object,Array],default:function(){return[]}},brandId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",enterpriseId:this.brandId,checkAll:!1,isIndeterminate:!1,searchSelect:"",storeVisible:!1,stores:[],storesCopy:[],dailyRuleForm:{stores:[]},pageNum:1,pageSize:200}},methods:{handleCheckAllChange:function(e){this.dailyRuleForm.stores=e?this.stores.map(function(e){return e.storeId}):[],this.isIndeterminate=!1,this.$emit("returnStores",this.dailyRuleForm.stores)},handleStoresChange:function(e){var t=e.length;this.checkAll=t===this.stores.length,this.isIndeterminate=t>0&&t<this.stores.length,this.$emit("returnStores",this.dailyRuleForm.stores)},toInput:Object(i.a)(function(e,t){""!=this.searchSelect&&(this.stores=[],this.pageNum=1,this.getStoreData())},500),changeVisible:function(){},checkStore:function(e){var t=this;if(e.select){e.select=!1;var a=t.dailyRuleForm.stores.indexOf(e.storeId);t.dailyRuleForm.stores.splice(a,1)}else e.select=!0,t.dailyRuleForm.stores.push(e.storeId);t.storesCopy.forEach(function(e){t.dailyRuleForm.stores.includes(e.storeId)&&(e.select=!0)})},clearSearch:function(){this.stores=[],this.pageNum=1,this.getStoreData()},getStoreData:function(){var e=this,t={searchName:e.searchSelect,gicEnterpriseId:e.brandId,pageNum:e.pageNum,pageSize:e.pageSize};Object(n.a)("/haoban-app-customer-web/cardCoupon/get-store-list",t).then(function(t){var a=t.data;if(1==a.errorCode)return a.result.result&&a.result.result.forEach(function(t){t.select=!1,e.selectData.includes(t.storeId)&&(t.select=!0)}),1==e.pageNum?(e.stores=JSON.parse(s()(a.result.result))||[],e.storesCopy=JSON.parse(s()(a.result.result))||[]):a.result.result.forEach(function(t){e.stores.push(t),e.storesCopy.push(t)}),void(e.pageNum*e.pageSize<a.result.totalCount&&(e.pageNum++,e.$nextTick(function(){e.getStoreData()})));o.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(e){e&&(this.checkAll=!1,this.isIndeterminate=!1,this.stores=[],this.storesCopy=[],this.searchSelect="",this.getStoreData())},selectData:function(e,t){e.length?this.dailyRuleForm.stores=JSON.parse(s()(e)):this.dailyRuleForm.stores=[]}},mounted:function(){this.brandId&&(this.stores=[],this.storesCopy=[],this.getStoreData()),this.selectData.length?this.dailyRuleForm.stores=JSON.parse(s()(this.selectData)):this.dailyRuleForm.stores=[]}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-popover",{attrs:{placement:"bottom",title:"",width:"350",trigger:"click"},model:{value:e.storeVisible,callback:function(t){e.storeVisible=t},expression:"storeVisible"}},[a("div",{staticClass:"daily-store-select"},[a("div",{staticClass:"select-search"},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入门店名称",clearable:""},on:{clear:e.clearSearch},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchSelect);var a}},model:{value:e.searchSelect,callback:function(t){e.searchSelect=t},expression:"searchSelect"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"checkbox border-box",staticStyle:{padding:"15px 20px"}},[a("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")])],1),e._v(" "),a("div",{staticClass:"el-scrollbar define-search-select"},[a("div",{staticClass:"el-select-dropdown__wrap el-scrollbar__wrap",staticStyle:{"margin-bottom":"-5px","margin-right":"-5px"}},[a("el-checkbox-group",{on:{change:e.handleStoresChange},model:{value:e.dailyRuleForm.stores,callback:function(t){e.$set(e.dailyRuleForm,"stores",t)},expression:"dailyRuleForm.stores"}},[a("ul",{staticClass:"el-scrollbar__view el-select-dropdown__list"},[e._l(e.stores,function(t){return a("li",{key:t.storeId,class:["el-select-dropdown__item",t.select?"selected hover":""]},[a("el-checkbox",{attrs:{label:t.storeId}},[e._v(e._s(t.storeName))])],1)}),e._v(" "),e.stores.length?e._e():a("li",{staticClass:"text-center"},[a("span",[e._v("暂无数据")])])],2)])],1),e._v(" "),a("div",{staticClass:"el-scrollbar__bar is-horizontal"},[a("div",{staticClass:"el-scrollbar__thumb",staticStyle:{transform:"translateX(0%)"}})]),e._v(" "),a("div",{staticClass:"el-scrollbar__bar is-vertical"},[a("div",{staticClass:"el-scrollbar__thumb",staticStyle:{transform:"translateY(0%)"}})])])]),e._v(" "),a("div",{staticClass:"show-select-num cursor-pointer w-350",attrs:{slot:"reference"},on:{click:e.changeVisible},slot:"reference"},[e._v("\n 已经选择"+e._s(e.dailyRuleForm.stores.length)+"家门店\n "),a("span",{staticClass:"el-input__suffix"},[a("span",{staticClass:"el-input__suffix-inner"},[a("i",{class:["el-select__caret el-input__icon el-icon-arrow-up",e.storeVisible?"is-reverse":""]})])])])])},staticRenderFns:[]};var u=a("VU/8")(l,c,!1,function(e){a("HoLU")},"data-v-67522a34",null);t.a=u.exports},z3jf:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),s=a.n(r),n=a("mOmb"),o=a("Xxa5"),i=a.n(o),l=a("exGp"),c=a.n(l),u=a("P9l9"),d=a("Ch4/"),p=a("PI0u"),h={name:"gic-select-group",props:{width:{type:String,default:function(){return"357px"}},selectData:{type:[Object,Array],default:function(){return[]}},brandId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",enterpriseId:this.brandId,searchSelect:"",departmentVisible:!1,groupIds:[],groupData:[],groupDataCopy:[],defaultProps:{children:"children",label:"storeGroupName"},checkedKeys:this.selectData.length?this.selectData.map(function(e){return e.departmentId}):[]}},methods:{filterNode:function(e,t){return!e||!t.label||-1!==t.label.indexOf(e)},loadNode:function(e,t){var a=this;return c()(i.a.mark(function r(){var s;return i.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(s=a,0!==e.level){r.next=5;break}return r.abrupt("return",t(s.getGroup()));case 5:return r.next=7,s.getGroup(e,e.data,t);case 7:case"end":return r.stop()}},r,a)}))()},toInput:Object(p.a)(function(e,t){if(!this.groupDataCopy.length)return!1},500),clearSearch:function(){this.groupData=JSON.parse(s()(this.groupDataCopy))},delDepart:function(e,t){t.splice(e,1);var a=t.map(function(e){return e.storeGroupId});this.setCheckedKeys(a)},checkGroup:function(e){this.groupIds=this.$refs.groupTree.getCheckedNodes(),this.$emit("checkGroupIds",this.$refs.groupTree.getCheckedNodes())},setCheckedKeys:function(e){this.$refs.groupTree.setCheckedKeys(e),this.$emit("checkGroupIds",this.$refs.groupTree.getCheckedNodes())},handleSort:function(e){var t=this;return c()(i.a.mark(function a(){var r,s;return i.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:r=t,s=0;case 2:if(!(s<e.children.length)){a.next=10;break}if(e.children.sort(function(e,t){return e.storeGroupSort-t.storeGroupSort}),!e.children[s].length){a.next=7;break}return a.next=7,r.handleSort(e.children[s]);case 7:s++,a.next=2;break;case 10:case"end":return a.stop()}},a,t)}))()},treeData:function(e){var t=this;return c()(i.a.mark(function a(){var r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(r=e.filter(function(t){var a=e.filter(function(e){return t.storeGroupId==e.parentGroupId});return a.length>0&&(t.children=a),0==t.parentGroupId})).length&&r.sort(function(e,t){return e.storeGroupSort-t.storeGroupSort}),r.forEach(function(e,t){e.children&&e.children.length&&e.children.sort(function(e,t){return e.storeGroupSort-t.storeGroupSort})}),t.abrupt("return",r);case 4:case"end":return t.stop()}},a,t)}))()},getGroup:function(){var e=this;return c()(i.a.mark(function t(){var a,r;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r={enterpriseId:(a=e).brandId},Object(u.a)("/haoban-manage3-web/gic-department-list",r).then(function(){var t=c()(i.a.mark(function t(r){var n,o;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(1!=(n=r.data).errorCode){e.next=10;break}if(!n.result||!n.result.length){e.next=9;break}return n.result.forEach(function(e){e.label=e.storeGroupName,e.departmentName=e.storeGroupName}),e.next=6,a.treeData(n.result);case 6:o=e.sent,a.$nextTick(function(){a.groupData=JSON.parse(s()(o))||[],a.groupDataCopy=JSON.parse(s()(a.groupData))||[]}),a.$forceUpdate();case 9:return e.abrupt("return");case 10:d.a.errorMsg(n);case 11:case"end":return e.stop()}},t,e)}));return function(e){return t.apply(this,arguments)}}()).catch(function(e){a.$message.error({duration:1e3,message:e.message})});case 3:case"end":return t.stop()}},t,e)}))()}},watch:{selectData:function(e,t){e.length?this.groupIds=e:this.groupIds=[]},searchSelect:function(e){this.$refs.groupTree.filter(e)},brandId:function(e){e&&(this.searchSelect="",this.groupIds=[],this.groupData=[],this.groupDataCopy=[],this.getGroup())}},mounted:function(){this.selectData.length?this.groupIds=this.selectData:this.groupIds=[],this.getGroup()}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-popover",{staticStyle:{"min-width":"357px"},attrs:{placement:"bottom"},model:{value:e.departmentVisible,callback:function(t){e.departmentVisible=t},expression:"departmentVisible"}},[a("div",{staticClass:"select-search"},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入内容"},on:{clear:e.clearSearch},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchSelect);var a}},model:{value:e.searchSelect,callback:function(t){e.searchSelect=t},expression:"searchSelect"}},[a("i",{staticClass:"el-input__icon el-icon-search",attrs:{slot:"prefix"},slot:"prefix"})])],1),e._v(" "),a("div",{staticClass:"select-tree-wrap m-t-10"},[a("el-tree",{ref:"groupTree",attrs:{"filter-node-method":e.filterNode,clearable:"",data:e.groupData,"default-checked-keys":e.checkedKeys,"node-key":"storeGroupId","show-checkbox":"","default-expand-all":"",props:e.defaultProps,"expand-on-click-node":!1},on:{check:e.checkGroup},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.node,s=t.data;return a("span",{staticClass:"custom-tree-node"},[a("span",{class:["font-14 p-r-10 iconfont",1==s.isStore?"icondianpu-kuai":"iconqiye-tianchong",1==s.bindFlag?"color-2f54eb":"color-dedfe6"]}),a("span",{staticClass:"font-14 color-606266"},[e._v(e._s(r.label))])])}}])})],1),e._v(" "),a("div",{staticClass:"flex-column item-cell-select inline-block ",attrs:{slot:"reference"},slot:"reference"},[a("div",{staticClass:"depart-item-wrap"},[a("div",{staticClass:"el-select el-select--large depart-item-content",style:{width:e.width}},[e.groupIds.length?e._e():a("span",{staticClass:"font-14 color-c0c4cc p-l-10",staticStyle:{display:"inline-block","line-height":"32px",color:"#c0c4cc"}},[e._v("请选择门店分组")]),e._v(" "),a("div",{staticClass:"el-select__tags",staticStyle:{"max-width":"348px"}},[a("span",{staticStyle:{display:"block"}},[e._l(e.groupIds,function(t,r){return[a("span",{key:r,staticClass:"el-tag el-tag--info el-tag--small"},[a("span",{staticClass:"el-select__tags-text"},[e._v(e._s(t.departmentName))]),e._v(" "),a("i",{staticClass:"el-tag__close el-icon-close",on:{click:function(t){t.stopPropagation(),e.delDepart(r,e.groupIds)}}})])]})],2)])])])])])},staticRenderFns:[]};var g=a("VU/8")(h,f,!1,function(e){a("gDiB")},"data-v-5e24da4b",null).exports,m=a("3E4D"),b={props:{brandId:{type:String,default:function(){return""}},setStoreShow:{type:Boolean,default:function(){return!1}},editRow:{type:Object,default:function(){return{}}},categoryId:{type:Object,default:function(){return""}}},components:{gicSelectGroupMult:g,gicSelectStore:n.a},data:function(){return{editPersion:localStorage.getItem("userInfos")&&JSON.parse(localStorage.getItem("userInfos")).staffDTO?JSON.parse(localStorage.getItem("userInfos")).staffDTO.staffName:"",wxEnterpriseRelatedId:localStorage.getItem("userInfos")?JSON.parse(localStorage.getItem("userInfos")).wxEnterpriseId:"",loading:!1,dialogVisible:this.setStoreShow,formData:{sendRange:"1",selectList:[]},loadingBtn:!1}},methods:{changeRange:function(e){this.formData.selectList=[]},returnStores:function(e){this.formData.selectList=JSON.parse(s()(e))},checkGroupIds:function(e){this.formData.selectList=JSON.parse(s()(e))},toCancel:function(){this.$emit("closeStore")},handleClose:function(e){this.$emit("closeStore")},submitForm:Object(p.a)(function(e){if(("2"==this.formData.sendRange||"3"==this.formData.sendRange)&&!this.formData.selectList.length)return!1;this.loadingBtn=!0,this.postSave()},300),postSave:function(){var e=this,t={enterpriseId:e.brandId,templateId:e.$route.query.templateId,selectType:e.formData.sendRange,groupIds:2==e.formData.sendRange?e.formData.selectList.map(function(e){return e.storeGroupId}).join(","):"",storeIds:3==e.formData.sendRange?e.formData.selectList.join(","):""};Object(u.d)("/haoban-app-customer-web/save-template-store",t).then(function(t){var a=t.data;e.loadingBtn=!1,1==a.errorCode?(m.a.showmsg("操作成功","success"),e.$emit("submitStore")):d.a.errorMsg(a)}).catch(function(t){e.loadingBtn=!1,e.$message.error({duration:1e3,message:t.message})})}},watch:{setStoreShow:function(e){console.log(e),this.dialogVisible=e}},mounted:function(){this.dialogVisible=this.setStoreShow}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:(e.editRow.templateId,"可见范围"),visible:e.dialogVisible,width:"873px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{},[a("div",{staticClass:"el-form-item el-form-item--large"},[a("label",{staticClass:"el-form-item__label",staticStyle:{width:"100px",cursor:"pointer"},attrs:{for:"name"}},[e._v("\n 选择范围\n ")]),e._v(" "),a("div",{staticClass:"el-form-item__content",staticStyle:{"margin-left":"100px"}},[a("el-radio",{attrs:{label:"1"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("所有门店")]),e._v(" "),a("el-radio",{staticClass:"m-l-40 m-r-8",attrs:{label:"2"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分分组")]),e._v(" "),2==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("gic-select-group-mult",{staticClass:"m-l-10",attrs:{brandId:e.brandId,width:213,selectData:e.formData.selectList},on:{checkGroupIds:e.checkGroupIds}})],1):e._e(),e._v(" "),a("el-radio",{staticClass:"m-l-40 m-r-8",attrs:{label:"3"},on:{change:e.changeRange},model:{value:e.formData.sendRange,callback:function(t){e.$set(e.formData,"sendRange",t)},expression:"formData.sendRange"}},[e._v("部分门店")]),e._v(" "),3==e.formData.sendRange?a("div",{staticClass:"w-240 inline-block item-cell-select"},[a("gic-select-store",{attrs:{brandId:e.brandId,selectData:e.formData.selectList},on:{returnStores:e.returnStores}})],1):e._e(),e._v(" "),"2"!=e.formData.sendRange&&"3"!=e.formData.sendRange||e.formData.selectList.length?e._e():a("div",{staticClass:"el-form-item__error"},[e._v("请选择发送范围")])],1)])]),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.toCancel}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",loading:e.loadingBtn},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v("确定")])],1)])},staticRenderFns:[]};var S=a("VU/8")(b,v,!1,function(e){a("L99Z")},"data-v-5095658e",null).exports,_={name:"app-detail",props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",wxEnterpriseRelatedId:localStorage.getItem("userInfos")?JSON.parse(localStorage.getItem("userInfos")).wxEnterpriseId:"",editPerson:localStorage.getItem("userInfos")&&JSON.parse(localStorage.getItem("userInfos")).staffDTO?JSON.parse(localStorage.getItem("userInfos")).staffDTO.staffName:"",searchInput:"",tableData:[],activeId:"1",loading:!1,multipleSelection:[],currentPage:1,pageSize:20,total:0,setStoreShow:!1,disableSet:!1}},methods:{toSetStore:function(){this.setStoreShow=!0},closeStore:function(){this.setStoreShow=!1},submitStore:function(){this.setStoreShow=!1,this.currentPage=1,this.getTableList()},toInput:Object(p.a)(function(e,t){this.currentPage=1,this.getTableList()},500),clearInput:function(){this.currentPage=1,this.getTableList()},handleSelectionChange:function(e){this.multipleSelection=e},delRow:function(e,t){var a=this;a.$confirm("确认要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.postDel(e,t)}).catch(function(){})},postDel:function(e,t){var a=this,r={storeTemplateRelatedIds:t.storeTemplateRelatedId,enterpriseId:a.activeBrand};Object(u.d)("/haoban-app-customer-web/del-template-store",r).then(function(e){var t=e.data;if(1==t.errorCode)return m.a.showmsg("删除成功","success"),a.currentPage=1,void a.getTableList();d.a.errorMsg(t)}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},multDel:function(){if(!this.multipleSelection.length)return this.$message.error({duration:1e3,message:"请选择删除项"}),!1;this.postMultDel()},postMultDel:function(){var e=this,t={enterpriseId:e.activeBrand,storeTemplateRelatedIds:e.multipleSelection.map(function(e){return e.storeTemplateRelatedId}).join(",")||""};Object(u.d)("/haoban-app-customer-web/del-template-store",t).then(function(t){var a=t.data;if(1==a.errorCode)return m.a.showmsg("删除成功","success"),e.currentPage=1,void e.getTableList();d.a.errorMsg(a)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},handleSizeChange:function(e){this.currentPage=1,this.pageSize=e,this.getTableList()},handleCurrentChange:function(e){this.currentPage=e,this.getTableList()},getTableList:function(e){var t=this,a={search:t.searchInput,templateId:t.$route.query.templateId,enterpriseId:t.brandId,pageNum:t.currentPage,pageSize:t.pageSize};Object(u.d)("/haoban-app-customer-web/get-template-store-list",a).then(function(e){var a=e.data;if(1==a.errorCode)return t.tableData=a.result.result||[],t.total=a.result.totalCount,t.disableSet=!1,void(t.$route.query.brandId!=t.brandId&&(t.tableData=[],t.total=0,t.disableSet=!0));d.a.errorMsg(a)}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})}},watch:{brandId:function(e,t){e&&this.getTableList(this.brandId)}},mounted:function(){this.$emit("showTab","12"),this.brandId&&this.getTableList(this.brandId)},components:{setVisiable:S}},I={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"app-detail-pane border-box p-20"},[a("div",{staticClass:"flex flex-space-between"},[a("div",[a("el-input",{staticClass:"w-369",attrs:{placeholder:"搜索门店名称或代码","prefix-icon":"el-icon-search",clearable:""},on:{clear:e.clearInput},nativeOn:{keyup:function(t){return a=t,e.toInput(a,e.searchInput);var a}},model:{value:e.searchInput,callback:function(t){e.searchInput=t},expression:"searchInput"}})],1),e._v(" "),a("div",[a("el-button",{attrs:{disabled:e.disableSet,type:"primary"},on:{click:e.toSetStore}},[e._v("新增门店")]),e._v(" "),a("el-button",{attrs:{type:"danger"},on:{click:e.multDel}},[e._v("批量移除")])],1)]),e._v(" "),a("div",{staticClass:"m-t-20"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",staticClass:"no-empty-icon-table",staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark"},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{label:"门店名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.storeName||"--"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"code","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.storeCode||"--"))]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"门店分组","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.storeGroupName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"",label:"操作","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.delRow(t.$index,t.row)}}},[e._v("移除")])]}}])}),e._v(" "),a("template",{slot:"empty"},[a("div",[a("span",[e._v("暂无门店分组,")]),a("el-button",{attrs:{disabled:e.disableSet,type:"text"},on:{click:function(t){e.toSetStore()}}},[e._v("去设置")])],1)])],2),e._v(" "),0!=e.tableData.length?a("div",{staticClass:"block common-wrap__page text-right"},[a("dm-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[20,40,60,80],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e(),e._v(" "),0==e.tableData.length?a("div",{staticClass:"text-center table-set-line"},[a("span",{staticClass:"font-14 color-606266"},[e._v("暂无门店分组,")]),a("el-button",{attrs:{disabled:e.disableSet,type:"text"},on:{click:function(t){e.toSetStore()}}},[e._v("去设置")])],1):e._e()],1)]),e._v(" "),a("set-visiable",{attrs:{setStoreShow:e.setStoreShow,brandId:e.brandId},on:{closeStore:e.closeStore,submitStore:e.submitStore}})],1)},staticRenderFns:[]};var y=a("VU/8")(_,I,!1,function(e){a("ENNC")},"data-v-65fec8be",null);t.default=y.exports}});
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(b,d,n){for(var r,t,o,i=0,u=[];i<b.length;i++)t=b[i],c[t]&&u.push(c[t][0]),c[t]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(a&&a(b,d,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var b={},c={87:0};function f(a){if(b[a])return b[a].exports;var c=b[a]={i:a,l:!1,exports:{}};return e[a].call(c.exports,c,c.exports,f),c.l=!0,c.exports}f.e=function(e){var a=c[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var b=new Promise(function(b,f){a=c[e]=[b,f]});a[2]=b;var d=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,f.nc&&n.setAttribute("nonce",f.nc),n.src=f.p+"static/js/"+e+"."+{0:"860bfa3cb8eb468b7ed1",1:"954a8a70c5f1171933ac",2:"2025d32c544f960c7161",3:"4a96d0d4a06bf1abf36b",4:"7fb54b0d6edc84c910b5",5:"d493a299eefcfbd9f885",6:"987ab930d70320e9de11",7:"66113db36be47feb5214",8:"6688862270a7a115521b",9:"e4b1c96880987aa33535",10:"ba45ab3ce5ecc5a4c375",11:"187b9452f775e45ee947",12:"361bae28995704fa0a09",13:"8676feea9b0f73967926",14:"24239555b415fe7edf8c",15:"df2516fb08ca009d145d",16:"2e67d6b713d29f49454e",17:"ffa8fd78809f2051ab27",18:"8cd0bfcbfb9f6254b106",19:"f36008a4491a333b3887",20:"3739332a7b56b9610431",21:"c1a63cc1562e8de3a198",22:"2fa2904a735b4975de9b",23:"0701e07f97c5ea8c69f9",24:"58659b3ecef2e163ec96",25:"7a6f156b59558add0546",26:"57cc5f0a703b8cf47b76",27:"374ba8f04a5b1b818cbf",28:"6b93822a842d19bde113",29:"31b76e28ebb4757dad98",30:"086da9842cf469ad0d5c",31:"ebd10d097aea3d81ed2b",32:"31154f7030b9a1a9f674",33:"ed8ea685dd0104c93851",34:"2fb0e71514d507a9d1b9",35:"bbe72f0809a142bfe710",36:"c0d5823901bcad989d6d",37:"dd7ea0181010887556dd",38:"e6093583cf558624136c",39:"50d172fadb6e1291634e",40:"e3783a714d3d04e4f0b8",41:"db29e66e59f0267ff152",42:"fa385aa3ae3ff3449580",43:"0e1b5606afdd4fe17947",44:"94726b9e3d00a3a9f492",45:"3436fdb0515f3943920a",46:"9b0778b1525cb8766c41",47:"fcec118795e1141b580c",48:"fc2742d1312f1844391c",49:"fde572dabbfdf32ec4ff",50:"cc15403d792e9f87d384",51:"95b87bfc80374a857e3e",52:"6825f1af396caf889c2b",53:"5a3bb76192524c48b60f",54:"c9fa7904189c47048236",55:"b57a5f79ce4d91c0bd7a",56:"bd3639e4f4d4a04cd24d",57:"fa62acb864daad401260",58:"41270ca77c05fafa2a76",59:"12e9048c59f5620de85b",60:"dabbe70ccc550275ee5f",61:"8a316c7474e8dd3c779a",62:"147e7d084fcc3dede961",63:"cc3902dc394bb8b9efd8",64:"b99faeb9442209fdffca",65:"8fe40214176b9490ebb2",66:"fc119eb0bdd71478c0c8",67:"32a85dd6075ab53e30f3",68:"ee25f10153706bdc4cd1",69:"0dd9f4a371a5d245ede7",70:"7f76b2e827f2b39a22cf",71:"5c8b034751136de0ad41",72:"6bd08329b97338ac7b58",73:"d27ecc18ea52e56b8068",74:"708cb8cbb0f89ad7ce51",75:"a5db1c248ee474874dbb",76:"c9da156741045201c794",77:"9dbbe0dbbf56bd8ebb5c",78:"3f8ff1771e5ebe177425",79:"e33bd709169a59c07181",80:"d787a916f855d8e10f62",81:"ba9a85726a5e4c70ee5a",82:"901721e9fa2d5e955b06",83:"1be1731cd80e60b30bfe",84:"137b6c1f26eca857ad09"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=c[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),c[e]=void 0)}return n.onerror=n.onload=t,d.appendChild(n),b},f.m=e,f.c=b,f.d=function(e,a,b){f.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:b})},f.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(a,"a",a),a},f.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]); !function(e){var a=window.webpackJsonp;window.webpackJsonp=function(f,d,n){for(var r,t,o,i=0,u=[];i<f.length;i++)t=f[i],c[t]&&u.push(c[t][0]),c[t]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(a&&a(f,d,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=b(b.s=n[i]);return o};var f={},c={87:0};function b(a){if(f[a])return f[a].exports;var c=f[a]={i:a,l:!1,exports:{}};return e[a].call(c.exports,c,c.exports,b),c.l=!0,c.exports}b.e=function(e){var a=c[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var f=new Promise(function(f,b){a=c[e]=[f,b]});a[2]=f;var d=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,b.nc&&n.setAttribute("nonce",b.nc),n.src=b.p+"static/js/"+e+"."+{0:"8264f4a92a1e11ea227d",1:"954a8a70c5f1171933ac",2:"2025d32c544f960c7161",3:"4a96d0d4a06bf1abf36b",4:"7fb54b0d6edc84c910b5",5:"d493a299eefcfbd9f885",6:"987ab930d70320e9de11",7:"66113db36be47feb5214",8:"6688862270a7a115521b",9:"3911c71e388f1d362c32",10:"ba45ab3ce5ecc5a4c375",11:"187b9452f775e45ee947",12:"361bae28995704fa0a09",13:"8676feea9b0f73967926",14:"24239555b415fe7edf8c",15:"df2516fb08ca009d145d",16:"2e67d6b713d29f49454e",17:"ffa8fd78809f2051ab27",18:"8cd0bfcbfb9f6254b106",19:"f36008a4491a333b3887",20:"3739332a7b56b9610431",21:"c1a63cc1562e8de3a198",22:"2fa2904a735b4975de9b",23:"0701e07f97c5ea8c69f9",24:"58659b3ecef2e163ec96",25:"7a6f156b59558add0546",26:"57cc5f0a703b8cf47b76",27:"374ba8f04a5b1b818cbf",28:"6b93822a842d19bde113",29:"31b76e28ebb4757dad98",30:"086da9842cf469ad0d5c",31:"ebd10d097aea3d81ed2b",32:"31154f7030b9a1a9f674",33:"ed8ea685dd0104c93851",34:"2fb0e71514d507a9d1b9",35:"bbe72f0809a142bfe710",36:"c0d5823901bcad989d6d",37:"dd7ea0181010887556dd",38:"e6093583cf558624136c",39:"50d172fadb6e1291634e",40:"e3783a714d3d04e4f0b8",41:"db29e66e59f0267ff152",42:"fa385aa3ae3ff3449580",43:"0e1b5606afdd4fe17947",44:"94726b9e3d00a3a9f492",45:"3436fdb0515f3943920a",46:"9b0778b1525cb8766c41",47:"fcec118795e1141b580c",48:"fc2742d1312f1844391c",49:"fde572dabbfdf32ec4ff",50:"cc15403d792e9f87d384",51:"95b87bfc80374a857e3e",52:"6825f1af396caf889c2b",53:"5a3bb76192524c48b60f",54:"c9fa7904189c47048236",55:"b57a5f79ce4d91c0bd7a",56:"bd3639e4f4d4a04cd24d",57:"fa62acb864daad401260",58:"41270ca77c05fafa2a76",59:"12e9048c59f5620de85b",60:"dabbe70ccc550275ee5f",61:"8a316c7474e8dd3c779a",62:"147e7d084fcc3dede961",63:"cc3902dc394bb8b9efd8",64:"b99faeb9442209fdffca",65:"8fe40214176b9490ebb2",66:"fc119eb0bdd71478c0c8",67:"32a85dd6075ab53e30f3",68:"ee25f10153706bdc4cd1",69:"0dd9f4a371a5d245ede7",70:"7f76b2e827f2b39a22cf",71:"5c8b034751136de0ad41",72:"6bd08329b97338ac7b58",73:"d27ecc18ea52e56b8068",74:"708cb8cbb0f89ad7ce51",75:"a5db1c248ee474874dbb",76:"c9da156741045201c794",77:"9dbbe0dbbf56bd8ebb5c",78:"3f8ff1771e5ebe177425",79:"e33bd709169a59c07181",80:"d787a916f855d8e10f62",81:"ba9a85726a5e4c70ee5a",82:"901721e9fa2d5e955b06",83:"1be1731cd80e60b30bfe",84:"137b6c1f26eca857ad09"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=c[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),c[e]=void 0)}return n.onerror=n.onload=t,d.appendChild(n),f},b.m=e,b.c=f,b.d=function(e,a,f){b.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:f})},b.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(a,"a",a),a},b.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},b.p="./",b.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2018-10-10 14:44:45 * @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-04-27 16:01:12 * @LastEditTime: 2020-07-01 13:51:03
*/ */
import Vue from 'vue'; import Vue from 'vue';
// import axios from 'axios'; // import axios from 'axios';
...@@ -87,7 +87,7 @@ Vue.axios.interceptors.response.use( ...@@ -87,7 +87,7 @@ Vue.axios.interceptors.response.use(
err => { err => {
// console.log(err, typeof err, err.response); // console.log(err, typeof err, err.response);
if (Vue.axios.isCancel(err)) { if (Vue.axios.isCancel(err)) {
console.log('请求取消'); // console.log('请求取消');
} }
if (err.response.status == 502) { if (err.response.status == 502) {
window.location.href = local + '/haoban-3/#/login'; window.location.href = local + '/haoban-3/#/login';
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-04-14 09:50:16 * @Date: 2020-04-14 09:50:16
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-06-30 11:40:22 * @LastEditTime: 2020-07-01 13:52:20
--> -->
<!-- <!--
<set-visiable :brandId="brandId" @closeStore="closeStore" @submitStore="submitStore"></set-visiable> <set-visiable :brandId="brandId" @closeStore="closeStore" @submitStore="submitStore"></set-visiable>
...@@ -158,7 +158,6 @@ export default { ...@@ -158,7 +158,6 @@ export default {
watch: { watch: {
setStoreShow(newData) { setStoreShow(newData) {
const that = this; const that = this;
console.log(newData);
that.dialogVisible = newData; that.dialogVisible = newData;
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment