(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["server"],{"068d":function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),e.isLoading?e._e():a("a-table",{attrs:{rowKey:"category_id",columns:e.columns,dataSource:e.categoryList,defaultExpandAllRows:!0,expandIconColumnIndex:1,pagination:!1,loading:e.isLoading},scopedSlots:e._u([{key:"status",fn:function(t){return a("span",{},[a("a-tag",{attrs:{color:t?"green":""}},[e._v(e._s(t?"显示":"隐藏"))])],1)}},{key:"action",fn:function(t,r){return a("span",{},[[a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleEdit(r)}}},[e._v("编辑")]),a("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(a){return e.handleDelete(r)}}},[e._v("删除")])]],2)}}],null,!1,721492270)}),a("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),a("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=t("c7eb"),s=t("1da1"),n=(t("d3b7"),t("41ed")),l=t("2af9"),c=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"新增服务分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}]})],1),a("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("显示")]),a("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},u=[],d={components:{SelectImage:l["j"]},props:{},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,n["b"]({form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},m=d,p=t("2877"),f=Object(p["a"])(m,c,u,!1,null,null,null),h=f.exports,v=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"编辑服务分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}],attrs:{defaultList:e.record.image?[e.record.image]:[]}})],1),a("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("显示")]),a("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},g=[],b=t("2ef0"),_=t.n(b),C={components:{SelectImage:l["j"]},props:{},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,a=this.form.setFieldsValue;this.$nextTick((function(){a(_.a.pick(e,["name","image_id","status","sort"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,n["j"]({categoryId:this.record["category_id"],form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},y=C,w=Object(p["a"])(y,v,g,!1,null,null,null),x=w.exports,q={name:"Index",components:{STable:l["d"],AddForm:h,EditForm:x},data:function(){return{categoryList:[],queryParam:{},isLoading:!0,columns:[{title:"分类ID",dataIndex:"category_id"},{title:"分类名称",dataIndex:"name"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],menuList:[]}},created:function(){this.getcategoryList()},methods:{getcategoryList:function(){var e=this;this.isLoading=!0,n["e"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleAdd:function(){var e=this;return Object(s["a"])(Object(o["a"])().mark((function a(){return Object(o["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.$refs.AddForm.add();case 1:case"end":return a.stop()}}),a)})))()},handleEdit:function(e){var a=this;return Object(s["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a.$refs.EditForm.edit(e);case 1:case"end":return t.stop()}}),t)})))()},handleDelete:function(e){var a=this,t=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["g"]({categoryId:e["category_id"]}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(){return t.destroy()}))}})},handleRefresh:function(){this.getcategoryList()}}},S=q,L=Object(p["a"])(S,r,i,!1,null,null,null);a["default"]=L.exports},"0b2d":function(e,a,t){"use strict";var r=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"回收验收",width:400,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"实际回收价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{attrs:{min:0},model:{value:e.real_price,callback:function(a){e.real_price=a},expression:"real_price"}}),a("span",{staticClass:"ml-10"},[e._v("元")])],1)],1)],1)],1)},i=[],o=(t("d3b7"),t("daab")),s={components:{},props:{},data:function(){return{engineerList:[],title:"",labelCol:{span:7},order_id:"",wrapperCol:{span:13},real_price:0,visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(e){this.order_id=e.order_id,this.real_price=e.expect_price,this.visible=!0},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||(t.order_id=a.order_id,t.real_price=a.real_price,a.onFormSubmit(t))}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,o["e"]({form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},n=s,l=t("2877"),c=Object(l["a"])(n,r,i,!1,null,null,null);a["a"]=c.exports},"0f3f":function(e,a,t){"use strict";t.r(a);t("b0c0");var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-row",{staticClass:"row-item-search"},[a("a-form",{staticClass:"search-form",attrs:{layout:"inline"}},[a("a-form-item",{attrs:{label:"回收名称"}},[a("a-input",{attrs:{placeholder:"请输入回收名称"},model:{value:e.queryParam.recovery_name,callback:function(a){e.$set(e.queryParam,"recovery_name",a)},expression:"queryParam.recovery_name"}})],1),a("a-form-item",{attrs:{label:"回收分类"}},[a("a-select",{model:{value:e.queryParam.category_id,callback:function(a){e.$set(e.queryParam,"category_id",a)},expression:"queryParam.category_id"}},[a("a-select-option",{attrs:{value:0}},[e._v("全部")]),e._l(e.categoryList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t.category_id}},[e._v(e._s(t.name))])}))],2)],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.handleSearch}},[e._v("搜索")])],1)],1)],1),a("div",{staticClass:"row-item-tab clearfix"},[a("div",{staticClass:"tab-list fl-l"},[a("a-radio-group",{attrs:{defaultValue:e.queryParam.status},on:{change:e.handleTabs}},[a("a-radio-button",{attrs:{value:"0"}},[e._v("全部")]),a("a-radio-button",{attrs:{value:"1"}},[e._v("出售中")]),a("a-radio-button",{attrs:{value:"2"}},[e._v("已下架")])],1)],1),e.$auth("/goods/create")?a("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:function(a){return e.handleCreate()}}},[e._v("新增回收")]):e._e(),e.selectedRowKeys.length?a("div",{staticClass:"button-group"},[a("a-button-group",{staticClass:"ml-10"},[a("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-up"},on:{click:function(a){return e.handleUpdateStatus(e.selectedRowKeys,!0)}}},[e._v("上架")]),a("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-down"},on:{click:function(a){return e.handleUpdateStatus(e.selectedRowKeys,!1)}}},[e._v("下架")]),a("a-button",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(a){return e.handleDelete(e.selectedRowKeys)}}},[e._v("删除")])],1)],1):e._e()],1)],1),a("s-table",{ref:"table",attrs:{rowKey:"recovery_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pagination:e.pagination},scopedSlots:e._u([{key:"recovery_image",fn:function(e,t){return a("span",{},[a("a",{attrs:{title:"点击查看原图",href:t.recovery_image,target:"_blank"}},[a("img",{attrs:{width:"50",height:"50",src:t.recovery_image,alt:"回收图片"}})])])}},{key:"recovery_name",fn:function(t){return a("span",{},[a("p",{staticClass:"twoline-hide"},[e._v(e._s(t))])])}},{key:"recovery_category",fn:function(t,r){return a("span",{},[a("p",{staticClass:"twoline-hide"},[e._v(e._s(r.recovery_category))])])}},{key:"comment_rate",fn:function(t,r){return a("span",{},[a("p",{staticClass:"twoline-hide"},[e._v(e._s(r.comment_rate)+"%")])])}},{key:"status",fn:function(t,r){return a("span",{},[a("a-tag",{staticClass:"cur-p",attrs:{color:1==t?"green":"red"},on:{click:function(a){return e.handleUpdateStatus([r.recovery_id],1!=t)}}},[e._v(e._s(1==t?"上架":"下架"))])],1)}},{key:"action",fn:function(t,r){return a("span",{staticClass:"actions"},[a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleEdit(r)}}},[e._v("编辑")]),a("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(a){return e.handleDelete([r.recovery_id])}}},[e._v("删除")])])}}])}),a("add",{ref:"AddRef",on:{handleSubmit:e.handleRefresh}}),a("edit",{ref:"EditRef",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=t("c7eb"),s=t("1da1"),n=t("5530"),l=(t("d3b7"),t("daab")),c=t("2af9"),u=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"新增回收",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"回收名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["recovery_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['recovery_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"回收分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{initialValue:0,rules:[{required:!0,message:"请选择分类"}]}],expression:"['category_id', { initialValue: 0, rules: [{ required: true, message: '请选择分类' }] }]"}]},[a("a-select-option",{attrs:{value:0}},[e._v("选择分类")]),e._l(e.categoryList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t.category_id}},[e._v(e._s(t.name))])}))],2)],1),a("a-form-item",{attrs:{label:"评论数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_num",{initialValue:10,rules:[{required:!0,message:"请输入评论数量"}]}],expression:"['comment_num', { initialValue: 10, rules: [{ required: true, message: '请输入评论数量' }] }]"}],attrs:{min:10,step:10}})],1),a("a-form-item",{attrs:{label:"好评率",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_rate",{initialValue:90,rules:[{required:!0,message:"请输入好评率"}]}],expression:"['comment_rate', { initialValue: 90, rules: [{ required: true, message: '请输入好评率' }] }]"}],attrs:{min:90,step:1,max:100}}),a("span",{staticClass:"ml-10"},[e._v("%")])],1),a("a-form-item",{attrs:{label:"销量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sold",{initialValue:100,rules:[{required:!0,message:"请输入销量价格"}]}],expression:"['sold', { initialValue: 100, rules: [{ required: true, message: '请输入销量价格' }] }]"}],attrs:{min:100}}),a("span",{staticClass:"ml-10"},[e._v("个")])],1),a("a-form-item",{attrs:{label:"回收图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请上传图片"}]}],expression:"['image_id', { rules: [{ required: true, message: '请上传图片' }] }]"}]})],1),a("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("上架")]),a("a-radio",{attrs:{value:2}},[e._v("下架")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1),a("a-form-item",{attrs:{label:"详情",labelCol:e.labelCol,wrapperCol:{span:16}}},[a("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"详情不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '详情不能为空' }] }]"}]})],1)],1)],1)],1)},d=[],m={components:{SelectImage:c["j"],Ueditor:c["q"]},props:{},data:function(){return{categoryList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.getCategoryList(),this.visible=!0},getCategoryList:function(){var e=this;this.isLoading=!0,l["d"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,l["b"]({form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},p=m,f=t("2877"),h=Object(f["a"])(p,u,d,!1,null,null,null),v=h.exports,g=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"编辑回收",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"回收名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["recovery_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['recovery_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"回收分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{initialValue:0,rules:[{required:!0,message:"请选择分类"}]}],expression:"['category_id', { initialValue: 0, rules: [{ required: true, message: '请选择分类' }] }]"}]},[a("a-select-option",{attrs:{value:0}},[e._v("选择分类")]),e._l(e.categoryList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t.category_id}},[e._v(e._s(t.name))])}))],2)],1),a("a-form-item",{attrs:{label:"评论数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_num",{initialValue:10,rules:[{required:!0,message:"请输入评论数量"}]}],expression:"['comment_num', { initialValue: 10, rules: [{ required: true, message: '请输入评论数量' }] }]"}],attrs:{min:10,step:10}})],1),a("a-form-item",{attrs:{label:"好评率",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_rate",{initialValue:90,rules:[{required:!0,message:"请输入好评率"}]}],expression:"['comment_rate', { initialValue: 90, rules: [{ required: true, message: '请输入好评率' }] }]"}],attrs:{min:90,step:1,max:100}}),a("span",{staticClass:"ml-10"},[e._v("%")])],1),a("a-form-item",{attrs:{label:"销量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sold",{initialValue:10,rules:[{required:!0,message:"请输入销量价格"}]}],expression:"['sold', { initialValue: 10, rules: [{ required: true, message: '请输入销量价格' }] }]"}],attrs:{min:10}}),a("span",{staticClass:"ml-10"},[e._v("个")])],1),a("a-form-item",{attrs:{label:"图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}],attrs:{defaultList:e.record.recovery_image?e.record.recovery_image:[]}})],1),a("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("上架")]),a("a-radio",{attrs:{value:2}},[e._v("下架")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1),a("a-form-item",{attrs:{label:"详情",labelCol:e.labelCol,wrapperCol:{span:16}}},[a("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"详情不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '详情不能为空' }] }]"}]})],1)],1)],1)],1)},b=[],C={components:{SelectImage:c["j"],Ueditor:c["q"]},props:{},data:function(){return{categoryList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){var a=[];a.push({preview_url:e.recovery_image,file_id:9999}),e.recovery_image=a,this.getCategoryList(),this.visible=!0,this.record=e,this.setFieldsValue()},getCategoryList:function(){var e=this;this.isLoading=!0,l["d"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this,a=this.form.setFieldsValue;this.$nextTick((function(){a(_.pick(e.record,["recovery_name","image_id","category_id","status","sold","comment_rate","sort","comment_num","content"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,l["i"]({recoveryId:this.record["recovery_id"],form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},y=C,w=Object(f["a"])(y,g,b,!1,null,null,null),x=w.exports,q=[{title:"回收ID",dataIndex:"recovery_id"},{title:"回收图片",dataIndex:"recovery_image",scopedSlots:{customRender:"recovery_image"}},{title:"回收名称",dataIndex:"recovery_name",scopedSlots:{customRender:"recovery_name"}},{title:"回收分类",dataIndex:"recovery_category",scopedSlots:{customRender:"recovery_category"}},{title:"好评率",dataIndex:"comment_rate",scopedSlots:{customRender:"comment_rate"}},{title:"销量",dataIndex:"sold",scopedSlots:{customRender:"sold"}},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",width:"180px",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],S={name:"Index",components:{ContentHeader:c["a"],STable:c["d"],Add:v,Edit:x},data:function(){var e=this;return{searchForm:this.$form.createForm(this),categoryList:[],queryParam:{},isLoading:!1,columns:q,selectedRowKeys:[],loadData:function(a){return l["n"](Object(n["a"])(Object(n["a"])({},a),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){this.$route.query.status&&(this.queryParam.status=this.$route.query.status),this.getCategoryList()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.status=e.target.value,this.handleRefresh(!0)},handleSearch:function(e){this.handleRefresh(!0)},handleReset:function(){this.searchForm.resetFields()},getCategoryList:function(){var e=this;this.isLoading=!0,l["d"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleUpdateStatus:function(e){var a=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.isLoading=!0,l["o"]({recoveryIds:e,state:t}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(e){a.isLoading=!1}))},handleDelete:function(e){var a=this,t=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return l["g"]({serverId:e}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(e){return t.destroy()}))}})},handleCreate:function(){this.$refs.AddRef.add()},handleEdit:function(e){var a=this;return Object(s["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a.$refs.EditRef.edit(e);case 1:case"end":return t.stop()}}),t)})))()},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)}}},L=S,k=(t("1c3c6"),Object(f["a"])(L,r,i,!1,null,"769afdae",null));a["default"]=k.exports},"1c3c6":function(e,a,t){"use strict";t("3f6b5")},"3f6b5":function(e,a,t){},"4b33":function(e,a,t){"use strict";t.r(a);t("b0c0");var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-row",{staticClass:"row-item-search"},[a("a-form",{staticClass:"search-form",attrs:{layout:"inline"}},[a("a-form-item",{attrs:{label:"服务名称"}},[a("a-input",{attrs:{placeholder:"请输入服务名称"},model:{value:e.queryParam.server_name,callback:function(a){e.$set(e.queryParam,"server_name",a)},expression:"queryParam.server_name"}})],1),a("a-form-item",{attrs:{label:"服务分类"}},[a("a-select",{model:{value:e.queryParam.category_id,callback:function(a){e.$set(e.queryParam,"category_id",a)},expression:"queryParam.category_id"}},[a("a-select-option",{attrs:{value:0}},[e._v("全部")]),e._l(e.categoryList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t.category_id}},[e._v(e._s(t.name))])}))],2)],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.handleSearch}},[e._v("搜索")])],1)],1)],1),a("div",{staticClass:"row-item-tab clearfix"},[a("div",{staticClass:"tab-list fl-l"},[a("a-radio-group",{attrs:{defaultValue:e.queryParam.status},on:{change:e.handleTabs}},[a("a-radio-button",{attrs:{value:"0"}},[e._v("全部")]),a("a-radio-button",{attrs:{value:"1"}},[e._v("出售中")]),a("a-radio-button",{attrs:{value:"2"}},[e._v("已下架")])],1)],1),e.$auth("/goods/create")?a("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:function(a){return e.handleCreate()}}},[e._v("新增服务")]):e._e(),e.selectedRowKeys.length?a("div",{staticClass:"button-group"},[a("a-button-group",{staticClass:"ml-10"},[a("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-up"},on:{click:function(a){return e.handleUpdateStatus(e.selectedRowKeys,!0)}}},[e._v("上架")]),a("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-down"},on:{click:function(a){return e.handleUpdateStatus(e.selectedRowKeys,!1)}}},[e._v("下架")]),a("a-button",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(a){return e.handleDelete(e.selectedRowKeys)}}},[e._v("删除")])],1)],1):e._e()],1)],1),a("s-table",{ref:"table",attrs:{rowKey:"server_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pagination:e.pagination},scopedSlots:e._u([{key:"server_image",fn:function(e,t){return a("span",{},[a("a",{attrs:{title:"点击查看原图",href:t.server_image,target:"_blank"}},[a("img",{attrs:{width:"50",height:"50",src:t.server_image,alt:"服务图片"}})])])}},{key:"server_name",fn:function(t){return a("span",{},[a("p",{staticClass:"twoline-hide"},[e._v(e._s(t))])])}},{key:"server_category",fn:function(t,r){return a("span",{},[a("p",{staticClass:"twoline-hide"},[e._v(e._s(r.category.name))])])}},{key:"status",fn:function(t,r){return a("span",{},[a("a-tag",{staticClass:"cur-p",attrs:{color:1==t?"green":"red"},on:{click:function(a){return e.handleUpdateStatus([r.server_id],1!=t)}}},[e._v(e._s(1==t?"上架":"下架"))])],1)}},{key:"action",fn:function(t,r){return a("span",{staticClass:"actions"},[a("a",{staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleEdit(r)}}},[e._v("编辑")]),a("a",{on:{click:function(a){return e.handleDelete([r.server_id])}}},[e._v("删除")])])}}])}),a("add",{ref:"AddRef",on:{handleSubmit:e.handleRefresh}}),a("edit",{ref:"EditRef",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=t("c7eb"),s=t("1da1"),n=t("5530"),l=(t("d3b7"),t("41ed")),c=t("2af9"),u=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"新增服务",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"服务名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["server_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['server_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"服务分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{initialValue:0,rules:[{required:!0,message:"请选择分类"}]}],expression:"['category_id', { initialValue: 0, rules: [{ required: true, message: '请选择分类' }] }]"}]},[a("a-select-option",{attrs:{value:0}},[e._v("选择分类")]),e._l(e.categoryList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t.category_id}},[e._v(e._s(t.name))])}))],2)],1),a("a-form-item",{attrs:{label:"服务价格",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["server_price",{initialValue:1,rules:[{required:!0,message:"请输入服务价格"}]}],expression:"['server_price', { initialValue: 1, rules: [{ required: true, message: '请输入服务价格' }] }]"}],attrs:{min:.01,precision:2}}),a("span",{staticClass:"ml-10"},[e._v("元")])],1),a("a-form-item",{attrs:{label:"行情价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["line_price",{initialValue:1,rules:[{required:!0,message:"请输入划线价"}]}],expression:"['line_price', { initialValue: 1, rules: [{ required: true, message: '请输入划线价' }] }]"}],attrs:{min:.01,precision:2}}),a("span",{staticClass:"ml-10"},[e._v("元")])],1),a("a-form-item",{attrs:{label:"评论数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_num",{initialValue:10,rules:[{required:!0,message:"请输入评论数量"}]}],expression:"['comment_num', { initialValue: 10, rules: [{ required: true, message: '请输入评论数量' }] }]"}],attrs:{min:10,step:10}})],1),a("a-form-item",{attrs:{label:"好评率",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_rate",{initialValue:90,rules:[{required:!0,message:"请输入好评率"}]}],expression:"['comment_rate', { initialValue: 90, rules: [{ required: true, message: '请输入好评率' }] }]"}],attrs:{min:90,step:1,max:100}}),a("span",{staticClass:"ml-10"},[e._v("%")])],1),a("a-form-item",{attrs:{label:"销量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sold",{initialValue:100,rules:[{required:!0,message:"请输入销量价格"}]}],expression:"['sold', { initialValue: 100, rules: [{ required: true, message: '请输入销量价格' }] }]"}],attrs:{min:100}}),a("span",{staticClass:"ml-10"},[e._v("个")])],1),a("a-form-item",{attrs:{label:"服务图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id",{rules:[{required:!0,message:"请上传图片"}]}],expression:"['image_id', { rules: [{ required: true, message: '请上传图片' }] }]"}]})],1),a("a-form-item",{attrs:{label:"服务状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("上架")]),a("a-radio",{attrs:{value:2}},[e._v("下架")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1),a("a-form-item",{attrs:{label:"服务详情",labelCol:e.labelCol,wrapperCol:{span:16}}},[a("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"服务详情不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '服务详情不能为空' }] }]"}]})],1)],1)],1)],1)},d=[],m={components:{SelectImage:c["j"],Ueditor:c["q"]},props:{},data:function(){return{categoryList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.getCategoryList(),this.visible=!0},getCategoryList:function(){var e=this;this.isLoading=!0,l["e"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,l["c"]({form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},p=m,f=t("2877"),h=Object(f["a"])(p,u,d,!1,null,null,null),v=h.exports,g=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"编辑服务",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"服务名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["server_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['server_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"服务分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category_id",{initialValue:0,rules:[{required:!0,message:"请选择分类"}]}],expression:"['category_id', { initialValue: 0, rules: [{ required: true, message: '请选择分类' }] }]"}]},[a("a-select-option",{attrs:{value:0}},[e._v("选择分类")]),e._l(e.categoryList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t.category_id}},[e._v(e._s(t.name))])}))],2)],1),a("a-form-item",{attrs:{label:"服务价格",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["server_price",{initialValue:1,rules:[{required:!0,message:"请输入服务价格"}]}],expression:"['server_price', { initialValue: 1, rules: [{ required: true, message: '请输入服务价格' }] }]"}],attrs:{min:.01,precision:2}}),a("span",{staticClass:"ml-10"},[e._v("元")])],1),a("a-form-item",{attrs:{label:"划线价",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["line_price",{initialValue:1,rules:[{required:!0,message:"请输入划线价"}]}],expression:"['line_price', { initialValue: 1, rules: [{ required: true, message: '请输入划线价' }] }]"}],attrs:{min:.01,precision:2}}),a("span",{staticClass:"ml-10"},[e._v("元")])],1),a("a-form-item",{attrs:{label:"评论数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_num",{initialValue:10,rules:[{required:!0,message:"请输入评论数量"}]}],expression:"['comment_num', { initialValue: 10, rules: [{ required: true, message: '请输入评论数量' }] }]"}],attrs:{min:10,step:10}})],1),a("a-form-item",{attrs:{label:"好评率",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["comment_rate",{initialValue:90,rules:[{required:!0,message:"请输入好评率"}]}],expression:"['comment_rate', { initialValue: 90, rules: [{ required: true, message: '请输入好评率' }] }]"}],attrs:{min:90,step:1,max:100}}),a("span",{staticClass:"ml-10"},[e._v("%")])],1),a("a-form-item",{attrs:{label:"销量",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sold",{initialValue:100,rules:[{required:!0,message:"请输入销量价格"}]}],expression:"['sold', { initialValue: 100, rules: [{ required: true, message: '请输入销量价格' }] }]"}],attrs:{min:100}}),a("span",{staticClass:"ml-10"},[e._v("个")])],1),a("a-form-item",{attrs:{label:"服务图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}],attrs:{defaultList:e.record.server_image?e.record.server_image:[]}})],1),a("a-form-item",{attrs:{label:"服务状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("上架")]),a("a-radio",{attrs:{value:2}},[e._v("下架")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1),a("a-form-item",{attrs:{label:"服务详情",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"服务详情不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '服务详情不能为空' }] }]"}]})],1)],1)],1)],1)},b=[],C={components:{SelectImage:c["j"],Ueditor:c["q"]},props:{},data:function(){return{categoryList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){var a=[];a.push({preview_url:e.server_image,file_id:9999}),e.server_image=a,this.getCategoryList(),this.visible=!0,this.record=e,this.setFieldsValue()},getCategoryList:function(){var e=this;this.isLoading=!0,l["e"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this,a=this.form.setFieldsValue;this.$nextTick((function(){a(_.pick(e.record,["server_name","image_id","category_id","status","server_price","cost_price","sort","content","comment_rate","sold","comment_num"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,l["k"]({serverId:this.record["server_id"],form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},y=C,w=Object(f["a"])(y,g,b,!1,null,null,null),x=w.exports,q=[{title:"服务ID",dataIndex:"server_id"},{title:"服务图片",dataIndex:"server_image",scopedSlots:{customRender:"server_image"}},{title:"服务名称",dataIndex:"server_name",scopedSlots:{customRender:"server_name"}},{title:"服务分类",dataIndex:"server_category",scopedSlots:{customRender:"server_category"}},{title:"服务价格",dataIndex:"server_price",scopedSlots:{customRender:"server_price"}},{title:"划线价",dataIndex:"line_price",scopedSlots:{customRender:"cost_price"}},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",width:"180px",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],S={name:"Index",components:{ContentHeader:c["a"],STable:c["d"],Add:v,Edit:x},data:function(){var e=this;return{searchForm:this.$form.createForm(this),categoryList:[],queryParam:{},isLoading:!1,columns:q,selectedRowKeys:[],loadData:function(a){return l["p"](Object(n["a"])(Object(n["a"])({},a),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){this.$route.query.status&&(this.queryParam.status=this.$route.query.status),this.getCategoryList()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.status=e.target.value,this.handleRefresh(!0)},handleSearch:function(e){this.handleRefresh(!0)},handleReset:function(){this.searchForm.resetFields()},getCategoryList:function(){var e=this;this.isLoading=!0,l["e"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleUpdateStatus:function(e){var a=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.isLoading=!0,l["q"]({serverIds:e,state:t}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(e){a.isLoading=!1}))},handleDelete:function(e){var a=this,t=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return l["h"]({serverId:e}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(e){return t.destroy()}))}})},handleCreate:function(){this.$refs.AddRef.add()},handleEdit:function(e){var a=this;return Object(s["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a.$refs.EditRef.edit(e);case 1:case"end":return t.stop()}}),t)})))()},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)}}},L=S,k=(t("e7b0"),Object(f["a"])(L,r,i,!1,null,"b3dd6ab0",null));a["default"]=k.exports},"59ee":function(e,a,t){"use strict";t.r(a);t("b0c0");var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-row",{staticClass:"row-item-search"},[a("a-form",{staticClass:"search-form",attrs:{layout:"inline"}},[a("a-form-item",{attrs:{label:"回收名称"}},[a("a-input",{attrs:{placeholder:"请输入回收名称","allow-clear":""},model:{value:e.queryParam.recovery_name,callback:function(a){e.$set(e.queryParam,"recovery_name",a)},expression:"queryParam.recovery_name"}})],1),a("a-form-item",{attrs:{label:"用户手机号"}},[a("a-input",{attrs:{placeholder:"请输入用户手机号","allow-clear":""},model:{value:e.queryParam.user_mobile,callback:function(a){e.$set(e.queryParam,"user_mobile",a)},expression:"queryParam.user_mobile"}})],1),a("a-form-item",{attrs:{label:"订单号"}},[a("a-input",{attrs:{placeholder:"请输入订单号","allow-clear":""},model:{value:e.queryParam.order_no,callback:function(a){e.$set(e.queryParam,"order_no",a)},expression:"queryParam.order_no"}})],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.handleSearch}},[e._v("搜索")])],1)],1)],1),a("div",{staticClass:"row-item-tab clearfix"},[a("div",{staticClass:"tab-list fl-l"},[a("a-radio-group",{attrs:{defaultValue:e.queryParam.order_status},on:{change:e.handleTabs}},[a("a-radio-button",{attrs:{value:"0"}},[e._v("全部")]),e._l(e.orderStatusList,(function(t,r){return a("a-radio-button",{key:r,attrs:{value:t.value}},[e._v(e._s(t.name))])}))],2)],1)])],1),a("a-table",{attrs:{rowKey:function(e){return e.order_id},columns:e.columns,"data-source":e.list,scroll:{x:1300},bordered:"",pagination:!1},scopedSlots:e._u([{key:"recovery_name",fn:function(t,r){return a("span",{},[a("p",{staticStyle:{"white-space":"pre-wrap"}},[e._v(e._s(t))])])}},{key:"action",fn:function(t){return a("span",{staticClass:"actions"},[e.$auth("/recovery/orderDetail")?a("router-link",{attrs:{to:{path:"/recovery/order/Detail",query:{orderId:t.order_id}},target:"_blank"}},[e._v("详情")]):e._e(),10==t.order_status?a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleAcceptance(t)}}},[e._v("验收")]):e._e(),10==t.order_status||30==t.order_status?a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleDelete(t.order_id)}}},[e._v("删除")]):e._e()],1)}}])}),a("a-pagination",{staticStyle:{float:"right"},attrs:{"default-page-size":e.queryParam.pageSize,pageSizes:e.queryParam.pageSize,total:e.total,showSizeChanger:!0,showQuickJumper:!0,pageSizeOptions:e.pageSizeOptions,layout:"total, sizes, prev, pager, next, jumper",showTotal:e.showTotal},on:{showSizeChange:e.handleSizeChange,change:e.handlePageChange},model:{value:e.queryParam.page,callback:function(a){e.$set(e.queryParam,"page",a)},expression:"queryParam.page"}}),a("acceptance",{ref:"acceptance",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=(t("d3b7"),t("daab")),s=t("2af9"),n=t("0b2d"),l=[{title:"订单号",dataIndex:"order_no",width:"180px",ellipsis:!0},{title:"回收名称",dataIndex:"recovery_name",width:"200px",scopedSlots:{customRender:"recovery_name"}},{title:"回收类型",width:"90px",dataIndex:"recovery_type_text",scopedSlots:{customRender:"recovery_type_text"}},{title:"姓名",width:"90px",dataIndex:"username"},{title:"服务时间",width:"160px",dataIndex:"server_time"},{title:"手机号",width:"180px",dataIndex:"mobile"},{title:"期待价格",width:"100px",dataIndex:"expect_price"},{title:"实际回收价",width:"100px",dataIndex:"real_price"},{title:"添加时间",width:"180px",dataIndex:"create_time"},{title:"状态",dataIndex:"order_status_text",scopedSlots:{customRender:"order_status_text"}},{title:"操作",width:"120px",fixed:"right",scopedSlots:{customRender:"action"}}],c={name:"Index",components:{ContentHeader:s["a"],STable:s["d"],Acceptance:n["a"]},data:function(){return{searchForm:this.$form.createForm(this),categoryList:[],orderStatusList:[],queryParam:{order_status:"0",recovery_name:"",category_id:"",order_no:"",page:1,pageSize:15},pageSizeOptions:["15","30","50","100","200","300","400","500"],showTotal:function(e){return"共 ".concat(e," 条记录")},total:0,isLoading:!1,columns:l,selectedRowKeys:[],list:[]}},created:function(){this.$route.query.order_status&&(this.queryParam.order_status=this.$route.query.order_status),this.getOrderStatusList(),this.fetchData()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.page=1,this.queryParam.order_status=e.target.value,this.fetchData()},handleSearch:function(){this.queryParam.page=1,this.fetchData()},fetchData:function(){var e=this;this.isLoading=!0,o["l"](this.queryParam).then((function(a){e.list=a.data.list,e.total=a.data.total})).finally((function(){return e.isLoading=!1}))},handleReset:function(){this.searchForm.resetFields()},handlePageChange:function(e,a){this.queryParam.page=e,this.queryParam.pageSize=a,this.fetchData()},handleSizeChange:function(e,a){this.queryParam.page=e,this.queryParam.pageSize=a,this.fetchData()},handleCancel:function(e){var a=this,t=this.$confirm({title:"您确定要取消该订单吗?",content:"",onOk:function(){return o["c"]({orderId:e}).then((function(e){a.$message.success(e.message,1.5),a.fetchData()})).finally((function(e){return t.destroy()}))}})},handleDelete:function(e){var a=this,t=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return o["j"]({order_id:e}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(){return t.destroy()}))}})},getOrderStatusList:function(){var e=this;this.isLoading=!0,o["m"]().then((function(a){e.orderStatusList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleAcceptance:function(e){this.$refs.acceptance.add(e)},handleRefresh:function(){this.selectedRowKeys=[],this.fetchData()}}},u=c,d=(t("f1e4"),t("2877")),m=Object(d["a"])(u,r,i,!1,null,"75cc005c",null);a["default"]=m.exports},"75c2":function(e,a,t){"use strict";t.r(a);t("b0c0");var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-row",{staticClass:"row-item-search"},[a("a-form",{staticClass:"search-form",attrs:{layout:"inline"}},[a("a-form-item",{attrs:{label:"服务名称"}},[a("a-input",{attrs:{placeholder:"请输入服务名称","allow-clear":""},model:{value:e.queryParam.server_name,callback:function(a){e.$set(e.queryParam,"server_name",a)},expression:"queryParam.server_name"}})],1),a("a-form-item",{attrs:{label:"用户手机号"}},[a("a-input",{attrs:{placeholder:"请输入用户手机号","allow-clear":""},model:{value:e.queryParam.user_mobile,callback:function(a){e.$set(e.queryParam,"user_mobile",a)},expression:"queryParam.user_mobile"}})],1),a("a-form-item",{attrs:{label:"订单号"}},[a("a-input",{attrs:{placeholder:"请输入订单号","allow-clear":""},model:{value:e.queryParam.order_no,callback:function(a){e.$set(e.queryParam,"order_no",a)},expression:"queryParam.order_no"}})],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.handleSearch}},[e._v("搜索")])],1)],1)],1),a("div",{staticClass:"row-item-tab clearfix"},[a("div",{staticClass:"tab-list fl-l"},[a("a-radio-group",{attrs:{defaultValue:e.queryParam.order_status},on:{change:e.handleTabs}},[a("a-radio-button",{attrs:{value:"0"}},[e._v("全部")]),e._l(e.orderStatusList,(function(t,r){return a("a-radio-button",{key:r,attrs:{value:t.value}},[e._v(e._s(t.name))])}))],2)],1)])],1),a("a-table",{attrs:{rowKey:function(e){return e.order_id},columns:e.columns,"data-source":e.list,scroll:{x:1300},bordered:"",pagination:!1},scopedSlots:e._u([{key:"action",fn:function(t){return a("span",{staticClass:"actions"},[e.$auth("/server/OrderDetail")?a("router-link",{attrs:{to:{path:"/server/OrderDetail",query:{orderId:t.order_id}},target:"_blank"}},[e._v("详情")]):e._e(),20==t.order_status?a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleDispatch(t.order_id)}}},[e._v("派单")]):e._e(),10==t.order_status||50==t.order_status?a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleDelete(t.order_id)}}},[e._v("删除")]):e._e(),10==t.order_status||20==t.order_status?a("a",{staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleCancel(t.order_id)}}},[e._v("取消")]):e._e()],1)}}])}),a("a-pagination",{staticStyle:{float:"right"},attrs:{"default-page-size":e.queryParam.pageSize,pageSizes:e.queryParam.pageSize,total:e.total,showSizeChanger:!0,showQuickJumper:!0,pageSizeOptions:e.pageSizeOptions,layout:"total, sizes, prev, pager, next, jumper",showTotal:e.showTotal},on:{showSizeChange:e.handleSizeChange,change:e.handlePageChange},model:{value:e.queryParam.page,callback:function(a){e.$set(e.queryParam,"page",a)},expression:"queryParam.page"}}),a("dispatch",{ref:"dispatchRef",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=(t("d3b7"),t("41ed")),s=t("2af9"),n=t("8005"),l=[{title:"订单号",dataIndex:"order_no",width:"180px",ellipsis:!0},{title:"订单价格",dataIndex:"total_price"},{title:"优惠金额",dataIndex:"coupon_money"},{title:"支付金额",dataIndex:"pay_price"},{title:"订单状态",dataIndex:"order_status_text"},{title:"用户手机号",dataIndex:"user_mobile"},{title:"工程师手机号",dataIndex:"dealer_mobile"},{title:"服务名称",dataIndex:"server_name",ellipsis:!0},{title:"下单时间",width:"180px",dataIndex:"create_time",ellipsis:!0},{title:"操作",width:"150px",fixed:"right",scopedSlots:{customRender:"action"}}],c={name:"Index",components:{ContentHeader:s["a"],STable:s["d"],Dispatch:n["a"]},data:function(){return{searchForm:this.$form.createForm(this),categoryList:[],orderStatusList:[],queryParam:{order_status:"0",server_name:"",category_id:"",page:1,pageSize:15},pageSizeOptions:["15","30","50","100","200","300","400","500"],showTotal:function(e){return"共 ".concat(e," 条记录")},total:0,isLoading:!1,columns:l,selectedRowKeys:[],list:[]}},created:function(){this.$route.query.order_status&&(this.queryParam.order_status=this.$route.query.order_status),this.getOrderStatusList(),this.fetchData()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.page=1,this.queryParam.order_status=e.target.value,this.fetchData()},handleSearch:function(){this.queryParam.page=1,this.fetchData()},fetchData:function(){var e=this;this.isLoading=!0,o["n"](this.queryParam).then((function(a){e.list=a.data.list,e.total=a.data.total})).finally((function(){return e.isLoading=!1}))},handleReset:function(){this.searchForm.resetFields()},handlePageChange:function(e,a){this.queryParam.page=e,this.queryParam.pageSize=a,this.fetchData()},handleSizeChange:function(e,a){this.queryParam.page=e,this.queryParam.pageSize=a,this.fetchData()},handleCancel:function(e){var a=this,t=this.$confirm({title:"您确定要取消该订单吗?",content:"",onOk:function(){return o["d"]({orderId:e}).then((function(e){a.$message.success(e.message,1.5),a.fetchData()})).finally((function(e){return t.destroy()}))}})},getOrderStatusList:function(){var e=this;this.isLoading=!0,o["o"]().then((function(a){e.orderStatusList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleDispatch:function(e){this.$refs.dispatchRef.add(e)},handleDelete:function(e){var a=this,t=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return o["f"]({order_id:e}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(){return t.destroy()}))}})},handleRefresh:function(){this.selectedRowKeys=[],this.fetchData()}}},u=c,d=(t("cb9f"),t("2877")),m=Object(d["a"])(u,r,i,!1,null,"964da69a",null);a["default"]=m.exports},7847:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),e.isLoading?e._e():a("a-table",{attrs:{rowKey:"category_id",columns:e.columns,dataSource:e.categoryList,defaultExpandAllRows:!0,expandIconColumnIndex:1,pagination:!1,loading:e.isLoading},scopedSlots:e._u([{key:"status",fn:function(t){return a("span",{},[a("a-tag",{attrs:{color:t?"green":""}},[e._v(e._s(t?"显示":"隐藏"))])],1)}},{key:"action",fn:function(t,r){return a("span",{},[[a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleEdit(r)}}},[e._v("编辑")]),a("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(a){return e.handleDelete(r)}}},[e._v("删除")])]],2)}}],null,!1,721492270)}),a("AddForm",{ref:"AddForm",on:{handleSubmit:e.handleRefresh}}),a("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],o=t("c7eb"),s=t("1da1"),n=(t("d3b7"),t("daab")),l=t("2af9"),c=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"新增服务分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}]})],1),a("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("显示")]),a("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},u=[],d={components:{SelectImage:l["j"]},props:{},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,n["a"]({form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},m=d,p=t("2877"),f=Object(p["a"])(m,c,u,!1,null,null,null),h=f.exports,v=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"编辑服务分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}],attrs:{defaultList:e.record.image?[e.record.image]:[]}})],1),a("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("显示")]),a("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),a("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0,message:"请输入至少1个数字"}]}],expression:"['sort', { initialValue: 100, rules: [{ required: true, message: '请输入至少1个数字' }] }]"}],attrs:{min:0}})],1)],1)],1)],1)},g=[],b=t("2ef0"),_=t.n(b),C={components:{SelectImage:l["j"]},props:{},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.setFieldsValue()},setFieldsValue:function(){var e=this.record,a=this.form.setFieldsValue;this.$nextTick((function(){a(_.a.pick(e,["name","image_id","status","sort"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,n["h"]({categoryId:this.record["category_id"],form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},y=C,w=Object(p["a"])(y,v,g,!1,null,null,null),x=w.exports,q={name:"Index",components:{STable:l["d"],AddForm:h,EditForm:x},data:function(){return{categoryList:[],queryParam:{},isLoading:!0,columns:[{title:"分类ID",dataIndex:"category_id"},{title:"分类名称",dataIndex:"name"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}],menuList:[]}},created:function(){this.getcategoryList()},methods:{getcategoryList:function(){var e=this;this.isLoading=!0,n["d"]().then((function(a){e.categoryList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleAdd:function(){var e=this;return Object(s["a"])(Object(o["a"])().mark((function a(){return Object(o["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.$refs.AddForm.add();case 1:case"end":return a.stop()}}),a)})))()},handleEdit:function(e){var a=this;return Object(s["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a.$refs.EditForm.edit(e);case 1:case"end":return t.stop()}}),t)})))()},handleDelete:function(e){var a=this,t=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["f"]({categoryId:e["category_id"]}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh()})).finally((function(){return t.destroy()}))}})},handleRefresh:function(){this.getcategoryList()}}},S=q,L=Object(p["a"])(S,r,i,!1,null,null,null);a["default"]=L.exports},8005:function(e,a,t){"use strict";var r=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"派单",width:400,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"服务人员",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["dealer_id",{initialValue:0,rules:[{required:!0,message:"请选择服务人员"}]}],expression:"['dealer_id', { initialValue: 0, rules: [{ required: true, message: '请选择服务人员' }] }]"}]},[a("a-select-option",{attrs:{value:0}},[e._v("选择服务人员")]),e._l(e.engineerList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t.user_id}},[e._v(e._s(t.real_name)),t.mobile?a("span",[e._v("("+e._s(t.mobile)+") ")]):e._e()])}))],2)],1)],1)],1)],1)},i=[],o=(t("d3b7"),t("41ed")),s={components:{},props:{},data:function(){return{engineerList:[],title:"",labelCol:{span:7},order_id:"",wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(e){this.getEngineerList(),this.order_id=e,this.visible=!0},getEngineerList:function(){var e=this;this.isLoading=!0,o["l"]().then((function(a){e.engineerList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||(t.order_id=a.order_id,a.onFormSubmit(t))}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,o["i"]({form:e}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}},n=s,l=t("2877"),c=Object(l["a"])(n,r,i,!1,null,null,null);a["a"]=c.exports},a136:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("a-spin",{attrs:{spinning:e.isLoading}},[a("a-form",{attrs:{form:e.form},on:{submit:e.handleSubmit}},[a("a-form-item",{attrs:{label:"商户分类",labelCol:e.labelCol,required:""}},[a("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["category"],expression:"[`category`]"}],staticStyle:{width:"500px","margin-right":"8px","margin-top":"3px"},attrs:{placeholder:"请选择商户分类",dropdownStyle:{maxHeight:"500px",overflow:"auto"},treeData:e.formData.categoryList,treeCheckable:"",allowClear:"",treeCheckStrictly:""}})],1),a("a-form-item",{attrs:{wrapperCol:{span:e.wrapperCol.span,offset:e.labelCol.span}}},[a("a-button",{attrs:{type:"primary","html-type":"submit"}},[e._v("提交")])],1)],1)],1)],1)},i=[],o=(t("a15b"),t("d81d"),t("d3b7"),t("159b"),t("88bc"),t("8dd4")),s=t("e1fe"),n=t("ca00"),l={data:function(){return{labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,form:this.$form.createForm(this),formData:s["a"].formData,record:{}}},created:function(){var e=this;this.isLoading=!0,s["a"].getFromData().then((function(){e.isLoading=!1})),this.form.getFieldDecorator("category",{initialValue:[],preserve:!0}),this.getDetail()},methods:{setFieldsValue:function(){var e=this,a=this.record,t=this.form,r=this.$nextTick;a["goods_cate"]=this.formatCategoryIds(a.goods_cate.split(",")),!Object(n["f"])(t.getFieldsValue())&&r((function(){t.setFieldsValue({category:a.goods_cate}),e.$forceUpdate()}))},formatCategoryIds:function(e){return e.map((function(e){return{value:e}}))},getDetail:function(){var e=this;this.isLoading=!0,o["e"]().then((function(a){e.record=a.data.merchant,a.data.merchant&&e.setFieldsValue()})).finally((function(){return e.isLoading=!1}))},handleSubmit:function(e){e.preventDefault();var a=this.form.validateFields,t=this.onFormSubmit;a((function(e,a){!e&&t(a)}))},onFormSubmit:function(e){var a=this,t=[];e.category.length>0&&e.category.forEach((function(e){t.push(e.value)})),this.isLoading=!0,o["h"]({form:{goods_cate:t.length>0?t.join(","):""}}).then((function(e){a.$message.success(e.message,1.5),a.getDetail()})).catch((function(){a.isLoading=!1})).finally((function(){return a.isLoading=!1}))}}},c=l,u=(t("a491"),t("2877")),d=Object(u["a"])(c,r,i,!1,null,"0134976c",null);a["default"]=d.exports},a456:function(e,a,t){},a491:function(e,a,t){"use strict";t("f4cc")},a69f:function(e,a,t){},cb9f:function(e,a,t){"use strict";t("a69f")},daab:function(e,a,t){"use strict";t.d(a,"n",(function(){return o})),t.d(a,"b",(function(){return s})),t.d(a,"i",(function(){return n})),t.d(a,"g",(function(){return l})),t.d(a,"o",(function(){return c})),t.d(a,"d",(function(){return u})),t.d(a,"a",(function(){return d})),t.d(a,"h",(function(){return m})),t.d(a,"f",(function(){return p})),t.d(a,"l",(function(){return f})),t.d(a,"c",(function(){return h})),t.d(a,"m",(function(){return v})),t.d(a,"k",(function(){return g})),t.d(a,"e",(function(){return b})),t.d(a,"j",(function(){return _}));var r=t("b775"),i={categoryList:"/recovery/categoryList",addCategory:"/recovery/addCategory",editCategory:"/recovery/editCategory",deleteCategory:"/recovery/deleteCategory",recoveryList:"/recovery/recoveryList",addRecovery:"/recovery/addRecovery",editRecovery:"/recovery/editRecovery",deleteRecovery:"/recovery/deleteRecovery",recoveryStatus:"/recovery/recoveryStatus",recoveryDetail:"/recovery/recoveryDetail",orderList:"/recovery/orderList",cancelOrder:"/recovery/cancelOrder",orderStatus:"/recovery/orderStatus",orderDetail:"/recovery/orderDetail",orderDel:"/recovery/orderDel",completeOrder:"/recovery/completeOrder"};function o(e){return Object(r["b"])({url:i.recoveryList,method:"post",data:e})}function s(e){return Object(r["b"])({url:i.addRecovery,method:"post",data:e})}function n(e){return Object(r["b"])({url:i.editRecovery,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.deleteRecovery,method:"post",data:e})}function c(e){return Object(r["b"])({url:i.recoveryStatus,method:"post",data:e})}function u(e){return Object(r["b"])({url:i.categoryList,method:"post",params:e})}function d(e){return Object(r["b"])({url:i.addCategory,method:"post",data:e})}function m(e){return Object(r["b"])({url:i.editCategory,method:"post",data:e})}function p(e){return Object(r["b"])({url:i.deleteCategory,method:"post",data:e})}function f(e){return Object(r["b"])({url:i.orderList,method:"post",data:e})}function h(e){return Object(r["b"])({url:i.cancelOrder,method:"post",data:e})}function v(e){return Object(r["b"])({url:i.orderStatus,method:"post",data:e})}function g(e){return Object(r["b"])({url:i.orderDetail,method:"post",data:e})}function b(e){return Object(r["b"])({url:i.completeOrder,method:"post",data:e})}function _(e){return Object(r["b"])({url:i.orderDel,method:"post",data:e})}},e51b:function(e,a,t){},e7b0:function(e,a,t){"use strict";t("e51b")},f1e4:function(e,a,t){"use strict";t("a456")},f4cc:function(e,a,t){},fdab:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-row",{staticClass:"row-item-search"},[a("a-form",{staticClass:"search-form",attrs:{layout:"inline"}},[a("a-form-item",{attrs:{label:"商户名称"}},[a("a-input",{attrs:{placeholder:"请输入商户名称"},model:{value:e.queryParam.shop_name,callback:function(a){e.$set(e.queryParam,"shop_name",a)},expression:"queryParam.shop_name"}})],1),a("a-form-item",{attrs:{label:"商户标签"}},[a("a-input",{attrs:{placeholder:"请输入商户标签"},model:{value:e.queryParam.shop_label,callback:function(a){e.$set(e.queryParam,"shop_label",a)},expression:"queryParam.shop_label"}})],1),a("a-form-item",{attrs:{label:"评分"}},[a("a-select",{attrs:{placeholder:"请选择评分"},model:{value:e.queryParam.score,callback:function(a){e.$set(e.queryParam,"score",a)},expression:"queryParam.score"}},e._l([5,4,3,2,1,0],(function(t,r){return a("a-select-option",{key:r,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search"},on:{click:e.handleSearch}},[e._v("搜索")])],1)],1)],1)],1),a("div",{staticClass:"table-operator"},[a("a-button",{directives:[{name:"action",rawName:"v-action:add",arg:"add"}],attrs:{type:"primary",icon:"plus"},on:{click:e.handleAdd}},[e._v("新增")])],1),a("s-table",{ref:"table",attrs:{rowKey:"merchant_id",columns:e.columns,data:e.loadData,pagination:e.pagination,scroll:{x:1450}},scopedSlots:e._u([{key:"logoImage",fn:function(t,r){return a("span",{},[r.logoImage?a("a",{attrs:{title:"点击查看原图",href:r.logoImage.external_url,target:"_blank"}},[a("img",{attrs:{width:"50",height:"50",src:r.logoImage.external_url,alt:"商户logo"}})]):e._e()])}},{key:"shop_name",fn:function(t,r){return a("span",{staticStyle:{"white-space":"pre-line"}},[e._v(" "+e._s(r.shop_name)+" ")])}},{key:"shop_label",fn:function(t,r){return a("span",{staticStyle:{"white-space":"pre-line"}},[e._v(" "+e._s(r.shop_label)+" ")])}},{key:"is_select_mechant",fn:function(t,r){return a("span",{},[e._v(" "+e._s(r.is_select_mechant?"是":"否")+" ")])}},{key:"action",fn:function(t,r){return a("span",{},[[a("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(a){return e.handleEdit(r)}}},[e._v("编辑")]),a("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(a){return e.handleDelete(r)}}},[e._v("删除")])]],2)}}])}),a("AddForm",{ref:"AddForm",on:{handleSubmit:function(a){return e.handleRefresh(!0)}}}),a("EditForm",{ref:"EditForm",on:{handleSubmit:function(a){return e.handleRefresh()}}})],1)},i=[],o=t("c7eb"),s=t("1da1"),n=t("5530"),l=(t("d3b7"),t("8dd4")),c=t("2af9"),u=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"新增商户",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"商户图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["logo_image_id",{rules:[{required:!0,message:"请上传图片"}]}],expression:"['logo_image_id', { rules: [{ required: true, message: '请上传图片' }] }]"}]})],1),a("a-form-item",{attrs:{label:"商户名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['shop_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"商户标签",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_label",{rules:[{required:!0,min:2,max:10,message:"请输入2-10个字符"}]}],expression:"['shop_label', { rules: [{ required: true, min: 2, max: 10, message: '请输入2-10个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"公司名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["company_name",{rules:[{required:!0,message:"请输入公司名称"}]}],expression:"['company_name', { rules: [{ required: true, message: '请输入公司名称' }] }]"}]})],1),a("a-form-item",{attrs:{label:"法人名字",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person",{rules:[{required:!0,message:"请输入法人名字"}]}],expression:"['legal_person', { rules: [{ required: true, message: '请输入法人名字' }] }]"}]})],1),a("a-form-item",{attrs:{label:"手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{rules:[{required:!0,message:"请输入手机号"}]}],expression:"['phone', { rules: [{ required: true, message: '请输入手机号' }] }]"}]})],1),a("a-form-item",{attrs:{label:"营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["license_img_id",{rules:[{required:!0,message:"请上传营业执照"}]}],expression:"['license_img_id', { rules: [{ required: true, message: '请上传营业执照' }]}]"}],attrs:{multiple:""}})],1),a("a-form-item",{attrs:{label:"是否展示营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_show_license",{rules:[{required:!0,message:"请选择是否展示营业执照"}]}],expression:"['is_show_license', { rules: [{ required: true, message: '请选择是否展示营业执照' }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("是")]),a("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),a("a-form-item",{attrs:{label:"店铺评分",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["score",{rules:[{required:!0,message:"请选择评分"}]}],expression:"['score', { rules: [{ required: true, message: '请选择评分' }] }]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择评分"}},e._l(5,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("a-form-item",{attrs:{label:"绑定账号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["user_name",{rules:[{required:!0,message:"请绑定账号"}]}],expression:"['user_name', { rules: [{ required: true, message: '请绑定账号' }] }]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请绑定账号"}},e._l(e.accountList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("a-form-item",{attrs:{label:"抽佣比例",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission_ratio"],expression:"['commission_ratio']"}],attrs:{min:0,max:1e3}}),e._v(" ‰ ")],1),a("a-form-item",{staticClass:"mt-30",attrs:{label:"精选商户",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_select_mechant",{rules:[{required:!0}]}],expression:"['is_select_mechant', { rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:!0}},[e._v("是")]),a("a-radio",{attrs:{value:!1}},[e._v("否")])],1)],1)],1)],1)],1)},d=[],m=(t("a15b"),{components:{SelectImage:c["j"]},props:{},data:function(){return{accountList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this)}},methods:{add:function(){this.visible=!0,this.getUser()},getUser:function(){var e=this;l["f"]().then((function(a){e.accountList=a.data.list})).finally((function(){return e.isLoading=!1}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,l["a"]({form:Object(n["a"])(Object(n["a"])({},e),{},{license_img_id:e.license_img_id&&(Array.isArray(e.license_img_id)?e.license_img_id.join(","):e.license_img_id)||""})}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}}),p=m,f=t("2877"),h=Object(f["a"])(p,u,d,!1,null,null,null),v=h.exports,g=function(){var e=this,a=e._self._c;return a("a-modal",{attrs:{title:"新增商户",width:920,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[a("a-spin",{attrs:{spinning:e.confirmLoading}},[a("a-form",{attrs:{form:e.form}},[a("a-form-item",{attrs:{label:"商户图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["logo_image_id",{rules:[{required:!0,message:"请上传图片"}]}],expression:"['logo_image_id', { rules: [{ required: true, message: '请上传图片' }] }]"}],attrs:{defaultList:e.info.logoImage?[e.info.logoImage]:[]}})],1),a("a-form-item",{attrs:{label:"商户名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['shop_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"商户标签",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["shop_label",{rules:[{required:!0,min:2,max:10,message:"请输入2-10个字符"}]}],expression:"['shop_label', { rules: [{ required: true, min: 2, max: 10, message: '请输入2-10个字符' }] }]"}]})],1),a("a-form-item",{attrs:{label:"公司名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["company_name",{rules:[{required:!0,message:"请输入公司名称"}]}],expression:"['company_name', { rules: [{ required: true, message: '请输入公司名称' }] }]"}]})],1),a("a-form-item",{attrs:{label:"法人名字",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["legal_person",{rules:[{required:!0,message:"请输入法人名字"}]}],expression:"['legal_person', { rules: [{ required: true, message: '请输入法人名字' }] }]"}]})],1),a("a-form-item",{attrs:{label:"手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{rules:[{required:!0,message:"请输入手机号"}]}],expression:"['phone', { rules: [{ required: true, message: '请输入手机号' }] }]"}]})],1),a("a-form-item",{attrs:{label:"营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["license_img_id",{rules:[{required:!0,message:"请上传营业执照"}]}],expression:"['license_img_id', { rules: [{ required: true, message: '请上传营业执照' }]}]"}],attrs:{multiple:"",defaultList:e.info.licenseImg?e.info.licenseImg:[]}})],1),a("a-form-item",{attrs:{label:"是否展示营业执照",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_show_license",{rules:[{required:!0,message:"请选择是否展示营业执照"}]}],expression:"['is_show_license', { rules: [{ required: true, message: '请选择是否展示营业执照' }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("是")]),a("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1),a("a-form-item",{attrs:{label:"店铺评分",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["score",{rules:[{required:!0,message:"请选择评分"}]}],expression:"['score', { rules: [{ required: true, message: '请选择评分' }] }]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择评分"}},e._l(5,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("a-form-item",{attrs:{label:"绑定账号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["user_name",{rules:[{required:!0,message:"请绑定账号"}]}],expression:"['user_name', { rules: [{ required: true, message: '请绑定账号' }] }]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请绑定账号"}},e._l(e.accountList,(function(t,r){return a("a-select-option",{key:r,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("a-form-item",{attrs:{label:"抽佣比例",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["commission_ratio"],expression:"['commission_ratio']"}],attrs:{min:0,max:1e3}}),e._v(" ‰ ")],1),a("a-form-item",{staticClass:"mt-30",attrs:{label:"精选商户",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_select_mechant",{rules:[{required:!0}]}],expression:"['is_select_mechant', { rules: [{ required: true }] }]"}]},[a("a-radio",{attrs:{value:1}},[e._v("是")]),a("a-radio",{attrs:{value:0}},[e._v("否")])],1)],1)],1)],1)],1)},b=[],C=(t("07ac"),{components:{SelectImage:c["j"]},props:{},data:function(){return{accountList:[],title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),info:{}}},methods:{add:function(e){this.visible=!0,this.info=e,this.getUser(),this.setFieldsValue()},getUser:function(){var e=this;l["f"]().then((function(a){e.accountList=Object.values(a.data.list),e.accountList.unshift(e.info.user_name)})).finally((function(){return e.isLoading=!1}))},setFieldsValue:function(){var e=this,a=this.form.setFieldsValue;this.$nextTick((function(){a(_.pick(e.info,["logo","shop_name","shop_label","logo_image_id","score","user_name","commission_ratio","is_select_mechant","company_name","legal_person","phone","is_show_license"]))}))},handleSubmit:function(e){var a=this;e.preventDefault();var t=this.form.validateFields;t((function(e,t){e||a.onFormSubmit(t)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var a=this;this.confirmLoading=!0,l["c"]({form:Object(n["a"])(Object(n["a"])({merchant_id:this.info["merchant_id"]},e),{},{license_img_id:e.license_img_id&&(Array.isArray(e.license_img_id)?e.license_img_id.join(","):e.license_img_id)||""})}).then((function(t){a.$message.success(t.message,1.5),a.handleCancel(),a.$emit("handleSubmit",e)})).finally((function(e){a.confirmLoading=!1}))}}}),y=C,w=Object(f["a"])(y,g,b,!1,null,null,null),x=w.exports,q={components:{STable:c["d"],AddForm:v,EditForm:x},data:function(){var e=this;return{queryParam:{},loadData:function(a){return l["i"](Object(n["a"])(Object(n["a"])({},a),e.queryParam)).then((function(e){return e.data}))},columns:[{title:"id",dataIndex:"merchant_id"},{title:"商户logo",dataIndex:"logoImage",scopedSlots:{customRender:"logoImage"}},{title:"商户名称",width:"150px",dataIndex:"shop_name",scopedSlots:{customRender:"shop_name"}},{title:"商户标签",width:"150px",dataIndex:"shop_label",scopedSlots:{customRender:"shop_label"}},{title:"账号名称",dataIndex:"user_name"},{title:"精选商户",dataIndex:"is_select_mechant",scopedSlots:{customRender:"is_select_mechant"}},{title:"评分",dataIndex:"score"},{title:"累计金额",dataIndex:"total_amount"},{title:"可用金额",dataIndex:"available_amount"},{title:"添加时间",width:"150px",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"120px",scopedSlots:{customRender:"action"}}]}},created:function(){},methods:{handleAdd:function(){var e=this;return Object(s["a"])(Object(o["a"])().mark((function a(){return Object(o["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.$refs.AddForm.add();case 1:case"end":return a.stop()}}),a)})))()},handleEdit:function(e){var a=this;return Object(s["a"])(Object(o["a"])().mark((function t(){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:a.$refs.EditForm.add(e);case 1:case"end":return t.stop()}}),t)})))()},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},handleSearch:function(e){this.handleRefresh(!0)},handleDelete:function(e){var a=this,t=this.$confirm({title:"您确定要删除该商户吗?",content:"删除后不可恢复",onOk:function(){return l["b"]({merchantId:e["merchant_id"]}).then((function(e){a.$message.success(e.message,1.5),a.handleRefresh(!0)})).finally((function(){return t.destroy()}))}})}}},S=q,L=Object(f["a"])(S,r,i,!1,null,null,null);a["default"]=L.exports}}]);