Files
oil/server-tp6/public/store/js/goods.8a836fa3.js
T
vipnub 45452c1799 1、合作商余额查询
2、分油账户司机可用额度
2026-10-08 23:12:33 +08:00

1 line
184 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["goods"],{"03eb":function(e,t,a){},"0573":function(e,t,a){},"07d4":function(e,t,a){"use strict";a("3f22")},"07dd":function(e,t,a){},"08a5":function(e,t,a){"use strict";var r=a("5530"),i=(a("d3b7"),a("3ca3"),a("ddb0"),a("25f0"),a("a9e3"),a("2ef0")),s=a.n(i),o=a("e533");t["a"]={partnersId:null,formData:{partners:{}},getFromData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.partnersId=t,new Promise((function(a,r){Promise.all([e.getPartnersDetail(t)]).then((function(){e.setDefaultData(),a({formData:e.formData})}))}))},getPartnersDetail:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!!t&&new Promise((function(a,r){o["d"]({partnersId:t}).then((function(t){e.formData.partners=t.data.partnersInfo,a()}))}))},getFieldsValue:function(){var e=this.formData.partners,t=s.a.pick(e,["partners_id","name","address","contact_name","contact_tel","appKey","callback","create_time"]);t.callback=t.callback.toString();var a=Number(e.qyt_enterprise_id||0);return Object(r["a"])(Object(r["a"])({},t),{},{qyt_enterprise_id:a>0?a:void 0})},setDefaultData:function(){}}},"12e9":function(e,t,a){"use strict";a("b91a")},1788:function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"商品名称"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsName"],expression:"['goodsName']"}],attrs:{placeholder:"请输入商品名称"}})],1),t("a-form-item",{attrs:{label:"商品编码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsNo"],expression:"['goodsNo']"}],attrs:{placeholder:"请输入商品编码"}})],1),t("a-form-item",{attrs:{label:"商品分类"}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["categoryId",{initialValue:0}],expression:"['categoryId', { initialValue: 0 }]"}],attrs:{treeData:e.categoryListTree,dropdownStyle:{maxHeight:"500px",overflow:"auto"},allowClear:""}})],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),t("div",{staticClass:"row-item-tab clearfix"},[t("div",{staticClass:"tab-list fl-l"},[t("a-radio-group",{attrs:{defaultValue:e.queryParam.listType},on:{change:e.handleTabs}},[t("a-radio-button",{attrs:{value:"all"}},[e._v("全部")]),t("a-radio-button",{attrs:{value:"on_sale"}},[e._v("出售中")]),t("a-radio-button",{attrs:{value:"off_sale"}},[e._v("已下架")]),t("a-radio-button",{attrs:{value:"sold_out"}},[e._v("已售罄")])],1)],1),e.$auth("/goods/create")?t("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:e.handleCreate}},[e._v("创建商品")]):e._e(),e.selectedRowKeys.length?t("div",{staticClass:"button-group"},[t("a-button-group",{staticClass:"ml-10"},[t("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-up"},on:{click:function(t){return e.handleUpdateStatus(e.selectedRowKeys,!0)}}},[e._v("上架")]),t("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-down"},on:{click:function(t){return e.handleUpdateStatus(e.selectedRowKeys,!1)}}},[e._v("下架")]),t("a-button",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(t){return e.handleDelete(e.selectedRowKeys)}}},[e._v("删除")])],1)],1):e._e()],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"goods_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pageSize:15,scroll:{x:1450}},scopedSlots:e._u([{key:"goods_image",fn:function(e){return t("span",{},[t("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[t("img",{attrs:{width:"50",height:"50",src:e,alt:"商品图片"}})])])}},{key:"goods_name",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(a))])])}},{key:"oilCardType",fn:function(a){return t("span",{},[t("p",[e._v(e._s(e.OilCardTypeEnum[a].name))])])}},{key:"status",fn:function(a,r){return t("span",{},[t("a-tag",{staticClass:"cur-p",attrs:{color:10==a?"green":"red"},on:{click:function(t){return e.handleUpdateStatus([r.goods_id],10!=a)}}},[e._v(e._s(10==a?"上架":"下架"))])],1)}},{key:"action",fn:function(a,r){return t("div",{staticClass:"actions"},[t("router-link",{attrs:{to:{path:"/goods/update",query:{goodsId:r.goods_id}}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete([r.goods_id])}}},[e._v("删除")])],1)}}])})],1)},i=[],s=a("5530"),o=(a("d3b7"),a("ca00")),n=a("d084"),l=a("2af9"),c=a("8243"),u=a("4a95"),d=[{title:"商品ID",dataIndex:"goods_id"},{title:"省份",dataIndex:"province"},{title:"卡券类型",dataIndex:"oilCardType",scopedSlots:{customRender:"oilCardType"}},{title:"商品图片",dataIndex:"goods_image",scopedSlots:{customRender:"goods_image"}},{title:"商品名称",dataIndex:"goods_name",width:"200px",scopedSlots:{customRender:"goods_name"}},{title:"商品编码",dataIndex:"goods_no",width:"100px",scopedSlots:{customRender:"goods_no"}},{title:"商品价格",dataIndex:"goods_price_min",scopedSlots:{customRender:"goods_price_min"}},{title:"总销量",dataIndex:"sales_actual"},{title:"库存总量",dataIndex:"stock_total"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"添加时间",width:"180px",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"150px",fixed:"right",scopedSlots:{customRender:"action"}}],m={name:"Index",components:{ContentHeader:l["a"],STable:l["c"]},data:function(){var e=this;return{searchForm:this.$form.createForm(this),categoryListTree:[],queryParam:{listType:"all"},isLoading:!1,columns:d,selectedRowKeys:[],loadData:function(t){return n["f"](Object(s["a"])(Object(s["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},beforeCreate:function(){Object(o["a"])(this,{OilCardTypeEnum:u["c"]})},created:function(){this.$route.query.listType&&(this.queryParam.listType=this.$route.query.listType),this.getCategoryList()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleTabs:function(e){this.queryParam.listType=e.target.value,this.handleRefresh(!0)},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(s["a"])(Object(s["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},handleReset:function(){this.searchForm.resetFields()},getCategoryList:function(){var e=this;this.isLoading=!0,c["a"].getListFromScreen().then((function(t){e.categoryListTree=t})).finally((function(t){e.isLoading=!1}))},handleUpdateStatus:function(e){var t=this,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.$auth("/goods/index.status"))return!1;this.isLoading=!0,n["j"]({goodsIds:e,state:a}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){t.isLoading=!1}))},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return n["c"]({goodsIds:e}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){a.destroy()}))}})},handleCreate:function(){this.$router.push("/goods/create")},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)}}},p=m,f=(a("1ff6"),a("2877")),h=Object(f["a"])(p,r,i,!1,null,"e4020f40",null);t["default"]=h.exports},"1a56":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"用户电话"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["search"],expression:"['search']"}],attrs:{placeholder:"请输入用户电话"}})],1),t("a-form-item",{attrs:{label:"订单时间"}},[t("a-range-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["betweenTime"],expression:"['betweenTime']"}],attrs:{format:"YYYY-MM-DD"}})],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"log_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15},scopedSlots:e._u([{key:"order_type",fn:function(a){return t("span",{},[t("a-tag",[e._v(e._s(e.TypeEnum[a].name))])],1)}},{key:"goods",fn:function(e){return t("span",{},[t("GoodsItem",{attrs:{data:{image:e.images[0].file.preview_url,imageAlt:"商品图片",title:e.goods_name,goods_no:e.goods_no,goodsProps:e.goods_props}}})],1)}},{key:"user",fn:function(e){return t("span",{},[t("UserItem",{attrs:{user:e}})],1)}},{key:"merchant",fn:function(a){return t("span",{},[t("p",[e._v(e._s(a.name))])])}}])})],1)},i=[],s=a("5530"),o=a("b775"),n={list:"/merchant.order/list"};function l(e){return Object(o["b"])({url:n.list,method:"get",params:e})}var c=a("ab09"),u=a("5c06"),d=new u["a"]([{key:"TICKET",name:"油券",value:"zsy_ticket"},{key:"COUPON",name:"优惠券",value:"coupon"}]),m={name:"Index",components:{STable:c["b"],GoodsItem:c["a"],UserItem:c["c"]},data:function(){var e=this;return{TypeEnum:d,searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:[{title:"ID",dataIndex:"merchant_order_id"},{title:"订单编号",dataIndex:"order_no",scopedSlots:{customRender:"order_no"}},{title:"订单类型",dataIndex:"order_type",scopedSlots:{customRender:"order_type"}},{title:"订单金额",dataIndex:"order_price"},{title:"商品信息",dataIndex:"goods",scopedSlots:{customRender:"goods"}},{title:"买家",dataIndex:"user",scopedSlots:{customRender:"user"}},{title:"代理商",dataIndex:"merchant",scopedSlots:{customRender:"merchant"}},{title:"管理员备注",width:"260px",dataIndex:"admin_remark"},{title:"订单时间",dataIndex:"create_time"}],loadData:function(t){return l(Object(s["a"])(Object(s["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(s["a"])(Object(s["a"])({},t.queryParam),a),t.handleRefresh(!0))}))}}},p=m,f=(a("91bf"),a("2877")),h=Object(f["a"])(p,r,i,!1,null,"bfa4e59e",null);t["default"]=h.exports},"1ff6":function(e,t,a){"use strict";a("94a3")},"24ba":function(e,t,a){},"252a":function(e,t,a){},"28d5":function(e,t,a){},"2aba":function(e,t,a){"use strict";a("c095")},"2e1c":function(e,t,a){"use strict";a.d(t,"e",(function(){return s})),a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return n})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return c}));var r=a("b775"),i={list:"/user.grade/list",all:"/user.grade/all",add:"/user.grade/add",edit:"/user.grade/edit",delete:"/user.grade/delete"};function s(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function o(e){return Object(r["b"])({url:i.all,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function c(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"2eff":function(e,t,a){"use strict";var r=a("5530"),i=(a("d3b7"),a("3ca3"),a("ddb0"),a("25f0"),a("2ef0")),s=a.n(i),o=a("fab29");t["a"]={userId:null,formData:{user:{},merchantList:[]},getFromData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.userId=t,new Promise((function(a,r){Promise.all([e.getUserDetail(t),e.getMerchantList()]).then((function(){e.setDefaultData(),a({formData:e.formData})}))}))},getUserDetail:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!!t&&new Promise((function(a,r){o["c"]({userId:t}).then((function(t){e.formData.user=t.data.userInfo,a()}))}))},getFieldsValue:function(){var e=this.formData.user,t=s.a.pick(e,["user_id","userNo","userType","userIdCard","platform","create_time"]);return t.callback=t.callback.toString(),Object(r["a"])({},t)},getMerchantList:function(){var e=this;return new Promise((function(t,a){o["g"]().then((function(a){e.formData.merchantList=a.data.list,t()}))}))},setDefaultData:function(){}}},"335a":function(e,t,a){"use strict";a("565a")},3669:function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"商户",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["merchant_id",{rules:[{required:!0,message:"请选择商户"}]}],expression:"['merchant_id', {rules: [{required: true, message: '请选择商户'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择商户"}},e._l(e.formData.merchantList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.merchant_id}},[e._v(e._s(a.name))])})),1)],1),t("a-form-item",{attrs:{label:"用户角色",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["userType",{rules:[{required:!0,message:"请选择用户角色"}]}],expression:"['userType', {rules: [{required: true, message: '请选择用户角色'}]}]"}],attrs:{placeholder:"请选择用户角色"}},e._l(["user","admin"],(function(a,r){return t("a-select-option",{key:r,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("a-form-item",{attrs:{label:"用户名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["userName",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['userName', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入用户名称"}})],1),t("a-form-item",{attrs:{label:"用户手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mobile",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['mobile', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入用户手机号"}})],1),t("a-form-item",{attrs:{label:"用户身份证号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["userIdCard",{rules:[{required:!1}]}],expression:"['userIdCard', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入用户身份证号"}})],1)],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=(a("d3b7"),a("fab29")),o=a("2eff"),n={components:{},data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),formData:o["a"].formData}},created:function(){var e=this;this.isLoading=!0,o["a"].getFromData().then((function(){e.isLoading=!1}))},methods:{onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){return e?(t.onTargetTabError(e),!1):(t.onFormSubmit(a),!0)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,s["a"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))}}},l=n,c=(a("d17a"),a("2877")),u=Object(c["a"])(l,r,i,!1,null,"95fdaa1e",null);t["default"]=u.exports},3686:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("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():t("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(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"显示":"隐藏"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}],null,!1,1032135766)}),t("AddForm",{ref:"AddForm",attrs:{categoryList:e.categoryList,provinceList:e.provinceList},on:{handleSubmit:e.handleRefresh}}),t("EditForm",{ref:"EditForm",attrs:{categoryList:e.categoryList,provinceList:e.provinceList},on:{handleSubmit:e.handleRefresh}})],1)},i=[],s=(a("d3b7"),a("2f71")),o=a("2af9"),n=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"新增商品分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("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),t("a-form-item",{attrs:{label:"上级分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id",{initialValue:0}],expression:"['parent_id', {initialValue: 0}]"}],attrs:{treeData:e.categoryListTree,dropdownStyle:{maxHeight:"400px",overflow:"auto"},allowClear:""}})],1),t("a-form-item",{attrs:{label:"所属省份",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["province",{rules:[{message:"请选择所属省份"}]}],expression:"['province', {rules: [{message: '请选择所属省份'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择所属省份"}},[t("a-select-option",{key:"",attrs:{value:""}},[e._v("不限")]),e._l(e.provinceList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a}},[e._v(e._s(a))])}))],2)],1),t("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}]})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', {initialValue: 1, rules: [{required: true}]}]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("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)},l=[],c=(a("99af"),a("8243")),u={components:{SelectImage:o["e"]},props:{categoryList:{type:Array,required:!0},provinceList:{type:Array,required:!0}},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),categoryListTree:[]}},methods:{add:function(){this.visible=!0,this.getCategoryList()},getCategoryList:function(){var e=this.categoryList,t=c["a"].formatTreeData(e);this.categoryListTree=[{title:"顶级分类",key:0,value:0}].concat(t)},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["a"]({form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},d=u,m=a("2877"),p=Object(m["a"])(d,n,l,!1,null,null,null),f=p.exports,h=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"编辑商品分类",width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"分类名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("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),t("a-form-item",{attrs:{label:"上级分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["parent_id"],expression:"['parent_id']"}],attrs:{treeData:e.categoryListTree,dropdownStyle:{maxHeight:"400px",overflow:"auto"},allowClear:""}})],1),t("a-form-item",{attrs:{label:"分类图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["image_id"],expression:"['image_id']"}],attrs:{defaultList:e.record.image?[e.record.image]:[]}})],1),t("a-form-item",{attrs:{label:"所属省份",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["province",{rules:[{message:"请选择所属省份"}]}],expression:"['province', {rules: [{message: '请选择所属省份'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择所属省份"}},[t("a-select-option",{key:"",attrs:{value:""}},[e._v("不限")]),e._l(e.provinceList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a}},[e._v(e._s(a))])}))],2)],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', { initialValue: 1, rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("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)},v=[],b=a("2ef0"),_=a.n(b),g={components:{SelectImage:o["e"]},props:{categoryList:{type:Array,required:!0},provinceList:{type:Array,required:!0}},data:function(){return{title:"",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),categoryListTree:[],record:{}}},methods:{edit:function(e){this.visible=!0,this.record=e,this.getCategoryList(),this.setFieldsValue()},setFieldsValue:function(){var e=this.record,t=this.form.setFieldsValue;this.$nextTick((function(){t(_.a.pick(e,["name","parent_id","image_id","status","province","sort"]))}))},getCategoryList:function(){var e=this.categoryList,t=c["a"].formatTreeData(e);this.categoryListTree=[{title:"顶级分类",key:0,value:0}].concat(t)},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){e||t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,s["c"]({categoryId:this.record["category_id"],form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},C=g,y=Object(m["a"])(C,h,v,!1,null,null,null),w=y.exports,x=a("d084"),L={name:"Index",components:{STable:o["c"],AddForm:f,EditForm:w},data:function(){return{categoryList:[],provinceList:[],queryParam:{},isLoading:!1,columns:[{title:"分类ID",dataIndex:"category_id"},{title:"分类名称",dataIndex:"name"},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"省份",dataIndex:"province"},{title:"排序",dataIndex:"sort"},{title:"添加时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"180px",scopedSlots:{customRender:"action"}}]}},created:function(){this.getCategoryList(!0),this.getProvinceList()},methods:{getCategoryList:function(e){var t=this;e&&(this.isLoading=!0),s["d"]().then((function(e){t.categoryList=e.data.list})).finally((function(e){t.isLoading=!1}))},getProvinceList:function(){var e=this;return new Promise((function(t,a){x["i"]().then((function(a){e.provinceList=a.data.list,t()}))}))},handleAdd:function(){this.$refs.AddForm.add()},handleEdit:function(e){this.$refs.EditForm.edit(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return s["b"]({categoryId:e["category_id"]}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){a.destroy()}))}})},handleRefresh:function(){this.getCategoryList()}}},S=L,k=Object(m["a"])(S,r,i,!1,null,null,null);t["default"]=k.exports},"38b4":function(e,t,a){"use strict";a("0573")},"39ad9":function(e,t,a){"use strict";a.d(t,"f",(function(){return s})),a.d(t,"b",(function(){return o})),a.d(t,"d",(function(){return n})),a.d(t,"g",(function(){return l})),a.d(t,"a",(function(){return c})),a.d(t,"e",(function(){return u})),a.d(t,"c",(function(){return d}));var r=a("b775"),i={list:"/market.coupon/list",all:"/market.coupon/all",detail:"/market.coupon/detail",receive:"/market.coupon/receive",add:"/market.coupon/add",edit:"/market.coupon/edit",delete:"/market.coupon/delete"};function s(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function o(e){return Object(r["b"])({url:i.all,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.detail,method:"get",params:e})}function l(e){return Object(r["b"])({url:i.receive,method:"get",params:e})}function c(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function u(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function d(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"39f0":function(e,t,a){"use strict";a("9f7c")},"3f22":function(e,t,a){},"3f55":function(e,t,a){"use strict";a("28d5")},4207:function(e,t,a){"use strict";a("6ab0")},4211:function(e,t,a){"use strict";a("60be")},"43de":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"代理商名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("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个字符'}]}]"}],attrs:{placeholder:"请输入代理商名称"}})],1),t("a-form-item",{attrs:{label:"代理商地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["address",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['address', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入代理商地址"}})],1),t("a-form-item",{attrs:{label:"联系人",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_name",{rules:[{required:!1}]}],expression:"['contact_name', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系人"}})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_tel",{rules:[{required:!1}]}],expression:"['contact_tel', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系电话"}})],1)],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=(a("d3b7"),a("c519")),o=a("86e8"),n={components:{},data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),formData:o["a"].formData}},created:function(){var e=this;this.isLoading=!0,o["a"].getFromData().then((function(){e.isLoading=!1}))},methods:{onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){return e?(t.onTargetTabError(e),!1):(t.onFormSubmit(a),!0)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,s["a"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))}}},l=n,c=(a("b551"),a("2877")),u=Object(c["a"])(l,r,i,!1,null,"0519cf39",null);t["default"]=u.exports},"459d":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"商户",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["merchant_id",{rules:[{required:!0,message:"请选择商户"}]}],expression:"['merchant_id', {rules: [{required: true, message: '请选择商户'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择商户"}},e._l(e.formData.merchantList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.merchant_id}},[e._v(e._s(a.name))])})),1),t("div",{staticClass:"form-item-help"},[t("router-link",{attrs:{target:"_blank",to:{path:"/shop/create"}}},[e._v("新增店铺")]),t("a",{attrs:{href:"javascript:;"},on:{click:e.onReloadShopList}},[e._v("刷新")])],1)],1),t("a-form-item",{attrs:{label:"用户角色",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["userType",{rules:[{required:!0,message:"请选择用户角色"}]}],expression:"['userType', {rules: [{required: true, message: '请选择用户角色'}]}]"}],attrs:{placeholder:"请选择用户角色"}},e._l(["user","admin"],(function(a,r){return t("a-select-option",{key:r,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("a-form-item",{attrs:{label:"用户名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["userName",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['userName', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入用户名称"}})],1),t("a-form-item",{attrs:{label:"用户手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mobile",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['mobile', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入用户手机号"}})],1),t("a-form-item",{attrs:{label:"用户身份证号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["userIdCard",{rules:[{required:!1}]}],expression:"['userIdCard', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入用户身份证号"}})],1)],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=(a("d3b7"),a("fab29")),o=a("2af9"),n=a("2eff"),l=a("ca00"),c={components:{InputNumberGroup:o["b"]},data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),userId:null,formData:n["a"].formData}},created:function(){this.initData()},beforeDestroy:function(){n["a"].formData.user={}},methods:{initData:function(){var e=this;this.userId=this.$route.query.userId,this.isLoading=!0,n["a"].getFromData(this.userId).then((function(){Object(l["f"])(e.form.getFieldsValue())||e.form.setFieldsValue(n["a"].getFieldsValue()),e.isLoading=!1}))},onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){return e?(t.onTargetTabError(e),!1):(t.onFormSubmit(a),!0)}))},onTargetTabError:function(e){},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,s["d"]({userId:this.userId,form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))}}},u=c,d=(a("b126"),a("2877")),m=Object(d["a"])(u,r,i,!1,null,"a3fe5cd4",null);t["default"]=m.exports},"45b7":function(e,t,a){"use strict";a("b0c0");var r=function(){var e=this,t=e._self._c;return t("div",[t("a-form-item",{attrs:{label:"优惠券",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"sku-batch"},[t("a-button",{on:{click:e.handleAddCoupon}},[e._v("添加优惠券")])],1),t("a-table",{staticClass:"sku-list",attrs:{columns:e.columns,dataSource:e.multiCouponData,scroll:{x:!0},pagination:!1,bordered:"",rowKey:"row_id"},scopedSlots:e._u([{key:"coupon_id",fn:function(a,r){return[t("a-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择优惠券"},on:{change:e.emitChange},model:{value:r.coupon_id,callback:function(t){e.$set(r,"coupon_id",t)},expression:"item.coupon_id"}},e._l(e.couponList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.coupon_id}},[e._v(" "+e._s(a.name)+" ")])})),1)]}},{key:"send_num",fn:function(a,r){return[t("a-input-number",{attrs:{size:"small",min:0,precision:0},on:{change:e.emitChange},model:{value:r.send_num,callback:function(t){e.$set(r,"send_num",t)},expression:"item.send_num"}})]}},{key:"action",fn:function(a,r){return[t("a",{on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])]}}])})],1)],1)},i=[],s=a("5530"),o=(a("d81d"),a("4de4"),a("d3b7"),a("4d91")),n=[{title:"优惠券",dataIndex:"coupon_id",width:120,scopedSlots:{customRender:"coupon_id"}},{title:"数量",dataIndex:"send_num",width:120,scopedSlots:{customRender:"send_num"}},{title:"操作",dataIndex:"action",width:"150px",scopedSlots:{customRender:"action"}}],l={props:{couponList:o["a"].any,defaultCouponList:o["a"].array.def([]),isCouponLocked:o["a"].bool.def(!1)},data:function(){return{columns:n,labelCol:{span:3},wrapperCol:{span:21},multiCouponData:[]}},watch:{defaultCouponList:function(e){e.length&&this.getData()}},created:function(){this.getData()},methods:{getData:function(){this.multiCouponData=this.defaultCouponList.map((function(e,t){return Object(s["a"])(Object(s["a"])({},e),{},{row_id:e.row_id||Date.now()+t})})),this.emitChange()},handleAddCoupon:function(){this.multiCouponData.push({coupon_id:null,send_num:1,row_id:Date.now()}),this.emitChange()},handleDelete:function(e){this.multiCouponData=this.multiCouponData.filter((function(t){return t!==e})),this.emitChange()},emitChange:function(){this.$emit("change",this.multiCouponData)}}},c=l,u=(a("4207"),a("2877")),d=Object(u["a"])(c,r,i,!1,null,"c7587ee2",null);t["a"]=d.exports},4603:function(e,t,a){"use strict";a("dd9f")},5193:function(e,t,a){},"52ea":function(e,t,a){"use strict";a("07dd")},"55c4":function(e,t,a){"use strict";a("ab64")},"565a":function(e,t,a){},"5b64":function(e,t,a){"use strict";a("f040")},"5bd3":function(e,t,a){},"5cd2":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"合作商名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("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个字符'}]}]"}],attrs:{placeholder:"请输入合作商名称"}})],1),t("a-form-item",{attrs:{label:"合作商地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["address",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['address', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入合作商地址"}})],1),t("a-form-item",{attrs:{label:"联系人",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_name",{rules:[{required:!1}]}],expression:"['contact_name', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系人"}})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_tel",{rules:[{required:!1}]}],expression:"['contact_tel', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系电话"}})],1),t("a-form-item",{attrs:{label:"回调地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["callback",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['callback', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入回调地址"}})],1),t("a-form-item",{attrs:{label:"企油通企业",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["qyt_enterprise_id"],expression:"['qyt_enterprise_id']"}],attrs:{placeholder:"不选则使用默认企业",allowClear:""}},e._l(e.enterpriseList,(function(a){return t("a-select-option",{key:a.enterprise_id,attrs:{value:a.enterprise_id}},[e._v(" "+e._s(a.company_name)+"("+e._s("pingan"===a.passageway?"平安银行":"支付宝企业码")+")"+e._s(a.is_default?" · 默认":"")+" ")])})),1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("该合作商下单时使用哪个企业的对接参数与支付通道。留空则走默认企业。")])])],1)],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=a("5530"),o=(a("d3b7"),a("e533")),n=a("763d"),l=a("08a5"),c={data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),formData:l["a"].formData,enterpriseList:[]}},created:function(){var e=this;this.getEnterpriseList(),this.isLoading=!0,l["a"].getFromData().then((function(){e.isLoading=!1}))},methods:{getEnterpriseList:function(){var e=this;n["g"]().then((function(t){e.enterpriseList=t.data.list}))},onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){return e?(t.onTargetTabError(e),!1):(t.onFormSubmit(a),!0)}))},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,o["a"]({form:Object(s["a"])(Object(s["a"])({},e),{},{qyt_enterprise_id:e.qyt_enterprise_id||0})}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))}}},u=c,d=(a("784f"),a("2877")),m=Object(d["a"])(u,r,i,!1,null,"41360aa9",null);t["default"]=m.exports},"60be":function(e,t,a){},6162:function(e,t,a){"use strict";a("bb0b")},"62cd":function(e,t,a){},"62da":function(e,t,a){"use strict";a("03eb")},"6a27":function(e,t,a){},"6ab0":function(e,t,a){},7367:function(e,t,a){"use strict";a("5bd3")},"761a":function(e,t,a){"use strict";a("252a")},"763d":function(e,t,a){"use strict";a.d(t,"f",(function(){return s})),a.d(t,"g",(function(){return o})),a.d(t,"a",(function(){return n})),a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return c})),a.d(t,"h",(function(){return u})),a.d(t,"b",(function(){return d})),a.d(t,"i",(function(){return m})),a.d(t,"j",(function(){return p})),a.d(t,"c",(function(){return f}));var r=a("b775"),i={list:"/qyt.enterprise/list",options:"/qyt.enterprise/options",detail:"/qyt.enterprise/detail",add:"/qyt.enterprise/add",edit:"/qyt.enterprise/edit",delete:"/qyt.enterprise/delete",setDefault:"/qyt.enterprise/setDefault",apply:"/qyt.enterprise/apply",syncAccount:"/qyt.enterprise/syncAccount",syncList:"/qyt.enterprise/syncList",balance:"/qyt.enterprise/balance"};function s(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function o(e){return Object(r["b"])({url:i.options,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function c(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}function u(e){return Object(r["b"])({url:i.setDefault,method:"post",data:e})}function d(e){return Object(r["b"])({url:i.apply,method:"post",data:e})}function m(e){return Object(r["b"])({url:i.syncAccount,method:"post",data:e})}function p(e){return Object(r["b"])({url:i.syncList,method:"post",data:e})}function f(e){return Object(r["b"])({url:i.balance,method:"get",params:e})}},"77e1":function(e,t,a){},"784f":function(e,t,a){"use strict";a("77e1")},"796a":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"关键字搜索"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["search"],expression:"['search']"}],attrs:{placeholder:"代理商编号/代理商名称/代理商地址/联系人/联系电话"}})],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),t("div",{staticClass:"row-item-tab clearfix"},[e.$auth("/merchant/create")?t("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:e.handleCreate}},[e._v("新增")]):e._e(),e.selectedRowKeys.length?t("div",{staticClass:"button-group"},[t("a-button-group",{staticClass:"ml-10"},[t("a-button",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(t){return e.handleDelete(e.selectedRowKeys)}}},[e._v("删除")])],1)],1):e._e()],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"merchant_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pageSize:15,scroll:{x:1450}},scopedSlots:e._u([{key:"address",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(a))])])}},{key:"action",fn:function(a,r){return t("div",{staticClass:"actions"},[t("a",{directives:[{name:"action",rawName:"v-action:qrCode",arg:"qrCode"}],attrs:{title:"推广码"},on:{click:function(t){return e.handleQrCode(r)}}},[e._v("推广码")]),t("a",{directives:[{name:"action",rawName:"v-action:recharge",arg:"recharge"}],attrs:{title:"代理商充值"},on:{click:function(t){return e.handleRecharge(r)}}},[e._v("充值")]),e.$auth("/merchant/update")?t("router-link",{attrs:{to:{path:"/merchant/update",query:{merchantId:r.merchant_id}}}},[e._v("编辑")]):e._e(),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete([r.merchant_id])}}},[e._v("删除")]),t("a",{directives:[{name:"action",rawName:"v-action:sendCoupon",arg:"sendCoupon"}],attrs:{title:"抖音发券"},on:{click:function(t){return e.handleSendCoupon(r)}}},[e._v("抖音发券")])],1)}}])}),t("RechargeForm",{ref:"RechargeForm",on:{handleSubmit:e.handleRefresh}}),t("ApiParaForm",{ref:"ApiParaForm",on:{handleSubmit:e.handleRefresh}}),t("QrCodeForm",{ref:"QrCodeForm",on:{handleSubmit:e.handleRefresh}}),t("SendCouponForm",{ref:"SendCouponForm",attrs:{coupongoods:e.couponGoodsData},on:{handleSubmit:e.handleRefresh}})],1)},i=[],s=a("5530"),o=(a("d3b7"),a("c519")),n=a("d084"),l=a("2af9"),c=function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:520,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-tabs",{attrs:{activeKey:e.activeKey},on:{change:e.onChangeTabs}},[t("a-tab-pane",{key:e.RECHARGE_TYPE_BALANCE,attrs:{tab:"充值余额"}},[e.activeKey===e.RECHARGE_TYPE_BALANCE?[t("a-form-item",{staticClass:"mb-5",attrs:{label:"商户ID",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.merchant_id))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"当前余额",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",{staticClass:"c-p"},[e._v(e._s(e.record.balance))])]),t("a-form-item",{attrs:{label:"充值方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".mode"),{initialValue:"inc",rules:[{required:!0}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.mode`, { initialValue: 'inc', rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:"inc"}},[e._v("增加")]),t("a-radio",{attrs:{value:"dec"}},[e._v("减少")]),t("a-radio",{attrs:{value:"final"}},[e._v("最终金额")])],1)],1),t("a-form-item",{attrs:{label:"变更金额",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".money"),{initialValue:"",rules:[{required:!0,message:"请输入变更的金额"}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.money`, { initialValue: '', rules: [{ required: true, message: '请输入变更的金额' }] }]"}],attrs:{min:.01}})],1),t("a-form-item",{attrs:{label:"管理员备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".remark"),{rules:[{required:!0,message:"请输入管理员备注"}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.remark`, { rules: [{ required: true, message: '请输入管理员备注' }] }]"}],attrs:{placeholder:"请输入管理员备注",rows:3}})],1)]:e._e()],2)],1)],1)],1)],1)},u=[],d="balance",m="points",p={components:{},data:function(){return{title:"商户充值",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),activeKey:d,RECHARGE_TYPE_BALANCE:d,RECHARGE_TYPE_POINTS:m,record:{}}},methods:{handle:function(e){this.visible=!0,this.record=e},onChangeTabs:function(e){this.activeKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this,a=this.record,r=this.activeKey;this.confirmLoading=!0,o["h"]({merchantId:a.merchant_id,target:r,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){t.confirmLoading=!1}))}}},f=p,h=(a("4211"),a("2877")),v=Object(h["a"])(f,c,u,!1,null,"40cf6f79",null),b=v.exports,_=function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:900,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-tabs",{attrs:{activeKey:e.activeKey},on:{change:e.onChangeTabs}},[t("a-tab-pane",{key:e.RECHARGE_TYPE_BALANCE,attrs:{tab:"商户对接参数"}},[e.activeKey===e.RECHARGE_TYPE_BALANCE?[t("a-form-item",{staticClass:"mb-5",attrs:{label:"商户编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.orgNo))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"商户appKey",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.appKey))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"商户私钥",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.privateKey))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"商户公钥",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.publicKey))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"回调地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.callback))])])]:e._e()],2)],1)],1)],1)],1)},g=[],C="balance",y={components:{},data:function(){return{title:"商户对接参数",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),activeKey:C,RECHARGE_TYPE_BALANCE:C,record:{}}},methods:{handle:function(e){this.visible=!0,this.record=e},onChangeTabs:function(e){this.activeKey=e},handleCancel:function(){this.visible=!1,this.form.resetFields()}}},w=y,x=(a("b38a"),Object(h["a"])(w,_,g,!1,null,"1f16853b",null)),L=x.exports,S=function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:500,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[e.qrcode?t("img",{attrs:{width:"260",src:e.qrcode,alt:"推广码"}}):e._e()])],1)},k=[],D={components:{},data:function(){return{title:"推广码",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,record:{},qrcode:{}}},methods:{handle:function(e){this.visible=!0,this.record=e,this.getMerchantQrcode(e.merchant_id)},getMerchantQrcode:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!!t&&new Promise((function(a,r){o["g"]({merchantId:t}).then((function(t){e.qrcode=t.data.data,a()}))}))},handleCancel:function(){this.visible=!1,this.form.resetFields()}}},q=D,I=(a("ec78"),Object(h["a"])(q,S,k,!1,null,"7c0c56a0",null)),F=I.exports,N=(a("b0c0"),function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:520,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[[t("a-form-item",{staticClass:"mb-5",attrs:{label:"代理商名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.name))])]),t("a-form-item",{attrs:{label:"发券商品",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_id",{rules:[{required:!0,message:"请选择发券商品"}],initialValue:e.coupongoods.length?e.coupongoods[0].goods_id:void 0}],expression:"[`goods_id`, {rules: [{required: true, message: '请选择发券商品'}], initialValue: coupongoods.length ? coupongoods[0].goods_id : undefined }]"}],staticStyle:{width:"300px"}},e._l(e.coupongoods,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.goods_id}},[e._v(e._s(a.goods_name))])})),1)],1),t("a-form-item",{attrs:{label:"用户手机号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["phone",{initialValue:"",rules:[{required:!0,message:"请输入用户手机号"}]}],expression:"[`phone`, { initialValue: '', rules: [{ required: true, message: '请输入用户手机号' }] }]"}],staticStyle:{width:"300px"}})],1),t("a-form-item",{attrs:{label:"订单备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["remark",{rules:[{message:"请输入订单备注"}]}],expression:"[`remark`, { rules: [{ message: '请输入订单备注' }] }]"}],attrs:{placeholder:"请输入订单备注",rows:3}})],1)]],2)],1)],1)}),R=[],O={components:{},props:{coupongoods:{type:Array,required:!0}},data:function(){return{title:"抖音发券",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),record:{}}},methods:{handle:function(e){this.visible=!0,this.record=e},onChangeTabs:function(e){this.activeKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this,a=this.record;this.confirmLoading=!0,o["i"]({merchantId:a.merchant_id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){t.confirmLoading=!1}))}}},j=O,$=(a("38b4"),Object(h["a"])(j,N,R,!1,null,"87d98050",null)),V=$.exports,T=a("ca00"),E=[{title:"代理商ID",width:"70px",dataIndex:"merchant_id"},{title:"代理商编号",width:"150px",dataIndex:"orgNo"},{title:"代理商名称",width:"150px",dataIndex:"name"},{title:"代理商地址",width:"200px",dataIndex:"address"},{title:"联系人",width:"150px",dataIndex:"contact_name"},{title:"联系电话",width:"150px",dataIndex:"contact_tel"},{title:"余额",width:"150px",dataIndex:"balance"},{title:"今日发券金额",width:"150px",dataIndex:"day_money"},{title:"发券总金额",width:"150px",dataIndex:"total_money"},{title:"创建时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"300px",fixed:"right",scopedSlots:{customRender:"action"}}],K={name:"Index",components:{ContentHeader:l["a"],RechargeForm:b,ApiParaForm:L,QrCodeForm:F,SendCouponForm:V,STable:l["c"]},data:function(){var e=this;return{searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:E,selectedRowKeys:[],loadData:function(t){return o["f"](Object(s["a"])(Object(s["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))},couponGoodsData:[]}},beforeCreate:function(){Object(T["a"])(this,{inArray:T["d"]})},created:function(){this.getCouponGoods()},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(s["a"])(Object(s["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},handleReset:function(){this.searchForm.resetFields()},handleRecharge:function(e){this.$refs.RechargeForm.handle(e)},handleQrCode:function(e){this.$refs.QrCodeForm.handle(e)},handleApiPara:function(e){this.$refs.ApiParaForm.handle(e)},handleSendCoupon:function(e){this.$refs.SendCouponForm.handle(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return o["c"](e).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){a.destroy()}))}})},handleCreate:function(){this.$router.push("/merchant/create")},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)},getCouponGoods:function(){var e=this;this.isLoading=!0,n["b"]({province:"",oilCardType:"coupon"}).then((function(t){e.couponGoodsData=t.data.list})).finally((function(){e.isLoading=!1}))}}},A=K,P=(a("55c4"),Object(h["a"])(A,r,i,!1,null,"0dc99bb3",null));t["default"]=P.exports},8430:function(e,t,a){"use strict";var r=function(){var e=this,t=e._self._c;return t("div",[t("a-form-item",{attrs:{label:"商品规格",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("div",{staticClass:"form-item-help",staticStyle:{"line-height":"36px"}},[t("small",[e._v("最多添加3个商品规格组,生成的SKU数量不能超出50个")])]),e._l(e.multiSpecData.specList,(function(a,r){return t("div",{key:r,staticClass:"spec-group"},[t("div",{staticClass:"spec-group-item clearfix"},[t("a-input",{staticClass:"group-item-input",attrs:{readOnly:e.isSpecLocked,placeholder:"请输入规格名称"},on:{change:e.onChangeSpecGroupIpt},model:{value:a.spec_name,callback:function(t){e.$set(a,"spec_name",t)},expression:"item.spec_name"}}),e.isSpecLocked?e._e():t("a",{staticClass:"group-item-delete",attrs:{href:"javascript:;"},on:{click:function(t){return e.handleDeleteSpecGroup(r)}}},[e._v("删除规格组")])],1),t("div",{staticClass:"spec-value clearfix"},[e._l(a.valueList,(function(a,i){return t("div",{key:i,staticClass:"spec-value-item"},[t("a-input",{staticClass:"value-item-input",attrs:{readOnly:e.isSpecLocked,placeholder:"请输入规格值"},on:{change:e.onChangeSpecValueIpt},model:{value:a.spec_value,callback:function(t){e.$set(a,"spec_value",t)},expression:"itm.spec_value"}}),e.isSpecLocked?e._e():t("a-icon",{staticClass:"icon-close",attrs:{theme:"filled",type:"close-circle"},on:{click:function(t){return e.handleDeleteSpecValue(r,i)}}})],1)})),e.isSpecLocked?e._e():t("div",{staticClass:"spec-value-add"},[t("a",{staticClass:"group-item-delete",attrs:{href:"javascript:;"},on:{click:function(t){return e.handleAddSpecValue(r)}}},[e._v("新增规格值")])])],2)])})),!e.isSpecLocked&&e.multiSpecData.specList.length<3?t("a-button",{staticClass:"spec-group-add-btn",attrs:{icon:"plus"},on:{click:e.handleAddSpecGroup}},[e._v("添加规格组")]):e._e()],2),t("a-form-item",{directives:[{name:"show",rawName:"v-show",value:e.multiSpecData.skuList.length,expression:"multiSpecData.skuList.length"}],attrs:{label:"SKU列表",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[e.multiSpecData.skuList.length>1?t("div",{staticClass:"sku-batch"},[t("span",{staticClass:"title"},[e._v("批量设置:")]),t("a-input-number",{attrs:{placeholder:"商品价格",min:.01,precision:2},model:{value:e.multiSpecData.skuBatchForm.goods_price,callback:function(t){e.$set(e.multiSpecData.skuBatchForm,"goods_price",t)},expression:"multiSpecData.skuBatchForm.goods_price"}}),t("a-input-number",{attrs:{placeholder:"划线价格",min:0,precision:2},model:{value:e.multiSpecData.skuBatchForm.line_price,callback:function(t){e.$set(e.multiSpecData.skuBatchForm,"line_price",t)},expression:"multiSpecData.skuBatchForm.line_price"}}),t("a-input-number",{attrs:{placeholder:"库存数量",min:0,precision:0},model:{value:e.multiSpecData.skuBatchForm.stock_num,callback:function(t){e.$set(e.multiSpecData.skuBatchForm,"stock_num",t)},expression:"multiSpecData.skuBatchForm.stock_num"}}),t("a-input-number",{attrs:{placeholder:"商品重量",min:0,precision:2},model:{value:e.multiSpecData.skuBatchForm.goods_weight,callback:function(t){e.$set(e.multiSpecData.skuBatchForm,"goods_weight",t)},expression:"multiSpecData.skuBatchForm.goods_weight"}}),t("a-input",{attrs:{placeholder:"sku编码"},model:{value:e.multiSpecData.skuBatchForm.goods_sku_no,callback:function(t){e.$set(e.multiSpecData.skuBatchForm,"goods_sku_no",t)},expression:"multiSpecData.skuBatchForm.goods_sku_no"}}),t("a-button",{on:{click:e.handleSkuBatch}},[e._v("立即设置")])],1):e._e(),t("a-table",{staticClass:"sku-list",attrs:{columns:e.multiSpecData.skuColumns,dataSource:e.multiSpecData.skuList,scroll:{x:!0},pagination:!1,bordered:""},scopedSlots:e._u([{key:"image",fn:function(a,r){return[t("SelectImage",{attrs:{defaultList:r.image_id>0&&r.image?[r.image]:[],width:50},model:{value:r.image_id,callback:function(t){e.$set(r,"image_id",t)},expression:"item.image_id"}})]}},{key:"goods_price",fn:function(a,r){return[t("a-input-number",{attrs:{size:"small",min:.01,precision:2},model:{value:r.goods_price,callback:function(t){e.$set(r,"goods_price",t)},expression:"item.goods_price"}})]}},{key:"line_price",fn:function(a,r){return[t("a-input-number",{attrs:{size:"small",min:0,precision:2},model:{value:r.line_price,callback:function(t){e.$set(r,"line_price",t)},expression:"item.line_price"}})]}},{key:"stock_num",fn:function(a,r){return[t("a-input-number",{attrs:{size:"small",min:0,precision:0},model:{value:r.stock_num,callback:function(t){e.$set(r,"stock_num",t)},expression:"item.stock_num"}})]}},{key:"goods_weight",fn:function(a,r){return[t("a-input-number",{attrs:{size:"small",min:0,precision:2},model:{value:r.goods_weight,callback:function(t){e.$set(r,"goods_weight",t)},expression:"item.goods_weight"}})]}},{key:"goods_sku_no",fn:function(a,r){return[t("a-input",{attrs:{size:"small"},model:{value:r.goods_sku_no,callback:function(t){e.$set(r,"goods_sku_no",t)},expression:"item.goods_sku_no"}})]}}])})],1)],1)},i=[],s=a("4d91"),o=a("5530"),n=a("d4ec"),l=a("bee2"),c=(a("d3b7"),a("159b"),a("a15b"),a("d81d"),a("99af"),a("7db0"),a("b64b"),a("a434"),a("b0c0"),a("2ef0")),u=a.n(c),d=a("ca00"),m=[{title:"预览图",dataIndex:"image",width:90,scopedSlots:{customRender:"image"}},{title:"商品价格",dataIndex:"goods_price",width:120,scopedSlots:{customRender:"goods_price"}},{title:"划线价格",dataIndex:"line_price",width:120,scopedSlots:{customRender:"line_price"}},{title:"库存数量",dataIndex:"stock_num",width:120,scopedSlots:{customRender:"stock_num"}},{title:"商品重量 (KG)",dataIndex:"goods_weight",width:120,scopedSlots:{customRender:"goods_weight"}},{title:"SKU编码",dataIndex:"goods_sku_no",width:140,scopedSlots:{customRender:"goods_sku_no"}}],p={image_id:0,image:{},goods_price:"",line_price:"",stock_num:"",goods_weight:"",goods_sku_no:""},f=function(){function e(){Object(n["a"])(this,e),this.multiSpecData={},this.error="",this.multiSpecData={specList:[],skuList:[],skuColumns:u.a.cloneDeep(m),skuBatchForm:u.a.cloneDeep(p)}}return Object(l["a"])(e,[{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.length&&(this.multiSpecData.specList=u.a.cloneDeep(e),this.multiSpecData.skuList=u.a.cloneDeep(t));var a=this.specGroupArr(),r=v(a),i=this.rowSpanArr(a,r);return this.buildSkuColumns(i),this.buildSkuList(r),this.multiSpecData}},{key:"isEmpty",value:function(){return 0===this.multiSpecData.specList.length}},{key:"getError",value:function(){return this.error}},{key:"specGroupArr",value:function(){var e=[];return this.multiSpecData.specList.forEach((function(t){var a=[];t.valueList.forEach((function(e){a.push(e)})),e.push(a)})),e}},{key:"rowSpanArr",value:function(e,t){for(var a=[],r=t.length,i=0;i<e.length;i++)a[i]=parseInt(r/e[i].length),r=a[i];return a}},{key:"buildSkuList",value:function(e){for(var t=[],a=function(){var a=Object(o["a"])(Object(o["a"])({},p),{},{key:r,skuKey:e[r].map((function(e){return e.key})).join("_"),skuKeys:e[r].map((function(e){return{groupKey:e.groupKey,valueKey:e.key}}))});e[r].forEach((function(e,t){a["spec_value_".concat(t)]=e.spec_value})),t.push(a)},r=0;r<e.length;r++)a();this.multiSpecData.skuList=this.oldSkuList(t)}},{key:"oldSkuList",value:function(e){var t=this.multiSpecData.skuList.concat();if(!t.length||!e.length)return e;var a=function(a){var r={};r=t.length===e.length?u.a.cloneDeep(t[a]):t.find((function(t){return t.skuKey===e[a].skuKey})),r&&(e[a]=Object(o["a"])(Object(o["a"])({},e[a]),u.a.pick(r,Object.keys(p))))};for(var r in e)a(r);return e}},{key:"buildSkuColumns",value:function(e){for(var t=this.multiSpecData.specList,a=m.concat(),r=function(t,a,r,i){var s={children:a,attrs:{}},o=e[t-1];return s.attrs.rowSpan=i%o===0?o:0,s},i=function(e){var i=t[e-1];a.unshift({title:i.spec_name,dataIndex:"spec_value_".concat(e-1),customRender:function(t,a,i){return r(e,t,a,i)}})},s=t.length;s>0;s--)i(s);this.multiSpecData.skuColumns=a}},{key:"handleAddSpecGroup",value:function(){var e=this.multiSpecData.specList;e.push({key:e.length||0,spec_name:"",valueList:[]});var t=e.length-1;this.handleAddSpecValue(t)}},{key:"handleAddSpecValue",value:function(e){var t=this.multiSpecData.specList[e],a=t.valueList;a.push({key:a.length||0,groupKey:t.key,spec_value:""}),this.onRefreshSpecValueKey(e)}},{key:"handleDeleteSpecGroup",value:function(e){this.multiSpecData.specList.splice(e,1),this.onUpdate(!1)}},{key:"handleDeleteSpecValue",value:function(e,t){this.multiSpecData.specList[e].valueList.splice(t,1),this.onRefreshSpecValueKey(e),this.onUpdate(!1)}},{key:"onRefreshSpecValueKey",value:function(e){var t=this.multiSpecData.specList[e],a=t.valueList;a.forEach((function(e,t){a[t].key=t}))}},{key:"handleSkuBatch",value:function(){var e=this.getFilterObject(this.multiSpecData.skuBatchForm),t=this.multiSpecData.skuList;for(var a in t)t[a]=Object(o["a"])(Object(o["a"])({},t[a]),e);this.onUpdate(!1)}},{key:"getFilterObject",value:function(e){var t={};for(var a in e){var r=e[a];Object(d["e"])(r)||(t[a]=r)}return t}},{key:"verifyForm",value:function(){return!!this.verifySpec()&&!!this.verifySkuList()}},{key:"verifySkuList",value:function(){var e=[{field:"goods_price",name:"商品价格"},{field:"stock_num",name:"库存数量"},{field:"goods_weight",name:"商品重量"}],t=this.multiSpecData.skuList;for(var a in t){var r=t[a];for(var i in e){var s=r[e[i].field];if(""===s||null===s)return this.error="".concat(e[i].name,"不能为空"),!1}}return!0}},{key:"verifySpec",value:function(){var e=this.multiSpecData.specList;if(!e.length)return this.error="亲,还没有添加规格组~",!1;for(var t in e){var a=e[t];if(Object(d["e"])(a.spec_name))return this.error="规格组名称不能为空~",!1;var r=a.valueList;if(!r.length)return this.error="还没有添加规格值~",!1;for(var i in r)if(Object(d["e"])(r[i].spec_value))return this.error="规格值不能为空~",!1}return!0}},{key:"getFromSpecData",value:function(){var e=this.multiSpecData,t=e.specList,a=e.skuList,r={specList:u.a.cloneDeep(t),skuList:u.a.cloneDeep(a)};for(var i in r.skuList){var s=r.skuList[i];delete s.image,delete s.key}return r}},{key:"onUpdate",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e?Object(d["c"])(h,200)(this):h(this)}}]),e}(),h=function(e){return e.getData()},v=function(e){return e.length?Array.prototype.reduce.call(e,(function(e,t){var a=[];return e.forEach((function(e){t.forEach((function(t){a.push(e.concat([t]))}))})),a}),[[]]):[]},b=a("2af9"),_={components:{SelectImage:b["e"]},props:{defaultSpecList:s["a"].array.def([]),defaultSkuList:s["a"].array.def([]),isSpecLocked:s["a"].bool.def(!1)},data:function(){return{labelCol:{span:3},wrapperCol:{span:21},MultiSpecModel:new f,multiSpecData:{specList:[],skuList:[]}}},watch:{defaultSpecList:function(e){e.length&&this.MultiSpecModel.isEmpty()&&this.getData()}},created:function(){this.getData()},methods:{getData:function(){var e=this.defaultSpecList,t=this.defaultSkuList;this.multiSpecData=this.MultiSpecModel.getData(e,t)},getFromSpecData:function(){return this.MultiSpecModel.getFromSpecData()},handleAddSpecGroup:function(){this.checkSkuMaxNum()&&this.MultiSpecModel.handleAddSpecGroup()},handleDeleteSpecGroup:function(e){var t=this,a=this.$confirm({title:"您确定要删除该规格组吗?",content:"删除后不可恢复",onOk:function(){t.MultiSpecModel.handleDeleteSpecGroup(e),a.destroy()}})},handleAddSpecValue:function(e){this.checkSkuMaxNum()&&this.MultiSpecModel.handleAddSpecValue(e)},handleDeleteSpecValue:function(e,t){var a=this,r=this.$confirm({title:"您确定要删除该规格值吗?",content:"删除后不可恢复",onOk:function(){a.MultiSpecModel.handleDeleteSpecValue(e,t),r.destroy()}})},onChangeSpecGroupIpt:function(){this.MultiSpecModel.onUpdate(!0)},onChangeSpecValueIpt:function(e,t){this.MultiSpecModel.onUpdate(!0)},checkSkuMaxNum:function(){var e=this.multiSpecData.skuList;return!(e.length>=50)||(this.$message.error("生成的sku列表数量不能大于50个,当前数量:".concat(e.length,"个"),2.5),!1)},handleSkuBatch:function(){this.MultiSpecModel.handleSkuBatch()},verifyForm:function(){return!!this.MultiSpecModel.verifyForm()||(this.$message.error(this.MultiSpecModel.getError(),2),!1)}}},g=_,C=(a("62da"),a("2877")),y=Object(C["a"])(g,r,i,!1,null,"b63f0ed6",null);t["a"]=y.exports},"86e8":function(e,t,a){"use strict";var r=a("5530"),i=(a("d3b7"),a("3ca3"),a("ddb0"),a("25f0"),a("2ef0")),s=a.n(i),o=a("c519");t["a"]={merchantId:null,formData:{merchant:{}},getFromData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.merchantId=t,new Promise((function(a,r){Promise.all([e.getMerchantDetail(t)]).then((function(){e.setDefaultData(),a({formData:e.formData})}))}))},getMerchantDetail:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!!t&&new Promise((function(a,r){o["d"]({merchantId:t}).then((function(t){e.formData.merchant=t.data.merchantInfo,a()}))}))},getFieldsValue:function(){var e=this.formData.merchant,t=s.a.pick(e,["merchant_id","name","address","contact_name","contact_tel","appKey","callback","create_time"]);return t.callback=t.callback.toString(),Object(r["a"])({},t)},setDefaultData:function(){}}},"88bc":function(e,t,a){(function(t){var a=1/0,r=9007199254740991,i="[object Arguments]",s="[object Function]",o="[object GeneratorFunction]",n="[object Symbol]",l="object"==typeof t&&t&&t.Object===Object&&t,c="object"==typeof self&&self&&self.Object===Object&&self,u=l||c||Function("return this")();function d(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}function m(e,t){var a=-1,r=e?e.length:0,i=Array(r);while(++a<r)i[a]=t(e[a],a,e);return i}function p(e,t){var a=-1,r=t.length,i=e.length;while(++a<r)e[i+a]=t[a];return e}var f=Object.prototype,h=f.hasOwnProperty,v=f.toString,b=u.Symbol,_=f.propertyIsEnumerable,g=b?b.isConcatSpreadable:void 0,C=Math.max;function y(e,t,a,r,i){var s=-1,o=e.length;a||(a=S),i||(i=[]);while(++s<o){var n=e[s];t>0&&a(n)?t>1?y(n,t-1,a,r,i):p(i,n):r||(i[i.length]=n)}return i}function w(e,t){return e=Object(e),x(e,t,(function(t,a){return a in e}))}function x(e,t,a){var r=-1,i=t.length,s={};while(++r<i){var o=t[r],n=e[o];a(n,o)&&(s[o]=n)}return s}function L(e,t){return t=C(void 0===t?e.length-1:t,0),function(){var a=arguments,r=-1,i=C(a.length-t,0),s=Array(i);while(++r<i)s[r]=a[t+r];r=-1;var o=Array(t+1);while(++r<t)o[r]=a[r];return o[t]=s,d(e,this,o)}}function S(e){return q(e)||D(e)||!!(g&&e&&e[g])}function k(e){if("string"==typeof e||$(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}function D(e){return F(e)&&h.call(e,"callee")&&(!_.call(e,"callee")||v.call(e)==i)}var q=Array.isArray;function I(e){return null!=e&&R(e.length)&&!N(e)}function F(e){return j(e)&&I(e)}function N(e){var t=O(e)?v.call(e):"";return t==s||t==o}function R(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function O(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function j(e){return!!e&&"object"==typeof e}function $(e){return"symbol"==typeof e||j(e)&&v.call(e)==n}var V=L((function(e,t){return null==e?{}:w(e,m(y(t,1),k))}));e.exports=V}).call(this,a("c8ba"))},9170:function(e,t,a){"use strict";a("62cd")},"91bf":function(e,t,a){"use strict";a("c405")},"94a3":function(e,t,a){},"967a":function(e,t,a){"use strict";a.d(t,"f",(function(){return s})),a.d(t,"b",(function(){return o})),a.d(t,"d",(function(){return n})),a.d(t,"a",(function(){return l})),a.d(t,"e",(function(){return c})),a.d(t,"c",(function(){return u}));var r=a("b775"),i={list:"/setting.delivery/list",all:"/setting.delivery/all",detail:"/setting.delivery/detail",add:"/setting.delivery/add",edit:"/setting.delivery/edit",delete:"/setting.delivery/delete"};function s(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function o(e){return Object(r["b"])({url:i.all,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.detail,method:"get",params:e})}function l(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function c(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function u(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},"98fc":function(e,t,a){"use strict";a.r(t);a("b0c0"),a("a9e3");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"司机手机号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["search"],expression:"['search']"}],attrs:{placeholder:"请输入司机手机号"}})],1),t("a-form-item",{attrs:{label:"司机姓名"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["driver_name"],expression:"['driver_name']"}],attrs:{placeholder:"请输入司机姓名"}})],1),t("a-form-item",{attrs:{label:"单号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["orderNo"],expression:"['orderNo']"}],attrs:{placeholder:"油卡编号/销售单号/批次号/运单号"}})],1),t("a-form-item",{attrs:{label:"发放状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["oil_status",{initialValue:-1}],expression:"['oil_status', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),e._l(e.OilStatusEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])}))],2)],1),t("a-form-item",{attrs:{label:"企油通发放态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["oil_status_zsy",{initialValue:-1}],expression:"['oil_status_zsy', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),t("a-select-option",{attrs:{value:0}},[e._v("未提交")]),t("a-select-option",{attrs:{value:1}},[e._v("发放中")]),t("a-select-option",{attrs:{value:2}},[e._v("发放成功")]),t("a-select-option",{attrs:{value:3}},[e._v("发放失败")])],1)],1),t("a-form-item",{attrs:{label:"加油核销"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["use_status",{initialValue:-1}],expression:"['use_status', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),e._l(e.UseStatusEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])}))],2)],1),t("a-form-item",{attrs:{label:"退款状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["refund_status",{initialValue:-1}],expression:"['refund_status', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),t("a-select-option",{attrs:{value:0}},[e._v("未退款")]),t("a-select-option",{attrs:{value:1}},[e._v("退款中")]),t("a-select-option",{attrs:{value:2}},[e._v("已退款")]),t("a-select-option",{attrs:{value:3}},[e._v("退款失败")]),t("a-select-option",{attrs:{value:4}},[e._v("待人工确认")])],1)],1),t("a-form-item",{attrs:{label:"合作商"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["partners_id",{initialValue:-1}],expression:"['partners_id', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),e._l(e.partnersListData,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.partners_id}},[e._v(e._s(a.name))])}))],2)],1),[t("a-config-provider",{attrs:{locale:e.zhCN}},[t("a-form-item",{attrs:{label:"下单时间"}},[t("a-range-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["betweenTime"],expression:"['betweenTime']"}],attrs:{format:"YYYY-MM-DD"}})],1)],1)],t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],2)],1),t("div",{staticClass:"row-item-tab clearfix flex-box"},[t("span",{staticClass:"form-total"},[e._v("发放总金额:¥"+e._s(e.total_money))])])],1),t("s-table",{ref:"table",attrs:{rowKey:"order_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15},scopedSlots:e._u([{key:"partners",fn:function(a){return t("span",{},[t("p",[e._v(e._s(a.name))])])}},{key:"driver",fn:function(a){return t("div",{},[t("p",{staticClass:"mtb-2"},[e._v(e._s(a.driver_name||"-"))]),t("p",{staticClass:"mtb-2 f-13"},[e._v(e._s(a.mobile))]),t("p",{staticClass:"mtb-2 f-13"},[e._v("车牌:"+e._s(a.plate_no||"-"))])])}},{key:"qyt",fn:function(a){return t("div",{},[t("p",{staticClass:"mtb-2 f-13"},[e._v("批次:"+e._s(a.batch_no||"-"))]),t("p",{staticClass:"mtb-2 f-13"},[e._v("运单:"+e._s(a.waybill_no||"-"))])])}},{key:"consume",fn:function(a){return t("div",{},[1===a.use_status?[t("p",{staticClass:"mtb-2 f-13"},[e._v("已加油:¥"+e._s(a.used_amount)+"("+e._s(a.used_num)+" 次)")]),t("p",{staticClass:"mtb-2 f-13"},[e._v("剩余:¥"+e._s(e.remainAmount(a)))]),t("p",{staticClass:"mtb-2 f-13"},[e._v("最近:"+e._s(a.station_name||"-")+" "+e._s(a.oil_name)+" "+e._s(a.litter)+"L")])]:t("span",[e._v("-")])],2)}},{key:"status",fn:function(a){return t("div",{},[t("p",{staticClass:"mtb-2"},[t("span",{staticClass:"f-13"},[e._v("发放状态:")]),t("a-tag",{attrs:{color:a.oil_status==e.OilStatusEnum.OIL.value?"green":""}},[e._v(e._s(e.OilStatusEnum[a.oil_status].name))])],1),t("p",{staticClass:"mtb-2"},[t("span",{staticClass:"f-13"},[e._v("加油核销:")]),t("a-tag",{attrs:{color:a.use_status==e.UseStatusEnum.USE.value?"green":""}},[e._v(e._s(e.UseStatusEnum[a.use_status].name))])],1),t("p",{staticClass:"mtb-2"},[t("span",{staticClass:"f-13"},[e._v("企油通:")]),t("a-tag",{attrs:{color:e.qytColor(a.oil_status_zsy)}},[e._v(e._s(e.qytText(a.oil_status_zsy)))])],1),a.oil_text?t("p",{staticClass:"mtb-2 f-13 order-remark"},[e._v(e._s(a.oil_text))]):e._e(),a.refund_status>0?t("p",{staticClass:"mtb-2"},[t("span",{staticClass:"f-13"},[e._v("退款:")]),t("a-tag",{attrs:{color:e.refundColor(a.refund_status)}},[e._v(e._s(e.refundText(a.refund_status)))])],1):e._e()])}},{key:"action",fn:function(a){return t("div",{staticClass:"actions"},[e.inArray(a.oil_status_zsy,[3])&&0===a.oil_status&&"zsy_ticket"===a.oilCardType?t("a",{on:{click:function(t){return e.handleShare(a)}}},[e._v("重新发放")]):e._e(),e.inArray(a.oil_status_zsy,[2])&&1===a.oil_status&&2!==a.refund_status&&Number(e.remainAmount(a))>0&&"zsy_ticket"===a.oilCardType?t("a",{on:{click:function(t){return e.handlePay(a)}}},[e._v("加油链接")]):e._e(),e.inArray(a.oil_status_zsy,[2])&&1===a.oil_status&&"zsy_ticket"===a.oilCardType?t("a",{on:{click:function(t){return e.handleOil(a)}}},[e._v("重推发放结果")]):e._e(),e.inArray(a.oil_status_zsy,[2])&&1===a.oil_status&&1===a.use_status&&"zsy_ticket"===a.oilCardType?t("a",{on:{click:function(t){return e.handleUse(a)}}},[e._v("重推加油结果")]):e._e(),e.canRefund(a)?t("a",{on:{click:function(t){return e.handleRefund(a)}}},[e._v(e._s(e.refundLabel(a)))]):e._e(),1===a.use_status?t("a",{on:{click:function(t){return e.handleInvoice(a)}}},[e._v("发票")]):e._e()])}}])}),t("ShareForm",{ref:"ShareForm",on:{handleSubmit:e.handleRefresh}}),t("PayForm",{ref:"PayForm",on:{handleSubmit:e.handleRefresh}}),t("OilForm",{ref:"OilForm",on:{handleSubmit:e.handleRefresh}}),t("UseForm",{ref:"UseForm",on:{handleSubmit:e.handleRefresh}}),t("RefundForm",{ref:"RefundForm",on:{handleSubmit:e.handleRefresh}}),t("InvoiceModal",{ref:"InvoiceModal"})],1)},i=[],s=a("5530"),o=(a("b680"),a("d3b7"),a("b775")),n={list:"/partners.order/list",share:"/partners.order/share",qrCode:"/partners.order/qrCode",oilCallback:"/partners.order/oilCallback",useCallback:"/partners.order/useCallback",refund:"/partners.order/refund",refundConfirm:"/partners.order/refundConfirm",refundResolve:"/partners.order/refundResolve",refundLog:"/partners.order/refundLog",invoice:"/partners.order/invoice"};function l(e){return Object(o["b"])({url:n.list,method:"get",params:e})}function c(e){return Object(o["b"])({url:n.share,method:"post",data:e})}function u(e){return Object(o["b"])({url:n.qrCode,method:"post",data:e})}function d(e){return Object(o["b"])({url:n.oilCallback,method:"post",data:e})}function m(e){return Object(o["b"])({url:n.useCallback,method:"post",data:e})}function p(e){return Object(o["b"])({url:n.refund,method:"post",data:e})}function f(e){return Object(o["b"])({url:n.refundConfirm,method:"post",data:e})}function h(e){return Object(o["b"])({url:n.refundResolve,method:"post",data:e})}function v(e){return Object(o["b"])({url:n.refundLog,method:"get",params:e})}function b(e){return Object(o["b"])({url:n.invoice,method:"get",params:e})}var _=a("ab09"),g=a("4a95"),C=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:580,visible:e.visible,isLoading:e.isLoading,confirmLoading:e.isLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:" 提示 ",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[e._v(" 是否确认手动进行分油结果回调通知? ")]),t("a-form-item",{attrs:{label:"登录密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"请输入密码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码"}]}],expression:"['password', { rules: [{ required: true, message: '请输入密码' }] }]"}],attrs:{type:"password"}})],1)],1)],1)],1)},y=[],w={data:function(){return{title:"重推发放结果",labelCol:{span:7},wrapperCol:{span:13},visible:!1,isLoading:!1,form:this.$form.createForm(this),expressList:[],record:{}}},created:function(){},methods:{show:function(e){this.visible=!0,this.record=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.isLoading=!0,d({orderId:this.record.order_id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.isLoading=!1}))}}},x=w,L=a("2877"),S=Object(L["a"])(x,C,y,!1,null,null,null),k=S.exports,D=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:580,visible:e.visible,isLoading:e.isLoading,confirmLoading:e.isLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:" 提示 ",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[e._v(" 是否确认手动进行使用结果回调通知? ")]),t("a-form-item",{attrs:{label:"登录密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"请输入密码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码"}]}],expression:"['password', { rules: [{ required: true, message: '请输入密码' }] }]"}],attrs:{type:"password"}})],1)],1)],1)],1)},q=[],I={data:function(){return{title:"重推加油结果",labelCol:{span:7},wrapperCol:{span:13},visible:!1,isLoading:!1,form:this.$form.createForm(this),expressList:[],record:{}}},created:function(){},methods:{show:function(e){this.visible=!0,this.record=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.isLoading=!0,m({orderId:this.record.order_id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.isLoading=!1}))}}},F=I,N=Object(L["a"])(F,D,q,!1,null,null,null),R=N.exports,O=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:580,visible:e.visible,isLoading:e.isLoading,confirmLoading:e.isLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:" 提示 ",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[e._v(" 是否手动分油? ")]),t("a-form-item",{attrs:{label:"登录密码",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"请输入密码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"请输入密码"}]}],expression:"['password', { rules: [{ required: true, message: '请输入密码' }] }]"}],attrs:{type:"password"}})],1)],1)],1)],1)},j=[],$={data:function(){return{title:"重新发放",labelCol:{span:7},wrapperCol:{span:13},visible:!1,isLoading:!1,form:this.$form.createForm(this),expressList:[],record:{}}},created:function(){},methods:{show:function(e){this.visible=!0,this.record=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this;this.isLoading=!0,c({orderId:this.record.order_id,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){return t.isLoading=!1}))}}},V=$,T=Object(L["a"])(V,O,j,!1,null,null,null),E=T.exports,K=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:520,visible:e.visible,confirmLoading:e.isLoading,maskClosable:!1},on:{ok:e.handleCancel,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.isLoading}},[e.qrCodeValue?t("div",{staticClass:"qyt-h5"},[t("div",{staticClass:"qyt-h5__tip"},[e._v("司机扫码即可进入企油通加油页(免登),也可直接把下方链接发给司机。")]),t("div",{staticClass:"qyt-h5__qr"},[t("vue-qr",{attrs:{text:e.qrCodeValue,size:200,margin:6}})],1),t("a-input-search",{staticClass:"qyt-h5__url",attrs:{value:e.qrCodeValue,readonly:"","enter-button":"复制"},on:{search:e.handleCopy}})],1):t("a-empty",{attrs:{description:"正在获取加油链接…"}})],1)],1)},A=[],P=a("658f5"),B=a.n(P),U={components:{vueQr:B.a},data:function(){return{title:"加油链接",visible:!1,isLoading:!1,record:{},qrCodeValue:""}},methods:{show:function(e){this.visible=!0,this.record=e,this.qrCodeValue="",this.getQrCode()},handleCancel:function(){this.visible=!1,this.qrCodeValue=""},handleCopy:function(){var e=document.createElement("input");e.value=this.qrCodeValue,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e),this.$message.success("链接已复制",1.5)},getQrCode:function(){var e=this;this.isLoading=!0,u({orderId:this.record.order_id}).then((function(t){e.qrCodeValue=t.data.qrCode})).finally((function(){e.isLoading=!1}))}}},G=U,M=(a("2aba"),Object(L["a"])(G,K,A,!1,null,"20bb8cdf",null)),z=M.exports,Y=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"订单退款",width:760,visible:e.visible,footer:null,maskClosable:!1},on:{cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.isLoading}},[t("div",{staticClass:"info"},[t("p",[e._v("油卡编号:"+e._s(e.record.oilCardNo))]),t("p",[e._v("司机:"+e._s(e.record.driver_name||"-")+"  "+e._s(e.record.mobile))]),t("p",[e._v("订单金额:¥"+e._s(e.record.total_price)+"  已加油:¥"+e._s(e.record.used_amount||"0.00")+"("+e._s(e.record.used_num||0)+" 次)")]),t("p",[e._v(" 退款金额:"),t("b",{staticClass:"amount"},[e._v("¥"+e._s(e.refundAmount))]),2===e.status?t("span",[e._v("(实际退款)")]):t("span",[e._v("(剩余未加油金额,固定不可修改)")])]),t("p",[e._v("当前状态:"),t("a-tag",{attrs:{color:e.statusColor}},[e._v(e._s(e.statusText))])],1),e.record.refund_text?t("p",{staticClass:"sub"},[e._v(e._s(e.record.refund_text))]):e._e()]),(0===e.status||3===e.status)&&Number(e.refundAmount)<=0?t("a-alert",{staticClass:"block",attrs:{type:"warning","show-icon":"",message:"订单金额已全部加油,没有可退金额"}}):e._e(),(0===e.status||3===e.status)&&Number(e.refundAmount)>0?[t("a-alert",{staticClass:"block",attrs:{type:"info","show-icon":""}},[t("div",{attrs:{slot:"message"},slot:"message"},[e._v(" 一张订单可以分多次加油,"),t("b",[e._v("退款金额固定为剩余未加油金额")]),e._v(",已加油的部分不退,每单只能成功退一次。 "),t("br"),e._v("退款会先用企油通 7.17 查询司机支付凭证,再用 7.16 把凭证额度调低退款金额;成功后原路回补合作商余额,并推送油卡变动通知。 "),t("br"),e._v("额度在凭证上按司机累计,若凭证可用余额不足退款金额(被该司机其他订单用掉),会直接拒绝。 ")])]),t("a-textarea",{attrs:{rows:2,maxLength:100,placeholder:"退款原因(选填,会写入企油通调额记录)"},model:{value:e.reason,callback:function(t){e.reason=t},expression:"reason"}}),t("div",{staticClass:"btns"},[t("a-button",{attrs:{type:"primary",loading:e.isLoading},on:{click:e.handleRefund}},[e._v("确认退款")])],1)]:e._e(),4===e.status?[t("a-alert",{staticClass:"block",attrs:{type:"warning","show-icon":""}},[t("div",{attrs:{slot:"message"},slot:"message"},[e._v(" 调额请求已发给企油通但没有拿到明确结果。企油通调额接口"),t("b",[e._v("没有幂等保护")]),e._v(",重复发起会被重复扣减,所以这里不允许直接重试。 "),t("br"),e._v("请先点「向企油通取证」:系统会查司机钱包流水(找退款单号)和凭证额度变化自动判定;判定不了再人工核对后提交。 ")])]),t("div",{staticClass:"btns"},[t("a-button",{attrs:{type:"primary",loading:e.isLoading},on:{click:e.handleConfirm}},[e._v("向企油通取证")])],1),t("a-divider",{attrs:{orientation:"left"}},[e._v("人工判定")]),t("a-radio-group",{model:{value:e.resolveResult,callback:function(t){e.resolveResult=t},expression:"resolveResult"}},[t("a-radio",{attrs:{value:"success"}},[e._v("企油通已调低额度(退款成功)")]),t("a-radio",{attrs:{value:"failed"}},[e._v("企油通未调额(退款失败,可重新发起)")])],1),t("a-textarea",{staticClass:"mt-10",attrs:{rows:2,maxLength:100,placeholder:"判定依据(必填),如:已在企油通后台核对凭证 xxx 总额度由 300 变为 200"},model:{value:e.resolveRemark,callback:function(t){e.resolveRemark=t},expression:"resolveRemark"}}),t("div",{staticClass:"btns"},[t("a-button",{attrs:{loading:e.isLoading},on:{click:e.handleResolve}},[e._v("提交人工判定")])],1)]:e._e(),t("a-divider",{attrs:{orientation:"left"}},[e._v("退款流水")]),t("a-table",{attrs:{size:"small",rowKey:"refund_id",columns:e.columns,dataSource:e.logs,pagination:!1},scopedSlots:e._u([{key:"status",fn:function(a,r){return t("span",{},[t("a-tag",{attrs:{color:e.logColor(r.status)}},[e._v(e._s(r.status_text))])],1)}}])})],2)],1)},H=[],Q=(a("498a"),{0:"未退款",1:"退款中",2:"已退款",3:"退款失败",4:"待人工确认"}),J={1:"blue",2:"green",3:"red",4:"orange"},W={data:function(){return{visible:!1,isLoading:!1,record:{},reason:"",resolveResult:"success",resolveRemark:"",logs:[],columns:[{title:"退款单号",dataIndex:"refund_no"},{title:"状态",scopedSlots:{customRender:"status"}},{title:"凭证",dataIndex:"quota_id"},{title:"调额前可用",dataIndex:"available_before"},{title:"说明",dataIndex:"message"},{title:"操作人",dataIndex:"operator"},{title:"时间",dataIndex:"create_time_text"}]}},computed:{status:function(){return Number(this.record.refund_status||0)},statusText:function(){return Q[this.status]||"-"},statusColor:function(){return J[this.status]||""},refundAmount:function(){if(2===this.status)return Number(this.record.refund_amount||0).toFixed(2);var e=Number(this.record.total_price||0)-Number(this.record.used_amount||0);return Math.max(0,e).toFixed(2)}},methods:{show:function(e){this.visible=!0,this.record=Object(s["a"])({},e),this.reason="",this.resolveResult="success",this.resolveRemark="",this.loadLogs()},handleCancel:function(){this.visible=!1},loadLogs:function(){var e=this;v({orderId:this.record.order_id}).then((function(t){e.logs=t.data.list,e.logs.length&&(e.record=Object(s["a"])(Object(s["a"])({},e.record),{},{refund_status:Number(e.logs[0].status),refund_text:e.logs[0].message}))}))},logColor:function(e){return J[Number(e)]||""},afterAction:function(e,t){this.$message.success(e.message,2),void 0!==t&&(this.record=Object(s["a"])(Object(s["a"])({},this.record),{},{refund_status:t,refund_text:e.message})),this.loadLogs(),this.$emit("handleSubmit")},afterError:function(){this.loadLogs(),this.$emit("handleSubmit")},handleRefund:function(){var e=this;this.$confirm({title:"确认退款 ¥"+this.refundAmount+"?",content:"退还剩余未加油金额:将调低该司机企油通凭证额度,成功后回补合作商余额。",onOk:function(){return e.isLoading=!0,p({orderId:e.record.order_id,reason:e.reason}).then((function(t){return e.afterAction(t,2)})).catch((function(){return e.afterError()})).finally((function(){e.isLoading=!1}))}})},handleConfirm:function(){var e=this;this.isLoading=!0,f({orderId:this.record.order_id}).then((function(t){return e.afterAction(t,t.data.refundStatus)})).catch((function(){return e.afterError()})).finally((function(){e.isLoading=!1}))},handleResolve:function(){var e=this;this.resolveRemark.trim()?(this.isLoading=!0,h({orderId:this.record.order_id,result:this.resolveResult,remark:this.resolveRemark}).then((function(t){return e.afterAction(t,t.data.refundStatus)})).catch((function(){return e.afterError()})).finally((function(){e.isLoading=!1}))):this.$message.warning("请填写判定依据")}}},X=W,Z=(a("07d4"),Object(L["a"])(X,Y,H,!1,null,"31e6d096",null)),ee=Z.exports,te=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:"加油发票",width:620,visible:e.visible,footer:null},on:{cancel:function(t){e.visible=!1}}},[t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-alert",{staticClass:"block",attrs:{type:"info","show-icon":""}},[t("div",{attrs:{slot:"message"},slot:"message"},[e._v(" 企油通发票按「企业 + 月份 + 司机」出具,和单笔订单没有一一对应关系。 这里展示的是"),t("b",[e._v("该订单所属企业、该司机在消费当月")]),e._v("的全部发票,同一司机当月的其他订单看到的是同一批。 ")])]),t("p",[e._v("消费月份:"),t("b",[e._v(e._s(e.month||"-"))]),e._v("  司机:"+e._s(e.record.driver_name||"-")+" "+e._s(e.record.mobile))]),e.row.sync_time_text?t("p",{staticClass:"sub"},[e._v("最近同步:"+e._s(e.row.sync_time_text)+"  "+e._s(e.row.sync_text))]):e.message?t("p",{staticClass:"sub"},[e._v(e._s(e.message))]):e._e(),e.urls.length?t("div",{staticClass:"links"},e._l(e.urls,(function(a,r){return t("p",{key:a},[t("a",{attrs:{href:a,target:"_blank",rel:"noopener noreferrer"}},[e._v("发票 "+e._s(r+1))]),t("span",{staticClass:"url"},[e._v(e._s(a))])])})),0):e.isLoading?e._e():t("a-empty",{attrs:{description:"企油通暂未出具该月发票"}}),t("div",{staticClass:"btns"},[t("a-button",{attrs:{loading:e.isLoading},on:{click:function(t){return e.load(!0)}}},[e._v("重新同步")])],1)],1)],1)},ae=[],re={data:function(){return{visible:!1,isLoading:!1,record:{},month:"",message:"",row:{}}},computed:{urls:function(){return this.row.invoice_urls||[]}},methods:{show:function(e){this.visible=!0,this.record=e,this.month="",this.message="",this.row={},this.load(!1)},load:function(e){var t=this;this.isLoading=!0,b({orderId:this.record.order_id,refresh:e?1:0}).then((function(a){t.month=a.data.month,t.message=a.data.message,t.row=a.data.row||{},e&&t.$message.success(a.message,1.5)})).finally((function(){t.isLoading=!1}))}}},ie=re,se=(a("12e9"),Object(L["a"])(ie,te,ae,!1,null,"2078b586",null)),oe=se.exports,ne=a("ca00"),le=a("eb60"),ce=a("e533"),ue={name:"Index",components:{STable:_["b"],ShareForm:E,PayForm:z,OilForm:k,UseForm:R,RefundForm:ee,InvoiceModal:oe},data:function(){var e=this;return{searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:[{title:"ID",dataIndex:"order_id"},{title:"油卡编号",dataIndex:"oilCardNo",scopedSlots:{customRender:"oilCardNo"}},{title:"企油通单号",scopedSlots:{customRender:"qyt"}},{title:"对接公司内部销售单号",dataIndex:"partners_order_no",scopedSlots:{customRender:"partners_order_no"}},{title:"数量",dataIndex:"total_num",scopedSlots:{customRender:"total_num"}},{title:"发放金额",dataIndex:"total_price"},{title:"司机",scopedSlots:{customRender:"driver"}},{title:"加油信息",scopedSlots:{customRender:"consume"}},{title:"合作商",dataIndex:"partners",scopedSlots:{customRender:"partners"}},{title:"交易状态",scopedSlots:{customRender:"status"}},{title:"操作",width:"220px",scopedSlots:{customRender:"action"}},{title:"订单时间",dataIndex:"create_time"}],loadData:function(t){return l(Object(s["a"])(Object(s["a"])({},t),e.queryParam)).then((function(t){return e.total_money=t.data.total_money||0,t.data.list}))},partnersListData:[],total_money:0,zhCN:le["a"]}},beforeCreate:function(){Object(ne["a"])(this,{inArray:ne["d"],OilStatusEnum:g["d"],UseStatusEnum:g["j"]})},created:function(){this.getPartnersList()},methods:{handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(s["a"])(Object(s["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},qytText:function(e){return{0:"未提交",1:"发放中",2:"发放成功",3:"发放失败"}[e]||"未知"},qytColor:function(e){return{1:"blue",2:"green",3:"red"}[e]||""},handleShare:function(e){this.$refs.ShareForm.show(e)},handlePay:function(e){this.$refs.PayForm.show(e)},handleOil:function(e){this.$refs.OilForm.show(e)},handleUse:function(e){this.$refs.UseForm.show(e)},refundText:function(e){return{0:"未退款",1:"退款中",2:"已退款",3:"退款失败",4:"待人工确认"}[e]||"未知"},refundColor:function(e){return{1:"blue",2:"green",3:"red",4:"orange"}[e]||""},canRefund:function(e){return"zsy_ticket"===e.oilCardType&&2===e.oil_status_zsy&&1===e.oil_status&&(e.refund_status>0||Number(this.remainAmount(e))>0)},remainAmount:function(e){var t=2===e.refund_status?Number(e.refund_amount||0):0,a=Number(e.total_price||0)-Number(e.used_amount||0)-t;return Math.max(0,a).toFixed(2)},refundLabel:function(e){return{2:"退款记录",4:"确认退款"}[e.refund_status]||"退款"},handleRefund:function(e){this.$refs.RefundForm.show(e)},handleInvoice:function(e){this.$refs.InvoiceModal.show(e)},getPartnersList:function(){var e=this;this.isLoading=!0,ce["b"]().then((function(t){e.partnersListData=t.data.list})).finally((function(){e.isLoading=!1}))}}},de=ue,me=(a("335a"),Object(L["a"])(de,r,i,!1,null,"1f2cfa16",null));t["default"]=me.exports},"9a97":function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-alert",{staticClass:"tips-alert",attrs:{type:"info","show-icon":""}},[t("div",{attrs:{slot:"message"},slot:"message"},[e._v(" 司机按身份证号归档。企油通发放到同一司机的额度会"),t("b",[e._v("在凭证上累计")]),e._v(",列表里的累计发放 / 已退款是按本地订单汇总的参考值, "),t("b",[e._v("真实可用额度以详情里实时查询的企油通数据为准")]),e._v("。 标红的「信息冲突」会导致上游实名二要素核验失败,建议先让下单平台核对司机信息。 ")])]),t("a-form",{staticClass:"search-form",attrs:{layout:"inline",form:e.searchForm},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"司机"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["keyword"],expression:"['keyword']"}],staticStyle:{width:"240px"},attrs:{placeholder:"姓名 / 手机号 / 完整身份证号",allowClear:""}})],1),t("a-form-item",{attrs:{label:"信息冲突"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["conflict",{initialValue:-1}],expression:"['conflict', { initialValue: -1 }]"}],staticStyle:{width:"110px"}},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),t("a-select-option",{attrs:{value:1}},[e._v("有冲突")]),t("a-select-option",{attrs:{value:0}},[e._v("正常")])],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary","html-type":"submit",icon:"search"}},[e._v("搜索")])],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"driver_id",columns:e.columns,data:e.loadData},scopedSlots:e._u([{key:"driver",fn:function(a){return[t("p",{staticClass:"mtb-2"},[t("b",[e._v(e._s(a.name||"-"))]),a.conflict?t("a-tag",{staticClass:"ml-6",attrs:{color:"red"}},[e._v("信息冲突")]):e._e()],1),t("p",{staticClass:"mtb-2 sub"},[e._v(e._s(a.mobile)+"  "+e._s(a.id_card_mask))]),a.conflict?t("p",{staticClass:"mtb-2 text-red"},[e._v(e._s(a.conflict_text))]):e._e()]}},{key:"orders",fn:function(a){return[t("p",{staticClass:"mtb-2"},[e._v("共 "+e._s(a.order_num)+" 单")]),t("p",{staticClass:"mtb-2 sub"},[e._v("已加油 "+e._s(a.used_num)+"  发放中 "+e._s(a.pending_num)+"  失败 "+e._s(a.fail_num))])]}},{key:"amount",fn:function(a){return[t("p",{staticClass:"mtb-2"},[e._v("累计发放 ¥"+e._s(a.grant_amount))]),t("p",{staticClass:"mtb-2 sub"},[e._v("已加油 ¥"+e._s(a.used_amount)+"  已退款 ¥"+e._s(a.refund_amount)+"  净额 ¥"+e._s(a.net_amount))])]}},{key:"action",fn:function(a){return[t("a",{on:{click:function(t){return e.openDetail(a)}}},[e._v("详情 / 查额度")])]}}])}),t("a-drawer",{attrs:{title:"司机详情",width:960,visible:e.drawer},on:{close:function(t){e.drawer=!1}}},[t("a-spin",{attrs:{spinning:e.detailLoading}},[e.detail.driver_id?[t("p",{staticClass:"head"},[t("b",[e._v(e._s(e.detail.name))]),e._v("  "+e._s(e.detail.mobile)+"  "+e._s(e.detail.id_card_mask)+" "),e.detail.conflict?t("a-tag",{staticClass:"ml-6",attrs:{color:"red"}},[e._v("信息冲突")]):e._e()],1),e.detail.conflict?t("a-alert",{staticClass:"block",attrs:{type:"error",message:e.detail.conflict_text,"show-icon":""}}):e._e(),t("p",{staticClass:"sub"},[e._v(" 本地汇总:共 "+e._s(e.detail.order_num)+" 单,累计发放 ¥"+e._s(e.detail.grant_amount)+",已退款 ¥"+e._s(e.detail.refund_amount)+", 净额 ¥"+e._s(e.detail.net_amount)+";最近下单 "+e._s(e.detail.last_order_time_text)+" ")]),t("a-divider",{attrs:{orientation:"left"}},[e._v("企油通实时数据")]),t("div",{staticClass:"toolbar"},[t("span",[e._v("企业:")]),t("a-select",{staticStyle:{width:"280px"},attrs:{placeholder:"选择企业"},model:{value:e.enterpriseId,callback:function(t){e.enterpriseId=t},expression:"enterpriseId"}},e._l(e.enterprises,(function(a){return t("a-select-option",{key:a.enterprise_id,attrs:{value:a.enterprise_id}},[e._v(" "+e._s(a.company_name)+"("+e._s("pingan"===a.passageway?"平安银行":"支付宝企业码")+") ")])})),1),e.enterprises.length?e._e():t("span",{staticClass:"sub ml-6"},[e._v("该司机还没有关联企业的订单")])],1),t("a-tabs",{on:{change:e.onTabChange},model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[t("a-tab-pane",{key:"balance",attrs:{tab:"钱包余额(7.12)"}},[t("a-button",{attrs:{loading:e.upLoading,disabled:!e.enterpriseId},on:{click:function(t){return e.query("balance")}}},[e._v("查询")]),e.result.balance?[t("p",{staticClass:"big"},[e._v(" 钱包发放总额 ¥"+e._s(e.result.balance.totalGrantAmountYuan||"0.00")+" 当前可用 "),t("b",{staticClass:"green"},[e._v("¥"+e._s(e.result.balance.availableBalanceYuan||"0.00"))])]),t("a-table",{attrs:{size:"small",rowKey:"business_license",pagination:!1,columns:e.balanceColumns,dataSource:e.result.balance.list||[]}})]:e._e()],2),t("a-tab-pane",{key:"voucher",attrs:{tab:"支付凭证(7.17)"}},[t("a-button",{attrs:{loading:e.upLoading,disabled:!e.enterpriseId},on:{click:function(t){return e.query("voucher")}}},[e._v("查询")]),t("p",{staticClass:"sub mt-8"},[e._v("额度按凭证累计;退款时就是把其中「生效中、可用余额最大」的一张调低订单金额。")]),e.result.voucher?t("a-table",{attrs:{size:"small",rowKey:"quota_id",pagination:!1,columns:e.voucherColumns,dataSource:e.result.voucher.list||[]}}):e._e()],1),t("a-tab-pane",{key:"wallet",attrs:{tab:"钱包流水(7.13)"}},[t("a-button",{attrs:{loading:e.upLoading,disabled:!e.enterpriseId},on:{click:function(t){return e.query("wallet")}}},[e._v("查询")]),t("p",{staticClass:"sub mt-8"},[e._v("企油通默认只回溯近 1 个月流水。")]),e.result.wallet?t("a-table",{attrs:{size:"small",rowKey:"transactionId",pagination:!1,columns:e.walletColumns,dataSource:e.result.wallet.transactionDetails||[]}}):e._e()],1),t("a-tab-pane",{key:"orders",attrs:{tab:"最近订单"}},[t("p",{staticClass:"sub"},[e._v("发放失败原因里能看到上游实名二要素核验的结果。")]),t("a-table",{attrs:{size:"small",rowKey:"order_id",pagination:!1,columns:e.orderColumns,dataSource:e.orders},scopedSlots:e._u([{key:"zsy",fn:function(a,r){return t("span",{},[t("a-tag",{attrs:{color:{1:"blue",2:"green",3:"red"}[r.oil_status_zsy]||""}},[e._v(" "+e._s({0:"未提交",1:"发放中",2:"发放成功",3:"发放失败"}[r.oil_status_zsy])+" ")])],1)}}],null,!1,1747132722)})],1)],1)]:e._e()],2)],1)],1)},i=[],s=a("ade3"),o=a("5530"),n=(a("d3b7"),a("b775")),l={list:"/qyt.driver/list",detail:"/qyt.driver/detail",upstream:"/qyt.driver/upstream"};function c(e){return Object(n["b"])({url:l.list,method:"get",params:e})}function u(e){return Object(n["b"])({url:l.detail,method:"get",params:e})}function d(e){return Object(n["b"])({url:l.upstream,method:"get",params:e})}var m=a("ab09"),p={name:"QytDriverIndex",components:{STable:m["b"]},data:function(){var e=this;return{searchForm:this.$form.createForm(this),queryParam:{},columns:[{title:"ID",dataIndex:"driver_id",width:70},{title:"司机",scopedSlots:{customRender:"driver"}},{title:"订单",scopedSlots:{customRender:"orders"}},{title:"金额(本地口径)",scopedSlots:{customRender:"amount"}},{title:"最近下单",dataIndex:"last_order_time_text",width:170},{title:"操作",width:120,scopedSlots:{customRender:"action"}}],loadData:function(t){return c(Object(o["a"])(Object(o["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))},drawer:!1,detailLoading:!1,detail:{},enterprises:[],orders:[],enterpriseId:void 0,tab:"balance",upLoading:!1,result:{},balanceColumns:[{title:"企业",dataIndex:"enterprise_name"},{title:"凭证总额(元)",dataIndex:"total_amount_yuan"},{title:"可用(元)",dataIndex:"available_amount_yuan"}],voucherColumns:[{title:"凭证ID",dataIndex:"quota_id"},{title:"名称",dataIndex:"quota_name"},{title:"总额度",dataIndex:"total_amount"},{title:"可用",dataIndex:"available_amount"},{title:"已用",dataIndex:"used_amount"},{title:"冻结",dataIndex:"freeze_amount"},{title:"状态",dataIndex:"status_text"},{title:"有效期至",dataIndex:"effective_end"}],walletColumns:[{title:"时间",dataIndex:"transactionTime"},{title:"类型",dataIndex:"transactionType"},{title:"金额(元)",dataIndex:"amount_yuan"},{title:"备注",dataIndex:"remark"},{title:"流水号",dataIndex:"transactionId"}],orderColumns:[{title:"油卡编号",dataIndex:"oilCardNo"},{title:"金额",dataIndex:"total_price"},{title:"发放",scopedSlots:{customRender:"zsy"}},{title:"说明",dataIndex:"oil_text"},{title:"退款",dataIndex:"refund_status_text"},{title:"下单时间",dataIndex:"create_time_text"}]}},methods:{handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam={keyword:a.keyword||"",conflict:a.conflict},t.$refs.table.refresh(!0))}))},openDetail:function(e){var t=this;this.drawer=!0,this.detail={},this.enterprises=[],this.orders=[],this.result={},this.tab="balance",this.enterpriseId=void 0,this.detailLoading=!0,u({driverId:e.driver_id}).then((function(e){t.detail=e.data.detail,t.enterprises=e.data.enterprises,t.orders=e.data.orders,t.enterpriseId=t.enterprises.length?t.enterprises[0].enterprise_id:void 0})).finally((function(){t.detailLoading=!1}))},onTabChange:function(){},query:function(e){var t=this;this.upLoading=!0,d({driverId:this.detail.driver_id,enterpriseId:this.enterpriseId,type:e}).then((function(a){t.result=Object(o["a"])(Object(o["a"])({},t.result),{},Object(s["a"])({},e,a.data.data))})).finally((function(){t.upLoading=!1}))}}},f=p,h=(a("39f0"),a("2877")),v=Object(h["a"])(f,r,i,!1,null,"16a6e947",null);t["default"]=v.exports},"9b62":function(e,t,a){"use strict";a("24ba")},"9f1c":function(e,t,a){},"9f7c":function(e,t,a){},"9f8e":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"代理商名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("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个字符'}]}]"}],attrs:{placeholder:"请输入代理商名称"}})],1),t("a-form-item",{attrs:{label:"代理商地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["address",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['address', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入代理商地址"}})],1),t("a-form-item",{attrs:{label:"联系人",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_name",{rules:[{required:!1}]}],expression:"['contact_name', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系人"}})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_tel",{rules:[{required:!1}]}],expression:"['contact_tel', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系电话"}})],1)],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=(a("d3b7"),a("c519")),o=a("2af9"),n=a("86e8"),l=a("ca00"),c={components:{InputNumberGroup:o["b"]},data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),merchantId:null,formData:n["a"].formData}},created:function(){this.initData()},beforeDestroy:function(){n["a"].formData.merchant={}},methods:{initData:function(){var e=this;this.merchantId=this.$route.query.merchantId,this.isLoading=!0,n["a"].getFromData(this.merchantId).then((function(){Object(l["f"])(e.form.getFieldsValue())||e.form.setFieldsValue(n["a"].getFieldsValue()),e.isLoading=!1}))},onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){return e?(t.onTargetTabError(e),!1):(t.onFormSubmit(a),!0)}))},onTargetTabError:function(e){},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,s["e"]({merchantId:this.merchantId,form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))}}},u=c,d=(a("7367"),a("2877")),m=Object(d["a"])(u,r,i,!1,null,"1d6c4b44",null);t["default"]=m.exports},a11a:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"关键字搜索"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["search"],expression:"['search']"}],attrs:{placeholder:"合作商编号/合作商名称/合作商地址/联系人/联系电话"}})],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),t("div",{staticClass:"row-item-tab clearfix"},[e.$auth("/partners/create")?t("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:e.handleCreate}},[e._v("新增")]):e._e(),e.selectedRowKeys.length?t("div",{staticClass:"button-group"},[t("a-button-group",{staticClass:"ml-10"},[t("a-button",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(t){return e.handleDelete(e.selectedRowKeys)}}},[e._v("删除")])],1)],1):e._e()],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"partners_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pageSize:15,scroll:{x:1670}},scopedSlots:e._u([{key:"qyt",fn:function(a,r){return t("div",{},["bind"===r.qyt_enterprise_source?[t("p",{staticClass:"qyt-name"},[e._v(e._s(r.qyt_enterprise_name))]),t("p",{staticClass:"qyt-sub"},[e._v("已绑定 · "+e._s(r.qyt_enterprise_channel))])]:"default"===r.qyt_enterprise_source?[t("p",{staticClass:"qyt-name"},[e._v(e._s(r.qyt_enterprise_name))]),t("p",{staticClass:"qyt-sub"},[e._v("未绑定,使用默认企业 · "+e._s(r.qyt_enterprise_channel))])]:"invalid"===r.qyt_enterprise_source?[t("p",{staticClass:"qyt-name text-red"},[e._v("绑定失效:"+e._s(r.qyt_bind_name||"企业已删除"))]),t("p",{staticClass:"qyt-sub"},[e._v(e._s(r.qyt_enterprise_name?"实际使用默认企业 "+r.qyt_enterprise_name:"且没有默认企业,下单会被拒绝"))])]:t("p",{staticClass:"qyt-name text-red"},[e._v("无可用企业,下单会被拒绝")])],2)}},{key:"address",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(a))])])}},{key:"action",fn:function(a,r){return t("div",{staticClass:"actions"},[t("a",{directives:[{name:"action",rawName:"v-action:para",arg:"para"}],attrs:{title:"合作商对接参数"},on:{click:function(t){return e.handleApiPara(r)}}},[e._v("对接参数")]),t("a",{directives:[{name:"action",rawName:"v-action:recharge",arg:"recharge"}],attrs:{title:"合作商充值"},on:{click:function(t){return e.handleRecharge(r)}}},[e._v("充值")]),e.$auth("/partners/update")?t("router-link",{attrs:{to:{path:"/partners/update",query:{partnersId:r.partners_id}}}},[e._v("编辑")]):e._e(),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete([r.partners_id])}}},[e._v("删除")])],1)}}])}),t("RechargeForm",{ref:"RechargeForm",on:{handleSubmit:e.handleRefresh}}),t("ApiParaForm",{ref:"ApiParaForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],s=a("5530"),o=(a("d3b7"),a("e533")),n=a("2af9"),l=function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:520,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-tabs",{attrs:{activeKey:e.activeKey},on:{change:e.onChangeTabs}},[t("a-tab-pane",{key:e.RECHARGE_TYPE_BALANCE,attrs:{tab:"充值余额"}},[e.activeKey===e.RECHARGE_TYPE_BALANCE?[t("a-form-item",{staticClass:"mb-5",attrs:{label:"合作商ID",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.partners_id))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"当前余额",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",{staticClass:"c-p"},[e._v(e._s(e.record.balance))])]),t("a-form-item",{attrs:{label:"充值方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".mode"),{initialValue:"inc",rules:[{required:!0}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.mode`, { initialValue: 'inc', rules: [{ required: true }] }]"}]},[t("a-radio",{attrs:{value:"inc"}},[e._v("增加")]),t("a-radio",{attrs:{value:"dec"}},[e._v("减少")]),t("a-radio",{attrs:{value:"final"}},[e._v("最终金额")])],1)],1),t("a-form-item",{attrs:{label:"变更金额",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".money"),{initialValue:"",rules:[{required:!0,message:"请输入变更的金额"}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.money`, { initialValue: '', rules: [{ required: true, message: '请输入变更的金额' }] }]"}],attrs:{min:.01}})],1),t("a-form-item",{attrs:{label:"管理员备注",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["".concat(e.RECHARGE_TYPE_BALANCE,".remark"),{rules:[{required:!0,message:"请输入管理员备注"}]}],expression:"[`${RECHARGE_TYPE_BALANCE}.remark`, { rules: [{ required: true, message: '请输入管理员备注' }] }]"}],attrs:{placeholder:"请输入管理员备注",rows:3}})],1)]:e._e()],2)],1)],1)],1)],1)},c=[],u="balance",d="points",m={components:{},data:function(){return{title:"合作商充值",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),activeKey:u,RECHARGE_TYPE_BALANCE:u,RECHARGE_TYPE_POINTS:d,record:{}}},methods:{handle:function(e){this.visible=!0,this.record=e},onChangeTabs:function(e){this.activeKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.form.resetFields()},onFormSubmit:function(e){var t=this,a=this.record,r=this.activeKey;this.confirmLoading=!0,o["g"]({partnersId:a.partners_id,target:r,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(){t.confirmLoading=!1}))}}},p=m,f=(a("5b64"),a("2877")),h=Object(f["a"])(p,l,c,!1,null,"11da5822",null),v=h.exports,b=function(){var e=this,t=e._self._c;return t("a-modal",{staticClass:"noborder",attrs:{title:e.title,width:900,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1},on:{cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-tabs",{attrs:{activeKey:e.activeKey},on:{change:e.onChangeTabs}},[t("a-tab-pane",{key:e.RECHARGE_TYPE_BALANCE,attrs:{tab:"合作商对接参数"}},[e.activeKey===e.RECHARGE_TYPE_BALANCE?[t("a-form-item",{staticClass:"mb-5",attrs:{label:"合作商编号",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.orgNo))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"合作商appKey",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.appKey))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"合作商私钥",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.privateKey))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"合作商公钥",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.publicKey))])]),t("a-form-item",{staticClass:"mb-5",attrs:{label:"回调地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("span",[e._v(e._s(e.record.callback))])])]:e._e()],2)],1)],1)],1)],1)},_=[],g="balance",C={components:{},data:function(){return{title:"合作商对接参数",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),activeKey:g,RECHARGE_TYPE_BALANCE:g,record:{}}},methods:{handle:function(e){this.visible=!0,this.record=e},onChangeTabs:function(e){this.activeKey=e},handleCancel:function(){this.visible=!1,this.form.resetFields()}}},y=C,w=(a("9b62"),Object(f["a"])(y,b,_,!1,null,"8a3efe68",null)),x=w.exports,L=a("ca00"),S=[{title:"合作商ID",width:"70px",dataIndex:"partners_id"},{title:"合作商编号",width:"150px",dataIndex:"orgNo"},{title:"合作商名称",width:"150px",dataIndex:"name"},{title:"企油通企业",width:"220px",scopedSlots:{customRender:"qyt"}},{title:"合作商地址",width:"200px",dataIndex:"address"},{title:"联系人",width:"150px",dataIndex:"contact_name"},{title:"联系电话",width:"150px",dataIndex:"contact_tel"},{title:"余额",width:"150px",dataIndex:"balance"},{title:"今日金额",width:"150px",dataIndex:"day_money"},{title:"油券总金额",width:"150px",dataIndex:"total_money"},{title:"appKey",dataIndex:"appKey",width:"300px"},{title:"回调地址",dataIndex:"callback",width:"300px",scopedSlots:{customRender:"callback"}},{title:"创建时间",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"200px",fixed:"right",scopedSlots:{customRender:"action"}}],k={name:"Index",components:{ContentHeader:n["a"],RechargeForm:v,ApiParaForm:x,STable:n["c"]},data:function(){var e=this;return{searchForm:this.$form.createForm(this),queryParam:{},isLoading:!1,columns:S,selectedRowKeys:[],loadData:function(t){return o["f"](Object(s["a"])(Object(s["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},beforeCreate:function(){Object(L["a"])(this,{inArray:L["d"]})},created:function(){},computed:{rowSelection:function(){return{selectedRowKeys:this.selectedRowKeys,onChange:this.onSelectChange}}},methods:{onSelectChange:function(e){this.selectedRowKeys=e},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(s["a"])(Object(s["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},handleReset:function(){this.searchForm.resetFields()},handleRecharge:function(e){this.$refs.RechargeForm.handle(e)},handleApiPara:function(e){this.$refs.ApiParaForm.handle(e)},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return o["c"](e).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){a.destroy()}))}})},handleCreate:function(){this.$router.push("/partners/create")},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectedRowKeys=[],this.$refs.table.refresh(e)}}},D=k,q=(a("4603"),Object(f["a"])(D,r,i,!1,null,"5337156e",null));t["default"]=q.exports},ab64:function(e,t,a){},acbe:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"商品名称"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsName"],expression:"['goodsName']"}],attrs:{placeholder:"请输入商品名称/编码"}})],1),t("a-form-item",{attrs:{label:"订单号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["orderNo"],expression:"['orderNo']"}],attrs:{placeholder:"请输入订单号"}})],1),t("a-form-item",{attrs:{label:"会员ID"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["userId"],expression:"['userId']"}],attrs:{placeholder:"请输入会员ID"}})],1),t("a-form-item",{attrs:{label:"状态"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:-1}],expression:"['status', { initialValue: -1 }]"}]},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),t("a-select-option",{attrs:{value:1}},[e._v("显示")]),t("a-select-option",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),t("div",{staticClass:"row-item-tab clearfix"},[t("div",{staticClass:"tab-list fl-l"},[t("a-radio-group",{attrs:{defaultValue:e.queryParam.score},on:{change:e.handleTabs}},[t("a-radio-button",{attrs:{value:0}},[e._v("全部")]),t("a-radio-button",{attrs:{value:10}},[e._v("好评")]),t("a-radio-button",{attrs:{value:20}},[e._v("中评")]),t("a-radio-button",{attrs:{value:30}},[e._v("差评")])],1)],1)])],1),t("s-table",{ref:"table",attrs:{rowKey:"comment_id",loading:e.isLoading,columns:e.columns,data:e.loadData,pageSize:15,scroll:{x:1450}},scopedSlots:e._u([{key:"orderGoods",fn:function(e){return t("span",{},[t("GoodsItem",{attrs:{data:{image:e.goods_image,imageAlt:"商品图片",title:e.goods_name,goodsProps:e.goods_props}}})],1)}},{key:"user",fn:function(e){return t("span",{},[t("UserItem",{attrs:{user:e}})],1)}},{key:"score",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:{10:"green",20:"",30:"red"}[a]}},[e._v(e._s({10:"好评",20:"中评",30:"差评"}[a]))])],1)}},{key:"content",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(a))])])}},{key:"is_picture",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"是":"否"))])],1)}},{key:"status",fn:function(a){return t("span",{},[t("a-tag",{attrs:{color:a?"green":""}},[e._v(e._s(a?"显示":"隐藏"))])],1)}},{key:"action",fn:function(a,r){return t("span",{},[t("a",{directives:[{name:"action",rawName:"v-action:edit",arg:"edit"}],staticStyle:{"margin-right":"8px"},on:{click:function(t){return e.handleEdit(r)}}},[e._v("编辑")]),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:{click:function(t){return e.handleDelete(r)}}},[e._v("删除")])])}}])}),t("EditForm",{ref:"EditForm",on:{handleSubmit:e.handleRefresh}})],1)},i=[],s=a("5530"),o=(a("d3b7"),a("b775")),n={list:"/goods.comment/list",detail:"/goods.comment/detail",edit:"/goods.comment/edit",delete:"/goods.comment/delete"};function l(e){return Object(o["b"])({url:n.list,method:"get",params:e})}function c(e){return Object(o["b"])({url:n.detail,method:"get",params:e})}function u(e){return Object(o["b"])({url:n.edit,method:"post",data:e})}function d(e){return Object(o["b"])({url:n.delete,method:"post",data:e})}var m=a("ab09"),p=function(){var e=this,t=e._self._c;return t("a-modal",{attrs:{title:e.title,width:720,visible:e.visible,confirmLoading:e.confirmLoading,maskClosable:!1,destroyOnClose:!0},on:{ok:e.handleSubmit,cancel:e.handleCancel}},[t("a-spin",{attrs:{spinning:e.confirmLoading}},[t("a-form",{attrs:{form:e.form}},[t("a-form-item",{attrs:{label:"评分",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["score",{initialValue:10,rules:[{required:!0}]}],expression:"['score', {initialValue: 10, rules: [{required: true}]}]"}]},[t("a-radio",{attrs:{value:10}},[e._v("好评")]),t("a-radio",{attrs:{value:20}},[e._v("中评")]),t("a-radio",{attrs:{value:30}},[e._v("差评")])],1)],1),t("a-form-item",{attrs:{label:"评价内容",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-textarea",{directives:[{name:"decorator",rawName:"v-decorator",value:["content"],expression:"['content']"}],attrs:{placeholder:"请输入评价内容 (300个字符以内)",autoSize:{minRows:4}}})],1),t("a-form-item",{attrs:{label:"评价图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"最多允许6张,可拖拽调整显示顺序"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["imageIds"],expression:"['imageIds']"}],attrs:{multiple:"",maxNum:6,defaultList:e.record.imageList}})],1),t("a-form-item",{attrs:{label:"状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端是否展示"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:1,rules:[{required:!0}]}],expression:"['status', {initialValue: 1, rules: [{required: true}]}]"}]},[t("a-radio",{attrs:{value:1}},[e._v("显示")]),t("a-radio",{attrs:{value:0}},[e._v("隐藏")])],1)],1),t("a-form-item",{attrs:{label:"排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("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)},f=[],h=a("88bc"),v=a.n(h),b=a("2af9"),_={components:{SelectImage:b["e"]},data:function(){return{title:"编辑评价",labelCol:{span:7},wrapperCol:{span:13},visible:!1,confirmLoading:!1,form:this.$form.createForm(this),commentId:null,record:{}}},methods:{edit:function(e){this.visible=!0,this.commentId=e,this.getRecordData()},getRecordData:function(){var e=this;this.confirmLoading=!0,c({commentId:this.commentId}).then((function(t){e.record=t.data.detail,e.setFieldsValue()})).finally((function(t){e.confirmLoading=!1}))},setFieldsValue:function(){var e=this,t=this.form.setFieldsValue;this.$nextTick((function(){t(v()(e.record,["score","content","status","sort","imageIds"]))}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){!e&&t.onFormSubmit(a)}))},handleCancel:function(){this.visible=!1,this.record={},this.form.resetFields()},onFormSubmit:function(e){var t=this;this.confirmLoading=!0,u({commentId:this.commentId,form:e}).then((function(a){t.$message.success(a.message,1.5),t.handleCancel(),t.$emit("handleSubmit",e)})).finally((function(e){t.confirmLoading=!1}))}}},g=_,C=a("2877"),y=Object(C["a"])(g,p,f,!1,null,null,null),w=y.exports,x=[{title:"ID",dataIndex:"comment_id"},{title:"商品信息",dataIndex:"orderGoods",width:"320px",scopedSlots:{customRender:"orderGoods"}},{title:"买家",dataIndex:"user",scopedSlots:{customRender:"user"}},{title:"评分",dataIndex:"score",scopedSlots:{customRender:"score"}},{title:"评价内容",dataIndex:"content",scopedSlots:{customRender:"content"}},{title:"图片评价",dataIndex:"is_picture",scopedSlots:{customRender:"is_picture"}},{title:"状态",dataIndex:"status",scopedSlots:{customRender:"status"}},{title:"排序",dataIndex:"sort"},{title:"评价时间",width:"180px",dataIndex:"create_time"},{title:"操作",dataIndex:"action",width:"150px",fixed:"right",scopedSlots:{customRender:"action"}}],L={name:"Index",components:{STable:m["b"],GoodsItem:m["a"],UserItem:m["c"],EditForm:w},data:function(){var e=this;return{expand:!1,searchForm:this.$form.createForm(this),categoryListTree:[],queryParam:{score:0},isLoading:!1,columns:x,loadData:function(t){return l(Object(s["a"])(Object(s["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){},methods:{handleTabs:function(e){this.queryParam.score=e.target.value,this.handleRefresh(!0)},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam=Object(s["a"])(Object(s["a"])({},t.queryParam),a),t.handleRefresh(!0))}))},handleDelete:function(e){var t=this,a=this.$confirm({title:"您确定要删除该记录吗?",content:"删除后不可恢复",onOk:function(){return d({commentId:e.comment_id}).then((function(e){t.$message.success(e.message,1.5),t.handleRefresh()})).finally((function(e){a.destroy()}))}})},handleEdit:function(e){this.$refs.EditForm.edit(e.comment_id)},handleRefresh:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.table.refresh(e)}}},S=L,k=(a("6162"),Object(C["a"])(S,r,i,!1,null,"944533f0",null));t["default"]=k.exports},b06c:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-alert",{staticClass:"tips-alert",attrs:{type:"info","show-icon":""}},[t("div",{attrs:{slot:"message"},slot:"message"},[e._v(" 企油通 7.14 按「企业 + 月份(+ 司机手机号)」出具发票,发票地址与单笔订单没有对应关系。 订单列表里点「发票」会自动按该订单的企业、消费月份、司机同步;这里可以按月批量同步或手动补同步。 ")])]),t("a-form",{staticClass:"sync-form",attrs:{layout:"inline",form:e.syncForm},on:{submit:e.handleSync}},[t("a-form-item",{attrs:{label:"企业"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["enterpriseId",{initialValue:0}],expression:"['enterpriseId', { initialValue: 0 }]"}],staticStyle:{width:"220px"}},[t("a-select-option",{attrs:{value:0}},[e._v("全部启用企业(企业全量)")]),e._l(e.enterpriseList,(function(a){return t("a-select-option",{key:a.enterprise_id,attrs:{value:a.enterprise_id}},[e._v(" "+e._s(a.company_name)+" ")])}))],2)],1),t("a-form-item",{attrs:{label:"月份"}},[t("a-month-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["month",{rules:[{required:!0,message:"请选择月份"}]}],expression:"['month', { rules: [{ required: true, message: '请选择月份' }] }]"}],attrs:{placeholder:"选择月份"}})],1),t("a-form-item",{attrs:{label:"司机手机号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mobile"],expression:"['mobile']"}],attrs:{placeholder:"选填,仅指定企业时有效",allowClear:""}})],1),t("a-form-item",[t("a-button",{attrs:{type:"primary","html-type":"submit",icon:"sync",loading:e.isSyncing}},[e._v("同步发票")])],1)],1),t("a-divider"),t("a-form",{staticClass:"search-form",attrs:{layout:"inline",form:e.searchForm},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"企业"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["qyt_enterprise_id",{initialValue:0}],expression:"['qyt_enterprise_id', { initialValue: 0 }]"}],staticStyle:{width:"200px"}},[t("a-select-option",{attrs:{value:0}},[e._v("全部")]),e._l(e.enterpriseList,(function(a){return t("a-select-option",{key:a.enterprise_id,attrs:{value:a.enterprise_id}},[e._v(" "+e._s(a.company_name)+" ")])}))],2)],1),t("a-form-item",{attrs:{label:"月份"}},[t("a-month-picker",{directives:[{name:"decorator",rawName:"v-decorator",value:["month"],expression:"['month']"}],attrs:{placeholder:"全部"}})],1),t("a-form-item",{attrs:{label:"司机手机号"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["mobile"],expression:"['mobile']"}],attrs:{placeholder:"手机号",allowClear:""}})],1),t("a-form-item",{attrs:{label:"发票"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["has_invoice",{initialValue:-1}],expression:"['has_invoice', { initialValue: -1 }]"}],staticStyle:{width:"110px"}},[t("a-select-option",{attrs:{value:-1}},[e._v("全部")]),t("a-select-option",{attrs:{value:1}},[e._v("已出具")]),t("a-select-option",{attrs:{value:0}},[e._v("暂无")])],1)],1),t("a-form-item",[t("a-button",{attrs:{type:"primary","html-type":"submit",icon:"search"}},[e._v("搜索")])],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"invoice_id",columns:e.columns,data:e.loadData},scopedSlots:e._u([{key:"dimension",fn:function(a){return[t("p",{staticClass:"mtb-2"},[t("b",[e._v(e._s(a.company_name))])]),t("p",{staticClass:"mtb-2 sub"},[e._v(e._s("pingan"===a.passageway?"平安银行":"支付宝企业码")+"  "+e._s(a.month)+"  "+e._s(a.mobile_mask))])]}},{key:"invoices",fn:function(a){return[a.invoice_urls.length?e._l(a.invoice_urls,(function(a,r){return t("p",{key:a,staticClass:"mtb-2"},[t("a",{attrs:{href:a,target:"_blank",rel:"noopener noreferrer"}},[e._v("发票 "+e._s(r+1))])])})):t("span",{staticClass:"sub"},[e._v("暂无")])]}},{key:"sync",fn:function(a){return[t("a-tag",{attrs:{color:{1:"green",2:"red"}[a.sync_status]||""}},[e._v(e._s({0:"未同步",1:"成功",2:"失败"}[a.sync_status]))]),t("p",{staticClass:"mtb-2 sub"},[e._v(e._s(a.sync_text))]),t("p",{staticClass:"mtb-2 sub"},[e._v(e._s(a.sync_time_text))])]}},{key:"action",fn:function(a){return[t("a",{on:{click:function(t){return e.handleResync(a)}}},[e._v("重新同步")])]}}])})],1)},i=[],s=a("5530"),o=(a("d3b7"),a("b775")),n={list:"/qyt.invoice/list",sync:"/qyt.invoice/sync"};function l(e){return Object(o["b"])({url:n.list,method:"get",params:e})}function c(e){return Object(o["b"])({url:n.sync,method:"post",data:e})}var u=a("763d"),d=a("ab09"),m={name:"QytInvoiceIndex",components:{STable:d["b"]},data:function(){var e=this;return{syncForm:this.$form.createForm(this),searchForm:this.$form.createForm(this),enterpriseList:[],isSyncing:!1,queryParam:{},columns:[{title:"ID",dataIndex:"invoice_id",width:70},{title:"企业 / 通道 / 月份 / 维度",scopedSlots:{customRender:"dimension"}},{title:"发票",scopedSlots:{customRender:"invoices"}},{title:"加油明细条数",dataIndex:"order_count",width:110},{title:"同步状态",scopedSlots:{customRender:"sync"}},{title:"操作",width:100,scopedSlots:{customRender:"action"}}],loadData:function(t){return l(Object(s["a"])(Object(s["a"])({},t),e.queryParam)).then((function(e){return e.data.list}))}}},created:function(){var e=this;u["g"]().then((function(t){e.enterpriseList=t.data.list}))},methods:{handleSync:function(e){var t=this;e.preventDefault(),this.syncForm.validateFields((function(e,a){e||t.doSync({enterpriseId:a.enterpriseId||0,month:a.month.format("YYYY-MM"),mobile:a.enterpriseId&&a.mobile||""})}))},handleResync:function(e){this.doSync({enterpriseId:e.qyt_enterprise_id,month:e.month,mobile:e.mobile})},doSync:function(e){var t=this;this.isSyncing=!0,c(e).then((function(e){t.$message.success(e.message,2),t.$refs.table.refresh()})).finally((function(){t.isSyncing=!1}))},handleSearch:function(e){var t=this;e.preventDefault(),this.searchForm.validateFields((function(e,a){e||(t.queryParam={qyt_enterprise_id:a.qyt_enterprise_id||"",month:a.month?a.month.format("YYYY-MM"):"",mobile:a.mobile||"",has_invoice:a.has_invoice},t.$refs.table.refresh(!0))}))}}},p=m,f=(a("9170"),a("2877")),h=Object(f["a"])(p,r,i,!1,null,"64a82a48",null);t["default"]=h.exports},b126:function(e,t,a){"use strict";a("9f1c")},b38a:function(e,t,a){"use strict";a("e05c")},b551:function(e,t,a){"use strict";a("6a27")},b91a:function(e,t,a){},bb0b:function(e,t,a){},bba5:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"合作商名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("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个字符'}]}]"}],attrs:{placeholder:"请输入合作商名称"}})],1),t("a-form-item",{attrs:{label:"合作商地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["address",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['address', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入合作商地址"}})],1),t("a-form-item",{attrs:{label:"联系人",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_name",{rules:[{required:!1}]}],expression:"['contact_name', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系人"}})],1),t("a-form-item",{attrs:{label:"联系电话",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["contact_tel",{rules:[{required:!1}]}],expression:"['contact_tel', {rules: [{required: false}]}]"}],attrs:{placeholder:"请输入联系电话"}})],1),t("a-form-item",{attrs:{label:"回调地址",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["callback",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['callback', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入回调地址"}})],1),t("a-form-item",{attrs:{label:"企油通企业",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["qyt_enterprise_id"],expression:"['qyt_enterprise_id']"}],attrs:{placeholder:"不选则使用默认企业",allowClear:""}},e._l(e.enterpriseList,(function(a){return t("a-select-option",{key:a.enterprise_id,attrs:{value:a.enterprise_id}},[e._v(" "+e._s(a.company_name)+"("+e._s("pingan"===a.passageway?"平安银行":"支付宝企业码")+")"+e._s(a.is_default?" · 默认":"")+" ")])})),1),t("div",{staticClass:"form-item-help"},[t("p",{staticClass:"extra"},[e._v("该合作商下单时使用哪个企业的对接参数与支付通道。留空则走默认企业。")])])],1)],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=a("5530"),o=(a("d3b7"),a("e533")),n=a("763d"),l=a("2af9"),c=a("08a5"),u=a("ca00"),d={components:{InputNumberGroup:l["b"]},data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),partnersId:null,formData:c["a"].formData,enterpriseList:[]}},created:function(){this.getEnterpriseList(),this.initData()},beforeDestroy:function(){c["a"].formData.partners={}},methods:{getEnterpriseList:function(){var e=this;n["g"]().then((function(t){e.enterpriseList=t.data.list}))},initData:function(){var e=this;this.partnersId=this.$route.query.partnersId,this.isLoading=!0,c["a"].getFromData(this.partnersId).then((function(){Object(u["f"])(e.form.getFieldsValue())||e.form.setFieldsValue(c["a"].getFieldsValue()),e.isLoading=!1}))},onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){return e?(t.onTargetTabError(e),!1):(t.onFormSubmit(a),!0)}))},onTargetTabError:function(e){},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,o["e"]({partnersId:this.partnersId,form:Object(s["a"])(Object(s["a"])({},e),{},{qyt_enterprise_id:e.qyt_enterprise_id||0})}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))}}},m=d,p=(a("761a"),a("2877")),f=Object(p["a"])(m,r,i,!1,null,"9bc6a936",null);t["default"]=f.exports},c095:function(e,t,a){},c1df6:function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}}),t("a-tab-pane",{key:1,attrs:{tab:"规格/库存"}}),t("a-tab-pane",{key:2,attrs:{tab:"商品详情"}}),t("a-tab-pane",{key:3,attrs:{tab:"更多设置"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"商品名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['goods_name', { rules: [{ required: true, min: 2, message: '请输入至少2个字符' }] }]"}],attrs:{placeholder:"请输入商品名称"}})],1),t("a-form-item",{attrs:{label:"商品分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["categorys",{rules:[{required:!0,message:"请至少选择1个商品分类"}]}],expression:"['categorys', { rules: [{required: true, message: '请至少选择1个商品分类'}]}]"}],attrs:{placeholder:"请选择商品分类",dropdownStyle:{maxHeight:"500px",overflow:"auto"},treeData:e.formData.categoryList,treeCheckable:"",treeCheckStrictly:"",allowClear:""}}),t("div",{staticClass:"form-item-help"},[t("router-link",{attrs:{target:"_blank",to:{path:"/goods/category/index"}}},[e._v("去新增")]),t("a",{attrs:{href:"javascript:;"},on:{click:e.onReloadCategoryList}},[e._v("刷新")])],1)],1),t("a-form-item",{attrs:{label:"商品图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸:750*750像素, 最多上传10张, 可拖拽图片调整顺序, 第1张将作为商品首图"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["imagesIds",{rules:[{required:!0,message:"请至少上传1张商品图片"}]}],expression:"['imagesIds', { rules: [{ required: true, message: '请至少上传1张商品图片' }] }]"}],attrs:{multiple:"",maxNum:10,defaultList:e.formData.goods.goods_images}})],1),t("a-form-item",{staticClass:"mb-5",attrs:{label:"卡券类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"选择中石油油券时所属省份和商品编码必填,选择优惠券时优惠券必选"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["oilCardType",{rules:[{required:!0,message:"请选择卡券类型"}],initialValue:"zsy_ticket"}],expression:"[`oilCardType`, { rules: [{required: true, message: '请选择卡券类型'}], initialValue: 'zsy_ticket' }]"}],staticStyle:{width:"300px"}},e._l(e.OilCardTypeEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])})),1)],1),t("a-form-item",{attrs:{label:"所属省份",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["province",{rules:[{message:"请选择所属省份"}]}],expression:"['province', {rules: [{message: '请选择所属省份'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择所属省份"}},[t("a-select-option",{key:"",attrs:{value:""}},[e._v("无")]),e._l(e.formData.province,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a}},[e._v(e._s(a))])}))],2)],1),t("a-form-item",{attrs:{label:"商品编码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_no",{rules:[{message:"请输入至少2个字符"}]}],expression:"['goods_no', {rules: [{message: '请输入至少2个字符'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请输入商品编码"}})],1),t("MultiCoupon",{ref:"MultiCoupon",attrs:{couponList:e.formData.coupon,defaultCouponList:e.formData.goods.couponList},on:{change:e.handleCouponChange}}),t("a-form-item",{attrs:{label:"商品状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:10,rules:[{required:!0}]}],expression:"['status', {initialValue: 10, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:10}},[e._v("上架")]),t("a-radio",{attrs:{value:20}},[e._v("下架")])],1)],1),t("a-form-item",{attrs:{label:"商品排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0}]}],expression:"['sort', {initialValue: 100, rules:[{ required: true }]}]"}],attrs:{min:0}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:1==e.tabKey,expression:"tabKey == 1"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"规格类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["spec_type",{initialValue:10,rules:[{required:!0}]}],expression:"['spec_type', {initialValue: 10, rules: [{ required: true }]}]"}],on:{change:function(t){return e.onForceUpdate()}}},[t("a-radio",{attrs:{value:10}},[e._v("单规格")]),t("a-radio",{attrs:{value:20}},[e._v("多规格")])],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:20==e.form.getFieldValue("spec_type"),expression:"form.getFieldValue('spec_type') == 20"}]},[t("MultiSpec",{ref:"MultiSpec",attrs:{defaultSpecList:e.formData.goods.specList,defaultSkuList:e.formData.goods.skuList}})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:10==e.form.getFieldValue("spec_type"),expression:"form.getFieldValue('spec_type') == 10"}]},[t("a-form-item",{attrs:{label:"商品价格",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商品的实际购买金额,最低0.01"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_price",{rules:[{required:!0,message:"请输入商品价格"}]}],expression:"['goods_price', { rules:[{ required: true, message: '请输入商品价格' }] }]"}],attrs:{min:.01,precision:2}}),t("span",{staticClass:"ml-10"},[e._v("元")])],1),t("a-form-item",{attrs:{label:"划线价",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"划线价仅用于商品页展示"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["line_price"],expression:"['line_price']"}],attrs:{min:0,precision:2}}),t("span",{staticClass:"ml-10"},[e._v("元")])],1),t("a-form-item",{attrs:{label:"当前库存数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商品的实际库存数量,为0时用户无法下单"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stock_num",{initialValue:100,rules:[{required:!0,message:"请输入库存数量"}]}],expression:"['stock_num', { initialValue: 100, rules:[{ required: true, message: '请输入库存数量' }] }]"}],attrs:{min:0,precision:0}}),t("span",{staticClass:"ml-10"},[e._v("件")])],1),t("a-form-item",{attrs:{label:"商品重量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商品的实际重量,用于计算运费"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_weight",{initialValue:0,rules:[{required:!0,message:"请输入库存数量"}]}],expression:"['goods_weight', { initialValue: 0, rules:[{ required: true, message: '请输入库存数量' }] }]"}],attrs:{min:0}}),t("span",{staticClass:"ml-10"},[e._v("千克 (Kg)")])],1)],1),t("a-form-item",{attrs:{label:"库存计算方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["deduct_stock_type",{initialValue:10,rules:[{required:!0}]}],expression:"['deduct_stock_type', {initialValue: 10, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:10}},[e._v("下单减库存")]),t("a-radio",{attrs:{value:20}},[e._v("付款减库存")])],1)],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:2==e.tabKey,expression:"tabKey == 2"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"商品详情",labelCol:e.labelCol,wrapperCol:{span:16}}},[t("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"商品详情不能为空"}]}],expression:"['content', {rules: [{required: true, message: '商品详情不能为空'}]}]"}]})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:3==e.tabKey,expression:"tabKey == 3"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"主图视频",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议视频宽高比19:9,建议时长8-45秒"}},[t("SelectVideo",{directives:[{name:"decorator",rawName:"v-decorator",value:["video_id"],expression:"['video_id']"}],attrs:{multiple:!1,defaultList:e.formData.goods.video?[e.formData.goods.video]:[]}})],1),t("a-form-item",{attrs:{label:"视频封面",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸:750像素*750像素"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["video_cover_id"],expression:"['video_cover_id']"}],attrs:{multiple:!1,defaultList:e.formData.goods.videoCover?[e.formData.goods.videoCover]:[]}})],1),t("a-form-item",{attrs:{label:"商品卖点",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"一句话简述,例如:此款商品美观大方 性价比较高 不容错过"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["selling_point"],expression:"['selling_point']"}],attrs:{placeholder:"请输入商品卖点"}})],1),t("a-form-item",{attrs:{label:"服务与承诺",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[e.formData.serviceList?t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["serviceIds"],expression:"['serviceIds']"}],attrs:{mode:"multiple",placeholder:"请选择服务与承诺"}},e._l(e.formData.serviceList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.service_id}},[e._v(e._s(a.name))])})),1):e._e(),t("div",{staticClass:"form-item-help"},[t("router-link",{attrs:{target:"_blank",to:{path:"/goods/service/index"}}},[e._v("去新增")]),t("a",{attrs:{href:"javascript:;"},on:{click:e.onReloadServiceList}},[e._v("刷新")])],1)],1),t("a-form-item",{attrs:{label:"初始销量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端展示的销量 = 初始销量 + 实际销量"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sales_initial",{initialValue:0}],expression:"['sales_initial', {initialValue: 0}]"}]})],1),t("a-divider",{attrs:{orientation:"left"}},[e._v("积分设置")]),t("a-form-item",{attrs:{label:"积分赠送",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"开启后用户购买此商品将获得积分"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_points_gift",{initialValue:1,rules:[{required:!0}]}],expression:"['is_points_gift', {initialValue: 1, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),t("a-form-item",{attrs:{label:"积分抵扣",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"开启后用户购买此商品可以使用积分进行抵扣"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_points_discount",{initialValue:1,rules:[{required:!0}]}],expression:"['is_points_discount', {initialValue: 1, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),t("a-divider",{attrs:{orientation:"left"}},[e._v("会员折扣设置")]),t("a-form-item",{attrs:{label:"会员折扣",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"开启后会员折扣,会员购买此商品可以享受会员等级折扣价"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_enable_grade",{initialValue:1,rules:[{required:!0}]}],expression:"['is_enable_grade', {initialValue: 1, rules: [{ required: true }]}]"}],on:{change:function(t){return e.onForceUpdate(!0)}}},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),t("a-form-item",{directives:[{name:"show",rawName:"v-show",value:e.form.getFieldValue("is_enable_grade"),expression:"form.getFieldValue('is_enable_grade')"}],attrs:{label:"会员折扣设置",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_alone_grade",{initialValue:0,rules:[{required:!0}]}],expression:"['is_alone_grade', {initialValue: 0, rules: [{ required: true }]}]"}],on:{change:function(t){return e.onForceUpdate(!0)}}},[t("a-radio",{attrs:{value:0}},[e._v("默认等级折扣")]),t("a-radio",{attrs:{value:1}},[e._v("单独设置折扣")])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.form.getFieldValue("is_alone_grade"),expression:"form.getFieldValue('is_alone_grade')"}]},e._l(e.formData.userGradeList,(function(a){return t("a-form-item",{key:a.grade_id},[t("InputNumberGroup",{directives:[{name:"decorator",rawName:"v-decorator",value:["alone_grade_equity[grade_id:".concat(a.grade_id,"]"),{initialValue:e.formData.defaultUserGradeValue[a.grade_id],rules:[{required:!0,message:"折扣率不能为空"}]}],expression:"[`alone_grade_equity[grade_id:${item.grade_id}]`, {\n initialValue: formData.defaultUserGradeValue[item.grade_id], rules: [{required: true, message: '折扣率不能为空'}]\n }]"}],attrs:{addonBefore:a.name,addonAfter:"折",inputProps:{min:0,max:9.9}}})],1)})),1),t("div",{staticClass:"form-item-help"},[e.form.getFieldValue("is_alone_grade")?t("p",{staticClass:"extra"},[e._v("单独折扣:折扣率范围0.0-9.9,例如: 9.8代表98折,0代表不折扣")]):t("p",{staticClass:"extra"},[e._v("默认折扣:默认为用户所属会员等级的折扣率")])])],1)],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=(a("d3b7"),a("d81d"),a("b64b"),a("d084")),o=a("2af9"),n=a("e1fe"),l=a("8430"),c=a("45b7"),u=a("ca00"),d=a("4a95"),m={components:{SelectImage:o["e"],SelectVideo:o["g"],Ueditor:o["h"],InputNumberGroup:o["b"],MultiSpec:l["a"],MultiCoupon:c["a"]},data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),goodsId:null,formData:n["a"].formData,couponList:[]}},beforeCreate:function(){Object(u["a"])(this,{OilCardTypeEnum:d["c"]})},created:function(){this.initData()},beforeDestroy:function(){n["a"].formData.goods={}},methods:{initData:function(){var e=this;this.goodsId=this.$route.query.goodsId,this.isLoading=!0,n["a"].getFromData(this.goodsId).then((function(){Object(u["f"])(e.form.getFieldsValue())||e.form.setFieldsValue(n["a"].getFieldsValue()),e.isLoading=!1}))},onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},onReloadCategoryList:function(){var e=this;this.isLoading=!0,n["a"].getCategoryList().then((function(){e.isLoading=!1}))},onReloadServiceList:function(){var e=this;this.isLoading=!0,n["a"].getServiceList().then((function(){e.isLoading=!1}))},onReloadStock:function(){var e=this;this.isLoading=!0,s["h"]({goodsId:this.goodsId}).then((function(t){e.$message.success(t.message,1.5),e.form.setFieldsValue({stock_num:t.data.canOrderNum})})).catch((function(){e.isBtnLoading=!1})).finally((function(){e.isLoading=!1}))},onReloadDeliveryList:function(){var e=this;this.isLoading=!0,n["a"].getDeliveryList().then((function(){e.isLoading=!1}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){if(e)return t.onTargetTabError(e),!1;if(20===a.spec_type){var r=t.$refs.MultiSpec;if(!r.verifyForm())return t.tabKey=1,!1;a.specData=r.getFromSpecData()}return a.categoryIds=a.categorys.map((function(e){return e.value})),delete a.categorys,a.couponList=t.couponList,t.onFormSubmit(a),!0}))},onTargetTabError:function(e){var t=[["goods_name","categorys","imagesIds","province"],["spec_type","goods_price"],["content"],["alone_grade_equity","first_money","second_money","third_money"]],a=Object.keys(e).shift();for(var r in t)if(t[r].indexOf(a)>-1){this.tabKey=parseInt(r);break}},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,s["e"]({goodsId:this.goodsId,form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))},handleCouponChange:function(e){this.couponList=e}}},p=m,f=(a("3f55"),a("2877")),h=Object(f["a"])(p,r,i,!1,null,"42fcaf9f",null);t["default"]=h.exports},c405:function(e,t,a){},d17a:function(e,t,a){"use strict";a("f88b")},dd9f:function(e,t,a){},e05c:function(e,t,a){},e1fe:function(e,t,a){"use strict";var r=a("5530"),i=(a("d3b7"),a("3ca3"),a("ddb0"),a("d81d"),a("4de4"),a("159b"),a("2ef0")),s=a.n(i),o=a("8243"),n=a("d084"),l=a("39ad9"),c=a("2e1c"),u=a("b775"),d={list:"/goods.service/list",all:"/goods.service/all",add:"/goods.service/add",edit:"/goods.service/edit",delete:"/goods.service/delete"};function m(e){return Object(u["b"])({url:d.all,method:"get",params:e})}var p=a("967a");t["a"]={goodsId:null,formData:{goods:{},categoryList:[],deliveryList:[],serviceList:[],defaultServiceIds:[],userGradeList:[],defaultUserGradeValue:{},province:[],coupon:[]},getFromData:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.goodsId=t,new Promise((function(a,r){Promise.all([e.getGoodsDetail(t),e.getCategoryList(),e.getDeliveryList(),e.getServiceList(),e.getUserGradeList(),e.getProvinceList(),e.getCouponList()]).then((function(){e.setDefaultData(),a({formData:e.formData})}))}))},getGoodsDetail:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!!t&&new Promise((function(a,r){n["d"]({goodsId:t}).then((function(t){e.formData.goods=t.data.goodsInfo,a()}))}))},getFieldsValue:function(){var e=this.formData.goods;e.categorys=this.formatCategoryIds(e.categoryIds);var t=s.a.pick(e,["goods_name","categorys","goods_no","delivery_type","sort","province","oilCardType","coupon_id","status","spec_type","deduct_stock_type","content","selling_point","serviceIds","sales_initial","is_points_gift","is_points_discount","is_enable_grade","is_alone_grade"]),a=s.a.pick(e.skuList[0],["goods_price","line_price","stock_num","goods_weight"]);return Object(r["a"])(Object(r["a"])({},t),a)},formatCategoryIds:function(e){return e.map((function(e){return{value:e}}))},getCategoryList:function(){var e=this;return new Promise((function(t,a){o["a"].getCategoryTreeSelect().then((function(a){e.formData.categoryList=a,t()}))}))},getDeliveryList:function(){var e=this;return new Promise((function(t,a){p["b"]().then((function(a){e.formData.deliveryList=a.data.list,t()}))}))},getServiceList:function(){var e=this;return new Promise((function(t,a){m().then((function(a){e.formData.serviceList=a.data.list,t()}))}))},getUserGradeList:function(){var e=this;return new Promise((function(t,a){c["b"]({status:1}).then((function(a){e.formData.userGradeList=a.data.list,t()}))}))},getProvinceList:function(){var e=this;return new Promise((function(t,a){n["i"]().then((function(a){e.formData.province=a.data.list,t()}))}))},getCouponList:function(){var e=this;return new Promise((function(t,a){l["b"]().then((function(a){e.formData.coupon=a.data.list,t()}))}))},setDefaultData:function(){this.setDefaultServiceIds(),this.setDefaultUserGradeValue()},setDefaultServiceIds:function(){var e=this.formData.serviceList;if(!this.goodsId){var t=e.filter((function(e){return e.is_default}));this.formData.defaultServiceIds=t.map((function(e){return e.service_id}))}},setDefaultUserGradeValue:function(){var e=this.formData.userGradeList,t=this.goodsId&&this.formData.goods.alone_grade_equity?this.formData.goods.alone_grade_equity:{},a={};e.forEach((function(e){a[e.grade_id]=t[e.grade_id]||e.equity.discount})),this.formData.defaultUserGradeValue=Object(r["a"])({},a)}}},e533:function(e,t,a){"use strict";a.d(t,"f",(function(){return s})),a.d(t,"b",(function(){return o})),a.d(t,"d",(function(){return n})),a.d(t,"a",(function(){return l})),a.d(t,"e",(function(){return c})),a.d(t,"g",(function(){return u})),a.d(t,"c",(function(){return d}));var r=a("b775"),i={list:"/partners/index",detail:"/partners/detail",add:"/partners/add",edit:"/partners/edit",delete:"/partners/delete",all:"/partners/all",recharge:"/partners/recharge"};function s(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function o(e){return Object(r["b"])({url:i.all,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.detail,method:"get",params:e})}function l(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function c(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function u(e){return Object(r["b"])({url:i.recharge,method:"post",data:e})}function d(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}},ec78:function(e,t,a){"use strict";a("5193")},f040:function(e,t,a){},f11f:function(e,t,a){"use strict";a.r(t);a("b0c0");var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("a-spin",{attrs:{spinning:e.isLoading}},[t("a-form",{attrs:{form:e.form,selfUpdate:!0},on:{submit:e.handleSubmit}},[t("a-tabs",{attrs:{activeKey:e.tabKey,tabBarStyle:{marginBottom:"30px"}},on:{change:e.handleTabs}},[t("a-tab-pane",{key:0,attrs:{tab:"基本信息"}}),t("a-tab-pane",{key:1,attrs:{tab:"规格/库存"}}),t("a-tab-pane",{key:2,attrs:{tab:"商品详情"}}),t("a-tab-pane",{key:3,attrs:{tab:"更多设置"}})],1),t("div",{staticClass:"tabs-content"},[t("div",{directives:[{name:"show",rawName:"v-show",value:0==e.tabKey,expression:"tabKey == 0"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"商品名称",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_name",{rules:[{required:!0,min:2,message:"请输入至少2个字符"}]}],expression:"['goods_name', {rules: [{required: true, min: 2, message: '请输入至少2个字符'}]}]"}],attrs:{placeholder:"请输入商品名称"}})],1),t("a-form-item",{attrs:{label:"商品分类",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["categorys",{rules:[{required:!0,message:"请至少选择1个商品分类"}]}],expression:"['categorys', {rules: [{required: true, message: '请至少选择1个商品分类'}]}]"}],attrs:{placeholder:"请选择商品分类",dropdownStyle:{maxHeight:"500px",overflow:"auto"},treeData:e.formData.categoryList,treeCheckable:"",treeCheckStrictly:"",allowClear:""}}),t("div",{staticClass:"form-item-help"},[t("router-link",{attrs:{target:"_blank",to:{path:"/goods/category/index"}}},[e._v("去新增")]),t("a",{attrs:{href:"javascript:;"},on:{click:e.onReloadCategoryList}},[e._v("刷新")])],1)],1),t("a-form-item",{attrs:{label:"商品图片",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸:750*750像素, 最多上传10张, 可拖拽图片调整顺序, 第1张将作为商品首图"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["imagesIds",{rules:[{required:!0,message:"请至少上传1张商品图片"}]}],expression:"['imagesIds', {rules: [{required: true, message: '请至少上传1张商品图片'}]}]"}],attrs:{multiple:"",maxNum:10}})],1),t("a-form-item",{staticClass:"mb-5",attrs:{label:"卡券类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"选择中石油油券时所属省份和商品编码必填,选择优惠券时优惠券必选"}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["oilCardType",{rules:[{required:!0,message:"请选择卡券类型"}],initialValue:"zsy_ticket"}],expression:"[`oilCardType`, {rules: [{required: true, message: '请选择卡券类型'}], initialValue: 'zsy_ticket' }]"}],staticStyle:{width:"300px"}},e._l(e.OilCardTypeEnum.data,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.value}},[e._v(e._s(a.name))])})),1)],1),t("a-form-item",{attrs:{label:"所属省份",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["province",{rules:[{message:"请选择所属省份"}]}],expression:"['province', {rules: [{message: '请选择所属省份'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请选择所属省份"}},e._l(e.formData.province,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("a-form-item",{attrs:{label:"商品编码",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_no",{rules:[{min:2,message:"请输入至少2个字符"}]}],expression:"['goods_no', {rules: [{min: 2, message: '请输入至少2个字符'}]}]"}],staticStyle:{width:"300px"},attrs:{placeholder:"请输入商品编码"}})],1),t("MultiCoupon",{ref:"MultiCoupon",attrs:{couponList:e.formData.coupon},on:{change:e.handleCouponChange}}),t("a-form-item",{attrs:{label:"商品状态",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["status",{initialValue:10,rules:[{required:!0}]}],expression:"['status', {initialValue: 10, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:10}},[e._v("上架")]),t("a-radio",{attrs:{value:20}},[e._v("下架")])],1)],1),t("a-form-item",{attrs:{label:"商品排序",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"数字越小越靠前"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sort",{initialValue:100,rules:[{required:!0}]}],expression:"['sort', {initialValue: 100, rules:[{ required: true }]}]"}],attrs:{min:0}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:1==e.tabKey,expression:"tabKey == 1"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"规格类型",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["spec_type",{initialValue:10,rules:[{required:!0}]}],expression:"['spec_type', { initialValue: 10, rules: [{ required: true }] }]"}],on:{change:function(t){return e.onForceUpdate()}}},[t("a-radio",{attrs:{value:10}},[e._v("单规格")]),t("a-radio",{attrs:{value:20}},[e._v("多规格")])],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:20==e.form.getFieldValue("spec_type"),expression:"form.getFieldValue('spec_type') == 20"}]},[t("MultiSpec",{ref:"MultiSpec"})],1),t("div",{directives:[{name:"show",rawName:"v-show",value:10==e.form.getFieldValue("spec_type"),expression:"form.getFieldValue('spec_type') == 10"}]},[t("a-form-item",{attrs:{label:"商品价格",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商品的实际购买金额,最低0.01"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_price",{initialValue:"",rules:[{required:!0,message:"请输入商品价格"}]}],expression:"['goods_price', { initialValue: '', rules: [{ required: true, message: '请输入商品价格' }] }]"}],attrs:{min:.01,precision:2}}),t("span",{staticClass:"ml-10"},[e._v("元")])],1),t("a-form-item",{attrs:{label:"划线价",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"划线价仅用于商品页展示"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["line_price"],expression:"['line_price']"}],attrs:{min:0,precision:2}}),t("span",{staticClass:"ml-10"},[e._v("元")])],1),t("a-form-item",{attrs:{label:"当前库存数量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商品的实际库存数量,为0时用户无法下单"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["stock_num",{initialValue:100,rules:[{required:!0,message:"请输入库存数量"}]}],expression:"['stock_num', { initialValue: 100, rules:[{ required: true, message: '请输入库存数量' }] }]"}],attrs:{min:0,precision:0}}),t("span",{staticClass:"ml-10"},[e._v("件")])],1),t("a-form-item",{attrs:{label:"商品重量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"商品的实际重量,用于计算运费"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["goods_weight",{initialValue:0,rules:[{required:!0,message:"请输入库存数量"}]}],expression:"['goods_weight', { initialValue: 0, rules:[{ required: true, message: '请输入库存数量' }] }]"}],attrs:{min:0}}),t("span",{staticClass:"ml-10"},[e._v("千克 (Kg)")])],1)],1),t("a-form-item",{attrs:{label:"库存计算方式",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["deduct_stock_type",{initialValue:10,rules:[{required:!0}]}],expression:"['deduct_stock_type', {initialValue: 10, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:10}},[e._v("下单减库存")]),t("a-radio",{attrs:{value:20}},[e._v("付款减库存")])],1)],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:2==e.tabKey,expression:"tabKey == 2"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"商品详情",labelCol:e.labelCol,wrapperCol:{span:16}}},[t("Ueditor",{directives:[{name:"decorator",rawName:"v-decorator",value:["content",{rules:[{required:!0,message:"商品详情不能为空"}]}],expression:"['content', { rules: [{ required: true, message: '商品详情不能为空' }] }]"}]})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:3==e.tabKey,expression:"tabKey == 3"}],staticClass:"tab-pane"},[t("a-form-item",{attrs:{label:"主图视频",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议视频宽高比19:9,建议时长8-45秒"}},[t("SelectVideo",{directives:[{name:"decorator",rawName:"v-decorator",value:["video_id"],expression:"['video_id']"}],attrs:{multiple:!1}})],1),t("a-form-item",{attrs:{label:"视频封面",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"建议尺寸:750像素*750像素"}},[t("SelectImage",{directives:[{name:"decorator",rawName:"v-decorator",value:["video_cover_id"],expression:"['video_cover_id']"}],attrs:{multiple:!1}})],1),t("a-form-item",{attrs:{label:"商品卖点",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"一句话简述,例如:此款商品美观大方 性价比较高 不容错过"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["selling_point"],expression:"['selling_point']"}],attrs:{placeholder:"请输入商品卖点"}})],1),t("a-form-item",{attrs:{label:"服务与承诺",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[e.formData.serviceList?t("a-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["serviceIds",{initialValue:e.formData.defaultServiceIds}],expression:"['serviceIds', { initialValue: formData.defaultServiceIds }]"}],attrs:{mode:"multiple",placeholder:"请选择服务与承诺"}},e._l(e.formData.serviceList,(function(a,r){return t("a-select-option",{key:r,attrs:{value:a.service_id}},[e._v(e._s(a.name))])})),1):e._e(),t("div",{staticClass:"form-item-help"},[t("router-link",{attrs:{target:"_blank",to:{path:"/goods/service/index"}}},[e._v("去新增")]),t("a",{attrs:{href:"javascript:;"},on:{click:e.onReloadServiceList}},[e._v("刷新")])],1)],1),t("a-form-item",{attrs:{label:"初始销量",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"用户端展示的销量 = 初始销量 + 实际销量"}},[t("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["sales_initial",{initialValue:0}],expression:"['sales_initial', {initialValue: 0}]"}]})],1),t("a-divider",{attrs:{orientation:"left"}},[e._v("积分设置")]),t("a-form-item",{attrs:{label:"积分赠送",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"开启后用户购买此商品将获得积分"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_points_gift",{initialValue:1,rules:[{required:!0}]}],expression:"['is_points_gift', {initialValue: 1, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),t("a-form-item",{attrs:{label:"积分抵扣",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"开启后用户购买此商品可以使用积分进行抵扣"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_points_discount",{initialValue:1,rules:[{required:!0}]}],expression:"['is_points_discount', {initialValue: 1, rules: [{ required: true }]}]"}]},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),t("a-divider",{attrs:{orientation:"left"}},[e._v("会员折扣设置")]),t("a-form-item",{attrs:{label:"会员折扣",labelCol:e.labelCol,wrapperCol:e.wrapperCol,extra:"开启后会员折扣,会员购买此商品可以享受会员等级折扣价"}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_enable_grade",{initialValue:1,rules:[{required:!0}]}],expression:"['is_enable_grade', {initialValue: 1, rules: [{ required: true }]}]"}],on:{change:function(t){return e.onForceUpdate(!0)}}},[t("a-radio",{attrs:{value:1}},[e._v("开启")]),t("a-radio",{attrs:{value:0}},[e._v("关闭")])],1)],1),e.form.getFieldValue("is_enable_grade")?t("a-form-item",{attrs:{label:"会员折扣设置",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[t("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_alone_grade",{initialValue:0,rules:[{required:!0}]}],expression:"['is_alone_grade', { initialValue: 0, rules: [{ required: true }] }]"}],on:{change:function(t){return e.onForceUpdate(!0)}}},[t("a-radio",{attrs:{value:0}},[e._v("默认等级折扣")]),t("a-radio",{attrs:{value:1}},[e._v("单独设置折扣")])],1),e.form.getFieldValue("is_alone_grade")?t("div",e._l(e.formData.userGradeList,(function(a){return t("a-form-item",{key:a.grade_id},[t("InputNumberGroup",{directives:[{name:"decorator",rawName:"v-decorator",value:["alone_grade_equity[grade_id:".concat(a.grade_id,"]"),{initialValue:e.formData.defaultUserGradeValue[a.grade_id],rules:[{required:!0,message:"折扣率不能为空"}]}],expression:"[`alone_grade_equity[grade_id:${item.grade_id}]`, {\n initialValue: formData.defaultUserGradeValue[item.grade_id], rules: [{required: true, message: '折扣率不能为空'}]\n }]"}],attrs:{addonBefore:a.name,addonAfter:"折",inputProps:{min:0,max:9.9}}})],1)})),1):e._e(),t("div",{staticClass:"form-item-help"},[e.form.getFieldValue("is_alone_grade")?t("p",{staticClass:"extra"},[e._v("单独折扣:折扣率范围0.0-9.9,例如: 9.8代表98折,0代表不折扣")]):t("p",{staticClass:"extra"},[e._v("默认折扣:默认为用户所属会员等级的折扣率")])])],1):e._e()],1)]),t("a-form-item",{staticClass:"mt-20",attrs:{"wrapper-col":{span:e.wrapperCol.span,offset:e.labelCol.span}}},[t("a-button",{attrs:{type:"primary","html-type":"submit",loading:e.isBtnLoading}},[e._v("提交")])],1)],1)],1)],1)},i=[],s=(a("d81d"),a("b64b"),a("d3b7"),a("ca00")),o=a("d084"),n=a("2af9"),l=a("e1fe"),c=a("8430"),u=a("45b7"),d=a("4a95"),m={components:{SelectImage:n["e"],SelectVideo:n["g"],Ueditor:n["h"],InputNumberGroup:n["b"],MultiSpec:c["a"],MultiCoupon:u["a"]},data:function(){return{tabKey:0,labelCol:{span:3},wrapperCol:{span:10},isLoading:!1,isBtnLoading:!1,form:this.$form.createForm(this),formData:l["a"].formData,couponList:[]}},beforeCreate:function(){Object(s["a"])(this,{OilCardTypeEnum:d["c"]})},created:function(){var e=this;this.isLoading=!0,l["a"].getFromData().then((function(){e.isLoading=!1}))},methods:{onForceUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$forceUpdate(),t&&setTimeout((function(){e.$forceUpdate()}),10)},handleTabs:function(e){this.tabKey=e},onReloadCategoryList:function(){var e=this;this.isLoading=!0,l["a"].getCategoryList().then((function(){e.isLoading=!1}))},onReloadServiceList:function(){var e=this;this.isLoading=!0,l["a"].getServiceList().then((function(){e.isLoading=!1}))},onReloadDeliveryList:function(){var e=this;this.isLoading=!0,l["a"].getDeliveryList().then((function(){e.isLoading=!1}))},handleSubmit:function(e){var t=this;e.preventDefault();var a=this.form.validateFields;a((function(e,a){if(e)return t.onTargetTabError(e),!1;if(20===a.spec_type){var r=t.$refs.MultiSpec;if(!r.verifyForm())return t.tabKey=1,!1;a.specData=r.getFromSpecData()}return a.categoryIds=a.categorys.map((function(e){return e.value})),delete a.categorys,a.couponList=t.couponList,t.onFormSubmit(a),!0}))},onTargetTabError:function(e){var t=[["goods_name","categorys","imagesIds","province"],["spec_type","goods_price"],["content"],["alone_grade_equity","first_money","second_money","third_money"]],a=Object.keys(e).shift();for(var r in t)if(t[r].indexOf(a)>-1){this.tabKey=parseInt(r);break}},onFormSubmit:function(e){var t=this;this.isLoading=!0,this.isBtnLoading=!0,o["a"]({form:e}).then((function(e){t.$message.success(e.message,1.5),setTimeout((function(){t.$router.push("./index")}),1500)})).catch((function(){t.isBtnLoading=!1})).finally((function(){t.isLoading=!1}))},handleCouponChange:function(e){this.couponList=e}}},p=m,f=(a("52ea"),a("2877")),h=Object(f["a"])(p,r,i,!1,null,"21446ca5",null);t["default"]=h.exports},f88b:function(e,t,a){},fab29:function(e,t,a){"use strict";a.d(t,"f",(function(){return s})),a.d(t,"c",(function(){return o})),a.d(t,"a",(function(){return n})),a.d(t,"d",(function(){return l})),a.d(t,"h",(function(){return c})),a.d(t,"e",(function(){return u})),a.d(t,"b",(function(){return d})),a.d(t,"g",(function(){return m}));var r=a("b775"),i={list:"/user/list",detail:"/user/detail",add:"/user/add",edit:"/user/edit",recharge:"/user/recharge",grade:"/user/grade",delete:"/user/delete",merchant:"/user/merchant"};function s(e){return Object(r["b"])({url:i.list,method:"get",params:e})}function o(e){return Object(r["b"])({url:i.detail,method:"get",params:e})}function n(e){return Object(r["b"])({url:i.add,method:"post",data:e})}function l(e){return Object(r["b"])({url:i.edit,method:"post",data:e})}function c(e){return Object(r["b"])({url:i.recharge,method:"post",data:e})}function u(e){return Object(r["b"])({url:i.grade,method:"post",data:e})}function d(e){return Object(r["b"])({url:i.delete,method:"post",data:e})}function m(){return Object(r["b"])({url:i.merchant,method:"post"})}}}]);