(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-26879679","chunk-ae7cb8dc","chunk-ae7cb8dc"],{"22c1":function(e,t,a){"use strict";a("8d8d")},"2e68":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("a-modal",{staticClass:"custom-modal",attrs:{title:"编辑省市区",width:"880px"},on:{ok:e.handleOk,cancel:e.handleCancel},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("a-layout",{},[a("a-layout-content",{style:{background:"#fff"}},[a("div",{staticClass:"btn-address"},[a("a-button",{attrs:{type:"primary"},on:{click:e.addProvince}},[e._v("添加省市区")]),a("a-button",{attrs:{disabled:!e.selectedRowKeys.length},on:{click:function(){e.deleteAction()}}},[e._v("删除")])],1)]),a("a-layout-content",{staticClass:"addressContent",style:{background:"#fff"}},[a("a-table",{key:e.tableKey,ref:"table",attrs:{dataSource:e.dataSource,columns:e.columns,pagination:!1,rowKey:"key",loading:e.loading,rowSelection:e.rowSelection},scopedSlots:e._u([{key:"province",fn:function(t){return[a("a-tooltip",{attrs:{title:t}},[e._v("\n "+e._s(t)+"\n ")])]}},{key:"operation",fn:function(t,i){return[a("a-popconfirm",{attrs:{title:"确定删除吗?",placement:"top"},on:{confirm:function(t){return e.deleteRow(i.key)}}},[a("a",{attrs:{href:"javascript:;"}},[e._v("删除")])])]}}])})],1)],1),a("select-address",{ref:"province",on:{selectAddress:e.eventAddress}}),a("template",{slot:"footer"},[a("div",{staticClass:"selected-number"},[e._v("共"+e._s(e.dataSource.length)+"条记录")]),a("a-button",{key:"back",on:{click:e.handleCancel}},[e._v("\n 取消\n ")]),a("a-button",{key:"submit",attrs:{type:"primary"},on:{click:e.handleOk}},[e._v("\n 确定\n ")])],1)],2)],1)},n=[],s=a("2909"),r=(a("4f7f"),a("5df3"),a("1c4c"),a("6762"),a("2fdb"),a("ac6a"),a("de6a")),l=a("2af9"),o=[{title:"省市区名称",dataIndex:"district",align:"left",ellipsis:!0,width:"30%"},{title:"省市区层级",dataIndex:"province",width:"40%",align:"left",ellipsis:!0,scopedSlots:{customRender:"province"}},{title:"操作",dataIndex:"operation",width:"20%",scopedSlots:{customRender:"operation"}}],c={props:{checkboxType:{type:Boolean,default:function(){return!0}},disabledSuccessMsg:{type:Boolean,default:function(){return!1}}},components:{selectAddress:l["d"]},computed:{rowSelection:function(){var e=this.selectedRowKeys;return this.checkboxType?{selectedRowKeys:e,onChange:this.onSelectChange,hideDefaultSelections:!0,selections:!1,onSelection:this.onSelection,columnTitle:"",type:"checkbox"}:{selectedRowKeys:e,onChange:this.onSelectChange,hideDefaultSelections:!0,selections:!0,onSelection:this.onSelection,columnTitle:"选择",type:"radio"}}},data:function(){return{visible:!1,loading:!1,dataSource:[],selectedRowKeys:[],parentVal:0,columns:o,stopInitGetTableList:!0,targetAttr:"",tableKey:1}},methods:{changeTableKey:function(){this.tableKey=Math.random()},showModal:function(e,t){this.visible=!0,this.parentVal=t;var a=[];e.dataSource.forEach((function(e){a.push({district:e.title,province:e.path_name,key:e.key,path:e.path,title:e.title,path_name:e.path_name})})),this.dataSource=a,this.$nextTick((function(){setTimeout((function(){document.querySelector(".addressContent").scrollTop=0}))}))},onSelectChange:function(e){this.selectedRowKeys=e},deleteRow:function(e){var t=this;this.dataSource.forEach((function(a,i){a.key===e&&t.dataSource.splice(i,1)}))},deleteAction:function(e){e=e||this.selectedRowKeys;var t=this;this.$confirm({icon:function(e){return e(r["a"])},title:"确定删除吗?",onOk:function(){t.deleteProcess(e),t.$message.success("操作成功")},cancelText:"取消",okText:"确定"})},deleteProcess:function(e){e.length===this.dataSource.length?(this.dataSource=[],this.selectedRowKeys=[]):(this.dataSource=this.dataSource.filter((function(t){return!e.includes(t.key)})),this.selectedRowKeys=this.selectedRowKeys.filter((function(t){return!e.includes(t)})))},addProvince:function(){var e=[];this.dataSource.map((function(t){e.push(t.key)})),this.$refs.province.showModal(),this.$refs.province.expandedKeys=[1,2],this.$refs.province.checkedKeys=e},eventAddress:function(e,t){var a=e.ids||[],i=this.dataSource.map((function(e){return e.key})),n=a.concat(i).filter((function(e){return!a.includes(e)||!i.includes(e)})),r=n.filter((function(e){return!a.includes(e)}));i=i.filter((function(e){return!r.includes(e)}));var l=Array.from(new Set([].concat(Object(s["a"])(a),Object(s["a"])(i)))),o=l.concat(i).filter((function(e){return!l.includes(e)||!i.includes(e)})),c=o.concat(i),d=Object(s["a"])(new Set(c)),u=[];d.forEach((function(t){e.dataSource.map((function(e){e.key===t&&u.push({district:e.title,province:e.path_name,key:e.key,path:e.path,title:e.title,path_name:e.path_name})}))})),this.dataSource=u,this.changeTableKey()},handleOk:function(){this.$emit("updateAddress",{ids:this.dataSource.map((function(e){return e.key})),dataSource:this.dataSource},this.parentVal),this.visible=!1},handleCancel:function(){this.visible=!1,this.selectedRowKeys=[]}},mounted:function(){}},d=c,u=(a("fa52"),a("2877")),f=Object(u["a"])(d,i,n,!1,null,"08c01682",null);t["a"]=f.exports},5197:function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"add-freight-content"},[a("custom-bread",{attrs:{breadList:"freightEdit"!==e.$route.name?e.breadList:e.breadListTwo}}),a("div",{staticClass:"customContent"},[a("a-layout",[a("a-layout-content",[a("a-card",{attrs:{bordered:!1,loading:e.cardLoading}},[a("a-form",{staticClass:"custom-form",attrs:{form:e.form},on:{submit:e.handleSubmit}},[a("a-form-item",{attrs:{required:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 运费模板名称\n "),a("a-tooltip",{attrs:{title:"运费模板名称不会在商城展示,仅供在后台系统展示和查询使用"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"请输入运费模板名称",pattern:/^(?!(\s+$))/},{max:100,message:"最多支持100个字符"}],validateTrigger:"blur",getValueFromEvent:function(e){return e.target.value.trim()}}],expression:"\n [ 'name', {\n rules: [\n { required: true, message: '请输入运费模板名称',pattern: /^(?!(\\s+$))/ },\n { max:100, message: '最多支持100个字符' }\n ],\n validateTrigger: 'blur',\n getValueFromEvent: event => {\n return event.target.value.trim()\n }\n }\n ]"}],staticStyle:{width:"600px"},attrs:{placeholder:"请输入"},on:{change:e.nameEnter}},[a("span",{attrs:{slot:"suffix"},slot:"suffix"},[e._v(e._s(e.nameEnterValue.length)+"/100")])])],1),a("a-form-item",{staticClass:"form-item-radio-margin-top",attrs:{required:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 运费模板类型\n ")]),"freightEdit"===e.$route.name?[e._v("\n "+e._s(e._f("templateType")(e.detailData.template_type))+"\n ")]:a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["template_type",{initialValue:2}],expression:"['template_type', {initialValue: 2}]"}],on:{change:e.eventTemplate}},[a("a-radio",{attrs:{value:1}},[e._v("\n 站点运费模板\n ")]),a("a-radio",{attrs:{value:2}},[e._v("\n 店铺运费模板\n ")]),a("a-radio",{attrs:{value:3}},[e._v("\n 物流线路运费模板\n ")])],1)],2),a("a-form-item",{staticClass:"form-item-radio-margin-top",attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 默认模板\n "),a("a-tooltip",{attrs:{title:"为了保证一定要有默认站点运费模板、默认店铺运费模板、默认物流线路运费模板,所以默认运费模板不可取消选择。如果想要切换默认运费模板,直接在对应的运费模板中勾选“设为默认运费模板”即可。"}},[a("a-icon",{attrs:{type:"exclamation-circle"}})],1)],1),a("a-checkbox-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["is_default",{initialValue:[]}],expression:"['is_default',\n {initialValue: []}]"}]},[1===e.templateValue?a("a-checkbox",{attrs:{value:1,disabled:e.is_default_disabled_1}},[e._v("设为默认站点运费模板")]):e._e(),2===e.templateValue?a("a-checkbox",{attrs:{value:2,disabled:e.is_default_disabled_2}},[e._v("设为默认店铺运费模板")]):e._e(),3===e.templateValue?a("a-checkbox",{attrs:{value:3,disabled:e.is_default_disabled_3}},[e._v("设为默认物流线路运费模板")]):e._e()],1),3===e.templateValue?a("span",{staticStyle:{"font-size":"12px",color:"#868686","margin-left":"16px"}},[e._v("新建物流线路默认使用该运费模板")]):e._e(),2===e.templateValue?a("span",{staticStyle:{"font-size":"12px",color:"#868686","margin-left":"16px"}},[e._v("新建店铺默认使用该运费模板")]):e._e()],1),a("a-form-item",{staticClass:"form-item-radio-margin-top",attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 计费方式\n ")]),a("a-radio-group",{directives:[{name:"decorator",rawName:"v-decorator",value:["fee_type",{initialValue:1}],expression:"['fee_type', {initialValue: 1}]"}],on:{change:e.eventFeeType}},[a("a-radio",{attrs:{value:1}},[e._v("\n 固定运费\n ")]),a("a-radio",{attrs:{value:2}},[e._v("\n 按重量计算运费\n ")])],1)],1),2!==e.form.getFieldValue("fee_type")?a("a-form-item",{attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 固定运费\n ")]),a("div",{staticClass:"form-item-flex"},[a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["fixed_fee",{rules:[{required:1===e.form.getFieldValue("fee_type"),message:"请输入金额"}],initialValue:""}],expression:"[\n 'fixed_fee',\n {\n rules: [\n { required: form.getFieldValue('fee_type') === 1 ? true : false, message: '请输入金额' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v(e._s(e.defaultCurrency))])],1)]):a("a-form-item",{staticClass:"error-explain",staticStyle:{"margin-bottom":"0"},attrs:{labelCol:e.labelCol,wrapperCol:e.wrapperCol,required:""}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 默认运费\n ")]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("首重")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["first_weight",{rules:[{required:!0,message:"请输入重量"}],initialValue:""}],expression:"[\n 'first_weight',\n {\n rules: [\n { required: true, message: '请输入重量' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v("g")])],1)]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("运费")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["first_weight_fee",{rules:[{required:!0,message:"请输入金额"}],initialValue:""}],expression:"[\n 'first_weight_fee',\n {\n rules: [\n { required: true, message: '请输入金额' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v(e._s(e.defaultCurrency))])],1)]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("续重")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["additional_weight",{rules:[{required:!0,message:"请输入重量"}],initialValue:""}],expression:"[\n 'additional_weight',\n {\n rules: [\n { required: true, message: '请输入重量' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v("g")])],1)]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("续费")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["additional_weight_fee",{rules:[{required:!0,message:"请输入金额"}],initialValue:""}],expression:"[\n 'additional_weight_fee',\n {\n rules: [\n { required: true, message: '请输入金额' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v(e._s(e.defaultCurrency))])],1)])],1),e._l(e.freightList,(function(t,i){return 2===e.form.getFieldValue("fee_type")?[a("div",{key:i},[a("a-form-item",{attrs:{required:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 指定地区\n ")]),t.tags.length?a("a-button",{on:{click:function(a){return e.eventEditSelect(t.count,t)}}},[e._v("编辑省市区")]):a("a-button",{on:{click:function(a){return e.eventSelect(t.count)}}},[e._v("请选择")]),a("a-row",[e._l(t.tags,(function(t){return[a("a-tag",{key:t},[e._v(e._s(t))])]}))],2),t.isShowError?a("div",{staticClass:"error-tips"},[e._v("请选择指定地区")]):e._e()],1),a("a-form-item",{staticClass:"error-explain",staticStyle:{"margin-bottom":"0"},attrs:{required:"",labelCol:e.labelCol,wrapperCol:e.wrapperCol}},[a("span",{attrs:{slot:"label"},slot:"label"},[e._v("\n 指定运费\n ")]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("首重")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["appoint_first_weight-"+i,{rules:[{required:!0,message:"请输入重量"}],initialValue:""}],expression:"[\n `appoint_first_weight-${index}`,\n {\n rules: [\n { required: true, message: '请输入重量' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v("g")])],1)]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("运费")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["appoint_first_weight_fee-"+i,{rules:[{required:!0,message:"请输入金额"}],initialValue:""}],expression:"[\n `appoint_first_weight_fee-${index}`,\n {\n rules: [\n { required: true, message: '请输入金额' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v(e._s(e.defaultCurrency))])],1)]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("续重")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["appoint_additional_weight-"+i,{rules:[{required:!0,message:"请输入重量"}],initialValue:""}],expression:"[\n `appoint_additional_weight-${index}`,\n {\n rules: [\n { required: true, message: '请输入重量' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v("g")])],1)]),a("a-form-item",{staticClass:"widget-freight",style:{display:"inline-block",paddingRight:"8px"}},[a("div",{staticClass:"form-item-flex"},[a("span",{staticStyle:{"margin-right":"6px"}},[e._v("续费")]),a("a-input-number",{directives:[{name:"decorator",rawName:"v-decorator",value:["appoint_additional_weight_fee-"+i,{rules:[{required:!0,message:"请输入金额"}],initialValue:""}],expression:"[\n `appoint_additional_weight_fee-${index}`,\n {\n rules: [\n { required: true, message: '请输入金额' },\n ],\n initialValue: ''\n }\n ]"}],staticClass:"custom-input-number",staticStyle:{width:"80px"},attrs:{placeholder:"请输入",min:0,precision:2,max:99999999.99}}),a("span",{staticClass:"perferentianRule-customRadio-value-style"},[e._v(e._s(e.defaultCurrency))]),a("a-icon",{staticClass:"dynamic-delete-button",attrs:{type:"minus-circle-o"},on:{click:function(a){return e.remove(t)}}})],1)])],1)],1)]:e._e()})),a("a-row",[2===e.form.getFieldValue("fee_type")?a("a-col",{staticStyle:{"margin-bottom":"24px"},attrs:{offset:4,span:20}},[a("a-button",{staticStyle:{color:"#1890ff","font-size":"12px"},on:{click:e.addFreight}},[e._v("+ 为指定地区设置运费")]),a("span",{staticStyle:{"font-size":"12px",color:"#868686","margin-left":"16px"}},[e._v('除指定地区外, 其余地区运费采用"默认运费"')])],1):e._e(),a("a-col",{attrs:{offset:4,span:5}},[a("a-button",{style:{height:"40px"},attrs:{type:"primary","html-type":"submit",loading:e.loading}},[e._v("保存")]),a("a-button",{style:{height:"40px",marginLeft:"16px"},on:{click:e.cancel}},[e._v("取消")])],1)],1)],2)],1)],1)],1),a("select-address",{ref:"province",on:{selectAddress:e.eventAddress}}),a("edit-address",{ref:"updateProvince",on:{updateAddress:e.updateAddress}})],1)],1)},n=[],s=(a("7f7f"),a("ade3")),r=(a("ac6a"),a("de6a")),l=a("5633"),o=a("2af9"),c=a("2e68"),d=a("8a9d"),u=a("ac0d"),f={data:function(){return{form:this.$form.createForm(this),breadList:{current:"新建运费模板",loopBread:[{name:"1",title:"工作台",href:"/dashboard"},{name:"2",title:"设置"},{name:"3",title:"运费模板",href:"/setting/freight/list"},{name:"4",title:"新建运费模板"}]},breadListTwo:{current:"编辑运费模板",loopBread:[{name:"1",title:"工作台",href:"/dashboard"},{name:"2",title:"设置"},{name:"3",title:"运费模板",href:"/setting/freight/list"},{name:"4",title:"编辑运费模板"}]},loading:!1,labelCol:{span:4},wrapperCol:{span:20},nameEnterValue:"",entityId:"",cardLoading:!1,freightList:[],count:0,fetching:!1,dataList:[],is_default_disabled_1:!1,is_default_disabled_2:!1,is_default_disabled_3:!1,default_entity_id:0,templateValue:2,detailData:{}}},components:{customBread:l["a"],selectAddress:o["d"],editAddress:c["a"]},computed:{defaultCurrency:function(){return this.$store.getters.siteCurrencyName}},mixins:[u["k"]],filters:{templateType:function(e){switch(e){case 1:return"站点运费模板";case 2:return"店铺运费模板";case 3:return"物流线路运费模板"}}},methods:{nameEnter:function(e){if(!e)return 0;this.nameEnterValue=e.target.value},eventTemplate:function(e){this.templateValue=e.target.value},addFreight:function(){this.count++;var e={count:this.count,isShowError:!1,tags:[]};this.freightList.push(e)},remove:function(e){var t=this;this.freightList.forEach((function(e,a){e.v1=t.form.getFieldValue("appoint_first_weight-".concat(a)),e.v2=t.form.getFieldValue("appoint_first_weight_fee-".concat(a)),e.v3=t.form.getFieldValue("appoint_additional_weight-".concat(a)),e.v4=t.form.getFieldValue("appoint_additional_weight_fee-".concat(a))}));var a=this.freightList.indexOf(e);this.freightList.splice(a,1),this.freightList.forEach((function(e,a){var i=t.form.setFieldsValue;setTimeout((function(){var t;i((t={},Object(s["a"])(t,"appoint_first_weight-".concat(a),e.v1),Object(s["a"])(t,"appoint_first_weight_fee-".concat(a),e.v2),Object(s["a"])(t,"appoint_additional_weight-".concat(a),e.v3),Object(s["a"])(t,"appoint_additional_weight_fee-".concat(a),e.v4),t))}))}))},eventSelect:function(e){var t=!0;this.$refs.province.showModal(e,t)},eventEditSelect:function(e,t){var a={ids:t.key,dataSource:t.dataList};this.$refs.updateProvince.showModal(a,e)},cancel:function(){var e=this,t="freightEdit"===this.$route.name?"/setting/freight/detail/".concat(e.$route.params.entity_id,"/websiteId/").concat(e.$route.params.site_id):"/setting/freight/list";this.$confirm({icon:function(e){return e(r["a"])},title:"数据未提交保存,直接离开数据将会丢失,确定离开!",onOk:function(){e.$router.push({path:t})},cancelText:"取消",okText:"确定"})},eventFeeType:function(e){var t=this,a=this.detailData;if("freightEdit"===this.$route.name){var i=this.form.setFieldsValue;1===e.target.value?setTimeout((function(){i({fixed_fee:0===a.fixed_fee?"":a.fixed_fee})})):(setTimeout((function(){i({first_weight:a.rules[0].first_weight,first_weight_fee:a.rules[0].first_weight_fee,additional_weight:a.rules[0].additional_weight,additional_weight_fee:a.rules[0].additional_weight_fee})})),a.rules.length>1&&(this.freightList=[],a.rules.forEach((function(e,a){if(a>0){t.count=a;var n=a-1;t.freightList.push({count:a,isShowError:!1,tags:[],key:[],path:[]}),e.areas.forEach((function(e){t.freightList[n].tags.push(e.area_path_name),t.freightList[n].key.push(e.area_id),t.freightList[n].path.push(e.area_path)})),setTimeout((function(){var t;i((t={},Object(s["a"])(t,"appoint_first_weight-".concat(n),e.first_weight),Object(s["a"])(t,"appoint_first_weight_fee-".concat(n),e.first_weight_fee),Object(s["a"])(t,"appoint_additional_weight-".concat(n),e.additional_weight),Object(s["a"])(t,"appoint_additional_weight_fee-".concat(n),e.additional_weight_fee),t))}))}}))))}else this.freightList=[]},initDetails:function(){var e=this,t={entity_id:this.$route.params.entity_id};Object(d["d"])(t).then((function(t){var a=t.data;a&&(e.detailData=a,e.entityId=a.entity_id,e.$nextTick((function(){setTimeout((function(){var t=e.form.setFieldsValue;t({name:a.name,is_default:1===a.is_default?[a.template_type]:[],fee_type:a.fee_type,fixed_fee:0===a.fixed_fee?"":a.fixed_fee}),e.templateValue=a.template_type,1===a.template_type&&1===a.is_default&&(e.is_default_disabled_1=!0),2===a.template_type&&1===a.is_default&&(e.is_default_disabled_2=!0),3===a.template_type&&1===a.is_default&&(e.is_default_disabled_3=!0),e.nameEnterValue=a.name,1===a.fee_type?t({fixed_fee:a.fixed_fee}):(setTimeout((function(){t({first_weight:a.rules[0].first_weight,first_weight_fee:a.rules[0].first_weight_fee,additional_weight:a.rules[0].additional_weight,additional_weight_fee:a.rules[0].additional_weight_fee}),e.default_entity_id=a.rules[0].entity_id})),a.rules.length>1&&a.rules.forEach((function(a,i){if(i>0){e.count=i;var n=i-1;e.freightList.push({count:i,isShowError:!1,tags:[],key:[],path:[],dataList:[],entity_id:a.entity_id}),a.areas.forEach((function(t){e.freightList[n].tags.push(t.area_path_name),e.freightList[n].key.push(t.area_id),e.freightList[n].path.push(t.area_path),e.freightList[n].dataList.push({key:t.area_id,path:t.area_path,path_name:t.area_path_name,title:t.area_name})})),setTimeout((function(){var e;t((e={},Object(s["a"])(e,"appoint_first_weight-".concat(n),a.first_weight),Object(s["a"])(e,"appoint_first_weight_fee-".concat(n),a.first_weight_fee),Object(s["a"])(e,"appoint_additional_weight-".concat(n),a.additional_weight),Object(s["a"])(e,"appoint_additional_weight_fee-".concat(n),a.additional_weight_fee),e))}))}}))),e.cardLoading=!1}))})))}))},eventAddress:function(e,t){this.$refs.updateProvince.showModal(e,t)},updateAddress:function(e,t){this.freightList.map((function(a){a.count===t&&(a.tags=[],a.key=[],a.path=[],a.dataList=e.dataSource,e.dataSource.length>0&&e.dataSource.map((function(e){a.tags.push(e.province),a.key.push(e.key),a.path.push(e.path)})))}))},handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e,a){var i,n=!1;(2===a.fee_type&&t.freightList.forEach((function(e){e.tags.length||(e.isShowError=!0,n=!0)})),e||n)||function(){var e={};if("freightEdit"===t.$route.name&&(e.entity_id=1*t.$route.params.entity_id),a.is_default.length>0?a.is_default=1:a.is_default=2,2===a.fee_type){if(e.name=a.name,e.template_type=a.template_type,e.is_default=a.is_default,e.fee_type=a.fee_type,e.rules=[],e.rules.push({entity_id:t.default_entity_id,first_weight:a.first_weight,first_weight_fee:a.first_weight_fee,additional_weight:a.additional_weight,additional_weight_fee:a.additional_weight_fee,is_default:1}),t.freightList.length>0){var n=function(){e.rules.push({entity_id:"freightEdit"===t.$route.name?t.freightList[i].entity_id:0,first_weight:a["appoint_first_weight-".concat(i)],first_weight_fee:a["appoint_first_weight_fee-".concat(i)],additional_weight:a["appoint_additional_weight-".concat(i)],additional_weight_fee:a["appoint_additional_weight_fee-".concat(i)],is_default:2});var n=i+1;e.rules[n].areas=[],t.freightList[i].dataList.forEach((function(t){e.rules[n].areas.push({area_id:t.key,area_path:t.path})}))};for(i=0;i\n
\n
\n \n
\n
\n \n ';case"搜索暗文":return'\n
\n
\n
\n \n
\n
\n
\n ';case"搜索跳转":return'\n
\n
\n
\n 设置搜索词跳转到指定的落地页\n
\n
\n
\n ';case"搜索联想词":return'\n
\n
\n
\n \n
\n
\n
\n ';case"热推商品":return'\n
\n
\n
\n 搜索商品列表页、运营分类商品列表页、品牌商品列表页、店铺商品列表页的商品,优先展示热推商品,同为热推商品,按排序值由小到大展示。\n
\n
\n
\n ';case"搜索无结果关联词":return'\n
\n
\n
\n \n
\n
\n
\n ';case"商品排序得分":return'\n
\n
\n

商品综合排序规则说明:

\n
    \n
  1. 无库存商品,排在有库存商品之后
  2. \n
  3. 热推商品展示在前,非热推商品展示在后;热推商品按热推商品排序值由小到大排序
  4. \n
  5. 运营分类商品列表:按运营分类人工排值由小到大排序(不适用搜索商品列表页、品牌商品列表页、店铺商品列表页)
  6. \n
  7. \n 排序值相同,按系统自动计算的商品排序得分由大到小排序。
    \n 商品排序得分="0.7*支付件数+0.03*下单件数+0.02*加购件数+0.05*访问uv+0.2*新品得分(新品=1,否则=0)
    \n 支付件数:最近一年已支付状态订单的sku件数合计
    \n 下单件数:最近一年所有状态订单的sku件数合计
    \n 加购件数:最近一年加入购物车的sku件数合计
    \n 访问uv:最近一年商品浏览访问uv合计
    \n 新品得分:新品=1,否则=0。设置新品规则 >>\n
  8. \n
  9. 若人工排序值和系统排序值都相同,则按照搜索引擎返回的顺序排序
  10. \n
\n
\n
\n ';case"异款SPU规则":return'\n
\n
\n
\n 将属于规则设置范围内,且属于同一店铺、同一品牌、同一品类,且符合价格最大极差的不同款商品,聚合成一个SPU商品\n
\n
\n
\n ';case"主图视频":return'\n
\n
\n
\n 按SPU编码维度,通过第三方视频生成服务,使用商品主图生成主图视频\n
\n
\n
\n ';default:return""}}}},r=s,l=(a("22c1"),a("2877")),o=Object(l["a"])(r,i,n,!1,null,"ceaaba20",null);t["a"]=o.exports},"5e69":function(e,t,a){},"67db":function(e,t,a){"use strict";a("5e69")},"8d8d":function(e,t,a){},d8a9:function(e,t,a){},fa52:function(e,t,a){"use strict";a("d8a9")}}]);