Commit 40f7f677 by 无尘

fix: 修改门店编辑

parent 790ac4d1
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.617de2467402c33e757390ae577618d9.css rel=stylesheet></head><body style="min-width: 1400px;"><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>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.671e1216b5c15ce26c63.js></script><script type=text/javascript src=./static/js/vendor.ccdd3a2984b37616bc62.js></script><script type=text/javascript src=./static/js/app.ea7f6e0cc55332f750a1.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.617de2467402c33e757390ae577618d9.css rel=stylesheet></head><body style="min-width: 1400px;"><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>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.7646bc7243840141fd7e.js></script><script type=text/javascript src=./static/js/vendor.ccdd3a2984b37616bc62.js></script><script type=text/javascript src=./static/js/app.ea7f6e0cc55332f750a1.js></script></body></html>
\ No newline at end of file \ No newline at end of file
webpackJsonp([13],{"5gt+":function(e,t,i){"use strict";var a=i("mvHQ"),s=i.n(a),l=i("//Fk"),o=i.n(l),n=i("DAYN"),r={name:"vue-office-upload-image",props:{projectName:{type:String,default:"haoban-manage-web"},wxFlag:{type:String,default:"1"},imgRate:{type:String},actionUrl:{type:String,default:""},maxImageLength:{type:Number,default:5},limitW:{type:Number},limitH:{type:Number},imageList:{type:Array,default:function(){return[]}}},data:function(){return{dragImageList:this.imageList,initialImg:0,progress:0,pass:null,isEnlargeImage:!1,enlargeImage:""}},computed:{propStatus:function(){return this.pass?"success":!1===this.pass?"exception":"text"}},beforeMount:function(){},methods:{uploadUrl:function(){var e,t=window.location.origin,i=void 0;return e=this.wxFlag&&""!=this.wxFlag?"wxFlag="+this.wxFlag+"&":"",i="-1"!=t.indexOf("localhost")?"http://www.gicdev.com":t,this.upUrl=i+this.actionUrl+"?"+e+"requestProject="+this.projectName,this.upUrl},beforeAvatarUpload:function(e){var t=this,i=("image/jpeg"===e.type||"image/jpg"===e.type||e.type,e.size/1024/1024<2);return i||t.$message.error("上传图片大小不能超过 2MB!"),i&&new o.a(function(i,a){var s=new FileReader;s.onload=function(e){var s=new Image;s.onload=function(){var e=this.width,s=this.height;t.imgRate&&""!==t.imgRate&&(Number(t.imgRate.split(":")[0])/Number(t.imgRate.split(":")[1])!=Number(e)/Number(s)&&(t.$message.error("上传图片比例不正确!"),a()));t.imgRate&&""!=t.imgRate||!t.limitW||!t.limitH||e===t.limitW||s===t.limitH||(t.$message.error("上传图片尺寸不正确!"),a()),i()},s.src=e.target.result},s.readAsDataURL(e)})},uploadOnSuccess:function(e,t){this.pass=!0,1==e.errorCode?(this.$message.success("上传成功"),this.$emit("uploadOnSuccess",{res:e,file:t},this.imageList)):this.$message.error(e.message)},uploadOnProgress:function(e,t){e&&e.percent&&(this.progress=Math.floor(e.percent))},uploadOnChange:function(e){"ready"===e.status?(this.pass=null,this.progress=0):"fail"===e.status&&this.$message.error("图片上传失败,请重试!")},uploadOnError:function(){},previewImage:function(e){this.isEnlargeImage=!0,this.initialImg=e},deleteImage:function(e){this.$emit("deleteImage",e);var t=JSON.parse(s()(this.imageList));t.splice(e,1),this.$emit("update:imageList",t)},handleClose:function(e){e()},itemMoveEnd:function(e){this.$emit("sortImg",this.dragImageList),this.$emit("update:imageList",this.dragImageList)}},watch:{imageList:function(e,t){this.dragImageList=e}},mounted:function(){},components:{draggable:i.n(n).a}},d={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"gic-upload__img"},[i("div",{staticClass:"gic-upload__img__drag"},[i("draggable",{staticClass:"drag-wrap",staticStyle:{display:"contents"},attrs:{options:{group:{name:"people",pull:!1,put:!0},sort:!0}},on:{end:e.itemMoveEnd},model:{value:e.dragImageList,callback:function(t){e.dragImageList=t},expression:"dragImageList"}},[i("transition-group",{attrs:{name:"slide-fade"}},e._l(e.imageList,function(t,a){return i("div",{key:a,class:["img-content",a>=6?"m-t-8":""]},[i("a",{staticClass:"item-img",attrs:{href:t.url}},[i("img",{attrs:{src:t.url,alt:"上传图片"}})]),e._v(" "),i("div",{staticClass:"upload-icon__btn"},[i("i",{staticClass:"el-icon-view",on:{click:function(t){e.previewImage(a)}}}),e._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(t){e.deleteImage(a)}}})])])}))],1),e._v(" "),e.pass||0===e.progress?e._e():i("div",{class:["img-content","img-progress",e.imageList.length>=6?"m-t-8":""]},[i("el-progress",{staticClass:"gic-img-progress",staticStyle:{"line-height":"102px"},attrs:{width:102,percentage:e.progress,status:e.propStatus}})],1),e._v(" "),e.imageList&&e.imageList.length<e.maxImageLength?i("div",{class:["img-upload",e.imageList.length>=6?"m-t-8":""]},[i("el-upload",{staticClass:"loader",attrs:{accept:"image/jpg,image/jpeg,image/png,image/gif",action:e.uploadUrl(),"list-type":"picture-card","on-change":e.uploadOnChange,"before-upload":e.beforeAvatarUpload,"on-success":e.uploadOnSuccess,"on-error":e.uploadOnError,"on-progress":e.uploadOnProgress}},[i("i",{staticClass:"el-icon-plus gic-upload-btn"})])],1):e._e()],1),e._v(" "),i("el-dialog",{attrs:{title:"图片预览",visible:e.isEnlargeImage,"modal-append-to-body":!1,"before-close":e.handleClose,width:"520px"},on:{"update:visible":function(t){e.isEnlargeImage=t}}},[e.isEnlargeImage?i("el-carousel",{attrs:{trigger:"click","initial-index":e.initialImg,autoplay:!1,height:"500px"}},e._l(e.imageList,function(t,a){return i("el-carousel-item",{key:a,staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[i("img",{staticStyle:{"max-width":"480px","max-height":"500px"},attrs:{src:t.url},on:{click:function(t){e.isEnlargeImage=!1}}})])})):e._e()],1)],1)},staticRenderFns:[]};var f=i("VU/8")(r,d,!1,function(e){i("FKG6")},null,null);t.a=f.exports},"67iC":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i("3Xzz"),s=i("P9l9"),l=i("0xDb"),o=i("KzHU"),n={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"editable-cell-container"},[i("div",{staticClass:"title-div"},[i("span",{staticClass:"font-w-500"},[e._v(e._s(e.title))]),e._v(" "),i("div",{staticClass:"hurdle"}),e._v(" "),i("a",{staticClass:"a-href",on:{click:function(t){e.showEdit=!0}}},[e._v("编辑")])]),e._v(" "),i("el-form",{ref:"cell_form",staticClass:"info-form record-edit-rorm",attrs:{rules:e.rules,inline:"","label-width":"150px",model:e.fieldsInfo}},[e._l(e.fieldList,function(t,a){return[i("el-form-item",{key:t.fieldCode+"_"+a,staticClass:"item-width",attrs:{label:t.title+":",prop:t.fieldCode}},[e.showEdit?[0==t.fieldType?i("el-input",{staticClass:"edit-infor-input",attrs:{placeholder:t.fieldDescription,disabled:"1"!=t.fieldEdited},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):e._e(),e._v(" "),6==t.fieldType&&"clerkPhone"!=t.fieldCode?i("el-input",{staticClass:"edit-infor-input",attrs:{placeholder:t.fieldDescription,disabled:"1"!=t.fieldEdited},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):e._e(),e._v(" "),6==t.fieldType&&"clerkPhone"==t.fieldCode?i("countryMobile",{attrs:{inputWidth:350,nationCode:e.fieldsInfo.nationcode,holder:t.fieldDescription,disflag:"1"!=t.fieldEdited},on:{"update:nationCode":function(t){e.$set(e.fieldsInfo,"nationcode",t)}},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):1==t.fieldType?i("el-input",{staticClass:"edit-infor-input",attrs:{type:"textarea",autosize:"",disabled:"1"!=t.fieldEdited},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):2==t.fieldType||3==t.fieldType?[1==t.systemFlag?i("el-select",{attrs:{disabled:"1"!=t.fieldEdited||"clerkStatus"==t.fieldCode&&3==e.fieldsInfo[t.fieldCode],multiple:3==t.fieldType,"collapse-tags":3==t.fieldType,placeholder:t.fieldDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}},e._l(t.fieldOperations.fieldContent,function(e){return i("el-option",{key:e.key,attrs:{label:e.name,value:e.key,disabled:"clerkStatus"==t.fieldCode&&3==e.key}})})):i("el-select",{attrs:{disabled:"1"!=t.fieldEdited,multiple:3==t.fieldType,"collapse-tags":3==t.fieldType,placeholder:t.fieldDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}},e._l(t.fieldOperations.fieldContent,function(e,t){return i("el-option",{key:e.key+"_"+t,attrs:{label:e.name,value:e.name}})}))]:4==t.fieldType?i("el-date-picker",{attrs:{type:"date",disabled:"1"!=t.fieldEdited,format:t.fieldOperations.typeValue,"value-format":t.fieldOperations.typeValue,placeholder:t.fieldDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):5==t.fieldType?i("el-date-picker",{attrs:{type:"daterange","range-separator":"至",disabled:"1"!=t.fieldEdited,format:t.fieldOperations.typeValue,"value-format":t.fieldOperations.typeValue,"start-placeholder":t.fieldOperations.startDescription,"end-placeholder":t.fieldOperations.endDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):7==t.fieldType?i("uploadImage",{attrs:{projectName:"haoban-manage-web",wxFlag:"0",actionUrl:e.uploadUrl,imageList:e.fieldsInfo[t.fieldCode],maxImageLength:3},on:{"update:imageList":function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},uploadOnSuccess:e.uploadOnSuccess,sortImg:e.sortImg,deleteImage:e.deleteImage}}):e._e()]:[0==t.fieldType||1==t.fieldType||6==t.fieldType?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s("clerkPhone"!=t.fieldCode?e.fieldsInfo[t.fieldCode]:"86"==e.fieldsInfo.nationcode?e.fieldsInfo.clerkPhone:"+"+e.fieldsInfo.nationcode+"-"+e.fieldsInfo.clerkPhone)+"\n ")]):2==t.fieldType?[1==t.systemFlag?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s(t.fieldOperations.fieldContent[1*e.fieldsInfo[t.fieldCode]-1]?t.fieldOperations.fieldContent[1*e.fieldsInfo[t.fieldCode]-1].name:""!==e.fieldsInfo[t.fieldCode]&&null!==e.fieldsInfo[t.fieldCode]&&t.fieldOperations.fieldContent.length?t.fieldOperations.fieldContent[t.fieldOperations.fieldContent.length-1].name:"")+"\n ")]):i("div",{staticClass:"field-value color-606266"},[e._v(e._s(e.fieldsInfo[t.fieldCode]))])]:3==t.fieldType?i("div",{staticClass:"field-value color-606266"}):4==t.fieldType?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s(e._f("formatDate")(e.fieldsInfo[t.fieldCode],t.fieldOperations.typeValue))+"\n ")]):5==t.fieldType?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s(e.fieldsInfo[t.fieldCode].join("至"))+"\n ")]):7==t.fieldType?i("div",{staticClass:"img-box"},e._l(e.fieldsInfo[t.fieldCode],function(e,t){return i("div",{key:t+e.url,staticClass:"item-imgs"},[i("a",[i("img",{attrs:{src:e.url}})])])})):e._e()]],2)]})],2),e._v(" "),e.showEdit?i("div",{staticClass:"handle-form-btns t-ct m-b-60"},[i("el-button",{attrs:{type:"primary"},on:{click:e.saveEdit}},[e._v("保存")]),e._v(" "),i("el-button",{on:{click:e.cancelEdit}},[e._v("取消")])],1):e._e()],1)},staticRenderFns:[]};var r=function(e){i("Ybhk")},d=i("VU/8")(o.a,n,!1,r,null,null).exports,f=i("IVno"),c={name:"recordInfo",components:{navCrumb:a.a,editableCell:d,handleDialog:f.a},filters:{formatDate:l.b},data:function(){return{windowH:window.screen.availHeight-180+"px",navpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"在职员工",path:"/employeeRecord"},{name:"编辑员工信息",path:""}],editNavpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"离职员工",path:"/unemployee"},{name:"编辑员工信息",path:""}],dialogVisible:!1,htmlTitle:"员工档案",info:{},staticInfo:{},statusList:["正式","试用","离职"],reasons:["","家庭原因","个人原因","发展原因","合同到期不续签","协议解除","无法胜任工作","经济性裁员","严重违法违纪","其他"],items:[],fieldList:[],mileStone:[],historyStatus:["新入职","转正","离职","转岗","再入职"],editHisObj:{}}},methods:{handleSuccess:function(){this.dialogVisible=!1},getEmployeeDetail:function(){var e=this,t={recordId:e.$route.query.recordId};Object(s.a)("/haoban-manage-web/record/employee-detail",t).then(function(t){1==t.data.errorCode?e.getTemplate(t.data.result):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})},subSuccess:function(){this.getEmployeeDetail()},getTemplate:function(e){var t=this;Object(s.a)("/haoban-manage-web/record/employee-find-template",{}).then(function(i){1==i.data.errorCode?t.formatTemplateList(i.data.result,e):t.$message.error({message:i.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatTemplateList:function(e,t){var i=[],a=e,s=JSON.parse(t.defineString),o=Object(l.a)(t);for(var n in s)o[n]=s[n];e.forEach(function(e){if(0!=e.parentCode&&(e.fieldOperations=JSON.parse(e.fieldOperations)),5==e.fieldType&&(o[e.fieldCode]=o[e.fieldCode]?o[e.fieldCode].split(","):["",""],t[e.fieldCode]=t[e.fieldCode]?t[e.fieldCode].split(","):["",""]),e.fieldType,7==e.fieldType){var s=[];o[e.fieldCode]=o[e.fieldCode]?o[e.fieldCode].split(","):[],o[e.fieldCode].forEach(function(e){s.push({url:e})}),t[e.fieldCode]=s,o[e.fieldCode]=s.slice(0)}e.title=e.fieldName;var l=[];a.forEach(function(t){t.parentCode==e.fieldCode&&l.push(t)}),l.sort(function(e,t){return 1*e.sort-1*t.sort}),l.length>0&&(e.childrens=l),0==e.parentCode&&i.push(e)}),i.sort(function(e,t){return 1*e.sort-1*t.sort}),this.fieldList=i,this.info=o,this.staticInfo=t},getHistoryList:function(){var e=this,t={recordId:e.$route.query.recordId};Object(s.a)("/haoban-manage-web/record/history-record-list",t).then(function(t){if(1==t.data.errorCode){var i=t.data.result;e.formatMileStone(i)}else e.$message({message:t.data.message})}).catch(function(t){e.$message({message:t.message})})},formatMileStone:function(e){e.sort(function(e,t){return 1*e.historyDate-1*t.historyDate});for(var t=[],i=0,a=e.length;i<a;i+=4)t.push(e.slice(i,i+4));this.mileStone=t},editHis:function(e){this.editHisObj.historyId=e.historyId,this.editHisObj.recordId=this.$route.query.recordId,this.dialogVisible=!0}},beforeMount:function(){this.getEmployeeDetail(),this.getHistoryList()},mounted:function(){var e=this.$route.query.type;e&&"unemployee"==e&&(this.navpath=this.editNavpath),this.$nextTick(function(){document.querySelector(".contact-wrap__body").style.overflow="auto",document.querySelector(".contact-wrap__body").removeAttribute("style"),document.getElementsByClassName("contact-wrap__right")[0].removeAttribute("style")})},beforeDestroy:function(){document.querySelector(".contact-wrap__body").style.overflow="hidden";var e=(document.documentElement.clientHeight||document.body.clientHeight)-64+"px";document.querySelector(".contact-wrap__body").setAttribute("style","height:"+e),document.getElementsByClassName("contact-wrap__right")[0].setAttribute("style","height:"+e)}},u={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"common-set-wrap",style:{"min-height":e.windowH}},[i("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),i("div",{staticClass:"right-content"},[i("div",{staticClass:"right-box"},[i("div",{staticClass:"commom-container clerk-detail-container"},[i("p",{staticClass:"t-rt"},[i("a",{staticClass:"a-href font-14",on:{click:function(t){e.getPdf()}}},[e._v("打印员工档案")])]),e._v(" "),i("div",{style:{"min-height":e.windowH},attrs:{id:"pdfDom"}},[i("div",{staticClass:"employee-detail-cell"},[i("div",{staticClass:"head-info"},[i("p",{staticClass:"head-cell"},[e.info.headPic?i("img",{staticClass:"head-img",attrs:{src:e.info.headPic}}):i("span",{staticClass:"head-img-null"},[i("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})])]),e._v(" "),i("p",{staticClass:"head-cell name"},[e._v("\n "+e._s(e.info.clerkName)),i("span",[e._v(e._s("-1"==e.info.clerkStatus?"无状态":e.statusList[e.info.clerkStatus-1]))])]),e._v(" "),i("p",{staticClass:"head-cell c-303133"},[e._v(e._s(e.info.groupName)+e._s(e.info.positionName))]),e._v(" "),i("p",{staticClass:"head-cell color-606266"},[e._v("已在"+e._s(e.info.enterpriseName)+"工作了"+e._s(e.info.days)+"天")])])]),e._v(" "),e._l(e.fieldList,function(t){return[t.childrens?i("editable-cell",{key:t.fieldCode,attrs:{info:e.info,staticInfo:e.staticInfo,items:e.items,title:t.title,fieldList:t.childrens},on:{subSuccess:e.subSuccess}}):e._e()]}),e._v(" "),i("div",{staticClass:"mile-stone-container"},[e._m(0),e._v(" "),i("ul",{staticClass:"mile-stone"},e._l(e.mileStone,function(t,a){return i("li",{key:a,staticClass:"stone-group",class:a%2==0?"column":"column-reverse"},[4==t.length&&a!=e.mileStone.length-1?i("div",{staticClass:"column-hurdle"}):e._e(),e._v(" "),e._l(t,function(t,s){return i("div",{key:s,staticClass:"stone",class:a%2==1&&3==s||a%2==0&&0==s&&0!=a?"no-radio":""},[i("p",{staticClass:"time"},[e._v(e._s(e._f("formatDate")(t.historyDate,"YY-MM-DD")))]),e._v(" "),e._m(1,!0),e._v(" "),i("p",{staticClass:"position"},[e._v(e._s(t.positionName))]),e._v(" "),i("p",{staticClass:"font-16 "},[e._v(e._s(e.historyStatus[1*t.historyStatus-1])),3==t.historyStatus?i("a",{staticClass:"a-href m-l-10 fs-12",on:{click:function(i){e.editHis(t)}}},[e._v("编辑")]):e._e()]),e._v(" "),3==t.historyStatus?i("p",[e._v("离职理由:"+e._s(e.reasons[t.fireReason]))]):e._e(),e._v(" "),i("p",{staticClass:"color-606266"},[e._v(e._s(t.storeName?t.storeName:t.groupName))])])})],2)}))])],2),e._v(" "),i("el-dialog",{attrs:{title:"修改离职信息",visible:e.dialogVisible,width:"480px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("handle-dialog",{attrs:{employee:e.editHisObj,handleType:"changeFireInfo",typeTitle:"修改离职信息"},on:{handleSuccess:e.handleSuccess}})],1)],1)])]),e._v(" "),i("vue-gic-footer")],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("p",{staticClass:"m-s-title"},[t("span",{staticClass:"font-w-500"},[this._v("员工记录")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"hurdle-box"},[t("span",{staticClass:"radio"}),this._v(" "),t("div",{staticClass:"hurdle"})])}]};var _=i("VU/8")(c,u,!1,function(e){i("sqsL")},null,null);t.default=_.exports},FKG6:function(e,t){},KzHU:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__=__webpack_require__("pFYg"),__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify__=__webpack_require__("mvHQ"),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_2_components_employeeRecord_uploadImage__=__webpack_require__("5gt+"),__WEBPACK_IMPORTED_MODULE_3__components_common_country_mobile_vue__=__webpack_require__("XDyb"),__WEBPACK_IMPORTED_MODULE_4__utils_index__=__webpack_require__("0xDb"),__WEBPACK_IMPORTED_MODULE_5__api_api__=__webpack_require__("P9l9");__webpack_exports__.a={name:"editableCell",props:{info:{type:Object,required:!0},staticInfo:{type:Object,required:!0},items:{type:Array,required:!0},title:{type:String,default:""},fieldList:{type:Array,required:!0}},components:{uploadImage:__WEBPACK_IMPORTED_MODULE_2_components_employeeRecord_uploadImage__.a,countryMobile:__WEBPACK_IMPORTED_MODULE_3__components_common_country_mobile_vue__.a},filters:{formatDate:__WEBPACK_IMPORTED_MODULE_4__utils_index__.b},data:function(){return{showEdit:!1,uploadUrl:"/haoban-manage-web/upload-img",fieldsInfo:{}}},methods:{uploadOnSuccess:function(e,t){e.file.url=e.res.result[0].qcloudImageUrl,t.push(e.file)},deleteImage:function(e){this.imageList=this.imageList?this.imageList:[],this.imageList.splice(e,1)},sortImg:function(e){this.imageList=e},saveEdit:function saveEdit(){var that=this;that.$refs.cell_form.validate(function(valid){if(valid){var newInfo=Object(__WEBPACK_IMPORTED_MODULE_4__utils_index__.a)(that.fieldsInfo),params={},regFlag=[],fieldList=that.fieldList,objToString=[];if(fieldList.forEach(function(field){if(params[field.fieldCode]=newInfo[field.fieldCode],5==field.fieldType&&(params[field.fieldCode]=newInfo[field.fieldCode].join(",")),7==field.fieldType){var arr=[];newInfo[field.fieldCode].forEach(function(e){arr.push(e.url)}),params[field.fieldCode]=arr.join(",")}if(1!=field.systemFlag){if(objToString.push({fieldCode:field.fieldCode,fieldValue:newInfo[field.fieldCode]}),5==field.fieldType&&objToString.push({fieldCode:field.fieldCode,fieldValue:newInfo[field.fieldCode].join(",")}),7==field.fieldType){var _arr=[];newInfo[field.fieldCode].forEach(function(e){_arr.push(e.url)}),objToString.push({fieldCode:field.fieldCode,fieldValue:_arr.join(",")})}delete params[field.fieldCode]}field.regular&&""!==newInfo[field.fieldCode]&&regFlag.push(eval("/"+field.regular+"/").test(newInfo[field.fieldCode]))}),regFlag.length&&regFlag.includes(!1))return that.$message.error("请输入正确格式的字段值!"),!1;params.jsonString="[]"==__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default()(objToString)?"":__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default()(objToString),params.recordId=that.$route.query.recordId,that.submitEdit(params)}})},submitEdit:function(e){var t=this;Object(__WEBPACK_IMPORTED_MODULE_5__api_api__.a)("/haoban-manage-web/record/save-record-detail",e).then(function(e){1==e.data.errorCode?(t.showEdit=!1,t.$emit("subSuccess"),t.$message({message:e.data.message,type:"success"})):t.$message.error(e.data.message)}).catch(function(e){t.$message.error(e.message)})},cancelEdit:function(){this.showEdit=!1,this.$refs.cell_form.clearValidate();var e=this.fieldsInfo,t=this.staticInfo;for(var i in e)e[i]=t[i]}},computed:{defineObj:function(){return JSON.parse(this.clerkInfo.defineString)},rules:function(){var e={},t=function(e,t,i){if(t){return/^[0-9]*$/.test(1*t)?i():i(new Error("请输入数字!"))}return i()};return this.fieldList.forEach(function(i){var a=[];0!=i.fieldType&&1!=i.fieldType||(i.minCount&&i.maxCount&&a.push({min:i.minCount,message:"至少填写"+i.minCount+"个字符",trigger:"change"}),!i.minCount&&i.maxCount&&a.push({max:i.maxCount,message:"至多填写"+i.maxCount+"个字符",trigger:"change"}),i.minCount&&i.maxCount&&a.push({min:i.minCount,max:i.maxCount,message:"长度在 "+i.minCount+" 到 "+i.maxCount+"个字符",trigger:"change"})),6==i.fieldType&&"identifyNo"!=i.fieldCode&&a.push({validator:t,message:i.fieldName+"必须为数字",trigger:"change"}),e[i.fieldCode]=a}),e}},beforeMount:function(){var e=JSON.parse(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default()(this.info));for(var t in e)e[t]=null==e[t]?"":"object"===__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(e[t])?e[t]:String(e[t]);this.fieldsInfo=e}}},Ybhk:function(e,t){},sqsL:function(e,t){}}); webpackJsonp([13],{"5gt+":function(e,t,i){"use strict";var a=i("mvHQ"),s=i.n(a),l=i("//Fk"),o=i.n(l),n=i("DAYN"),r={name:"vue-office-upload-image",props:{projectName:{type:String,default:"haoban-manage-web"},wxFlag:{type:String,default:"1"},imgRate:{type:String},actionUrl:{type:String,default:""},maxImageLength:{type:Number,default:5},limitW:{type:Number},limitH:{type:Number},imageList:{type:Array,default:function(){return[]}}},data:function(){return{dragImageList:this.imageList,initialImg:0,progress:0,pass:null,isEnlargeImage:!1,enlargeImage:""}},computed:{propStatus:function(){return this.pass?"success":!1===this.pass?"exception":"text"}},beforeMount:function(){},methods:{uploadUrl:function(){var e,t=window.location.origin,i=void 0;return e=this.wxFlag&&""!=this.wxFlag?"wxFlag="+this.wxFlag+"&":"",i="-1"!=t.indexOf("localhost")?"http://www.gicdev.com":t,this.upUrl=i+this.actionUrl+"?"+e+"requestProject="+this.projectName,this.upUrl},beforeAvatarUpload:function(e){var t=this,i=("image/jpeg"===e.type||"image/jpg"===e.type||e.type,e.size/1024/1024<2);return i||t.$message.error("上传图片大小不能超过 2MB!"),i&&new o.a(function(i,a){var s=new FileReader;s.onload=function(e){var s=new Image;s.onload=function(){var e=this.width,s=this.height;t.imgRate&&""!==t.imgRate&&(Number(t.imgRate.split(":")[0])/Number(t.imgRate.split(":")[1])!=Number(e)/Number(s)&&(t.$message.error("上传图片比例不正确!"),a()));t.imgRate&&""!=t.imgRate||!t.limitW||!t.limitH||e===t.limitW||s===t.limitH||(t.$message.error("上传图片尺寸不正确!"),a()),i()},s.src=e.target.result},s.readAsDataURL(e)})},uploadOnSuccess:function(e,t){this.pass=!0,1==e.errorCode?(this.$message.success("上传成功"),this.$emit("uploadOnSuccess",{res:e,file:t},this.imageList)):this.$message.error(e.message)},uploadOnProgress:function(e,t){e&&e.percent&&(this.progress=Math.floor(e.percent))},uploadOnChange:function(e){"ready"===e.status?(this.pass=null,this.progress=0):"fail"===e.status&&this.$message.error("图片上传失败,请重试!")},uploadOnError:function(){},previewImage:function(e){this.isEnlargeImage=!0,this.initialImg=e},deleteImage:function(e){this.$emit("deleteImage",e);var t=JSON.parse(s()(this.imageList));t.splice(e,1),this.$emit("update:imageList",t)},handleClose:function(e){e()},itemMoveEnd:function(e){this.$emit("sortImg",this.dragImageList),this.$emit("update:imageList",this.dragImageList)}},watch:{imageList:function(e,t){this.dragImageList=e}},mounted:function(){},components:{draggable:i.n(n).a}},d={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"gic-upload__img"},[i("div",{staticClass:"gic-upload__img__drag"},[i("draggable",{staticClass:"drag-wrap",staticStyle:{display:"contents"},attrs:{options:{group:{name:"people",pull:!1,put:!0},sort:!0}},on:{end:e.itemMoveEnd},model:{value:e.dragImageList,callback:function(t){e.dragImageList=t},expression:"dragImageList"}},[i("transition-group",{attrs:{name:"slide-fade"}},e._l(e.imageList,function(t,a){return i("div",{key:a,class:["img-content",a>=6?"m-t-8":""]},[i("a",{staticClass:"item-img",attrs:{href:t.url}},[i("img",{attrs:{src:t.url,alt:"上传图片"}})]),e._v(" "),i("div",{staticClass:"upload-icon__btn"},[i("i",{staticClass:"el-icon-view",on:{click:function(t){e.previewImage(a)}}}),e._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(t){e.deleteImage(a)}}})])])}))],1),e._v(" "),e.pass||0===e.progress?e._e():i("div",{class:["img-content","img-progress",e.imageList.length>=6?"m-t-8":""]},[i("el-progress",{staticClass:"gic-img-progress",staticStyle:{"line-height":"102px"},attrs:{width:102,percentage:e.progress,status:e.propStatus}})],1),e._v(" "),e.imageList&&e.imageList.length<e.maxImageLength?i("div",{class:["img-upload",e.imageList.length>=6?"m-t-8":""]},[i("el-upload",{staticClass:"loader",attrs:{accept:"image/jpg,image/jpeg,image/png,image/gif",action:e.uploadUrl(),"list-type":"picture-card","on-change":e.uploadOnChange,"before-upload":e.beforeAvatarUpload,"on-success":e.uploadOnSuccess,"on-error":e.uploadOnError,"on-progress":e.uploadOnProgress}},[i("i",{staticClass:"el-icon-plus gic-upload-btn"})])],1):e._e()],1),e._v(" "),i("el-dialog",{attrs:{title:"图片预览",visible:e.isEnlargeImage,"modal-append-to-body":!1,"before-close":e.handleClose,width:"520px"},on:{"update:visible":function(t){e.isEnlargeImage=t}}},[e.isEnlargeImage?i("el-carousel",{attrs:{trigger:"click","initial-index":e.initialImg,autoplay:!1,height:"500px"}},e._l(e.imageList,function(t,a){return i("el-carousel-item",{key:a,staticStyle:{display:"flex","align-items":"center","justify-content":"center"}},[i("img",{staticStyle:{"max-width":"480px","max-height":"500px"},attrs:{src:t.url},on:{click:function(t){e.isEnlargeImage=!1}}})])})):e._e()],1)],1)},staticRenderFns:[]};var f=i("VU/8")(r,d,!1,function(e){i("FKG6")},null,null);t.a=f.exports},"67iC":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=i("3Xzz"),s=i("P9l9"),l=i("0xDb"),o=i("KzHU"),n={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"editable-cell-container"},[i("div",{staticClass:"title-div"},[i("span",{staticClass:"font-w-500"},[e._v(e._s(e.title))]),e._v(" "),i("div",{staticClass:"hurdle"}),e._v(" "),i("a",{staticClass:"a-href",on:{click:function(t){e.showEdit=!0}}},[e._v("编辑")])]),e._v(" "),i("el-form",{ref:"cell_form",staticClass:"info-form record-edit-rorm",attrs:{rules:e.rules,inline:"","label-width":"150px",model:e.fieldsInfo}},[e._l(e.fieldList,function(t,a){return[i("el-form-item",{key:t.fieldCode+"_"+a,staticClass:"item-width",attrs:{label:t.title+":",prop:t.fieldCode}},[e.showEdit?[0==t.fieldType?i("el-input",{staticClass:"edit-infor-input",attrs:{placeholder:t.fieldDescription,disabled:"1"!=t.fieldEdited},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):e._e(),e._v(" "),6==t.fieldType&&"clerkPhone"!=t.fieldCode?i("el-input",{staticClass:"edit-infor-input",attrs:{placeholder:t.fieldDescription,disabled:"1"!=t.fieldEdited},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):e._e(),e._v(" "),6==t.fieldType&&"clerkPhone"==t.fieldCode?i("countryMobile",{attrs:{inputWidth:350,nationCode:e.fieldsInfo.nationcode,holder:t.fieldDescription,disflag:"1"!=t.fieldEdited},on:{"update:nationCode":function(t){e.$set(e.fieldsInfo,"nationcode",t)}},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):1==t.fieldType?i("el-input",{staticClass:"edit-infor-input",attrs:{type:"textarea",autosize:"",disabled:"1"!=t.fieldEdited},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):2==t.fieldType||3==t.fieldType?[1==t.systemFlag?i("el-select",{attrs:{disabled:"1"!=t.fieldEdited||"clerkStatus"==t.fieldCode&&3==e.fieldsInfo[t.fieldCode],multiple:3==t.fieldType,"collapse-tags":3==t.fieldType,placeholder:t.fieldDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}},e._l(t.fieldOperations.fieldContent,function(e){return i("el-option",{key:e.key,attrs:{label:e.name,value:e.key,disabled:"clerkStatus"==t.fieldCode&&3==e.key}})})):i("el-select",{attrs:{disabled:"1"!=t.fieldEdited,multiple:3==t.fieldType,"collapse-tags":3==t.fieldType,placeholder:t.fieldDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}},e._l(t.fieldOperations.fieldContent,function(e,t){return i("el-option",{key:e.key+"_"+t,attrs:{label:e.name,value:e.name}})}))]:4==t.fieldType?i("el-date-picker",{attrs:{type:"date",disabled:"1"!=t.fieldEdited,format:t.fieldOperations.typeValue,"value-format":t.fieldOperations.typeValue,placeholder:t.fieldDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):5==t.fieldType?i("el-date-picker",{attrs:{type:"daterange","range-separator":"至",disabled:"1"!=t.fieldEdited,format:t.fieldOperations.typeValue,"value-format":t.fieldOperations.typeValue,"start-placeholder":t.fieldOperations.startDescription,"end-placeholder":t.fieldOperations.endDescription},model:{value:e.fieldsInfo[t.fieldCode],callback:function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},expression:"fieldsInfo[item.fieldCode]"}}):7==t.fieldType?i("uploadImage",{attrs:{projectName:"haoban-manage-web",wxFlag:"0",actionUrl:e.uploadUrl,imageList:e.fieldsInfo[t.fieldCode],maxImageLength:3},on:{"update:imageList":function(i){e.$set(e.fieldsInfo,t.fieldCode,i)},uploadOnSuccess:e.uploadOnSuccess,sortImg:e.sortImg,deleteImage:e.deleteImage}}):e._e()]:[0==t.fieldType||1==t.fieldType||6==t.fieldType?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s("clerkPhone"!=t.fieldCode?e.fieldsInfo[t.fieldCode]:"86"==e.fieldsInfo.nationcode?e.fieldsInfo.clerkPhone:"+"+e.fieldsInfo.nationcode+"-"+e.fieldsInfo.clerkPhone)+"\n ")]):2==t.fieldType?[1==t.systemFlag?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s(t.fieldOperations.fieldContent[1*e.fieldsInfo[t.fieldCode]-1]?t.fieldOperations.fieldContent[1*e.fieldsInfo[t.fieldCode]-1].name:""!==e.fieldsInfo[t.fieldCode]&&null!==e.fieldsInfo[t.fieldCode]&&t.fieldOperations.fieldContent.length?t.fieldOperations.fieldContent[t.fieldOperations.fieldContent.length-1].name:"")+"\n ")]):i("div",{staticClass:"field-value color-606266"},[e._v(e._s(e.fieldsInfo[t.fieldCode]))])]:3==t.fieldType?i("div",{staticClass:"field-value color-606266"}):4==t.fieldType?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s(e._f("formatDate")(e.fieldsInfo[t.fieldCode],t.fieldOperations.typeValue))+"\n ")]):5==t.fieldType?i("div",{staticClass:"field-value color-606266"},[e._v("\n "+e._s(e.fieldsInfo[t.fieldCode].join("至"))+"\n ")]):7==t.fieldType?i("div",{staticClass:"img-box"},e._l(e.fieldsInfo[t.fieldCode],function(e,t){return i("div",{key:t+e.url,staticClass:"item-imgs"},[i("a",[i("img",{attrs:{src:e.url}})])])})):e._e()]],2)]})],2),e._v(" "),e.showEdit?i("div",{staticClass:"handle-form-btns t-ct m-b-60"},[i("el-button",{attrs:{type:"primary"},on:{click:e.saveEdit}},[e._v("保存")]),e._v(" "),i("el-button",{on:{click:e.cancelEdit}},[e._v("取消")])],1):e._e()],1)},staticRenderFns:[]};var r=function(e){i("MEE7")},d=i("VU/8")(o.a,n,!1,r,null,null).exports,f=i("IVno"),c={name:"recordInfo",components:{navCrumb:a.a,editableCell:d,handleDialog:f.a},filters:{formatDate:l.b},data:function(){return{windowH:window.screen.availHeight-180+"px",navpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"在职员工",path:"/employeeRecord"},{name:"编辑员工信息",path:""}],editNavpath:[{name:"首页",path:"/index"},{name:"通讯录",path:"/administrativeFrame"},{name:"员工档案",path:"/fileSet"},{name:"离职员工",path:"/unemployee"},{name:"编辑员工信息",path:""}],dialogVisible:!1,htmlTitle:"员工档案",info:{},staticInfo:{},statusList:["正式","试用","离职"],reasons:["","家庭原因","个人原因","发展原因","合同到期不续签","协议解除","无法胜任工作","经济性裁员","严重违法违纪","其他"],items:[],fieldList:[],mileStone:[],historyStatus:["新入职","转正","离职","转岗","再入职"],editHisObj:{}}},methods:{handleSuccess:function(){this.dialogVisible=!1},getEmployeeDetail:function(){var e=this,t={recordId:e.$route.query.recordId};Object(s.a)("/haoban-manage-web/record/employee-detail",t).then(function(t){1==t.data.errorCode?e.getTemplate(t.data.result):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})},subSuccess:function(){this.getEmployeeDetail()},getTemplate:function(e){var t=this;Object(s.a)("/haoban-manage-web/record/employee-find-template",{}).then(function(i){1==i.data.errorCode?t.formatTemplateList(i.data.result,e):t.$message.error({message:i.data.message})}).catch(function(e){t.$message.error({message:e.message})})},formatTemplateList:function(e,t){var i=[],a=e,s=JSON.parse(t.defineString),o=Object(l.a)(t);for(var n in s)o[n]=s[n];e.forEach(function(e){if(0!=e.parentCode&&(e.fieldOperations=JSON.parse(e.fieldOperations)),5==e.fieldType&&(o[e.fieldCode]=o[e.fieldCode]?o[e.fieldCode].split(","):["",""],t[e.fieldCode]=t[e.fieldCode]?t[e.fieldCode].split(","):["",""]),e.fieldType,7==e.fieldType){var s=[];o[e.fieldCode]=o[e.fieldCode]?o[e.fieldCode].split(","):[],o[e.fieldCode].forEach(function(e){s.push({url:e})}),t[e.fieldCode]=s,o[e.fieldCode]=s.slice(0)}e.title=e.fieldName;var l=[];a.forEach(function(t){t.parentCode==e.fieldCode&&l.push(t)}),l.sort(function(e,t){return 1*e.sort-1*t.sort}),l.length>0&&(e.childrens=l),0==e.parentCode&&i.push(e)}),i.sort(function(e,t){return 1*e.sort-1*t.sort}),this.fieldList=i,this.info=o,this.staticInfo=t},getHistoryList:function(){var e=this,t={recordId:e.$route.query.recordId};Object(s.a)("/haoban-manage-web/record/history-record-list",t).then(function(t){if(1==t.data.errorCode){var i=t.data.result;e.formatMileStone(i)}else e.$message({message:t.data.message})}).catch(function(t){e.$message({message:t.message})})},formatMileStone:function(e){e.sort(function(e,t){return 1*e.historyDate-1*t.historyDate});for(var t=[],i=0,a=e.length;i<a;i+=4)t.push(e.slice(i,i+4));this.mileStone=t},editHis:function(e){this.editHisObj.historyId=e.historyId,this.editHisObj.recordId=this.$route.query.recordId,this.dialogVisible=!0}},beforeMount:function(){this.getEmployeeDetail(),this.getHistoryList()},mounted:function(){var e=this.$route.query.type;e&&"unemployee"==e&&(this.navpath=this.editNavpath),this.$nextTick(function(){document.querySelector(".contact-wrap__body").style.overflow="auto",document.querySelector(".contact-wrap__body").removeAttribute("style"),document.getElementsByClassName("contact-wrap__right")[0].removeAttribute("style")})},beforeDestroy:function(){document.querySelector(".contact-wrap__body").style.overflow="hidden";var e=(document.documentElement.clientHeight||document.body.clientHeight)-64+"px";document.querySelector(".contact-wrap__body").setAttribute("style","height:"+e),document.getElementsByClassName("contact-wrap__right")[0].setAttribute("style","height:"+e)}},u={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"common-set-wrap",style:{"min-height":e.windowH}},[i("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),i("div",{staticClass:"right-content"},[i("div",{staticClass:"right-box"},[i("div",{staticClass:"commom-container clerk-detail-container"},[i("p",{staticClass:"t-rt"},[i("a",{staticClass:"a-href font-14",on:{click:function(t){e.getPdf()}}},[e._v("打印员工档案")])]),e._v(" "),i("div",{style:{"min-height":e.windowH},attrs:{id:"pdfDom"}},[i("div",{staticClass:"employee-detail-cell"},[i("div",{staticClass:"head-info"},[i("p",{staticClass:"head-cell"},[e.info.headPic?i("img",{staticClass:"head-img",attrs:{src:e.info.headPic}}):i("span",{staticClass:"head-img-null"},[i("i",{staticClass:"iconfont icon-yewuduanmorentouxian"})])]),e._v(" "),i("p",{staticClass:"head-cell name"},[e._v("\n "+e._s(e.info.clerkName)),i("span",[e._v(e._s("-1"==e.info.clerkStatus?"无状态":e.statusList[e.info.clerkStatus-1]))])]),e._v(" "),i("p",{staticClass:"head-cell c-303133"},[e._v(e._s(e.info.groupName)+e._s(e.info.positionName))]),e._v(" "),i("p",{staticClass:"head-cell color-606266"},[e._v("已在"+e._s(e.info.enterpriseName)+"工作了"+e._s(e.info.days)+"天")])])]),e._v(" "),e._l(e.fieldList,function(t){return[t.childrens?i("editable-cell",{key:t.fieldCode,attrs:{info:e.info,staticInfo:e.staticInfo,items:e.items,title:t.title,fieldList:t.childrens},on:{subSuccess:e.subSuccess}}):e._e()]}),e._v(" "),i("div",{staticClass:"mile-stone-container"},[e._m(0),e._v(" "),i("ul",{staticClass:"mile-stone"},e._l(e.mileStone,function(t,a){return i("li",{key:a,staticClass:"stone-group",class:a%2==0?"column":"column-reverse"},[4==t.length&&a!=e.mileStone.length-1?i("div",{staticClass:"column-hurdle"}):e._e(),e._v(" "),e._l(t,function(t,s){return i("div",{key:s,staticClass:"stone",class:a%2==1&&3==s||a%2==0&&0==s&&0!=a?"no-radio":""},[i("p",{staticClass:"time"},[e._v(e._s(e._f("formatDate")(t.historyDate,"YY-MM-DD")))]),e._v(" "),e._m(1,!0),e._v(" "),i("p",{staticClass:"position"},[e._v(e._s(t.positionName))]),e._v(" "),i("p",{staticClass:"font-16 "},[e._v(e._s(e.historyStatus[1*t.historyStatus-1])),3==t.historyStatus?i("a",{staticClass:"a-href m-l-10 fs-12",on:{click:function(i){e.editHis(t)}}},[e._v("编辑")]):e._e()]),e._v(" "),3==t.historyStatus?i("p",[e._v("离职理由:"+e._s(e.reasons[t.fireReason]))]):e._e(),e._v(" "),i("p",{staticClass:"color-606266"},[e._v(e._s(t.storeName?t.storeName:t.groupName))])])})],2)}))])],2),e._v(" "),i("el-dialog",{attrs:{title:"修改离职信息",visible:e.dialogVisible,width:"480px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("handle-dialog",{attrs:{employee:e.editHisObj,handleType:"changeFireInfo",typeTitle:"修改离职信息"},on:{handleSuccess:e.handleSuccess}})],1)],1)])]),e._v(" "),i("vue-gic-footer")],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("p",{staticClass:"m-s-title"},[t("span",{staticClass:"font-w-500"},[this._v("员工记录")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"hurdle-box"},[t("span",{staticClass:"radio"}),this._v(" "),t("div",{staticClass:"hurdle"})])}]};var _=i("VU/8")(c,u,!1,function(e){i("sqsL")},null,null);t.default=_.exports},FKG6:function(e,t){},KzHU:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__=__webpack_require__("pFYg"),__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof__),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify__=__webpack_require__("mvHQ"),__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify__),__WEBPACK_IMPORTED_MODULE_2_components_employeeRecord_uploadImage__=__webpack_require__("5gt+"),__WEBPACK_IMPORTED_MODULE_3__components_common_country_mobile_vue__=__webpack_require__("XDyb"),__WEBPACK_IMPORTED_MODULE_4__utils_index__=__webpack_require__("0xDb"),__WEBPACK_IMPORTED_MODULE_5__api_api__=__webpack_require__("P9l9");__webpack_exports__.a={name:"editableCell",props:{info:{type:Object,required:!0},staticInfo:{type:Object,required:!0},items:{type:Array,required:!0},title:{type:String,default:""},fieldList:{type:Array,required:!0}},components:{uploadImage:__WEBPACK_IMPORTED_MODULE_2_components_employeeRecord_uploadImage__.a,countryMobile:__WEBPACK_IMPORTED_MODULE_3__components_common_country_mobile_vue__.a},filters:{formatDate:__WEBPACK_IMPORTED_MODULE_4__utils_index__.b},data:function(){return{showEdit:!1,uploadUrl:"/haoban-manage-web/upload-img",fieldsInfo:{}}},methods:{uploadOnSuccess:function(e,t){e.file.url=e.res.result[0].qcloudImageUrl,t.push(e.file)},deleteImage:function(e){this.imageList=this.imageList?this.imageList:[],this.imageList.splice(e,1)},sortImg:function(e){this.imageList=e},saveEdit:function saveEdit(){var that=this;that.$refs.cell_form.validate(function(valid){if(valid){var newInfo=Object(__WEBPACK_IMPORTED_MODULE_4__utils_index__.a)(that.fieldsInfo),params={},regFlag=[],fieldList=that.fieldList,objToString=[];if(fieldList.forEach(function(field){if(params[field.fieldCode]=newInfo[field.fieldCode],5==field.fieldType&&(params[field.fieldCode]=newInfo[field.fieldCode].join(",")),7==field.fieldType){var arr=[];newInfo[field.fieldCode].forEach(function(e){arr.push(e.url)}),params[field.fieldCode]=arr.join(",")}if(1!=field.systemFlag){if(objToString.push({fieldCode:field.fieldCode,fieldValue:newInfo[field.fieldCode]}),5==field.fieldType&&objToString.push({fieldCode:field.fieldCode,fieldValue:newInfo[field.fieldCode].join(",")}),7==field.fieldType){var _arr=[];newInfo[field.fieldCode].forEach(function(e){_arr.push(e.url)}),objToString.push({fieldCode:field.fieldCode,fieldValue:_arr.join(",")})}delete params[field.fieldCode]}field.regular&&""!==newInfo[field.fieldCode]&&regFlag.push(eval("/"+field.regular+"/").test(newInfo[field.fieldCode]))}),regFlag.length&&regFlag.includes(!1))return that.$message.error("请输入正确格式的字段值!"),!1;params.jsonString="[]"==__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default()(objToString)?"":__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default()(objToString),params.recordId=that.$route.query.recordId,that.submitEdit(params)}})},submitEdit:function(e){var t=this;Object(__WEBPACK_IMPORTED_MODULE_5__api_api__.a)("/haoban-manage-web/record/save-record-detail",e).then(function(e){1==e.data.errorCode?(t.showEdit=!1,t.$emit("subSuccess"),t.$message({message:e.data.message,type:"success"})):t.$message.error(e.data.message)}).catch(function(e){t.$message.error(e.message)})},cancelEdit:function(){this.showEdit=!1,this.$refs.cell_form.clearValidate();var e=this.fieldsInfo,t=this.staticInfo;for(var i in e)e[i]=null==t[i]?"":"object"===__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(t[i])?t[i]:String(t[i])}},computed:{defineObj:function(){return JSON.parse(this.clerkInfo.defineString)},rules:function(){var e={},t=function(e,t,i){if(t){return/^[0-9]*$/.test(1*t)?i():i(new Error("请输入数字!"))}return i()};return this.fieldList.forEach(function(i){var a=[];0!=i.fieldType&&1!=i.fieldType||(i.minCount&&i.maxCount&&a.push({min:i.minCount,message:"至少填写"+i.minCount+"个字符",trigger:"change"}),!i.minCount&&i.maxCount&&a.push({max:i.maxCount,message:"至多填写"+i.maxCount+"个字符",trigger:"change"}),i.minCount&&i.maxCount&&a.push({min:i.minCount,max:i.maxCount,message:"长度在 "+i.minCount+" 到 "+i.maxCount+"个字符",trigger:"change"})),6==i.fieldType&&"identifyNo"!=i.fieldCode&&a.push({validator:t,message:i.fieldName+"必须为数字",trigger:"change"}),e[i.fieldCode]=a}),e}},beforeMount:function(){var e=JSON.parse(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_core_js_json_stringify___default()(this.info));for(var t in e)e[t]=null==e[t]?"":"object"===__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_typeof___default()(e[t])?e[t]:String(e[t]);this.fieldsInfo=e}}},MEE7:function(e,t){},sqsL:function(e,t){}});
\ 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([6],{"7SJI":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("Xxa5"),r=a.n(s),o=a("exGp"),n=a.n(o),i=a("3Xzz"),l=a("ATfr"),c=a("P9l9"),d={name:"storeView",props:{tableData:{type:Array,default:function(){return[]}},departmentId:{type:[String,Number],default:""},brandId:{type:[String,Number],default:""},firstLevelId:{type:[String,Number],default:""},gicFlag:{type:Boolean,default:!0}},data:function(){return{tableH:window.screen.availHeight-440-180-70,selectedList:[],showChildMember:!1,typeArr:["全部类型","自营","联营","代理(加盟)","代销","托管"],statusArr:["待审核","正常","审核失败","停业整顿","回收站","删除"]}},methods:{delStores:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this;a.$confirm("是否删除所选店铺","提示",{type:"warning"}).then(function(){var s="";if(t)s=e.storeId;else{var r=[];a.selectedList.forEach(function(e){r.push(e.storeId)}),s=r.join(",")}var o={ids:s};a.postDel(o)})},postDel:function(e,t){var a=this;Object(c.a)("/haoban-manage-web/store/delByIds",e).then(function(e){1==e.data.errorCode?(a.$message.success({duration:1e3,message:"操作成功"}),t&&(t.popVisible=!1),a.$emit("getStoreList")):a.$message.error({duration:1e3,message:e.data.message})}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},selectMember:function(e){this.selectedList=e},setChildMemberShow:function(){this.$emit("setChildMemberShow",this.showChildMember)},cancelDelTag:function(e,t){t.popVisible=!1},toDelTag:function(e,t){var a={ids:t.storeId};this.postDel(a,t)}},computed:{disabledDel:function(){return this.selectedList.length<1}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"common-right-button-box"},[a("a",{attrs:{href:"#/storeInfo?firstLevelId="+e.firstLevelId}},[e.gicFlag?e._e():a("el-button",{attrs:{type:"primary"}},[e._v("添加门店")])],1),e._v(" "),a("a",{attrs:{href:"#/storeIo?importCode=store&departmentId="+e.departmentId+"&showChildMember="+1*e.showChildMember+"&brandId="+e.brandId}},[a("el-button",[e._v("批量导入/导出")])],1),e._v(" "),e.gicFlag?e._e():a("el-button",{attrs:{type:"danger",disabled:e.disabledDel},on:{click:e.delStores}},[e._v("批量删除")]),e._v(" "),a("span",{staticClass:"J_show-children el-button",attrs:{size:"small"}},[a("el-checkbox",{staticClass:"m-r-10",on:{change:e.setChildMemberShow},model:{value:e.showChildMember,callback:function(t){e.showChildMember=t},expression:"showChildMember"}},[e._v("显示子成员")]),a("a",{staticClass:"a-href"})],1)],1),e._v(" "),a("el-table",{ref:"table1",attrs:{data:e.tableData},on:{"selection-change":e.selectMember}},[a("el-table-column",{attrs:{type:"selection",width:"42"}}),e._v(" "),a("el-table-column",{attrs:{label:"门店",prop:"storeName",width:"140"}}),e._v(" "),a("el-table-column",{attrs:{label:"代码",prop:"storeCode",width:"140"}}),e._v(" "),a("el-table-column",{attrs:{label:"类型",prop:"storeType",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.typeArr[1*t.row.storeType+1])+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"地区",prop:"areaChainName","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.areaChainName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"所属分组",prop:"groupChainName","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"a-href m-r-20",attrs:{href:"#/storeInfo?gicFlag="+e.gicFlag+"&storeId="+t.row.storeId+"&firstLevelId="+e.firstLevelId}},[e._v("编辑")]),e._v(" "),e.gicFlag?e._e():a("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.row.popVisible,callback:function(a){e.$set(t.row,"popVisible",a)},expression:"scope.row.popVisible"}},[a("p",{staticStyle:{"line-height":"1.5",padding:"10px 10px 20px"}},[e._v("确认删除吗?")]),e._v(" "),a("div",{staticStyle:{"text-align":"right",margin:"0"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){e.cancelDelTag(t.$index,t.row)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){e.toDelTag(t.$index,t.row)}}},[e._v("确定")])],1),e._v(" "),a("el-button",{staticClass:"p-l-10",attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("\n 删除\n ")])],1)]}}])})],1)],1)},staticRenderFns:[]};var m=a("VU/8")(d,u,!1,function(e){a("sC3T")},null,null).exports,f=a("Ie7z"),p={name:"clerkView",props:{tableData:{type:Array,default:function(){return[]}},firstLevelId:{type:[String,Number],default:""},gicFlag:{type:Boolean,default:!1}},components:{vueSelectStore:f.a},data:function(){return{tableH:window.screen.availHeight-440-180-70,storeType:0,typeArr:["全部类型","自营","联营","代理(加盟)","代销","托管"],storeStatus:"",showChildMember:!1,treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0,groupId:"",storeType:"",openNextBool:!0},defaultList:[],transferObj:{}}},methods:{handleSelectedList:function(e){e&&e.length&&this.postTrans(e)},postTrans:function(e){var t=this,a={id:t.transferObj.employeeClerkId,storeId:e[0].id,oldStoreId:t.transferObj.storeId};Object(c.a)("/haoban-manage-web/emp/clerkMove",a).then(function(e){1==e.data.errorCode?(t.$message.success({message:"转移成功"}),t.$emit("refreshClerkData")):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},setChildMemberShow:function(){this.$emit("setChildMemberShow",this.showChildMember)},changeManager:function(e,t){var a=this,s={};e.clerks.some(function(e){return 1==e.isManager&&(s=e),1==e.isManager});var r={employeeClerkId:t.employeeClerkId,managerId:s.employeeClerkId};Object(c.a)("/haoban-manage-web/emp/setManager",r).then(function(e){1==e.data.errorCode?(s.isManager=0,t.isManager=1,a.$message.success({message:"操作成功"})):a.$message.error({message:e.data.message})}).catch(function(e){a.$message.error({message:e.message})})},selectByStatus:function(e){this.$emit("selectByStatus",e)},selectByType:function(e){var t="";0!=e&&(t=1*e-1),this.$emit("selectByType",t)},delClerk:function(e,t){var a=this;a.$confirm("是否要删除该员工?","提示",{type:"warning"}).then(function(){var s={ids:e.employeeClerkId};a.postDel(s,t,e)})},postDel:function(e,t,a){var s=this;Object(c.a)("/haoban-manage-web/emp/del",e).then(function(e){1==e.data.errorCode?(t.clerks.forEach(function(e){e.employeeClerkId==a.employeeClerkId&&t.clerks.splice(t.clerks.indexOf(e),1)}),s.$message.success({duration:1e3,message:"操作成功"})):s.$message.error({duration:1e3,message:e.data.message})}).catch(function(e){s.$message.error({duration:1e3,message:e.message})})},cancelDelTag:function(e,t,a){t.popVisible=!1},toDelTag:function(e,t,a){var s={ids:t.employeeClerkId};this.postDel(s,a,t)},toTransfer:function(e,t,a){this.transferObj=t,this.treeSet.storeType="addClerk",this.treeSet.groupId=this.firstLevelId,this.defaultList=[{id:t.storeId,label:t.storeName}],this.treeSet.dialogVisible=!0},addClerkBtn:function(e,t){this.$router.push({path:"/addClerk",query:{storeId:t.storeId,firstLevelId:this.firstLevelId,type:e}})}}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"sf-right-button-box common-right-button-box"},[a("el-select",{attrs:{size:"small"},on:{change:e.selectByType},model:{value:e.storeType,callback:function(t){e.storeType=t},expression:"storeType"}},e._l(e.typeArr,function(e,t){return a("el-option",{key:e,attrs:{label:e,value:t}})})),e._v(" "),a("el-select",{attrs:{size:"small"},on:{change:e.selectByStatus},model:{value:e.storeStatus,callback:function(t){e.storeStatus=t},expression:"storeStatus"}},[a("el-option",{attrs:{label:"全部状态",value:""}}),e._v(" "),a("el-option",{attrs:{label:"正常",value:1}}),e._v(" "),a("el-option",{attrs:{label:"停业整顿",value:3}})],1),e._v(" "),a("span",{staticClass:"J_show-children el-button",staticStyle:{"vertical-align":"middle"},attrs:{size:"small"}},[a("el-checkbox",{staticClass:"m-r-10",on:{change:e.setChildMemberShow},model:{value:e.showChildMember,callback:function(t){e.showChildMember=t},expression:"showChildMember"}},[e._v("显示子成员")]),a("a",{staticClass:"a-href"})],1)],1),e._v(" "),a("el-table",{ref:"clerkViewTable",staticClass:"diy-table",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"门店",width:"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",{staticClass:"m-b-10"},[e._v(e._s(t.row.storeName))]),e._v(" "),a("p",[a("a",{staticClass:"a-href",attrs:{href:"#/addClerk?gicFlag="+e.gicFlag+"&storeId="+t.row.storeId+"&firstLevelId="+e.firstLevelId+"&type=addClerk"}},[e._v("新增店员")])])])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"门店code",prop:"storeCode",width:"300"}}),e._v(" "),a("el-table-column",{attrs:{"min-width":"675"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("ul",e._l(t.row.clerks,function(s,r){return a("li",{key:s.employeeClerkId,staticClass:"clerk-obj-li"},[a("div",{staticClass:"clerk-name clerk-cell"},[a("el-radio",{attrs:{value:1,label:s.isManager},on:{change:function(a){e.changeManager(t.row,s)}}},[e._v(e._s(s.name))]),e._v(" "),1==s.isManager?a("span",{staticClass:"manager"},[e._v("店长")]):e._e()],1),e._v(" "),a("div",{staticClass:"clerk-cell clerk-phone"},[e._v(e._s("86"==s.nationcode?s.phoneNumber:"+"+s.nationcode+"-"+s.phoneNumber))]),e._v(" "),a("div",{staticClass:"clerk-cell clerk-position"},[e._v(e._s(s.positionName||"--"))]),e._v(" "),a("div",{staticClass:"clerk-cell clerk-status"},[a("div",{staticClass:"status-icon",class:1==s.status?"is-active":""},[a("i",{staticClass:"iconfont icon-shouji"})])]),e._v(" "),a("div",{staticClass:"clerk-cell clerk-handle"},[a("a",{staticClass:"a-href m-r-20",attrs:{href:"#/addClerk?gicFlag="+e.gicFlag+"&storeId="+t.row.storeId+"&clerkId="+s.employeeClerkId+"&firstLevelId="+e.firstLevelId+"&type=addClerk"}},[e._v("编辑")]),e._v(" "),a("el-popover",{attrs:{placement:"top",width:"160"},model:{value:s.popVisible,callback:function(t){e.$set(s,"popVisible",t)},expression:"clerk.popVisible"}},[a("p",{staticStyle:{"line-height":"1.5",padding:"10px 10px 20px"}},[e._v("确认删除吗?")]),e._v(" "),a("div",{staticStyle:{"text-align":"right",margin:"0"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){e.cancelDelTag(r,s,t.row)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){e.toDelTag(r,s,t.row)}}},[e._v("确定")])],1),e._v(" "),a("el-button",{staticClass:"p-l-10",attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("\n 删除\n ")])],1),e._v(" "),1!=s.isManager?a("el-button",{staticClass:"m-l-10",attrs:{type:"text",size:"small"},on:{click:function(a){e.toTransfer(r,s,t.row)}}},[e._v("转移")]):e._e()],1)])}))]}}])},[a("template",{slot:"header"},[a("ul",{staticClass:"diy-header"},[a("li",{staticClass:"name"},[e._v("姓名")]),e._v(" "),a("li",{staticClass:"phone"},[e._v("手机号")]),e._v(" "),a("li",{staticClass:"position"},[e._v("职位")]),e._v(" "),a("li",{staticClass:"status"},[e._v("状态")]),e._v(" "),a("li",{staticStyle:{width:"200px"}},[e._v("操作")])])])],2)],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{selectType:"store",defaultList:e.defaultList,treeSet:e.treeSet},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var g=a("VU/8")(p,h,!1,function(e){a("crdp")},"data-v-8355f47c",null).exports,v=a("qsKc"),b={name:"add-brand-dialog",data:function(){return{dialogVisible:!1,brandName:"",brand:""}},methods:{saveFn:function(){if(this.brandName){var e=this,t={brandName:e.brandName};Object(c.a)("/haoban-manage-web/brand/insert",t).then(function(t){1==t.data.errorCode?e.$emit("addSuccess"):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})}else this.$message.error({message:"请输入品牌名称"})}}},I={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:"新建品牌",width:"422px",visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("p",[e._v("请输入品牌名称")]),e._v(" "),a("el-input",{staticClass:"m-t-20",model:{value:e.brandName,callback:function(t){e.brandName=t},expression:"brandName"}}),e._v(" "),a("div",{staticClass:"btn-box t-rt m-t-20 m-b-10"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.saveFn}},[e._v("确定")])],1)],1)],1)},staticRenderFns:[]};var _=a("VU/8")(b,I,!1,function(e){a("fAiH")},null,null).exports,C=a("WSbm"),y=a("oncj"),k=a("Ch4/"),w=a("unF8"),S={name:"storeEstruturaContainer",components:{navCrumb:i.a,searchMenu:l.a,storeView:m,clerkView:g,employeeInfo:C.a,storeInfo:v.a,addBrand:_,clerkInfo:y.a},data:function(){return{navpath:[{name:"首页",path:"/index"},{name:"企业通讯录",path:"/administrativeFrame"},{name:"门店架构",path:""}],menuData:[],searchResult:{},loading:!0,groupInfo:{groupName:"",departmentId:""},total:0,showChildMember:!1,pageSize:20,pageNumber:1,storeList:[],tableView:1,showEmployee:"node",perId:"",storeInfo:{},disableBtn:!0,storeStatus:"",storeType:"",recycleCount:0,firstLevelId:"",gicFlag:!0}},beforeRouteUpdate:function(e,t,a){a()},methods:{handleSearchKey:function(e){var t=this,a={keyWord:e};Object(c.a)("/haoban-manage-web/store/searchpage",a).then(function(e){t.searchResult=e.data.result||{}}).catch(function(e){t.$message.error({message:e.message})})},handleEmployeeSelection:function(e,t){var a=this;return n()(r.a.mark(function s(){return r.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return a.perId=e.employeeClerkId,a.userId=e.brandId,a.showEmployee=t,s.next=5,a.getGicData();case 5:case"end":return s.stop()}},s,a)}))()},addBrand:function(){this.$refs.add_brand.dialogVisible=!0},addSon:function(){location.href="#/addGroup?addnew=1&type=childgroup&groupId="+this.groupInfo.departmentId+"&firstLevelId="+this.firstLevelId},goToEdit:function(e){var t=0==e?"brand":"group";location.href="#/addGroup?groupId="+this.groupInfo.departmentId+"&type="+t+"&firstLevelId="+this.firstLevelId},addSuccess:function(){this.getGroupData(),this.$refs.add_brand.dialogVisible=!1},handleStoreSelection:function(e,t){var a=this,s={storeId:e.storeId};Object(c.a)("/haoban-manage-web/store/findStoreById",s).then(function(e){1==e.data.errorCode?(a.storeInfo=e.data.result,a.groupInfo.brandId=e.data.result.brandId,a.showEmployee=t,a.getGicData()):a.$message.error({message:e.data.message})})},handleSizeChange:function(e){this.pageSize=e,this.getStoreList()},handleCurrentChange:function(e){this.pageNumber=e,this.getStoreList()},switchView:function(e){this.pageSize=20,this.pageNumber=1,this.storeList=[],this.showChildMember=!1,this.storeStatus="",this.getStoreList()},setChildMemberShow:function(e){this.showChildMember=e,this.getStoreList()},refreshClerkData:function(){this.getStoreList()},getGroupData:function(){var e=this;Object(c.a)("/haoban-manage-web/dept/deptList",{isStoreGroup:1}).then(function(t){1==t.data.errorCode?(e.menuData=t.data.result||[],t.data.result.some(function(t){return 0==t.level&&(e.groupInfo.brandId=t.brandId,e.groupInfo.departmentId=t.groupId,e.groupInfo.groupName=t.name,e.groupInfo.hasPression=t.hasPression,e.firstLevelId=t.chainId.split("-")[1],e.groupInfo.level=0),0==t.level}),e.getStoreList(),e.getGicData()):(e.menuData=[],e.loading=!1,e.$message.error({duration:1e3,message:t.data.message}))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getStoreList:function(){var e=this;if(!e.groupInfo.departmentId)return e.loading=!1,!1;e.loading=!0;var t={storeGroupId:e.groupInfo.departmentId,showChild:1*e.showChildMember,showType:e.tableView,pageSize:e.pageSize,pageNum:e.pageNumber,status:e.storeStatus,storeType:e.storeType};Object(c.a)("/haoban-manage-web/store/findSimplePage",t).then(function(t){1==t.data.errorCode?(e.loading=!1,e.total=t.data.result.total,t.data.result.list&&t.data.result.list.length&&t.data.result.list.forEach(function(e,t){e.popVisible=!1,e.clerks&&e.clerks.length&&e.clerks.forEach(function(e,t){e.popVisible=!1})}),e.storeList=t.data.result.list||[],e.getRecycle()):(e.loading=!1,e.storeList=[],e.$message.error({duration:1e3,message:t.data.message}))}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})},handleTreeSelection:function(e,t,a){this.groupInfo.departmentId=e.groupId,this.firstLevelId=e.chainId.split("-")[1],this.groupInfo.groupName=e.name,this.groupInfo.brandId=e.brandId,this.showEmployee=a,this.groupInfo.hasPression=e.hasPression,this.groupInfo.level=e.level,this.storeStatus="",this.getStoreList(),this.getRecycle(),this.getGicData()},selectByStatus:function(e){this.storeStatus=e,this.getStoreList()},selectByType:function(e){this.storeType=e,this.getStoreList()},cancelClerkInfo:function(e){e&&(this.showEmployee="")},getRecycle:function(){var e=this,t={storeGroupId:e.groupInfo.departmentId};Object(c.a)("/haoban-manage-web/store/get-recycle-count",t).then(function(t){var a=t.data;1==a.errorCode?e.recycleCount=a.result:e.$message.error({duration:1e3,message:a.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGicData:function(){var e=this;return n()(r.a.mark(function t(){var a,s,o,n;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("store"!=(a=e).showEmployee||a.groupInfo.brandId){t.next=4;break}return a.loading=!1,t.abrupt("return",!1);case 4:if(a.userId||a.groupInfo.brandId){t.next=6;break}return t.abrupt("return",!1);case 6:return s={type:1,businessId:"employee"==a.showEmployee?a.userId:a.groupInfo.brandId},t.next=9,Object(w.a)(s);case 9:o=t.sent,1==(n=o.data).errorCode?a.gicFlag=n.result:k.a.errorMsg(n);case 12:case"end":return t.stop()}},t,e)}))()}},beforeMount:function(){this.getGroupData()},mounted:function(){this.disableBtn=!1}},D={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"common-set-wrap store-frame-wrap"},[a("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("div",{staticClass:"store-estrutura-container common-frame-container"},[a("search-menu",{ref:"searchMenu",attrs:{storeFrame:!0,treeData:e.menuData,searchResult:e.searchResult},on:{handleSearchKey:e.handleSearchKey,handleTreeSelection:e.handleTreeSelection,handleStoreSelection:e.handleStoreSelection,handleEmployeeSelection:e.handleEmployeeSelection}},[a("template",{slot:"buttonBox"},[a("div",{staticClass:"slot-button"},[a("el-button",{attrs:{disabled:e.disableBtn},on:{click:e.addBrand}},[e._v("新建品牌")]),e._v(" "),a("el-popover",{attrs:{placement:"right",width:"200",content:"若您的企业为集团企业,可通过新建品牌,不同品牌的门店可以创建在不同的品牌下面",trigger:"hover"}},[a("i",{staticClass:"el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1)])],2),e._v(" "),"employee"==e.showEmployee?a("clerk-info",{attrs:{gicFlag:e.gicFlag,perId:e.perId},on:{cancelClerkInfo:e.cancelClerkInfo}}):"store"==e.showEmployee?a("store-info",{ref:"store_info",attrs:{gicFlag:e.gicFlag,storeInfo:e.storeInfo}}):a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"sf-right-container common-right-container"},[a("div",{staticClass:"sf-right-header common-right-header"},[a("span",{staticClass:"title-span"},[e._v(e._s(e.groupInfo.groupName)+"("+e._s(e.total)+"家)")]),e._v(" "),a("span",{staticClass:"id-span"},[e._v("部门ID: "+e._s(e.groupInfo.departmentId))]),e._v(" "),e.gicFlag?a("el-popover",{attrs:{placement:"right",width:"200",content:"该品牌已与 GIC门店同步",trigger:"hover"}},[a("i",{staticClass:"el-icon-info",staticStyle:{color:"#c0c4cc",cursor:"pointer"},attrs:{slot:"reference"},slot:"reference"})]):e._e(),e._v(" "),e.gicFlag?e._e():a("span",{staticClass:"handle-area"},[a("el-button",{staticClass:"no-bdr-btn",on:{click:e.addSon}},[e._v(" 添加子分组 ")]),a("span",{staticClass:"hurdle"}),a("el-button",{staticClass:"no-bdr-btn",on:{click:function(t){e.goToEdit(e.groupInfo.level)}}},[e._v(" 编辑 ")])],1)],1),e._v(" "),a("div",{staticClass:"tab-div"},[a("el-radio-group",{on:{change:e.switchView},model:{value:e.tableView,callback:function(t){e.tableView=t},expression:"tableView"}},[a("el-radio-button",{attrs:{label:1}},[e._v("门店视图")]),e._v(" "),a("el-radio-button",{attrs:{label:2}},[e._v("店员视图")])],1),e._v(" "),a("a",{staticClass:"a-href fr",attrs:{href:"#/recycle?brandId="+e.groupInfo.brandId+"&dept="+e.groupInfo.departmentId+"&showChild=1&type="+e.storeType}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-delete"}},[e._v("回收站("+e._s(e.recycleCount)+")")])],1)],1),e._v(" "),a("div",[1==e.tableView?[a("store-view",{attrs:{gicFlag:e.gicFlag,tableData:e.storeList,departmentId:e.groupInfo.departmentId,brandId:e.groupInfo.brandId,firstLevelId:e.firstLevelId},on:{setChildMemberShow:e.setChildMemberShow,getStoreList:e.getStoreList}})]:[a("clerk-view",{attrs:{gicFlag:e.gicFlag,tableData:e.storeList,firstLevelId:e.firstLevelId},on:{setChildMemberShow:e.setChildMemberShow,selectByStatus:e.selectByStatus,selectByType:e.selectByType,refreshClerkData:e.refreshClerkData}})]],2),e._v(" "),e.storeList.length?a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","page-sizes":[20,40,60,80],"page-size":e.pageSize,"current-page":e.pageNumber,layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()]),e._v(" "),a("add-brand",{ref:"add_brand",on:{addSuccess:e.addSuccess}})],1)])]),e._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var N=a("VU/8")(S,D,!1,function(e){a("A6TM")},null,null);t.default=N.exports},A6TM:function(e,t){},ATfr:function(e,t,a){"use strict";var s=a("0xDb"),r={name:"searchMenu",components:{},props:{treeData:{type:Array,required:!0},searchResult:{type:Object,required:!0},storeFrame:{type:Boolean,default:!1}},data:function(){return{searchKey:"",searchResultShow:!1,myProps:{children:"childrens",label:"label",disabled:"disabled"},menuData:[],defaultOpen:[],defaultId:""}},methods:{clearFn:function(){this.searchResultShow=!1,this.$nextTick(function(){document.querySelector(".el-tree-node").classList.add("is-current")})},searchFn:function(){if(""==this.searchKey)return this.searchResultShow=!1,!1;this.searchResultShow=!0,this.$emit("handleSearchKey",this.searchKey)},handleNodeClick:function(e,t){e.id!=this.defaultId&&document.querySelector(".el-tree-node")&&document.querySelector(".el-tree-node").classList.remove("is-current"),this.defaultId=e.groupId,this.$emit("handleTreeSelection",e,t,"node")},selectEmployee:function(e){this.defaultId=e.employeeClerkId,this.$emit("handleEmployeeSelection",e,"employee")},handleStoreClick:function(e){this.$emit("handleStoreSelection",e,"store")}},filter:{},computed:{employeeList:function(){return this.searchResult.searchList?this.searchResult.searchList:[]},departmentList:function(){return this.searchResult.departmentList?this.searchResult.departmentList:[]},brandList:function(){return this.searchResult.brandList?this.searchResult.brandList:[]}},watch:{treeData:function(e,t){var a=this,r=Object(s.c)(e);a.defaultOpen=r.defaultOpen,a.menuData=r.menuArr,a.menuData.length&&a.$nextTick(function(){a.defaultId=a.menuData.length?a.menuData[0].id:"",document.querySelector(".el-tree-node").classList.add("is-current")})}}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"searh-menu-container"},[a("div",{staticClass:"p-0-15"},[a("el-input",{attrs:{"prefix-icon":"el-icon-search",placeholder:"姓名/手机号/部门名称",clearable:""},on:{clear:e.clearFn},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.searchFn(t):null}},model:{value:e.searchKey,callback:function(t){e.searchKey=t},expression:"searchKey"}}),e._v(" "),e._t("buttonBox"),e._v(" "),e.searchResultShow?e._e():a("el-tree",{staticClass:"search-menu",attrs:{"node-key":"id","default-expanded-keys":e.defaultOpen,data:e.menuData,"highlight-current":!0,"expand-on-click-node":!1,props:e.myProps},on:{"node-click":e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.node;return t.data,a("span",{staticClass:"custom-tree-node"},[a("i",{staticClass:"iconfont",class:1==s.level?"icon-2zuzhijiagou":"icon-tongshi-zuzhijiagou"}),e._v(" "),a("span",[e._v(e._s(s.label))])])}}])})],2),e._v(" "),e.searchResultShow?a("div",{staticClass:"search-result-container m-t-15"},[e.storeFrame?[e._l(e.brandList,function(t,s){return[t.departmentList.length>0||t.storeList.length>0||t.searchList.length>0?a("div",{key:t.topDepartment.brandId+"_"+s},[a("div",[a("p",{staticClass:"brand-title"},[e._v(e._s(t.topDepartment.name))]),e._v(" "),t.departmentList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title store-frame-title"},[e._v("分组列表")]),e._v(" "),e._l(t.departmentList,function(t,s){return a("li",{key:s+"_"+t.groupId,staticClass:"group-item items",on:{click:function(a){e.handleNodeClick(t)}}},[a("i",{staticClass:"iconfont icon-tongshi-zuzhijiagou"}),e._v("\n "+e._s(t.name)+"\n ")])})],2):e._e(),e._v(" "),t.storeList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title store-frame-title"},[e._v("门店列表")]),e._v(" "),e._l(t.storeList,function(t,s){return a("li",{key:s+"_"+t.storeGroupId,staticClass:"group-item items",on:{click:function(a){e.handleStoreClick(t)}}},[a("i",{staticClass:"iconfont icon-tongshi-zuzhijiagou"}),e._v("\n "+e._s(t.storeName)+"\n ")])})],2):e._e(),e._v(" "),t.searchList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title store-frame-title"},[e._v("人员列表")]),e._v(" "),e._l(t.searchList,function(t,s){return a("li",{key:s+"_"+t.employeeClerkId,staticClass:"person-item items",on:{click:function(a){e.selectEmployee(t)}}},[a("i",{staticClass:"iconfont icon-chengyuan"}),e._v("\n "+e._s(t.name)+"\n "),a("span",{staticClass:"from-group"},[e._v(e._s(t.departmentName))])])})],2):e._e()])]):e._e()]}),e._v(" "),e.brandList.length<1?a("p",{staticClass:"no-data-tip"},[e._v("暂无数据")]):e._e()]:[e.departmentList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title"},[e._v("部门列表")]),e._v(" "),e._l(e.departmentList,function(t,s){return a("li",{key:s+"_"+t.groupId,class:["group-item items",e.defaultId==t.groupId?"active-item":""],on:{click:function(a){e.handleNodeClick(t)}}},[a("i",{staticClass:"iconfont icon-tongshi-zuzhijiagou"}),e._v("\n "+e._s(t.name)+"\n ")])})],2):e._e(),e._v(" "),e.employeeList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title"},[e._v("人员列表")]),e._v(" "),e._l(e.employeeList,function(t,s){return a("li",{key:s+"_"+t.employeeClerkId,class:["person-item items",e.defaultId==t.employeeClerkId?"active-item":""],on:{click:function(a){e.selectEmployee(t)}}},[a("i",{staticClass:"iconfont icon-chengyuan"}),e._v("\n "+e._s(t.name)+"\n "),a("span",{staticClass:"from-group"},[e._v(e._s(t.departmentName))])])})],2):e._e(),e._v(" "),e.departmentList.length<1&&e.employeeList.length<1?a("p",{staticClass:"no-data-tip"},[e._v("暂无数据")]):e._e()]],2):e._e()])},staticRenderFns:[]};var n=a("VU/8")(r,o,!1,function(e){a("MEND")},null,null);t.a=n.exports},MEND:function(e,t){},Rc4o:function(e,t){},cPpO:function(e,t){},crdp:function(e,t){},fAiH:function(e,t){},oncj:function(e,t,a){"use strict";var s=a("Ie7z"),r=a("P9l9"),o=a("XDyb"),n=a("T+u5"),i=a.n(n),l={name:"clerk-info-form",props:{isAddnew:{type:Boolean,default:!1},perId:{type:[String,Number],default:""},firstLevelId:{type:[String,Number],default:""},storeType:{type:[String,Number],default:""},gicFlag:{type:Boolean,default:!1}},components:{vueSelectStore:s.a,countryMobile:o.a},data:function(){var e=this;return{rules:{name:[{required:!0,message:"请输入店员姓名",trigger:"blur"},{min:2,max:10,message:"长度在 2 到 10 个字符",trigger:"blur"}],phoneNumber:[{required:!0,validator:function(t,a,s){if(!a)return s(new Error("请输入手机号"));var r=new i.a("+"+e.clerkInfo.nationcode+a);r.isValid()&&r.isMobile()?s():s(new Error("手机号格式不正确"))},trigger:"blur"}],storeName:[{required:!0,message:"请选择门店",trigger:"change"}],code:[{required:!0,message:"请输入code",trigger:"blur"},{min:2,max:20,message:"长度在 2 到 20 个字符",trigger:"blur"}],positionName:[{required:!0,message:"请输入店员职位",trigger:"blur"}]},clerkInfo:{storeName:"",storeId:"",managerMode:!1,positionName:"职员",nationcode:"86"},treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0,groupId:"",storeType:"",openNextBool:!0},defaultList:[]}},methods:{toInputCode:function(e){var t=this.clerkInfo.code;""!==t&&(this.clerkInfo.code=t.replace(/[^A-Za-z0-9]+/g,""))},saveFn:function(e){var t=!0;this.$refs.clerk_info.validate(function(e){e||(t=!1)}),t&&this.addEmployee(this.clerkInfo,e)},callSelector:function(){this.treeSet.dialogVisible=!0},handleSelectedList:function(e){this.clerkInfo.storeName=e&&e.length?e[0].label:"",this.clerkInfo.storeId=e&&e.length?e[0].id:"",this.$forceUpdate()},addEmployee:function(e,t){var a=this,s={name:e.name,isClerk:1,phoneNumber:e.phoneNumber,positionName:e.positionName,storeId:e.storeId,managerMode:1*e.managerMode,code:e.code,employeeClerkId:e.employeeClerkId||"",nationcode:e.nationcode},o=a.isAddnew?"/haoban-manage-web/emp/add":"/haoban-manage-web/emp/update";Object(r.a)(o,s).then(function(e){1==e.data.errorCode?(a.$message.success({message:"操作成功"}),1==t?(a.clerkInfo={name:"",isClerk:1,phoneNumber:"",positionName:"职员",storeId:"",managerMode:!1,code:"",nationcode:"86"},a.defaultList=[],a.$refs.clerk_info.resetFields()):a.$router.push("/storeFrame")):a.$message.error({message:e.data.message})}).catch(function(e){a.$message.error({message:e.message})})},cancel:function(){var e=this;this.$confirm(" 是否确认取消,取消后当前页面信息将丢失 ?","提示",{type:"warning"}).then(function(){e.$router.go(-1)}).catch(function(e){})},getClerkInfo:function(){var e=this,t={id:e.$route.query.clerkId?e.$route.query.clerkId:e.perId};Object(r.a)("/haoban-manage-web/emp/findOne",t).then(function(t){1==t.data.errorCode?(e.clerkInfo=t.data.result,e.defaultList=[{id:t.data.result.storeId,label:t.data.result.storeName}]):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t})})}},beforeMount:function(){this.treeSet.storeType=this.storeType,this.treeSet.groupId=this.firstLevelId,this.isAddnew||this.getClerkInfo()},watch:{perId:function(e,t){this.getClerkInfo(e)}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-container bdr-box"},[a("el-form",{ref:"clerk_info",staticClass:"add-clerk-form",attrs:{model:e.clerkInfo,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"姓名",prop:"name"}},[a("el-input",{staticClass:"clerk-info-input",model:{value:e.clerkInfo.name,callback:function(t){e.$set(e.clerkInfo,"name",t)},expression:"clerkInfo.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号",prop:"phoneNumber"}},[a("countryMobile",{attrs:{inputWidth:380,nationCode:e.clerkInfo.nationcode,holder:"请输入手机号",disflag:!e.isAddnew},on:{"update:nationCode":function(t){e.$set(e.clerkInfo,"nationcode",t)}},model:{value:e.clerkInfo.phoneNumber,callback:function(t){e.$set(e.clerkInfo,"phoneNumber",t)},expression:"clerkInfo.phoneNumber"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"门店",prop:"storeName"}},[a("el-input",{staticClass:"clerk-info-input",attrs:{disabled:!e.isAddnew},on:{focus:e.callSelector},model:{value:e.clerkInfo.storeName,callback:function(t){e.$set(e.clerkInfo,"storeName",t)},expression:"clerkInfo.storeName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"code",prop:"code"}},[a("el-input",{staticClass:"clerk-info-input",attrs:{disabled:e.gicFlag&&!e.isAddnew},on:{blur:function(t){return e.toInputCode(t)}},model:{value:e.clerkInfo.code,callback:function(t){e.$set(e.clerkInfo,"code",t)},expression:"clerkInfo.code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"职位",prop:"positionName"}},[a("el-input",{staticClass:"clerk-info-input",model:{value:e.clerkInfo.positionName,callback:function(t){e.$set(e.clerkInfo,"positionName",t)},expression:"clerkInfo.positionName"}})],1)],1),e._v(" "),a("div",{staticClass:"btn-box"},[a("el-button",{attrs:{type:"primary"},on:{click:e.saveFn}},[e._v("保 存")]),e._v(" "),!e.gicFlag&&e.isAddnew?a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.saveFn(1)}}},[e._v("保存并继续添加")]):e._e(),e._v(" "),e.gicFlag?e._e():a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{selectType:"store",defaultList:e.defaultList,treeSet:e.treeSet},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var d=a("VU/8")(l,c,!1,function(e){a("Rc4o")},null,null);t.a=d.exports},qsKc:function(e,t,a){"use strict";var s=a("mvHQ"),r=a.n(s),o=a("Xxa5"),n=a.n(o),i=a("//Fk"),l=a.n(i),c=a("exGp"),d=a.n(c),u=a("P9l9"),m=a("Ie7z"),f=a("XDyb"),p=a("T+u5"),h=a.n(p),g={name:"store-detail",components:{vueSelectStore:m.a,countryMobile:f.a},props:{storeInfo:{type:Object,default:function(){return{}}},gicFlag:{type:Boolean,default:!0}},data:function(){var e=this;return{areaChainName:"",location:"",areaOptions:{},imgs:[],uploadUrl:"/haoban-manage-web/upload-img",defaultList:[],treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0,groupId:this.storeInfo.brandId,openNextBool:!0},selectType:"group",disableFlag:!1,storeInfoData:this.storeInfo,rules:{storeName:[{required:!0,message:"请输入门店名称",trigger:"blur"}],departmentName:[{required:!0,message:"请选择所属分组",trigger:"blur"}],groupChainName:[{required:!0,message:"请选择部门",trigger:"change"}],imageUrls:[{type:"array",required:!0,message:"请选择门店图片",trigger:"change"}],areaId:[{required:!0,message:"请选择门店地址",trigger:"blur"}],storeType:[{required:!0,message:"请选择门店类型",trigger:"blur"}],openTime:[{required:!0,validator:function(t,a,s){return a&&e.storeInfo.closeTime?s():s(new Error("请选择营业时间"))},trigger:"blur"}],location:[{required:!0,message:"请选择经纬度",trigger:"blur"}],phoneNumber:[{required:!0,validator:function(e,t,a){return t?a():a(new Error("请输入联系电话"))},trigger:"blur"}],storeCode:[{required:!0,validator:function(e,t,a){if(t)return t.match(/[^\x00-\xff]/gi)?a(new Error("门店代码不能是中文或表情")):a();return a(new Error("请输入门店代码"))},trigger:"blur"}],managerName:[{required:!0,message:"请输入店长姓名",trigger:"blur"}],managerPhone:[{required:!0,validator:function(t,a,s){if(!a)return s(new Error("请输入手机号码"));var r=new h.a("+"+e.storeInfoData.managerNationcode+a);r.isValid()&&r.isMobile()?s():s(new Error("手机号格式不正确"))},trigger:"blur"}],managerCode:[{required:!0,validator:function(e,t,a){if(t)return t.match(/[^\x00-\xff]/gi)?a(new Error("店长代码不能是中文或表情")):a();return a(new Error("请输入店长代码"))},trigger:"blur"}],specialService:[{max:20,message:"长度在 20 个字符以内",trigger:"blur"}],personCost:[{validator:function(e,t,a){if(t)return/^\d+(\.\d+)?$/.test(1*t)?a():a(new Error("人均消费只能为非负整数或者小数"));return a()},trigger:"blur"}]}}},methods:{inputBlur:function(e){this.storeInfoData.storeArea||(this.storeInfoData.storeArea=""),this.storeInfoData.storeArea=Number(this.storeInfoData.storeArea.replace(/[^\d.]/g,""))?this.storeInfoData.storeArea.replace(/[^\d+(.\d+)]/g,""):"",this.storeInfoData.storeArea=Number(this.storeInfoData.storeArea).toFixed(2),this.storeInfoData.storeArea>=999999&&(this.storeInfoData.storeArea=Number(999999).toFixed(2))},callSelector:function(){this.treeSet={isSelectPerson:!1,dialogVisible:!0,isSingle:!0,groupId:this.storeInfoData.brandId,openNextBool:!0}},handleSelectedList:function(e){this.storeInfoData.groupChainName=e.length?e[0].chainName:"",this.storeInfoData.departmentName=e.length?e[0].label:"",this.storeInfoData.storeGroupId=e.length?e[0].id:""},selected:function(e){this.areaChainName=e.provinceName+"/"+e.cityName+"/"+e.countryName},uploadOnSuccess:function(e,t){e.file.url=e.res.result[0].qcloudImageUrl,t.push(e.file)},sortImg:function(e){this.storeInfoData.imageUrls=e},deleteImage:function(e){this.storeInfoData.imageUrls.splice(e,1)},clickToSave:function(){var e=this;return d()(n.a.mark(function t(){var a,s,r,o;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=e,s=new l.a(function(e,t){a.$refs.storeInfoData.validate(function(t){t&&e()})}),r=new l.a(function(e,t){a.$refs.storeManagerForm.validate(function(t){t&&e()})}),o=new l.a(function(e,t){a.$refs.storeOperateForm.validate(function(t){t&&e()})}),l.a.all([s,r,o]).then(function(){a.save()});case 5:case"end":return t.stop()}},t,e)}))()},save:function(){var e=this,t=e.location.split(",");e.storeInfoData.longitude=t[1],e.storeInfoData.latitude=2!==t.length?"":t[0],e.storeInfoData.managerPhone=e.storeInfoData.managerPhone,e.storeInfoData.areaChainName=e.areaOptions.provinceName+"/"+e.areaOptions.cityName+"/"+e.areaOptions.countryName;var a=JSON.parse(r()(e.storeInfoData)),s=[];e.storeInfoData.imageUrls.forEach(function(e){s.push(e.url)}),a.imageUrls=s.join(","),Object(u.e)("/haoban-manage-web/store/update",a).then(function(t){1==t.data.errorCode?e.$message.success({message:"操作成功!"}):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})},formatStoreInfo:function(e){this.defaultList=[{id:e.storeGroupId,label:e.departmentName}],e.managerNationcode||(e.managerNationcode="86");var t=(e.areaChainName||"").split("/");this.areaOptions={provinceName:t[0],provinceId:e.provinceId,cityName:t[1],cityId:e.cityId,countryName:t[2],countyId:e.countyId},this.imgs=e.imageUrl?e.imageUrl.split(","):[];var a=[];this.imgs.forEach(function(e){a.push({url:e})}),e.imageUrls=a,this.location=e.longitude?e.latitude+","+e.longitude:"",this.disableFlag=!!e.managerPhone}},watch:{storeInfo:function(e){this.treeSet.groupId=e.brandId,this.storeInfoData=e,this.formatStoreInfo(this.storeInfoData)}},beforeMount:function(){this.treeSet.groupId=this.storeInfo.brandId},mounted:function(){this.storeInfoData=JSON.parse(r()(this.storeInfo)),this.formatStoreInfo(this.storeInfoData)}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"store-info"},[a("div",{staticClass:"info-cell"},[a("p",{staticClass:"title"},[e._v("门店信息")]),e._v(" "),a("el-form",{ref:"storeInfoData",staticClass:"store-info-form info-form",attrs:{"label-width":"90px",rules:e.rules,model:e.storeInfoData}},[a("el-form-item",{attrs:{label:"门店名称",prop:"storeName"}},[a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.storeName,callback:function(t){e.$set(e.storeInfoData,"storeName",t)},expression:"storeInfoData.storeName"}},[a("template",{slot:"suffix"},[e._v("\n "+e._s(e.storeInfoData.storeName?e.storeInfoData.storeName.length:0)+"/20\n ")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"所属分组",prop:"departmentName"}},[a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},on:{focus:e.callSelector},model:{value:e.storeInfoData.groupChainName,callback:function(t){e.$set(e.storeInfoData,"groupChainName",t)},expression:"storeInfoData.groupChainName"}},[a("i",{staticClass:"el-input__icon el-icon-arrow-down",attrs:{slot:"suffix"},slot:"suffix"})])],1),e._v(" "),a("el-form-item",{attrs:{label:"门店图片(640*340)",prop:"imageUrls"}},[a("div",{staticClass:"member-upload-image"},[a("vue-office-upload-image",{attrs:{projectName:"haoban-manage-web",wxFlag:"0",actionUrl:e.uploadUrl,imageList:e.storeInfoData.imageUrls,limitW:640,limitH:340,maxImageLength:10},on:{uploadOnSuccess:e.uploadOnSuccess,sortImg:e.sortImg,deleteImage:e.deleteImage}})],1),e._v(" "),a("div",{staticClass:"tip font-12 color-909399 m-t-8 line-h-1"},[e._v("门店图片(640*340),支持.jpg,.jepg,.png类型文件,最多添加10张图片")])]),e._v(" "),a("el-form-item",{attrs:{label:"联系电话",prop:"phoneNumber"}},[a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.phoneNumber,callback:function(t){e.$set(e.storeInfoData,"phoneNumber",t)},expression:"storeInfoData.phoneNumber"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"营业时间",prop:"openTime"}},[a("el-time-select",{attrs:{placeholder:"起始时间","picker-options":{start:"00:00",step:"00:05",end:"24:00"}},model:{value:e.storeInfoData.openTime,callback:function(t){e.$set(e.storeInfoData,"openTime",t)},expression:"storeInfoData.openTime"}}),e._v("\n ~\n "),a("el-time-select",{attrs:{placeholder:"结束时间","picker-options":{start:"00:00",step:"00:05",end:"24:00",minTime:e.storeInfoData.openTime}},model:{value:e.storeInfoData.closeTime,callback:function(t){e.$set(e.storeInfoData,"closeTime",t)},expression:"storeInfoData.closeTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"门店类型",prop:"storeType"}},[a("el-radio-group",{model:{value:e.storeInfoData.storeType,callback:function(t){e.$set(e.storeInfoData,"storeType",t)},expression:"storeInfoData.storeType"}},[a("el-radio",{attrs:{label:0}},[e._v("自营")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("联营")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("代理")]),e._v(" "),a("el-radio",{attrs:{label:3}},[e._v("代销")]),e._v(" "),a("el-radio",{attrs:{label:4}},[e._v("托管")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"门店地址",prop:"areaId"}},[a("vue-office-area",{attrs:{areaOptions:e.areaOptions,projectName:"haoban-web",postUrl:"/api-admin/dict-district-list"},on:{selected:e.selected}}),e._v(" "),a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.postAddress,callback:function(t){e.$set(e.storeInfoData,"postAddress",t)},expression:"storeInfoData.postAddress"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.postAddress||"").length)+"/50")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"GPS坐标",prop:"location"}},[a("el-input",{staticClass:"w-500 m-r-10",model:{value:e.storeInfoData.location,callback:function(t){e.$set(e.storeInfoData,"location",t)},expression:"storeInfoData.location"}}),e._v(" "),a("a",{staticClass:"a-href",attrs:{href:"http://m.gpsspg.com/maps.htm",target:"_blank"}},[e._v("经纬度测试工具")])],1),e._v(" "),a("el-form-item",[a("template",{slot:"label"},[e._v("\n 门店代码\n ")]),e._v(" "),a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.storeCode,callback:function(t){e.$set(e.storeInfoData,"storeCode",t)},expression:"storeInfoData.storeCode"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.storeCode||"").length)+"/20")])],2)],2),e._v(" "),a("el-form-item",{attrs:{label:"门店面积"}},[a("el-input",{staticClass:"w-500",on:{blur:function(t){return e.inputBlur(t)}},model:{value:e.storeInfoData.storeArea,callback:function(t){e.$set(e.storeInfoData,"storeArea",t)},expression:"storeInfoData.storeArea"}}),a("span",{staticClass:"font-14 p-l-10"},[e._v("平方米")])],1)],1)],1),e._v(" "),a("div",{staticClass:"info-cell"},[a("p",{staticClass:"title"},[e._v("店长信息")]),e._v(" "),a("el-form",{ref:"storeManagerForm",staticClass:"store-manager-info-form info-form",attrs:{"label-width":"90px",rules:e.rules,model:e.storeInfoData}},[a("el-form-item",{attrs:{label:"店长姓名",prop:"managerName"}},[a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.managerName,callback:function(t){e.$set(e.storeInfoData,"managerName",t)},expression:"storeInfoData.managerName"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.managerName||"").length)+"/10")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号码",prop:"managerPhone"}},[a("countryMobile",{attrs:{inputWidth:500,nationCode:e.storeInfoData.managerNationcode,holder:"请输入手机号",disflag:e.disableFlag||e.gicFlag},on:{"update:nationCode":function(t){e.$set(e.storeInfoData,"managerNationcode",t)}},model:{value:e.storeInfoData.managerPhone,callback:function(t){e.$set(e.storeInfoData,"managerPhone",t)},expression:"storeInfoData.managerPhone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"店长性别"}},[a("el-radio-group",{attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.managerSex,callback:function(t){e.$set(e.storeInfoData,"managerSex",t)},expression:"storeInfoData.managerSex"}},[a("el-radio",{attrs:{label:1}},[e._v("男")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("女")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"店长代码",prop:"managerCode"}},[a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.managerCode,callback:function(t){e.$set(e.storeInfoData,"managerCode",t)},expression:"storeInfoData.managerCode"}},[a("template",{slot:"suffix"},[e._v("\n "+e._s((e.storeInfoData.managerCode||"").length)+"/20\n ")])],2)],1)],1)],1),e._v(" "),a("div",{staticClass:"info-cell"},[a("p",{staticClass:"title"},[e._v("经营信息")]),e._v(" "),a("el-form",{ref:"storeOperateForm",staticClass:"operate-info-form info-form",attrs:{"label-width":"90px",rules:e.rules,model:e.storeInfoData}},[a("el-form-item",{attrs:{label:"特色服务"}},[a("el-input",{staticClass:"w-500",attrs:{type:"textarea",rows:2},model:{value:e.storeInfoData.specialService,callback:function(t){e.$set(e.storeInfoData,"specialService",t)},expression:"storeInfoData.specialService"}}),e._v(" "),a("p",{staticClass:"counter t-rt c-909399"},[e._v(e._s((e.storeInfoData.specialService||"").length)+"/20")])],1),e._v(" "),a("el-form-item",{attrs:{label:"人均消费"}},[a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.personCost,callback:function(t){e.$set(e.storeInfoData,"personCost",t)},expression:"storeInfoData.personCost"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.personCost+"").length)+"/10")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"推荐商品"}},[a("el-input",{staticClass:"w-500",attrs:{type:"textarea",rows:2},model:{value:e.storeInfoData.recommendGoods,callback:function(t){e.$set(e.storeInfoData,"recommendGoods",t)},expression:"storeInfoData.recommendGoods"}}),e._v(" "),a("p",{staticClass:"counter t-rt c-909399"},[e._v(e._s((e.storeInfoData.recommendGoods||"").length)+"/100")])],1),e._v(" "),a("el-form-item",{attrs:{label:"品牌介绍"}},[a("el-input",{staticClass:"w-500",attrs:{type:"textarea",rows:2},model:{value:e.storeInfoData.brandDes,callback:function(t){e.$set(e.storeInfoData,"brandDes",t)},expression:"storeInfoData.brandDes"}}),e._v(" "),a("p",{staticClass:"counter t-rt c-909399"},[e._v(e._s((e.storeInfoData.recommendGoods||"").length)+"/200")])],1)],1)],1),e._v(" "),a("div",{staticClass:"handle-area"},[a("el-button",{attrs:{type:"primary"},on:{click:e.clickToSave}},[e._v("保 存")])],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{defaultList:e.defaultList,treeSet:e.treeSet,selectType:e.selectType,forbidenList:[e.storeInfoData.storeGroupId]},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var b=a("VU/8")(g,v,!1,function(e){a("cPpO")},null,null);t.a=b.exports},sC3T:function(e,t){}}); webpackJsonp([6],{"7SJI":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("Xxa5"),r=a.n(s),o=a("exGp"),n=a.n(o),i=a("3Xzz"),l=a("ATfr"),c=a("P9l9"),d={name:"storeView",props:{tableData:{type:Array,default:function(){return[]}},departmentId:{type:[String,Number],default:""},brandId:{type:[String,Number],default:""},firstLevelId:{type:[String,Number],default:""},gicFlag:{type:Boolean,default:!0}},data:function(){return{tableH:window.screen.availHeight-440-180-70,selectedList:[],showChildMember:!1,typeArr:["全部类型","自营","联营","代理(加盟)","代销","托管"],statusArr:["待审核","正常","审核失败","停业整顿","回收站","删除"]}},methods:{delStores:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this;a.$confirm("是否删除所选店铺","提示",{type:"warning"}).then(function(){var s="";if(t)s=e.storeId;else{var r=[];a.selectedList.forEach(function(e){r.push(e.storeId)}),s=r.join(",")}var o={ids:s};a.postDel(o)})},postDel:function(e,t){var a=this;Object(c.a)("/haoban-manage-web/store/delByIds",e).then(function(e){1==e.data.errorCode?(a.$message.success({duration:1e3,message:"操作成功"}),t&&(t.popVisible=!1),a.$emit("getStoreList")):a.$message.error({duration:1e3,message:e.data.message})}).catch(function(e){a.$message.error({duration:1e3,message:e.message})})},selectMember:function(e){this.selectedList=e},setChildMemberShow:function(){this.$emit("setChildMemberShow",this.showChildMember)},cancelDelTag:function(e,t){t.popVisible=!1},toDelTag:function(e,t){var a={ids:t.storeId};this.postDel(a,t)}},computed:{disabledDel:function(){return this.selectedList.length<1}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"common-right-button-box"},[a("a",{attrs:{href:"#/storeInfo?firstLevelId="+e.firstLevelId}},[e.gicFlag?e._e():a("el-button",{attrs:{type:"primary"}},[e._v("添加门店")])],1),e._v(" "),a("a",{attrs:{href:"#/storeIo?importCode=store&departmentId="+e.departmentId+"&showChildMember="+1*e.showChildMember+"&brandId="+e.brandId}},[a("el-button",[e._v("批量导入/导出")])],1),e._v(" "),e.gicFlag?e._e():a("el-button",{attrs:{type:"danger",disabled:e.disabledDel},on:{click:e.delStores}},[e._v("批量删除")]),e._v(" "),a("span",{staticClass:"J_show-children el-button",attrs:{size:"small"}},[a("el-checkbox",{staticClass:"m-r-10",on:{change:e.setChildMemberShow},model:{value:e.showChildMember,callback:function(t){e.showChildMember=t},expression:"showChildMember"}},[e._v("显示子成员")]),a("a",{staticClass:"a-href"})],1)],1),e._v(" "),a("el-table",{ref:"table1",attrs:{data:e.tableData},on:{"selection-change":e.selectMember}},[a("el-table-column",{attrs:{type:"selection",width:"42"}}),e._v(" "),a("el-table-column",{attrs:{label:"门店",prop:"storeName",width:"140"}}),e._v(" "),a("el-table-column",{attrs:{label:"代码",prop:"storeCode",width:"140"}}),e._v(" "),a("el-table-column",{attrs:{label:"类型",prop:"storeType",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.typeArr[1*t.row.storeType+1])+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"地区",prop:"areaChainName","show-overflow-tooltip":!0},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.areaChainName||"--")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"所属分组",prop:"groupChainName","show-overflow-tooltip":!0}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("a",{staticClass:"a-href m-r-20",attrs:{href:"#/storeInfo?gicFlag="+e.gicFlag+"&storeId="+t.row.storeId+"&firstLevelId="+e.firstLevelId}},[e._v("编辑")]),e._v(" "),e.gicFlag?e._e():a("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.row.popVisible,callback:function(a){e.$set(t.row,"popVisible",a)},expression:"scope.row.popVisible"}},[a("p",{staticStyle:{"line-height":"1.5",padding:"10px 10px 20px"}},[e._v("确认删除吗?")]),e._v(" "),a("div",{staticStyle:{"text-align":"right",margin:"0"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){e.cancelDelTag(t.$index,t.row)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){e.toDelTag(t.$index,t.row)}}},[e._v("确定")])],1),e._v(" "),a("el-button",{staticClass:"p-l-10",attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("\n 删除\n ")])],1)]}}])})],1)],1)},staticRenderFns:[]};var m=a("VU/8")(d,u,!1,function(e){a("sC3T")},null,null).exports,f=a("Ie7z"),p={name:"clerkView",props:{tableData:{type:Array,default:function(){return[]}},firstLevelId:{type:[String,Number],default:""},gicFlag:{type:Boolean,default:!1}},components:{vueSelectStore:f.a},data:function(){return{tableH:window.screen.availHeight-440-180-70,storeType:0,typeArr:["全部类型","自营","联营","代理(加盟)","代销","托管"],storeStatus:"",showChildMember:!1,treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0,groupId:"",storeType:"",openNextBool:!0},defaultList:[],transferObj:{}}},methods:{handleSelectedList:function(e){e&&e.length&&this.postTrans(e)},postTrans:function(e){var t=this,a={id:t.transferObj.employeeClerkId,storeId:e[0].id,oldStoreId:t.transferObj.storeId};Object(c.a)("/haoban-manage-web/emp/clerkMove",a).then(function(e){1==e.data.errorCode?(t.$message.success({message:"转移成功"}),t.$emit("refreshClerkData")):t.$message.error({message:e.data.message})}).catch(function(e){t.$message.error({message:e.message})})},setChildMemberShow:function(){this.$emit("setChildMemberShow",this.showChildMember)},changeManager:function(e,t){var a=this,s={};e.clerks.some(function(e){return 1==e.isManager&&(s=e),1==e.isManager});var r={employeeClerkId:t.employeeClerkId,managerId:s.employeeClerkId};Object(c.a)("/haoban-manage-web/emp/setManager",r).then(function(e){1==e.data.errorCode?(s.isManager=0,t.isManager=1,a.$message.success({message:"操作成功"})):a.$message.error({message:e.data.message})}).catch(function(e){a.$message.error({message:e.message})})},selectByStatus:function(e){this.$emit("selectByStatus",e)},selectByType:function(e){var t="";0!=e&&(t=1*e-1),this.$emit("selectByType",t)},delClerk:function(e,t){var a=this;a.$confirm("是否要删除该员工?","提示",{type:"warning"}).then(function(){var s={ids:e.employeeClerkId};a.postDel(s,t,e)})},postDel:function(e,t,a){var s=this;Object(c.a)("/haoban-manage-web/emp/del",e).then(function(e){1==e.data.errorCode?(t.clerks.forEach(function(e){e.employeeClerkId==a.employeeClerkId&&t.clerks.splice(t.clerks.indexOf(e),1)}),s.$message.success({duration:1e3,message:"操作成功"})):s.$message.error({duration:1e3,message:e.data.message})}).catch(function(e){s.$message.error({duration:1e3,message:e.message})})},cancelDelTag:function(e,t,a){t.popVisible=!1},toDelTag:function(e,t,a){var s={ids:t.employeeClerkId};this.postDel(s,a,t)},toTransfer:function(e,t,a){this.transferObj=t,this.treeSet.storeType="addClerk",this.treeSet.groupId=this.firstLevelId,this.defaultList=[{id:t.storeId,label:t.storeName}],this.treeSet.dialogVisible=!0},addClerkBtn:function(e,t){this.$router.push({path:"/addClerk",query:{storeId:t.storeId,firstLevelId:this.firstLevelId,type:e}})}}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"sf-right-button-box common-right-button-box"},[a("el-select",{attrs:{size:"small"},on:{change:e.selectByType},model:{value:e.storeType,callback:function(t){e.storeType=t},expression:"storeType"}},e._l(e.typeArr,function(e,t){return a("el-option",{key:e,attrs:{label:e,value:t}})})),e._v(" "),a("el-select",{attrs:{size:"small"},on:{change:e.selectByStatus},model:{value:e.storeStatus,callback:function(t){e.storeStatus=t},expression:"storeStatus"}},[a("el-option",{attrs:{label:"全部状态",value:""}}),e._v(" "),a("el-option",{attrs:{label:"正常",value:1}}),e._v(" "),a("el-option",{attrs:{label:"停业整顿",value:3}})],1),e._v(" "),a("span",{staticClass:"J_show-children el-button",staticStyle:{"vertical-align":"middle"},attrs:{size:"small"}},[a("el-checkbox",{staticClass:"m-r-10",on:{change:e.setChildMemberShow},model:{value:e.showChildMember,callback:function(t){e.showChildMember=t},expression:"showChildMember"}},[e._v("显示子成员")]),a("a",{staticClass:"a-href"})],1)],1),e._v(" "),a("el-table",{ref:"clerkViewTable",staticClass:"diy-table",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"门店",width:"300"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[a("p",{staticClass:"m-b-10"},[e._v(e._s(t.row.storeName))]),e._v(" "),a("p",[a("a",{staticClass:"a-href",attrs:{href:"#/addClerk?gicFlag="+e.gicFlag+"&storeId="+t.row.storeId+"&firstLevelId="+e.firstLevelId+"&type=addClerk"}},[e._v("新增店员")])])])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"门店code",prop:"storeCode",width:"300"}}),e._v(" "),a("el-table-column",{attrs:{"min-width":"675"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("ul",e._l(t.row.clerks,function(s,r){return a("li",{key:s.employeeClerkId,staticClass:"clerk-obj-li"},[a("div",{staticClass:"clerk-name clerk-cell"},[a("el-radio",{attrs:{value:1,label:s.isManager},on:{change:function(a){e.changeManager(t.row,s)}}},[e._v(e._s(s.name))]),e._v(" "),1==s.isManager?a("span",{staticClass:"manager"},[e._v("店长")]):e._e()],1),e._v(" "),a("div",{staticClass:"clerk-cell clerk-phone"},[e._v(e._s("86"==s.nationcode?s.phoneNumber:"+"+s.nationcode+"-"+s.phoneNumber))]),e._v(" "),a("div",{staticClass:"clerk-cell clerk-position"},[e._v(e._s(s.positionName||"--"))]),e._v(" "),a("div",{staticClass:"clerk-cell clerk-status"},[a("div",{staticClass:"status-icon",class:1==s.status?"is-active":""},[a("i",{staticClass:"iconfont icon-shouji"})])]),e._v(" "),a("div",{staticClass:"clerk-cell clerk-handle"},[a("a",{staticClass:"a-href m-r-20",attrs:{href:"#/addClerk?gicFlag="+e.gicFlag+"&storeId="+t.row.storeId+"&clerkId="+s.employeeClerkId+"&firstLevelId="+e.firstLevelId+"&type=addClerk"}},[e._v("编辑")]),e._v(" "),a("el-popover",{attrs:{placement:"top",width:"160"},model:{value:s.popVisible,callback:function(t){e.$set(s,"popVisible",t)},expression:"clerk.popVisible"}},[a("p",{staticStyle:{"line-height":"1.5",padding:"10px 10px 20px"}},[e._v("确认删除吗?")]),e._v(" "),a("div",{staticStyle:{"text-align":"right",margin:"0"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(a){e.cancelDelTag(r,s,t.row)}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){e.toDelTag(r,s,t.row)}}},[e._v("确定")])],1),e._v(" "),a("el-button",{staticClass:"p-l-10",attrs:{slot:"reference",type:"text"},slot:"reference"},[e._v("\n 删除\n ")])],1),e._v(" "),1!=s.isManager?a("el-button",{staticClass:"m-l-10",attrs:{type:"text",size:"small"},on:{click:function(a){e.toTransfer(r,s,t.row)}}},[e._v("转移")]):e._e()],1)])}))]}}])},[a("template",{slot:"header"},[a("ul",{staticClass:"diy-header"},[a("li",{staticClass:"name"},[e._v("姓名")]),e._v(" "),a("li",{staticClass:"phone"},[e._v("手机号")]),e._v(" "),a("li",{staticClass:"position"},[e._v("职位")]),e._v(" "),a("li",{staticClass:"status"},[e._v("状态")]),e._v(" "),a("li",{staticStyle:{width:"200px"}},[e._v("操作")])])])],2)],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{selectType:"store",defaultList:e.defaultList,treeSet:e.treeSet},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var g=a("VU/8")(p,h,!1,function(e){a("crdp")},"data-v-8355f47c",null).exports,v=a("qsKc"),b={name:"add-brand-dialog",data:function(){return{dialogVisible:!1,brandName:"",brand:""}},methods:{saveFn:function(){if(this.brandName){var e=this,t={brandName:e.brandName};Object(c.a)("/haoban-manage-web/brand/insert",t).then(function(t){1==t.data.errorCode?e.$emit("addSuccess"):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})}else this.$message.error({message:"请输入品牌名称"})}}},I={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:"新建品牌",width:"422px",visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("p",[e._v("请输入品牌名称")]),e._v(" "),a("el-input",{staticClass:"m-t-20",model:{value:e.brandName,callback:function(t){e.brandName=t},expression:"brandName"}}),e._v(" "),a("div",{staticClass:"btn-box t-rt m-t-20 m-b-10"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.saveFn}},[e._v("确定")])],1)],1)],1)},staticRenderFns:[]};var _=a("VU/8")(b,I,!1,function(e){a("fAiH")},null,null).exports,C=a("WSbm"),y=a("oncj"),k=a("Ch4/"),w=a("unF8"),S={name:"storeEstruturaContainer",components:{navCrumb:i.a,searchMenu:l.a,storeView:m,clerkView:g,employeeInfo:C.a,storeInfo:v.a,addBrand:_,clerkInfo:y.a},data:function(){return{navpath:[{name:"首页",path:"/index"},{name:"企业通讯录",path:"/administrativeFrame"},{name:"门店架构",path:""}],menuData:[],searchResult:{},loading:!0,groupInfo:{groupName:"",departmentId:""},total:0,showChildMember:!1,pageSize:20,pageNumber:1,storeList:[],tableView:1,showEmployee:"node",perId:"",storeInfo:{},disableBtn:!0,storeStatus:"",storeType:"",recycleCount:0,firstLevelId:"",gicFlag:!0}},beforeRouteUpdate:function(e,t,a){a()},methods:{handleSearchKey:function(e){var t=this,a={keyWord:e};Object(c.a)("/haoban-manage-web/store/searchpage",a).then(function(e){t.searchResult=e.data.result||{}}).catch(function(e){t.$message.error({message:e.message})})},handleEmployeeSelection:function(e,t){var a=this;return n()(r.a.mark(function s(){return r.a.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return a.perId=e.employeeClerkId,a.userId=e.brandId,a.showEmployee=t,s.next=5,a.getGicData();case 5:case"end":return s.stop()}},s,a)}))()},addBrand:function(){this.$refs.add_brand.dialogVisible=!0},addSon:function(){location.href="#/addGroup?addnew=1&type=childgroup&groupId="+this.groupInfo.departmentId+"&firstLevelId="+this.firstLevelId},goToEdit:function(e){var t=0==e?"brand":"group";location.href="#/addGroup?groupId="+this.groupInfo.departmentId+"&type="+t+"&firstLevelId="+this.firstLevelId},addSuccess:function(){this.getGroupData(),this.$refs.add_brand.dialogVisible=!1},handleStoreSelection:function(e,t){var a=this,s={storeId:e.storeId};Object(c.a)("/haoban-manage-web/store/findStoreById",s).then(function(e){1==e.data.errorCode?(a.storeInfo=e.data.result,a.groupInfo.brandId=e.data.result.brandId,a.showEmployee=t,a.getGicData()):a.$message.error({message:e.data.message})})},handleSizeChange:function(e){this.pageSize=e,this.getStoreList()},handleCurrentChange:function(e){this.pageNumber=e,this.getStoreList()},switchView:function(e){this.pageSize=20,this.pageNumber=1,this.storeList=[],this.showChildMember=!1,this.storeStatus="",this.getStoreList()},setChildMemberShow:function(e){this.showChildMember=e,this.getStoreList()},refreshClerkData:function(){this.getStoreList()},getGroupData:function(){var e=this;Object(c.a)("/haoban-manage-web/dept/deptList",{isStoreGroup:1}).then(function(t){1==t.data.errorCode?(e.menuData=t.data.result||[],t.data.result.some(function(t){return 0==t.level&&(e.groupInfo.brandId=t.brandId,e.groupInfo.departmentId=t.groupId,e.groupInfo.groupName=t.name,e.groupInfo.hasPression=t.hasPression,e.firstLevelId=t.chainId.split("-")[1],e.groupInfo.level=0),0==t.level}),e.getStoreList(),e.getGicData()):(e.menuData=[],e.loading=!1,e.$message.error({duration:1e3,message:t.data.message}))}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getStoreList:function(){var e=this;if(!e.groupInfo.departmentId)return e.loading=!1,!1;e.loading=!0;var t={storeGroupId:e.groupInfo.departmentId,showChild:1*e.showChildMember,showType:e.tableView,pageSize:e.pageSize,pageNum:e.pageNumber,status:e.storeStatus,storeType:e.storeType};Object(c.a)("/haoban-manage-web/store/findSimplePage",t).then(function(t){1==t.data.errorCode?(e.loading=!1,e.total=t.data.result.total,t.data.result.list&&t.data.result.list.length&&t.data.result.list.forEach(function(e,t){e.popVisible=!1,e.clerks&&e.clerks.length&&e.clerks.forEach(function(e,t){e.popVisible=!1})}),e.storeList=t.data.result.list||[],e.getRecycle()):(e.loading=!1,e.storeList=[],e.$message.error({duration:1e3,message:t.data.message}))}).catch(function(t){e.loading=!1,e.$message.error({duration:1e3,message:t.message})})},handleTreeSelection:function(e,t,a){this.groupInfo.departmentId=e.groupId,this.firstLevelId=e.chainId.split("-")[1],this.groupInfo.groupName=e.name,this.groupInfo.brandId=e.brandId,this.showEmployee=a,this.groupInfo.hasPression=e.hasPression,this.groupInfo.level=e.level,this.storeStatus="",this.getStoreList(),this.getRecycle(),this.getGicData()},selectByStatus:function(e){this.storeStatus=e,this.getStoreList()},selectByType:function(e){this.storeType=e,this.getStoreList()},cancelClerkInfo:function(e){e&&(this.showEmployee="")},getRecycle:function(){var e=this,t={storeGroupId:e.groupInfo.departmentId};Object(c.a)("/haoban-manage-web/store/get-recycle-count",t).then(function(t){var a=t.data;1==a.errorCode?e.recycleCount=a.result:e.$message.error({duration:1e3,message:a.message})}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},getGicData:function(){var e=this;return n()(r.a.mark(function t(){var a,s,o,n;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("store"!=(a=e).showEmployee||a.groupInfo.brandId){t.next=4;break}return a.loading=!1,t.abrupt("return",!1);case 4:if(a.userId||a.groupInfo.brandId){t.next=6;break}return t.abrupt("return",!1);case 6:return s={type:1,businessId:"employee"==a.showEmployee?a.userId:a.groupInfo.brandId},t.next=9,Object(w.a)(s);case 9:o=t.sent,1==(n=o.data).errorCode?a.gicFlag=n.result:k.a.errorMsg(n);case 12:case"end":return t.stop()}},t,e)}))()}},beforeMount:function(){this.getGroupData()},mounted:function(){this.disableBtn=!1}},D={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"common-set-wrap store-frame-wrap"},[a("nav-crumb",{attrs:{navpath:e.navpath}}),e._v(" "),a("div",{staticClass:"right-content"},[a("div",{staticClass:"right-box"},[a("div",{staticClass:"store-estrutura-container common-frame-container"},[a("search-menu",{ref:"searchMenu",attrs:{storeFrame:!0,treeData:e.menuData,searchResult:e.searchResult},on:{handleSearchKey:e.handleSearchKey,handleTreeSelection:e.handleTreeSelection,handleStoreSelection:e.handleStoreSelection,handleEmployeeSelection:e.handleEmployeeSelection}},[a("template",{slot:"buttonBox"},[a("div",{staticClass:"slot-button"},[a("el-button",{attrs:{disabled:e.disableBtn},on:{click:e.addBrand}},[e._v("新建品牌")]),e._v(" "),a("el-popover",{attrs:{placement:"right",width:"200",content:"若您的企业为集团企业,可通过新建品牌,不同品牌的门店可以创建在不同的品牌下面",trigger:"hover"}},[a("i",{staticClass:"el-icon-info",attrs:{slot:"reference"},slot:"reference"})])],1)])],2),e._v(" "),"employee"==e.showEmployee?a("clerk-info",{attrs:{gicFlag:e.gicFlag,perId:e.perId},on:{cancelClerkInfo:e.cancelClerkInfo}}):"store"==e.showEmployee?a("store-info",{ref:"store_info",attrs:{gicFlag:e.gicFlag,storeInfo:e.storeInfo}}):a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"sf-right-container common-right-container"},[a("div",{staticClass:"sf-right-header common-right-header"},[a("span",{staticClass:"title-span"},[e._v(e._s(e.groupInfo.groupName)+"("+e._s(e.total)+"家)")]),e._v(" "),a("span",{staticClass:"id-span"},[e._v("部门ID: "+e._s(e.groupInfo.departmentId))]),e._v(" "),e.gicFlag?a("el-popover",{attrs:{placement:"right",width:"200",content:"该品牌已与 GIC门店同步",trigger:"hover"}},[a("i",{staticClass:"el-icon-info",staticStyle:{color:"#c0c4cc",cursor:"pointer"},attrs:{slot:"reference"},slot:"reference"})]):e._e(),e._v(" "),e.gicFlag?e._e():a("span",{staticClass:"handle-area"},[a("el-button",{staticClass:"no-bdr-btn",on:{click:e.addSon}},[e._v(" 添加子分组 ")]),a("span",{staticClass:"hurdle"}),a("el-button",{staticClass:"no-bdr-btn",on:{click:function(t){e.goToEdit(e.groupInfo.level)}}},[e._v(" 编辑 ")])],1)],1),e._v(" "),a("div",{staticClass:"tab-div"},[a("el-radio-group",{on:{change:e.switchView},model:{value:e.tableView,callback:function(t){e.tableView=t},expression:"tableView"}},[a("el-radio-button",{attrs:{label:1}},[e._v("门店视图")]),e._v(" "),a("el-radio-button",{attrs:{label:2}},[e._v("店员视图")])],1),e._v(" "),a("a",{staticClass:"a-href fr",attrs:{href:"#/recycle?brandId="+e.groupInfo.brandId+"&dept="+e.groupInfo.departmentId+"&showChild=1&type="+e.storeType}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-delete"}},[e._v("回收站("+e._s(e.recycleCount)+")")])],1)],1),e._v(" "),a("div",[1==e.tableView?[a("store-view",{attrs:{gicFlag:e.gicFlag,tableData:e.storeList,departmentId:e.groupInfo.departmentId,brandId:e.groupInfo.brandId,firstLevelId:e.firstLevelId},on:{setChildMemberShow:e.setChildMemberShow,getStoreList:e.getStoreList}})]:[a("clerk-view",{attrs:{gicFlag:e.gicFlag,tableData:e.storeList,firstLevelId:e.firstLevelId},on:{setChildMemberShow:e.setChildMemberShow,selectByStatus:e.selectByStatus,selectByType:e.selectByType,refreshClerkData:e.refreshClerkData}})]],2),e._v(" "),e.storeList.length?a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","page-sizes":[20,40,60,80],"page-size":e.pageSize,"current-page":e.pageNumber,layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()]),e._v(" "),a("add-brand",{ref:"add_brand",on:{addSuccess:e.addSuccess}})],1)])]),e._v(" "),a("vue-gic-footer")],1)},staticRenderFns:[]};var N=a("VU/8")(S,D,!1,function(e){a("A6TM")},null,null);t.default=N.exports},A6TM:function(e,t){},ATfr:function(e,t,a){"use strict";var s=a("0xDb"),r={name:"searchMenu",components:{},props:{treeData:{type:Array,required:!0},searchResult:{type:Object,required:!0},storeFrame:{type:Boolean,default:!1}},data:function(){return{searchKey:"",searchResultShow:!1,myProps:{children:"childrens",label:"label",disabled:"disabled"},menuData:[],defaultOpen:[],defaultId:""}},methods:{clearFn:function(){this.searchResultShow=!1,this.$nextTick(function(){document.querySelector(".el-tree-node").classList.add("is-current")})},searchFn:function(){if(""==this.searchKey)return this.searchResultShow=!1,!1;this.searchResultShow=!0,this.$emit("handleSearchKey",this.searchKey)},handleNodeClick:function(e,t){e.id!=this.defaultId&&document.querySelector(".el-tree-node")&&document.querySelector(".el-tree-node").classList.remove("is-current"),this.defaultId=e.groupId,this.$emit("handleTreeSelection",e,t,"node")},selectEmployee:function(e){this.defaultId=e.employeeClerkId,this.$emit("handleEmployeeSelection",e,"employee")},handleStoreClick:function(e){this.$emit("handleStoreSelection",e,"store")}},filter:{},computed:{employeeList:function(){return this.searchResult.searchList?this.searchResult.searchList:[]},departmentList:function(){return this.searchResult.departmentList?this.searchResult.departmentList:[]},brandList:function(){return this.searchResult.brandList?this.searchResult.brandList:[]}},watch:{treeData:function(e,t){var a=this,r=Object(s.c)(e);a.defaultOpen=r.defaultOpen,a.menuData=r.menuArr,a.menuData.length&&a.$nextTick(function(){a.defaultId=a.menuData.length?a.menuData[0].id:"",document.querySelector(".el-tree-node").classList.add("is-current")})}}},o={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"searh-menu-container"},[a("div",{staticClass:"p-0-15"},[a("el-input",{attrs:{"prefix-icon":"el-icon-search",placeholder:"姓名/手机号/部门名称",clearable:""},on:{clear:e.clearFn},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.searchFn(t):null}},model:{value:e.searchKey,callback:function(t){e.searchKey=t},expression:"searchKey"}}),e._v(" "),e._t("buttonBox"),e._v(" "),e.searchResultShow?e._e():a("el-tree",{staticClass:"search-menu",attrs:{"node-key":"id","default-expanded-keys":e.defaultOpen,data:e.menuData,"highlight-current":!0,"expand-on-click-node":!1,props:e.myProps},on:{"node-click":e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.node;return t.data,a("span",{staticClass:"custom-tree-node"},[a("i",{staticClass:"iconfont",class:1==s.level?"icon-2zuzhijiagou":"icon-tongshi-zuzhijiagou"}),e._v(" "),a("span",[e._v(e._s(s.label))])])}}])})],2),e._v(" "),e.searchResultShow?a("div",{staticClass:"search-result-container m-t-15"},[e.storeFrame?[e._l(e.brandList,function(t,s){return[t.departmentList.length>0||t.storeList.length>0||t.searchList.length>0?a("div",{key:t.topDepartment.brandId+"_"+s},[a("div",[a("p",{staticClass:"brand-title"},[e._v(e._s(t.topDepartment.name))]),e._v(" "),t.departmentList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title store-frame-title"},[e._v("分组列表")]),e._v(" "),e._l(t.departmentList,function(t,s){return a("li",{key:s+"_"+t.groupId,staticClass:"group-item items",on:{click:function(a){e.handleNodeClick(t)}}},[a("i",{staticClass:"iconfont icon-tongshi-zuzhijiagou"}),e._v("\n "+e._s(t.name)+"\n ")])})],2):e._e(),e._v(" "),t.storeList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title store-frame-title"},[e._v("门店列表")]),e._v(" "),e._l(t.storeList,function(t,s){return a("li",{key:s+"_"+t.storeGroupId,staticClass:"group-item items",on:{click:function(a){e.handleStoreClick(t)}}},[a("i",{staticClass:"iconfont icon-tongshi-zuzhijiagou"}),e._v("\n "+e._s(t.storeName)+"\n ")])})],2):e._e(),e._v(" "),t.searchList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title store-frame-title"},[e._v("人员列表")]),e._v(" "),e._l(t.searchList,function(t,s){return a("li",{key:s+"_"+t.employeeClerkId,staticClass:"person-item items",on:{click:function(a){e.selectEmployee(t)}}},[a("i",{staticClass:"iconfont icon-chengyuan"}),e._v("\n "+e._s(t.name)+"\n "),a("span",{staticClass:"from-group"},[e._v(e._s(t.departmentName))])])})],2):e._e()])]):e._e()]}),e._v(" "),e.brandList.length<1?a("p",{staticClass:"no-data-tip"},[e._v("暂无数据")]):e._e()]:[e.departmentList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title"},[e._v("部门列表")]),e._v(" "),e._l(e.departmentList,function(t,s){return a("li",{key:s+"_"+t.groupId,class:["group-item items",e.defaultId==t.groupId?"active-item":""],on:{click:function(a){e.handleNodeClick(t)}}},[a("i",{staticClass:"iconfont icon-tongshi-zuzhijiagou"}),e._v("\n "+e._s(t.name)+"\n ")])})],2):e._e(),e._v(" "),e.employeeList.length>0?a("ul",{staticClass:"search-result-ul"},[a("p",{staticClass:"title"},[e._v("人员列表")]),e._v(" "),e._l(e.employeeList,function(t,s){return a("li",{key:s+"_"+t.employeeClerkId,class:["person-item items",e.defaultId==t.employeeClerkId?"active-item":""],on:{click:function(a){e.selectEmployee(t)}}},[a("i",{staticClass:"iconfont icon-chengyuan"}),e._v("\n "+e._s(t.name)+"\n "),a("span",{staticClass:"from-group"},[e._v(e._s(t.departmentName))])])})],2):e._e(),e._v(" "),e.departmentList.length<1&&e.employeeList.length<1?a("p",{staticClass:"no-data-tip"},[e._v("暂无数据")]):e._e()]],2):e._e()])},staticRenderFns:[]};var n=a("VU/8")(r,o,!1,function(e){a("MEND")},null,null);t.a=n.exports},MEND:function(e,t){},Rc4o:function(e,t){},crdp:function(e,t){},fAiH:function(e,t){},oncj:function(e,t,a){"use strict";var s=a("Ie7z"),r=a("P9l9"),o=a("XDyb"),n=a("T+u5"),i=a.n(n),l={name:"clerk-info-form",props:{isAddnew:{type:Boolean,default:!1},perId:{type:[String,Number],default:""},firstLevelId:{type:[String,Number],default:""},storeType:{type:[String,Number],default:""},gicFlag:{type:Boolean,default:!1}},components:{vueSelectStore:s.a,countryMobile:o.a},data:function(){var e=this;return{rules:{name:[{required:!0,message:"请输入店员姓名",trigger:"blur"},{min:2,max:10,message:"长度在 2 到 10 个字符",trigger:"blur"}],phoneNumber:[{required:!0,validator:function(t,a,s){if(!a)return s(new Error("请输入手机号"));var r=new i.a("+"+e.clerkInfo.nationcode+a);r.isValid()&&r.isMobile()?s():s(new Error("手机号格式不正确"))},trigger:"blur"}],storeName:[{required:!0,message:"请选择门店",trigger:"change"}],code:[{required:!0,message:"请输入code",trigger:"blur"},{min:2,max:20,message:"长度在 2 到 20 个字符",trigger:"blur"}],positionName:[{required:!0,message:"请输入店员职位",trigger:"blur"}]},clerkInfo:{storeName:"",storeId:"",managerMode:!1,positionName:"职员",nationcode:"86"},treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0,groupId:"",storeType:"",openNextBool:!0},defaultList:[]}},methods:{toInputCode:function(e){var t=this.clerkInfo.code;""!==t&&(this.clerkInfo.code=t.replace(/[^A-Za-z0-9]+/g,""))},saveFn:function(e){var t=!0;this.$refs.clerk_info.validate(function(e){e||(t=!1)}),t&&this.addEmployee(this.clerkInfo,e)},callSelector:function(){this.treeSet.dialogVisible=!0},handleSelectedList:function(e){this.clerkInfo.storeName=e&&e.length?e[0].label:"",this.clerkInfo.storeId=e&&e.length?e[0].id:"",this.$forceUpdate()},addEmployee:function(e,t){var a=this,s={name:e.name,isClerk:1,phoneNumber:e.phoneNumber,positionName:e.positionName,storeId:e.storeId,managerMode:1*e.managerMode,code:e.code,employeeClerkId:e.employeeClerkId||"",nationcode:e.nationcode},o=a.isAddnew?"/haoban-manage-web/emp/add":"/haoban-manage-web/emp/update";Object(r.a)(o,s).then(function(e){1==e.data.errorCode?(a.$message.success({message:"操作成功"}),1==t?(a.clerkInfo={name:"",isClerk:1,phoneNumber:"",positionName:"职员",storeId:"",managerMode:!1,code:"",nationcode:"86"},a.defaultList=[],a.$refs.clerk_info.resetFields()):a.$router.push("/storeFrame")):a.$message.error({message:e.data.message})}).catch(function(e){a.$message.error({message:e.message})})},cancel:function(){var e=this;this.$confirm(" 是否确认取消,取消后当前页面信息将丢失 ?","提示",{type:"warning"}).then(function(){e.$router.go(-1)}).catch(function(e){})},getClerkInfo:function(){var e=this,t={id:e.$route.query.clerkId?e.$route.query.clerkId:e.perId};Object(r.a)("/haoban-manage-web/emp/findOne",t).then(function(t){1==t.data.errorCode?(e.clerkInfo=t.data.result,e.defaultList=[{id:t.data.result.storeId,label:t.data.result.storeName}]):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t})})}},beforeMount:function(){this.treeSet.storeType=this.storeType,this.treeSet.groupId=this.firstLevelId,this.isAddnew||this.getClerkInfo()},watch:{perId:function(e,t){this.getClerkInfo(e)}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"form-container bdr-box"},[a("el-form",{ref:"clerk_info",staticClass:"add-clerk-form",attrs:{model:e.clerkInfo,rules:e.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"姓名",prop:"name"}},[a("el-input",{staticClass:"clerk-info-input",model:{value:e.clerkInfo.name,callback:function(t){e.$set(e.clerkInfo,"name",t)},expression:"clerkInfo.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号",prop:"phoneNumber"}},[a("countryMobile",{attrs:{inputWidth:380,nationCode:e.clerkInfo.nationcode,holder:"请输入手机号",disflag:!e.isAddnew},on:{"update:nationCode":function(t){e.$set(e.clerkInfo,"nationcode",t)}},model:{value:e.clerkInfo.phoneNumber,callback:function(t){e.$set(e.clerkInfo,"phoneNumber",t)},expression:"clerkInfo.phoneNumber"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"门店",prop:"storeName"}},[a("el-input",{staticClass:"clerk-info-input",attrs:{disabled:!e.isAddnew},on:{focus:e.callSelector},model:{value:e.clerkInfo.storeName,callback:function(t){e.$set(e.clerkInfo,"storeName",t)},expression:"clerkInfo.storeName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"code",prop:"code"}},[a("el-input",{staticClass:"clerk-info-input",attrs:{disabled:e.gicFlag&&!e.isAddnew},on:{blur:function(t){return e.toInputCode(t)}},model:{value:e.clerkInfo.code,callback:function(t){e.$set(e.clerkInfo,"code",t)},expression:"clerkInfo.code"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"职位",prop:"positionName"}},[a("el-input",{staticClass:"clerk-info-input",model:{value:e.clerkInfo.positionName,callback:function(t){e.$set(e.clerkInfo,"positionName",t)},expression:"clerkInfo.positionName"}})],1)],1),e._v(" "),a("div",{staticClass:"btn-box"},[a("el-button",{attrs:{type:"primary"},on:{click:e.saveFn}},[e._v("保 存")]),e._v(" "),!e.gicFlag&&e.isAddnew?a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.saveFn(1)}}},[e._v("保存并继续添加")]):e._e(),e._v(" "),e.gicFlag?e._e():a("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{selectType:"store",defaultList:e.defaultList,treeSet:e.treeSet},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var d=a("VU/8")(l,c,!1,function(e){a("Rc4o")},null,null);t.a=d.exports},p1QR:function(e,t){},qsKc:function(e,t,a){"use strict";var s=a("mvHQ"),r=a.n(s),o=a("Xxa5"),n=a.n(o),i=a("//Fk"),l=a.n(i),c=a("exGp"),d=a.n(c),u=a("P9l9"),m=a("Ie7z"),f=a("XDyb"),p=a("T+u5"),h=a.n(p),g={name:"store-detail",components:{vueSelectStore:m.a,countryMobile:f.a},props:{storeInfo:{type:Object,default:function(){return{}}},gicFlag:{type:Boolean,default:!0}},data:function(){var e=this;return{areaChainName:"",location:"",areaOptions:{},imgs:[],uploadUrl:"/haoban-manage-web/upload-img",defaultList:[],treeSet:{isSelectPerson:!1,dialogVisible:!1,isSingle:!0,groupId:this.storeInfo.brandId,openNextBool:!0},selectType:"group",disableFlag:!1,storeInfoData:this.storeInfo,rules:{storeName:[{required:!0,message:"请输入门店名称",trigger:"blur"}],departmentName:[{required:!0,message:"请选择所属分组",trigger:"blur"}],groupChainName:[{required:!0,message:"请选择部门",trigger:"change"}],imageUrls:[{type:"array",required:!0,message:"请选择门店图片",trigger:"change"}],areaId:[{required:!0,message:"请选择门店地址",trigger:"blur"}],storeType:[{required:!0,message:"请选择门店类型",trigger:"blur"}],openTime:[{required:!0,validator:function(t,a,s){return a&&e.storeInfo.closeTime?s():s(new Error("请选择营业时间"))},trigger:"blur"}],location:[{required:!0,message:"请选择经纬度",trigger:"blur"}],phoneNumber:[{required:!0,validator:function(e,t,a){return t?a():a(new Error("请输入联系电话"))},trigger:"blur"}],storeCode:[{required:!0,validator:function(e,t,a){if(t)return t.match(/[^\x00-\xff]/gi)?a(new Error("门店代码不能是中文或表情")):a();return a(new Error("请输入门店代码"))},trigger:"blur"}],managerName:[{required:!0,message:"请输入店长姓名",trigger:"blur"}],managerPhone:[{required:!0,validator:function(t,a,s){if(!a)return s(new Error("请输入手机号码"));var r=new h.a("+"+e.storeInfoData.managerNationcode+a);r.isValid()&&r.isMobile()?s():s(new Error("手机号格式不正确"))},trigger:"blur"}],managerCode:[{required:!0,validator:function(e,t,a){if(t)return t.match(/[^\x00-\xff]/gi)?a(new Error("店长代码不能是中文或表情")):a();return a(new Error("请输入店长代码"))},trigger:"blur"}],specialService:[{max:20,message:"长度在 20 个字符以内",trigger:"blur"}],personCost:[{validator:function(e,t,a){if(t)return/^\d+(\.\d+)?$/.test(1*t)?a():a(new Error("人均消费只能为非负整数或者小数"));return a()},trigger:"blur"}]}}},methods:{inputBlur:function(e){this.storeInfoData.storeArea||(this.storeInfoData.storeArea=""),this.storeInfoData.storeArea=Number(this.storeInfoData.storeArea.replace(/[^\d.]/g,""))?this.storeInfoData.storeArea.replace(/[^\d+(.\d+)]/g,""):"",this.storeInfoData.storeArea=Number(this.storeInfoData.storeArea).toFixed(2),this.storeInfoData.storeArea>=999999&&(this.storeInfoData.storeArea=Number(999999).toFixed(2))},callSelector:function(){this.treeSet={isSelectPerson:!1,dialogVisible:!0,isSingle:!0,groupId:this.storeInfoData.brandId,openNextBool:!0}},handleSelectedList:function(e){this.storeInfoData.groupChainName=e.length?e[0].chainName:"",this.storeInfoData.departmentName=e.length?e[0].label:"",this.storeInfoData.storeGroupId=e.length?e[0].id:""},selected:function(e){this.areaChainName=e.provinceName+"/"+e.cityName+"/"+e.countryName},uploadOnSuccess:function(e,t){e.file.url=e.res.result[0].qcloudImageUrl,t.push(e.file)},sortImg:function(e){this.storeInfoData.imageUrls=e},deleteImage:function(e){this.storeInfoData.imageUrls.splice(e,1)},clickToSave:function(){var e=this;return d()(n.a.mark(function t(){var a,s,r,o;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:a=e,s=new l.a(function(e,t){a.$refs.storeInfoData.validate(function(t){t&&e()})}),r=new l.a(function(e,t){a.$refs.storeManagerForm.validate(function(t){t&&e()})}),o=new l.a(function(e,t){a.$refs.storeOperateForm.validate(function(t){t&&e()})}),l.a.all([s,r,o]).then(function(){a.save()});case 5:case"end":return t.stop()}},t,e)}))()},save:function(){var e=this,t=e.location.split(",");e.storeInfoData.longitude=t[1],e.storeInfoData.latitude=2!==t.length?"":t[0],e.storeInfoData.managerPhone=e.storeInfoData.managerPhone,e.storeInfoData.areaChainName=e.areaOptions.provinceName+"/"+e.areaOptions.cityName+"/"+e.areaOptions.countryName;var a=JSON.parse(r()(e.storeInfoData)),s=[];e.storeInfoData.imageUrls.forEach(function(e){s.push(e.url)}),a.imageUrls=s.join(","),Object(u.e)("/haoban-manage-web/store/update",a).then(function(t){1==t.data.errorCode?e.$message.success({message:"操作成功!"}):e.$message.error({message:t.data.message})}).catch(function(t){e.$message.error({message:t.message})})},formatStoreInfo:function(e){this.defaultList=[{id:e.storeGroupId,label:e.departmentName}],e.managerNationcode||(e.managerNationcode="86");var t=(e.areaChainName||"").split("/");this.areaOptions={provinceName:t[0],provinceId:e.provinceId,cityName:t[1],cityId:e.cityId,countryName:t[2],countyId:e.countyId},this.imgs=e.imageUrl?e.imageUrl.split(","):[];var a=[];this.imgs.forEach(function(e){a.push({url:e})}),e.imageUrls=a,e.location=e.longitude?e.latitude+","+e.longitude:"",this.location=e.longitude?e.latitude+","+e.longitude:"",this.disableFlag=!!e.managerPhone}},watch:{storeInfo:function(e){this.treeSet.groupId=e.brandId,this.storeInfoData=e,this.formatStoreInfo(this.storeInfoData)}},beforeMount:function(){this.treeSet.groupId=this.storeInfo.brandId},mounted:function(){this.storeInfoData=JSON.parse(r()(this.storeInfo)),this.formatStoreInfo(this.storeInfoData)}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"store-info"},[a("div",{staticClass:"info-cell"},[a("p",{staticClass:"title"},[e._v("门店信息")]),e._v(" "),a("el-form",{ref:"storeInfoData",staticClass:"store-info-form info-form",attrs:{"label-width":"90px",rules:e.rules,model:e.storeInfoData}},[a("el-form-item",{attrs:{label:"门店名称",prop:"storeName"}},[a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.storeName,callback:function(t){e.$set(e.storeInfoData,"storeName",t)},expression:"storeInfoData.storeName"}},[a("template",{slot:"suffix"},[e._v("\n "+e._s(e.storeInfoData.storeName?e.storeInfoData.storeName.length:0)+"/20\n ")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"所属分组",prop:"departmentName"}},[a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},on:{focus:e.callSelector},model:{value:e.storeInfoData.groupChainName,callback:function(t){e.$set(e.storeInfoData,"groupChainName",t)},expression:"storeInfoData.groupChainName"}},[a("i",{staticClass:"el-input__icon el-icon-arrow-down",attrs:{slot:"suffix"},slot:"suffix"})])],1),e._v(" "),a("el-form-item",{attrs:{label:"门店图片(640*340)",prop:"imageUrls"}},[a("div",{staticClass:"member-upload-image"},[a("vue-office-upload-image",{attrs:{projectName:"haoban-manage-web",wxFlag:"0",actionUrl:e.uploadUrl,imageList:e.storeInfoData.imageUrls,limitW:640,limitH:340,maxImageLength:10},on:{uploadOnSuccess:e.uploadOnSuccess,sortImg:e.sortImg,deleteImage:e.deleteImage}})],1),e._v(" "),a("div",{staticClass:"tip font-12 color-909399 m-t-8 line-h-1"},[e._v("门店图片(640*340),支持.jpg,.jepg,.png类型文件,最多添加10张图片")])]),e._v(" "),a("el-form-item",{attrs:{label:"联系电话",prop:"phoneNumber"}},[a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.phoneNumber,callback:function(t){e.$set(e.storeInfoData,"phoneNumber",t)},expression:"storeInfoData.phoneNumber"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"营业时间",prop:"openTime"}},[a("el-time-select",{attrs:{placeholder:"起始时间","picker-options":{start:"00:00",step:"00:05",end:"24:00"}},model:{value:e.storeInfoData.openTime,callback:function(t){e.$set(e.storeInfoData,"openTime",t)},expression:"storeInfoData.openTime"}}),e._v("\n ~\n "),a("el-time-select",{attrs:{placeholder:"结束时间","picker-options":{start:"00:00",step:"00:05",end:"24:00",minTime:e.storeInfoData.openTime}},model:{value:e.storeInfoData.closeTime,callback:function(t){e.$set(e.storeInfoData,"closeTime",t)},expression:"storeInfoData.closeTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"门店类型",prop:"storeType"}},[a("el-radio-group",{model:{value:e.storeInfoData.storeType,callback:function(t){e.$set(e.storeInfoData,"storeType",t)},expression:"storeInfoData.storeType"}},[a("el-radio",{attrs:{label:0}},[e._v("自营")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("联营")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("代理")]),e._v(" "),a("el-radio",{attrs:{label:3}},[e._v("代销")]),e._v(" "),a("el-radio",{attrs:{label:4}},[e._v("托管")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"门店地址",prop:"areaId"}},[a("vue-office-area",{attrs:{areaOptions:e.areaOptions,projectName:"haoban-web",postUrl:"/api-admin/dict-district-list"},on:{selected:e.selected}}),e._v(" "),a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.postAddress,callback:function(t){e.$set(e.storeInfoData,"postAddress",t)},expression:"storeInfoData.postAddress"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.postAddress||"").length)+"/50")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"GPS坐标",prop:"location"}},[a("el-input",{staticClass:"w-500 m-r-10",model:{value:e.storeInfoData.location,callback:function(t){e.$set(e.storeInfoData,"location",t)},expression:"storeInfoData.location"}}),e._v(" "),a("a",{staticClass:"a-href",attrs:{href:"http://m.gpsspg.com/maps.htm",target:"_blank"}},[e._v("经纬度测试工具")])],1),e._v(" "),a("el-form-item",[a("template",{slot:"label"},[e._v("\n 门店代码\n ")]),e._v(" "),a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.storeCode,callback:function(t){e.$set(e.storeInfoData,"storeCode",t)},expression:"storeInfoData.storeCode"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.storeCode||"").length)+"/20")])],2)],2),e._v(" "),a("el-form-item",{attrs:{label:"门店面积"}},[a("el-input",{staticClass:"w-500",on:{blur:function(t){return e.inputBlur(t)}},model:{value:e.storeInfoData.storeArea,callback:function(t){e.$set(e.storeInfoData,"storeArea",t)},expression:"storeInfoData.storeArea"}}),a("span",{staticClass:"font-14 p-l-10"},[e._v("平方米")])],1)],1)],1),e._v(" "),a("div",{staticClass:"info-cell"},[a("p",{staticClass:"title"},[e._v("店长信息")]),e._v(" "),a("el-form",{ref:"storeManagerForm",staticClass:"store-manager-info-form info-form",attrs:{"label-width":"90px",rules:e.rules,model:e.storeInfoData}},[a("el-form-item",{attrs:{label:"店长姓名",prop:"managerName"}},[a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.managerName,callback:function(t){e.$set(e.storeInfoData,"managerName",t)},expression:"storeInfoData.managerName"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.managerName||"").length)+"/10")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"手机号码",prop:"managerPhone"}},[a("countryMobile",{attrs:{inputWidth:500,nationCode:e.storeInfoData.managerNationcode,holder:"请输入手机号",disflag:e.disableFlag||e.gicFlag},on:{"update:nationCode":function(t){e.$set(e.storeInfoData,"managerNationcode",t)}},model:{value:e.storeInfoData.managerPhone,callback:function(t){e.$set(e.storeInfoData,"managerPhone",t)},expression:"storeInfoData.managerPhone"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"店长性别"}},[a("el-radio-group",{attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.managerSex,callback:function(t){e.$set(e.storeInfoData,"managerSex",t)},expression:"storeInfoData.managerSex"}},[a("el-radio",{attrs:{label:1}},[e._v("男")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("女")])],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"店长代码",prop:"managerCode"}},[a("el-input",{staticClass:"w-500",attrs:{disabled:e.gicFlag},model:{value:e.storeInfoData.managerCode,callback:function(t){e.$set(e.storeInfoData,"managerCode",t)},expression:"storeInfoData.managerCode"}},[a("template",{slot:"suffix"},[e._v("\n "+e._s((e.storeInfoData.managerCode||"").length)+"/20\n ")])],2)],1)],1)],1),e._v(" "),a("div",{staticClass:"info-cell"},[a("p",{staticClass:"title"},[e._v("经营信息")]),e._v(" "),a("el-form",{ref:"storeOperateForm",staticClass:"operate-info-form info-form",attrs:{"label-width":"90px",rules:e.rules,model:e.storeInfoData}},[a("el-form-item",{attrs:{label:"特色服务"}},[a("el-input",{staticClass:"w-500",attrs:{type:"textarea",rows:2},model:{value:e.storeInfoData.specialService,callback:function(t){e.$set(e.storeInfoData,"specialService",t)},expression:"storeInfoData.specialService"}}),e._v(" "),a("p",{staticClass:"counter t-rt c-909399"},[e._v(e._s((e.storeInfoData.specialService||"").length)+"/20")])],1),e._v(" "),a("el-form-item",{attrs:{label:"人均消费"}},[a("el-input",{staticClass:"w-500",model:{value:e.storeInfoData.personCost,callback:function(t){e.$set(e.storeInfoData,"personCost",t)},expression:"storeInfoData.personCost"}},[a("template",{slot:"suffix"},[e._v(e._s((e.storeInfoData.personCost+"").length)+"/10")])],2)],1),e._v(" "),a("el-form-item",{attrs:{label:"推荐商品"}},[a("el-input",{staticClass:"w-500",attrs:{type:"textarea",rows:2},model:{value:e.storeInfoData.recommendGoods,callback:function(t){e.$set(e.storeInfoData,"recommendGoods",t)},expression:"storeInfoData.recommendGoods"}}),e._v(" "),a("p",{staticClass:"counter t-rt c-909399"},[e._v(e._s((e.storeInfoData.recommendGoods||"").length)+"/100")])],1),e._v(" "),a("el-form-item",{attrs:{label:"品牌介绍"}},[a("el-input",{staticClass:"w-500",attrs:{type:"textarea",rows:2},model:{value:e.storeInfoData.brandDes,callback:function(t){e.$set(e.storeInfoData,"brandDes",t)},expression:"storeInfoData.brandDes"}}),e._v(" "),a("p",{staticClass:"counter t-rt c-909399"},[e._v(e._s((e.storeInfoData.recommendGoods||"").length)+"/200")])],1)],1)],1),e._v(" "),a("div",{staticClass:"handle-area"},[a("el-button",{attrs:{type:"primary"},on:{click:e.clickToSave}},[e._v("保 存")])],1),e._v(" "),a("vue-select-store",{ref:"storeSelector",attrs:{defaultList:e.defaultList,treeSet:e.treeSet,selectType:e.selectType,forbidenList:[e.storeInfoData.storeGroupId]},on:{handleSelectedList:e.handleSelectedList}})],1)},staticRenderFns:[]};var b=a("VU/8")(g,v,!1,function(e){a("p1QR")},null,null);t.a=b.exports},sC3T:function(e,t){}});
\ No newline at end of file \ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,b,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],d[t]&&u.push(d[t][0]),d[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(a,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},d={81:0};function f(c){if(a[c])return a[c].exports;var d=a[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=d[e]=[a,f]});c[2]=a;var b=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:"3c616ff3462963ed6689",1:"0ebe3ead93207dc78a78",2:"fdf82093764059c1200c",3:"3282d88c1532d0ca9c9e",4:"01be0f85b0acd6f1d6df",5:"4d8ee14718aaa4455e12",6:"f23f1b5d7188825408f6",7:"57af0bc90206c6098149",8:"9bd56928cea92db3c119",9:"860dbe8cf83334f9e3c0",10:"956d97940afe04265b88",11:"2d0a192288361dd95250",12:"3d3797e96dc9e8cc5bd4",13:"c01b6415e93d21d1c19f",14:"d9f8f7e5598d599d6b6a",15:"360a92075d219ac84088",16:"bdc37aea4c14db4484c6",17:"18d7b200f29fbb0cc9c8",18:"abdaeaa2156762ec876d",19:"2b9b49e18e64eeb57067",20:"d5bc42e9568015f2689e",21:"93b01771494d9916a557",22:"e1b4bf5194bfcda1eb00",23:"9efbbc6dd315a676ce09",24:"4637a4566383d6e864cf",25:"4f9db49437ea94436d03",26:"e0b684b65d0dbf5d032b",27:"acda88d3c2aa77c9f51c",28:"e1b3c97634b8203082e4",29:"a00a8b4033e1feddfe67",30:"07a39afe8e9361ef44b8",31:"8e77909f1af264b00346",32:"ec0bbd85e6d55909453d",33:"d649a5e4d061985d1c3a",34:"629893b7dd561b646232",35:"d6f0ed32cea79ea624b3",36:"61a1c2681f78e1fd7e80",37:"b705f6c904ae182c9103",38:"401ecfbced781ca109ff",39:"45d0c177c91108351c01",40:"1fb27e8293a434b3d04d",41:"9fcb9feb2cab7a8a2cbe",42:"47c4c30ceefa4af03de5",43:"1a91709ef6c1a7d304ba",44:"12f6d6e11d29fce5030d",45:"0b5d6900b31658c66569",46:"ded26d9ea3a71492142a",47:"f40607fbf197dd764203",48:"854c6c054adb5cba1f06",49:"33530ea069fc872b0d5f",50:"331006123edd2049b7d9",51:"244dc6f576a64b7c174b",52:"3ee35b29a67a32a31d1d",53:"8ea56d269da04331dd65",54:"4b3de5b9c967cbdcb803",55:"c423570fcbf037d349d9",56:"03f9fa2efa7f832146f1",57:"ec64d57876772f26c560",58:"f8f6469b19558b91d2af",59:"014ae5d12d19afa067f5",60:"633307c153fec68e7774",61:"a6c4d42ed111c8f08d58",62:"1b7880620e9dff5a28ed",63:"02272fe3caa4b8c63c2a",64:"ebc341a9017c4b2c1112",65:"afcb60484e7a9ec39f28",66:"0c2656f4decfecb59972",67:"57f329b5a1c3658845e9",68:"ba49712f562eff6edbc3",69:"6262c1a9179f86d6e8cc",70:"d5759f121e5783b4c558",71:"95b66215f468ac6aa391",72:"b9aea07ebd1f712eee71",73:"18ea446164b9b7002fde",74:"3a4f20982bf349c4bf08",75:"9d6001a41243544ee007",76:"20c34513d3349ef2f6ee",77:"9f9f5c7a26a4045cd5f7",80:"c4a24f0beb29dbd2892a"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]); !function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,b,n){for(var r,t,o,i=0,u=[];i<a.length;i++)t=a[i],d[t]&&u.push(d[t][0]),d[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(a,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=f(f.s=n[i]);return o};var a={},d={81:0};function f(c){if(a[c])return a[c].exports;var d=a[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=d[e]=[a,f]});c[2]=a;var b=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:"3c616ff3462963ed6689",1:"0ebe3ead93207dc78a78",2:"d733065ba61b92955f46",3:"3282d88c1532d0ca9c9e",4:"01be0f85b0acd6f1d6df",5:"4d8ee14718aaa4455e12",6:"674c331ad6ca1e0d0ccf",7:"57af0bc90206c6098149",8:"9bd56928cea92db3c119",9:"860dbe8cf83334f9e3c0",10:"956d97940afe04265b88",11:"2d0a192288361dd95250",12:"3d3797e96dc9e8cc5bd4",13:"7d945bbda9ba504b9227",14:"d9f8f7e5598d599d6b6a",15:"360a92075d219ac84088",16:"bdc37aea4c14db4484c6",17:"18d7b200f29fbb0cc9c8",18:"abdaeaa2156762ec876d",19:"2b9b49e18e64eeb57067",20:"d5bc42e9568015f2689e",21:"93b01771494d9916a557",22:"e1b4bf5194bfcda1eb00",23:"9efbbc6dd315a676ce09",24:"4637a4566383d6e864cf",25:"4f9db49437ea94436d03",26:"e0b684b65d0dbf5d032b",27:"acda88d3c2aa77c9f51c",28:"e1b3c97634b8203082e4",29:"a00a8b4033e1feddfe67",30:"07a39afe8e9361ef44b8",31:"8e77909f1af264b00346",32:"ec0bbd85e6d55909453d",33:"d649a5e4d061985d1c3a",34:"629893b7dd561b646232",35:"d6f0ed32cea79ea624b3",36:"61a1c2681f78e1fd7e80",37:"b705f6c904ae182c9103",38:"401ecfbced781ca109ff",39:"45d0c177c91108351c01",40:"1fb27e8293a434b3d04d",41:"9fcb9feb2cab7a8a2cbe",42:"47c4c30ceefa4af03de5",43:"1a91709ef6c1a7d304ba",44:"12f6d6e11d29fce5030d",45:"0b5d6900b31658c66569",46:"ded26d9ea3a71492142a",47:"f40607fbf197dd764203",48:"854c6c054adb5cba1f06",49:"33530ea069fc872b0d5f",50:"331006123edd2049b7d9",51:"244dc6f576a64b7c174b",52:"3ee35b29a67a32a31d1d",53:"8ea56d269da04331dd65",54:"4b3de5b9c967cbdcb803",55:"c423570fcbf037d349d9",56:"03f9fa2efa7f832146f1",57:"ec64d57876772f26c560",58:"f8f6469b19558b91d2af",59:"014ae5d12d19afa067f5",60:"633307c153fec68e7774",61:"a6c4d42ed111c8f08d58",62:"1b7880620e9dff5a28ed",63:"02272fe3caa4b8c63c2a",64:"ebc341a9017c4b2c1112",65:"afcb60484e7a9ec39f28",66:"0c2656f4decfecb59972",67:"57f329b5a1c3658845e9",68:"ba49712f562eff6edbc3",69:"6262c1a9179f86d6e8cc",70:"d5759f121e5783b4c558",71:"95b66215f468ac6aa391",72:"b9aea07ebd1f712eee71",73:"18ea446164b9b7002fde",74:"3a4f20982bf349c4bf08",75:"9d6001a41243544ee007",76:"20c34513d3349ef2f6ee",77:"9f9f5c7a26a4045cd5f7",80:"c4a24f0beb29dbd2892a"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="./",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ No newline at end of file
...@@ -416,6 +416,7 @@ export default { ...@@ -416,6 +416,7 @@ export default {
}); });
// that.imgs = newImgs; // that.imgs = newImgs;
obj.imageUrls = newImgs; obj.imageUrls = newImgs;
obj.location = !!obj.longitude ? obj.latitude + ',' + obj.longitude : '';
that.location = !!obj.longitude ? obj.latitude + ',' + obj.longitude : ''; that.location = !!obj.longitude ? obj.latitude + ',' + obj.longitude : '';
that.disableFlag = !!obj.managerPhone? true : false; that.disableFlag = !!obj.managerPhone? true : false;
} }
......
...@@ -199,11 +199,11 @@ export default { ...@@ -199,11 +199,11 @@ export default {
}, },
cancelEdit() { cancelEdit() {
this.showEdit = false; this.showEdit = false;
this.$refs.cell_form.clearValidate(); // 清表单验证 this.$refs.cell_form.clearValidate(); // 清表单验证
let nowObj = this.fieldsInfo; let nowObj = this.fieldsInfo;
let oldObj = this.staticInfo; let oldObj = this.staticInfo;
for (let key in nowObj) { for (let key in nowObj) {
nowObj[key] = oldObj[key]; nowObj[key] = oldObj[key] == null ? '': typeof(oldObj[key]) === 'object'? oldObj[key] : String(oldObj[key]);
} }
} }
}, },
......
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