chunk-401c3a25.c022badc.js 38 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-401c3a25"],{"06e6":function(t,e,n){},"0fae":function(t,e,n){},5334:function(t,e,n){"use strict";n("0fae");var r=n("2f62"),i=n("90e7");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o={name:"city",props:{type:{type:Number,default:0},selectArr:{type:Array,default:[]}},data:function(){return{iSselect:!1,addressModal:!1,cityList:[],activeCity:-1,loading:!1}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(n,!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(r.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{enter:function(t){this.activeCity=t},leave:function(){this.activeCity=null},getCityList:function(){var t=this;this.loading=!0,Object(i.Lb)().then((function(e){t.loading=!1,e.data.forEach((function(e,n,r){e.isShow=!0,e.children.forEach((function(e,n){e.isShow=!0,t.selectArr.length>0&&t.selectArr.forEach((function(t,n){t.children.forEach((function(t,n){e.city_id==t.city_id&&(e.isShow=!1)}))}))}))})),e.data.forEach((function(t,e,n){var r=0,i=0;t.children.forEach((function(t,e){t.isShow?i++:r++})),r==t.children.length&&(t.isShow=!1),t.childNum=i})),t.cityList=e.data}))},allCheckbox:function(){var t=this,e=this.iSselect;t.cityList.forEach((function(n,r){t.$set(t.cityList[r],"checked",e),e?t.$set(t.cityList[r],"count",t.cityList[r].children.length):t.$set(t.cityList[r],"count",0),t.cityList[r].children.forEach((function(n,i){t.$set(t.cityList[r].children[i],"checked",e)}))}))},empty:function(){var t=this;t.cityList.forEach((function(e,n){t.$set(t.cityList[n],"checked",!1),t.cityList[n].children.forEach((function(e,r){t.$set(t.cityList[n].children[r],"checked",!1)})),t.$set(t.cityList[n],"count",0)})),this.iSselect=!1},checkedClick:function(t){var e=this;e.cityList[t].checked?(e.$set(e.cityList[t],"count",e.cityList[t].childNum),e.cityList[t].children.forEach((function(n,r){e.$set(e.cityList[t].children[r],"checked",!0)}))):(e.$set(e.cityList[t],"count",0),e.$set(e.cityList[t],"checked",!1),e.cityList[t].children.forEach((function(n,r){e.$set(e.cityList[t].children[r],"checked",!1)})),e.iSselect=!1)},primary:function(t,e){var n=!1,r=0;this.cityList[t].children.forEach((function(t,e){t.checked&&(n=!0,r++)})),this.$set(this.cityList[t],"count",r),this.$set(this.cityList[t],"checked",n)},confirm:function(){var t=this,e=[];if(t.cityList.forEach((function(n,r){var i={};n.checked&&(i={name:n.name,city_id:n.city_id,children:[]}),t.cityList[r].children.forEach((function(t,e){t.checked&&i.children.push({city_id:t.city_id})})),void 0!==i.city_id&&e.push(i)})),0===e.length)return t.$Message.error("至少选择一个省份或者城市");this.$emit("selectCity",e,this.type),t.addressModal=!1,this.cityList=[]},close:function(){this.addressModal=!1,this.cityList=[]}},mounted:function(){}},s=(n("d77b"),n("2877")),u=(Object(s.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Modal",{staticClass:"modal",attrs:{title:"选择可配送区域",width:"50%",mask:!0},model:{value:t.addressModal,callback:function(e){t.addressModal=e},expression:"addressModal"}},[n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{staticClass:"item",attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[n("div",{staticClass:"acea-row row-right row-middle"},[n("Checkbox",{on:{"on-change":t.allCheckbox},model:{value:t.iSselect,callback:function(e){t.iSselect=e},expression:"iSselect"}},[t._v("全选")]),n("div",{staticClass:"empty",on:{click:t.empty}},[t._v("清空")])],1)])],1),n("Row",{attrs:{gutter:24,type:"flex",loading:t.loading}},t._l(t.cityList,(function(e,r){return e.isShow?n("Col",{key:r,staticClass:"item",attrs:{xl:6,lg:6,md:6,sm:8,xs:6}},[n("div",{on:{mouseenter:function(e){return t.enter(r)},mouseleave:function(e){return t.leave()}}},[n("Checkbox",{attrs:{label:e.name},on:{"on-change":function(e){return t.checkedClick(r)}},model:{value:e.checked,callback:function(n){t.$set(e,"checked",n)},expression:"item.checked"}},[t._v(t._s(e.name))]),n("span",{staticClass:"red"},[t._v("("+t._s((e.count||0)+"/"+e.childNum)+")")]),n("div",{directives:[{name:"show",rawName:"v-show",value:t.activeCity===r,expression:"activeCity===index"}],staticClass:"city"},[n("div",{staticClass:"checkBox"},[n("div",{staticClass:"arrow"}),n("div",t._l(e.children,(function(e,i){return n("Checkbox",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"city.isShow"}],key:i,staticClass:"itemn",attrs:{label:e.name},on:{"on-change":function(e){return t.primary(r,i)}},model:{value:e.checked,callback:function(n){t.$set(e,"checked",n)},expression:"city.checked"}},[t._v(t._s(e.name))])})),1)])])],1)]):t._e()})),1),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("Button",{on:{click:t.close}},[t._v("取消")]),n("Button",{attrs:{type:"primary"},on:{click:t.confirm}},[t._v("确定")])],1),t.loading?n("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)],1)}),[],!1,null,"045af22c",null).exports,n("a34a")),l=n.n(u);function d(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function p(t,e,n,r,i,a,c){try{var o=t[a](c),s=o.value}catch(t){return void n(t)}o.done?e(s):Promise.resolve(s).then(r,i)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function c(t){p(a,r,i,c,o,"next",t)}function o(t){p(a,r,i,c,o,"throw",t)}c(void 0)}))}}var h={props:{value:{type:Array,default:function(){return[]}},separator:{type:String,default:"/"},placeholder:{type:String,default:"请选择"},width:{type:String,default:"400px"},filterable:Boolean,clearable:Boolean,disabled:Boolean,props:{type:Object,default:function(){return{}}},suggestionsPopperClass:{type:String,default:"suggestions-popper-class"},searchWidth:{type:String},searchEmptyText:{type:String,default:"暂无数据"}},data:function(){return{isSearchEmpty:!1,keyword:"",options:[],current:[],labelObject:{label:[],value:[]},labelArray:[],currentProps:{multiple:this.props.multiple,checkStrictly:this.props.checkStrictly,value:this.props.value,label:this.props.label,leaf:this.props.leaf,lazy:!0,lazyLoad:this.lazyLoad}}},computed:{placeholderVisible:function(){return!this.current||0==this.current.length}},watch:{current:function(){this.getLabelArray()},value:function(t){this.current=t},keyword:function(){this.isSearchEmpty=!1}},created:function(){this.initOptions()},methods:{isChecked:function(t){return this.props.multiple?this.current.findIndex((function(e){return e.join()==t.join()}))>-1?"el-link el-link--primary":"":t.join()==this.current.join()?"el-link el-link--primary":""},querySearch:function(t,e){var n=this;this.props.lazySearch(t,(function(t){e(t),t&&t.length||(n.isSearchEmpty=!0)}))},handleSelect:function(t){var e=this;this.props.multiple?-1==this.current.findIndex((function(n){return n.join()==t[e.props.value].join()}))&&(this.$refs.panel.clearCheckedNodes(),this.current.push(t[this.props.value]),this.$emit("change",this.current)):null!=this.current&&t[this.props.value].join()===this.current.join()||(this.$refs.panel.activePath=[],this.current=t[this.props.value],this.$emit("change",this.current)),this.keyword=""},initOptions:function(){var t=f(l.a.mark((function t(){var e=this;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.props.lazyLoad(0,(function(t){e.$set(e,"options",t),e.props.multiple?e.current=d(e.value):e.current=e.value}));case 1:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),getLabelArray:function(){var t=f(l.a.mark((function t(){var e,n,r,i=this;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.props.multiple){t.next=16;break}e=[],n=0;case 3:if(!(n<this.current.length)){t.next=11;break}return t.next=6,this.getObject(this.current[n]);case 6:r=t.sent,e.push(r);case 8:n++,t.next=3;break;case 11:this.labelArray=e,this.$emit("input",this.current),this.disabled||this.$nextTick((function(){i.$refs.popover.updatePopper()})),t.next=20;break;case 16:return t.next=18,this.getObject(this.current||[]);case 18:this.labelObject=t.sent,this.$emit("input",this.current);case 20:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),getObject:function(){var t=f(l.a.mark((function t(e){var n,r,i,a,c=this;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,n=this.options,r=[],i=l.a.mark((function t(i){var a,o;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!((a=n.findIndex((function(t){return t[c.props.value]==e[i]})))<0)){t.next=3;break}return t.abrupt("return","continue");case 3:if(r.push(n[a][c.props.label]),!(i<e.length-1)||n[a].children.length){t.next=15;break}return o=new Promise((function(t){c.props.lazyLoad(e[i],(function(e){t(e)}))})),t.t0=c,t.t1=n[a],t.next=10,o;case 10:t.t2=t.sent,t.t0.$set.call(t.t0,t.t1,"children",t.t2),n=n[a].children,t.next=16;break;case 15:n=n[a].children;case 16:case"end":return t.stop()}}),t)})),a=0;case 5:if(!(a<e.length)){t.next=13;break}return t.delegateYield(i(a),"t0",7);case 7:if("continue"!==t.t0){t.next=10;break}return t.abrupt("continue",10);case 10:a++,t.next=5;break;case 13:return t.abrupt("return",{value:e,label:r});case 16:return t.prev=16,t.t1=t.catch(0),this.current=[],t.abrupt("return",{value:[],label:[]});case 20:case"end":return t.stop()}}),t,this,[[0,16]])})));return function(e){return t.apply(this,arguments)}}(),lazyLoad:function(){var t=f(l.a.mark((function t(e,n){var r,i=this;return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=this.current,this.props.multiple&&(r=d(this.current)),e.root||e.data[this.props.leaf]?n():e.data.children&&e.data.children.length?(this.props.multiple&&(this.current=r),n()):this.props.lazyLoad(e.value,(function(t){e.data.children=t,i.props.multiple&&(i.current=r),n(t)}));case 3:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}(),handleClose:function(t){var e=this.current.findIndex((function(e){return e.join()==t.value.join()}));e>-1&&(this.$refs.panel.clearCheckedNodes(),this.current.splice(e,1),this.$emit("change",this.current))},clearBtnClick:function(){this.$refs.panel.clearCheckedNodes(),this.current=[],this.$emit("change",this.current)},change:function(){this.$emit("change",this.current)}}};function m(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n("f26e");var g={},v={name:"freightTemplate",components:{LazyCascader:Object(s.a)(h,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"lazy-cascader",style:{width:t.width}},[t.disabled?n("div",{staticClass:"el-input__inner lazy-cascader-input lazy-cascader-input-disabled"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.placeholderVisible,expression:"placeholderVisible"}],staticClass:"lazy-cascader-placeholder"},[t._v("\n "+t._s(t.placeholder)+"\n ")]),t.props.multiple?n("div",{staticClass:"lazy-cascader-tags"},t._l(t.labelArray,(function(e,r){return n("el-tag",{key:r,staticClass:"lazy-cascader-tag",attrs:{type:"info","disable-transitions":"",closable:""}},[n("span",[t._v(" "+t._s(e.label.join(t.separator)))])])})),1):n("div",{staticClass:"lazy-cascader-label"},[n("el-tooltip",{attrs:{placement:"top-start",content:t.labelObject.label.join(t.separator)}},[n("span",[t._v(t._s(t.labelObject.label.join(t.separator)))])])],1)]):n("el-popover",{ref:"popover",attrs:{trigger:"click",placement:"bottom-start"}},[n("div",{staticClass:"lazy-cascader-search"},[t.filterable?n("el-autocomplete",{staticClass:"inline-input",style:{width:t.searchWidth||"100%"},attrs:{"popper-class":t.suggestionsPopperClass,"prefix-icon":"el-icon-search",label:"name","fetch-suggestions":t.querySearch,"trigger-on-focus":!1,placeholder:"请输入"},on:{select:t.handleSelect,blur:function(e){t.isSearchEmpty=!1}},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.item;return[n("div",{staticClass:"name",class:t.isChecked(r[t.props.value])},[t._v("\n "+t._s(r[t.props.label].join(t.separator))+"\n ")])]}}],null,!1,3481993904),model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}}):t._e(),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isSearchEmpty,expression:"isSearchEmpty"}],staticClass:"empty"},[t._v(t._s(t.searchEmptyText))])],1),n("div",{staticClass:"lazy-cascader-panel"},[n("el-cascader-panel",{ref:"panel",attrs:{options:t.options,props:t.currentProps},on:{change:t.change},model:{value:t.current,callback:function(e){t.current=e},expression:"current"}})],1),n("div",{staticClass:"el-input__inner lazy-cascader-input",class:t.disabled?"lazy-cascader-input-disabled":"",attrs:{slot:"reference"},slot:"reference"},[n("span",{directives:[{name:"show",rawName:"v-show",value:t.placeholderVisible,expression:"placeholderVisible"}],staticClass:"lazy-cascader-placeholder"},[t._v("\n "+t._s(t.placeholder)+"\n ")]),t.props.multiple?n("div",{staticClass:"lazy-cascader-tags"},t._l(t.labelArray,(function(e,r){return n("el-tag",{key:r,staticClass:"lazy-cascader-tag",attrs:{type:"info",size:"small","disable-transitions":"",closable:""},on:{close:function(n){return t.handleClose(e)}}},[n("span",[t._v(" "+t._s(e.label.join(t.separator)))])])})),1):n("div",{staticClass:"lazy-cascader-label"},[n("el-tooltip",{attrs:{placement:"top-start",content:t.labelObject.label.join(t.separator)}},[n("span",[t._v(t._s(t.labelObject.label.join(t.separator)))])])],1),t.clearable&&t.current.length>0?n("span",{staticClass:"lazy-cascader-clear",on:{click:function(e){return e.stopPropagation(),t.clearBtnClick(e)}}},[n("i",{staticClass:"el-icon-close"})]):t._e()])])],1)}),[],!1,null,null,null).exports},props:{merchantType:{type:Number,default:0}},data:function(){var t=this;return{props:{children:"children",label:"label",value:"value",multiple:!0,lazy:!0,lazyLoad:this.lazyLoad,checkStrictly:!0},isTemplate:!1,columns:[{title:"可配送区域",slot:"regionName",minWidth:200},{title:"首件",key:"first",minWidth:70,render:function(e,n){return e("Input",{props:{type:"number",value:t.templateList[n.index].first},on:{"on-change":function(e){t.templateList[n.index].first=e.target.value}}})}},{title:"运费(元)",key:"price",minWidth:70,render:function(e,n){return e("Input",{props:{type:"number",value:t.templateList[n.index].first_price},on:{"on-change":function(e){t.templateList[n.index].first_price=e.target.value}}})}},{title:"续件",key:"continue",minWidth:70,render:function(e,n){return e("Input",{props:{type:"number",value:t.templateList[n.index].continue},on:{"on-change":function(e){t.templateList[n.index].continue=e.target.value}}})}},{title:"续费(元)",key:"continue_price",minWidth:70,render:function(e,n){return e("Input",{props:{type:"number",value:t.templateList[n.index].continue_price},on:{"on-change":function(e){t.templateList[n.index].continue_price=e.target.value}}})}},{title:"操作",slot:"action",minWidth:70}],columns2:[{title:"选择地区",slot:"placeName",minWidth:250},{title:"包邮件数",key:"number",minWidth:100,render:function(e,n){return e("Input",{props:{type:"number",value:t.appointList[n.index].number},on:{"on-change":function(e){t.appointList[n.index].number=e.target.value}}})}},{title:"包邮金额(元)",key:"price",minWidth:100,render:function(e,n){return e("Input",{props:{type:"number",value:t.appointList[n.index].price},on:{"on-change":function(e){t.appointList[n.index].price=e.target.value}}})}},{title:"操作",slot:"action",minWidth:100}],columns3:[{title:"选择地区",slot:"placeName",minWidth:250},{title:"操作",slot:"action",minWidth:100}],templateList:[{first:1,first_price:0,continue:1,continue_price:0,city_ids:[[0]]}],appointList:[],noDeliveryList:[],formData:{type:1,sort:0,name:"",appoint_check:0,no_delivery_check:0},id:0}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(n,!0).forEach((function(e){y(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},Object(r.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),mounted:function(){},methods:{lazyLoad:function(t,e){var n=this;if(g[t])g[t]().then((function(t){e(m(t.data))}));else{var r=Object(i.h)({pid:t});g[t]=function(){return r},r.then((function(n){n.data.forEach((function(t){t.leaf=!t.hasOwnProperty("children")})),g[t]=function(){return new Promise((function(t){setTimeout((function(){return t(n)}),300)}))},e(n.data)})).catch((function(t){n.$message.error(t.message)}))}},onChange:function(t){},editFrom:function(t){var e=this;this.id=t,Object(i.lb)(t).then((function(t){var n=t.data.formData;e.templateList=t.data.templateList,e.appointList=t.data.appointList,e.noDeliveryList=t.data.noDeliveryList,e.formData={type:n.type,sort:n.sort,name:n.name,appoint_check:n.appoint_check,no_delivery_check:n.no_delivery_check},e.headerType()}))},selectCity:function(t){switch(t){case 1:this.templateList.push({first:1,first_price:0,continue:1,continue_price:0,city_ids:[]});break;case 2:this.appointList.push({placeName:"",number:0,price:0,city_ids:[]});break;case 3:this.noDeliveryList.push({placeName:"",city_ids:[]})}},addCity:function(t){this.type=t,this.selectCity(t)},changeRadio:function(){this.headerType()},headerType:function(){2===this.formData.type?(this.columns[1].title="首重量(KG)",this.columns[3].title="续重量(KG)",this.columns2[1].title="包邮重量(KG)"):3===this.formData.type?(this.columns[1].title="首体积(m³)",this.columns[3].title="续体积(m³)",this.columns2[1].title="包邮体积(m³)"):(this.columns[1].title="首件",this.columns[3].title="续件",this.columns2[1].title="包邮件数")},handleSubmit:function(){var t=this;if(!this.formData.name.trim().length)return this.$Message.error("请填写模板名称");if(!this.templateList.length)return this.$Message.error("请设置配送区域");for(var e=0;e<this.templateList.length;e++){if(this.templateList[e].first<=0)return this.$Message.error("首件/重量/体积应大于0");if(this.templateList[e].first_price<0)return this.$Message.error("运费应大于等于0");if(this.templateList[e].continue<=0)return this.$Message.error("续件/重量/体积应大于0");if(this.templateList[e].continue_price<0)return this.$Message.error("续费应大于等于0")}if(1===this.formData.appoint_check)for(var n=0;n<this.appointList.length;n++){if(this.appointList[n].number<=0)return this.$Message.error("包邮件数应大于0");if(this.appointList[n].price<0)return this.$Message.error("包邮金额应大于等于0")}var r={no_delivery_info:this.noDeliveryList,appoint_info:this.appointList,region_info:this.templateList,sort:this.formData.sort,type:this.formData.type,name:this.formData.name,appoint:this.formData.appoint_check,no_delivery:this.formData.no_delivery_check};Object(i.Mb)(this.id,r).then((function(e){t.isTemplate=!1,t.$parent.getList(),t.formData={type:1,sort:0,name:"",appoint_check:0,no_delivery_check:0},t.appointList=[],t.noDeliveryList=[],t.templateList=[{first:1,first_price:0,continue:1,continue_price:0,city_ids:[[0]]}],t.$Message.success(e.msg)}))},delCity:function(t,e,n,r){var i=this,a={title:e,num:n,url:"setting/shipping_templates/del/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){i.$Message.success(t.msg),1===r?i.templateList.splice(n,1):2==r?i.appointList.splice(n,1):i.noDeliveryList.splice(n,1)})).catch((function(t){i.$Message.error(t.msg)}))},cancel:function(){this.formData={type:1,sort:0,name:"",appoint_check:0,no_delivery_check:0},this.noDeliveryList=[],this.appointList=[],this.templateList=[{first:0,first_price:0,continue:0,continue_price:0,city_ids:[[0]]}]}}},_=(n("c779"),Object(s.a)(v,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Modal",{attrs:{title:"运费模版",width:"70%",if:"isTemplate"},on:{"on-cancel":t.cancel},model:{value:t.isTemplate,callback:function(e){t.isTemplate=e},expression:"isTemplate"}},[n("div",{staticClass:"Modals"},[n("Form",{ref:"formData",staticClass:"form",attrs:{"label-width":t.labelWidth,"label-position":t.labelPosition}},[n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{attrs:{xl:18,lg:18,md:18,sm:24,xs:24}},[n("FormItem",{attrs:{label:"模板名称:",prop:"name"}},[n("Input",{attrs:{type:"text",placeholder:"请输入模板名称",maxlength:20},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1)],1)],1),n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{attrs:{xl:18,lg:18,md:18,sm:24,xs:24}},[n("FormItem",{attrs:{label:"计费方式:",props:"state","label-for":"state"}},[n("RadioGroup",{staticClass:"radio",attrs:{"element-id":"state"},on:{"on-change":t.changeRadio},model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}},[n("Radio",{attrs:{label:1}},[t._v("按件数")]),n("Radio",{attrs:{label:2}},[t._v("按重量")]),n("Radio",{attrs:{label:3}},[t._v("按体积")])],1)],1)],1)],1),n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[n("FormItem",{staticClass:"label",attrs:{label:"配送区域及运费:",props:"state","label-for":"state"}},[n("Table",{ref:"table",staticClass:"ivu-mt",attrs:{columns:t.columns,data:t.templateList,"no-data-text":"暂无数据",border:""},scopedSlots:t._u([{key:"regionName",fn:function(e){e.row;var r=e.index;return[0===r?n("div",[t._v("默认全国 "),n("span",{staticStyle:{"font-weight":"bold"}},[t._v("(开启指定区域不配送时无效)")])]):n("LazyCascader",{staticStyle:{width:"98%"},attrs:{props:t.props,"collapse-tags":"",clearable:"",filterable:!1,size:"mini"},model:{value:t.templateList[r].city_ids,callback:function(e){t.$set(t.templateList[r],"city_ids",e)},expression:"templateList[index].city_ids"}})]}},{key:"action",fn:function(e){var r=e.row,i=e.index;return[0!==i?n("a",{on:{click:function(e){return t.delCity(r,"配送区域",i,1)}}},[t._v("删除")]):t._e()]}}])}),n("Row",{staticClass:"addTop",attrs:{type:"flex"}},[n("Col",[n("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(e){return t.addCity(1)}}},[t._v("单独添加配送区域")])],1)],1)],1)],1)],1),n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[n("FormItem",{attrs:{label:"指定包邮:",prop:"store_name","label-for":"store_name"}},[n("Radio-group",{staticClass:"radio",model:{value:t.formData.appoint_check,callback:function(e){t.$set(t.formData,"appoint_check",e)},expression:"formData.appoint_check"}},[n("Radio",{attrs:{label:1}},[t._v("开启")]),n("Radio",{attrs:{label:0}},[t._v("关闭")])],1),1===t.formData.appoint_check?n("Table",{ref:"table",staticClass:"addTop ivu-mt",attrs:{columns:t.columns2,data:t.appointList,"no-data-text":"暂无数据",border:""},scopedSlots:t._u([{key:"placeName",fn:function(e){e.row;var r=e.index;return[n("LazyCascader",{staticStyle:{width:"98%"},attrs:{props:t.props,"collapse-tags":"",clearable:"",filterable:!1,size:"mini"},model:{value:t.appointList[r].city_ids,callback:function(e){t.$set(t.appointList[r],"city_ids",e)},expression:"appointList[index].city_ids"}})]}},{key:"action",fn:function(e){var r=e.row,i=e.index;return[n("a",{on:{click:function(e){return t.delCity(r,"配送区域",i,2)}}},[t._v("删除")])]}}],null,!1,1551961943)}):t._e(),1===t.formData.appoint_check?n("Row",{staticClass:"addTop",attrs:{type:"flex"}},[n("Col",[n("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(e){return t.addCity(2)}}},[t._v("单独指定包邮")])],1)],1):t._e()],1)],1)],1),n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{attrs:{xl:24,lg:24,md:24,sm:24,xs:24}},[n("FormItem",{attrs:{label:"指定不送达:",prop:"store_name","label-for":"store_name"}},[n("Radio-group",{staticClass:"radio",model:{value:t.formData.no_delivery_check,callback:function(e){t.$set(t.formData,"no_delivery_check",e)},expression:"formData.no_delivery_check"}},[n("Radio",{attrs:{label:1}},[t._v("开启")]),n("Radio",{attrs:{label:0}},[t._v("关闭")])],1),1===t.formData.no_delivery_check?n("Table",{ref:"table",staticClass:"addTop ivu-mt",attrs:{columns:t.columns3,data:t.noDeliveryList,"no-data-text":"暂无数据",border:""},scopedSlots:t._u([{key:"placeName",fn:function(e){e.row;var r=e.index;return[n("LazyCascader",{staticStyle:{width:"98%"},attrs:{props:t.props,"collapse-tags":"",clearable:"",filterable:!1,size:"mini"},model:{value:t.noDeliveryList[r].city_ids,callback:function(e){t.$set(t.noDeliveryList[r],"city_ids",e)},expression:"noDeliveryList[index].city_ids"}})]}},{key:"action",fn:function(e){var r=e.row,i=e.index;return[n("a",{on:{click:function(e){return t.delCity(r,"配送区域",i,3)}}},[t._v("删除")])]}}],null,!1,3510670902)}):t._e(),1===t.formData.no_delivery_check?n("Row",{staticClass:"addTop",attrs:{type:"flex"}},[n("Col",[n("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(e){return t.addCity(3)}}},[t._v("单独指定不送达")])],1)],1):t._e()],1)],1)],1),n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{attrs:{xl:18,lg:18,md:18,sm:24,xs:24}},[n("FormItem",{attrs:{label:"排序:",prop:"store_name","label-for":"store_name"}},[n("InputNumber",{attrs:{min:0,placeholder:"输入值越大越靠前"},model:{value:t.formData.sort,callback:function(e){t.$set(t.formData,"sort",e)},expression:"formData.sort"}})],1)],1)],1),t.merchantType?t._e():n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",[n("FormItem",{attrs:{prop:"store_name","label-for":"store_name"}},[n("Button",{attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.id?"立即修改":"立即提交"))])],1)],1)],1)],1)],1),n("div",{attrs:{slot:"footer"},slot:"footer"})])],1)}),[],!1,null,"9ae049be",null));e.a=_.exports},"56cf":function(t,e,n){},"90e7":function(t,e,n){"use strict";n.d(e,"x",(function(){return i})),n.d(e,"k",(function(){return a})),n.d(e,"Jb",(function(){return c})),n.d(e,"Ib",(function(){return o})),n.d(e,"j",(function(){return s})),n.d(e,"db",(function(){return u})),n.d(e,"kb",(function(){return l})),n.d(e,"gb",(function(){return d})),n.d(e,"hb",(function(){return p})),n.d(e,"d",(function(){return f})),n.d(e,"eb",(function(){return h})),n.d(e,"Nb",(function(){return m})),n.d(e,"ib",(function(){return b})),n.d(e,"p",(function(){return y})),n.d(e,"o",(function(){return g})),n.d(e,"c",(function(){return v})),n.d(e,"U",(function(){return _})),n.d(e,"mb",(function(){return j})),n.d(e,"T",(function(){return O})),n.d(e,"nb",(function(){return k})),n.d(e,"xb",(function(){return x})),n.d(e,"K",(function(){return w})),n.d(e,"wb",(function(){return L})),n.d(e,"s",(function(){return C})),n.d(e,"q",(function(){return $})),n.d(e,"r",(function(){return D})),n.d(e,"t",(function(){return S})),n.d(e,"u",(function(){return E})),n.d(e,"X",(function(){return T})),n.d(e,"Y",(function(){return P})),n.d(e,"V",(function(){return z})),n.d(e,"W",(function(){return M})),n.d(e,"M",(function(){return R})),n.d(e,"E",(function(){return N})),n.d(e,"I",(function(){return A})),n.d(e,"H",(function(){return I})),n.d(e,"z",(function(){return W})),n.d(e,"J",(function(){return B})),n.d(e,"B",(function(){return G})),n.d(e,"G",(function(){return F})),n.d(e,"A",(function(){return V})),n.d(e,"y",(function(){return K})),n.d(e,"L",(function(){return U})),n.d(e,"i",(function(){return q})),n.d(e,"e",(function(){return J})),n.d(e,"f",(function(){return H})),n.d(e,"Kb",(function(){return Q})),n.d(e,"Lb",(function(){return Y})),n.d(e,"Mb",(function(){return X})),n.d(e,"lb",(function(){return Z})),n.d(e,"yb",(function(){return tt})),n.d(e,"N",(function(){return et})),n.d(e,"Ab",(function(){return nt})),n.d(e,"zb",(function(){return rt})),n.d(e,"Bb",(function(){return it})),n.d(e,"Cb",(function(){return at})),n.d(e,"Db",(function(){return ct})),n.d(e,"Eb",(function(){return ot})),n.d(e,"Ob",(function(){return st})),n.d(e,"Pb",(function(){return ut})),n.d(e,"O",(function(){return lt})),n.d(e,"g",(function(){return dt})),n.d(e,"Qb",(function(){return pt})),n.d(e,"ob",(function(){return ft})),n.d(e,"pb",(function(){return ht})),n.d(e,"F",(function(){return mt})),n.d(e,"C",(function(){return bt})),n.d(e,"jb",(function(){return yt})),n.d(e,"qb",(function(){return gt})),n.d(e,"rb",(function(){return vt})),n.d(e,"sb",(function(){return _t})),n.d(e,"D",(function(){return jt})),n.d(e,"fb",(function(){return Ot})),n.d(e,"cb",(function(){return kt})),n.d(e,"P",(function(){return xt})),n.d(e,"S",(function(){return wt})),n.d(e,"Q",(function(){return Lt})),n.d(e,"R",(function(){return Ct})),n.d(e,"h",(function(){return $t})),n.d(e,"w",(function(){return Dt})),n.d(e,"v",(function(){return St})),n.d(e,"Z",(function(){return Et})),n.d(e,"tb",(function(){return Tt})),n.d(e,"vb",(function(){return Pt})),n.d(e,"b",(function(){return zt})),n.d(e,"ub",(function(){return Mt})),n.d(e,"n",(function(){return Rt})),n.d(e,"a",(function(){return Nt})),n.d(e,"m",(function(){return At})),n.d(e,"l",(function(){return It})),n.d(e,"Fb",(function(){return Wt})),n.d(e,"Gb",(function(){return Bt})),n.d(e,"Hb",(function(){return Gt})),n.d(e,"ab",(function(){return Ft})),n.d(e,"bb",(function(){return Vt}));var r=n("b6bd");function i(t){return Object(r.a)({url:"setting/config/header_basics",method:"get",params:t})}function a(t,e){return Object(r.a)({url:e,method:"get",params:t})}function c(t){return Object(r.a)({url:t.url,method:"get",params:t.data})}function o(){return Object(r.a)({url:"notify/sms/temp/create",method:"get"})}function s(t){return Object(r.a)({url:"serve/login",method:"post",data:t})}function u(){return Object(r.a)({url:"serve/info",method:"get"})}function l(t){return Object(r.a)({url:"serve/sms/open",method:"get",params:t})}function d(t){return Object(r.a)({url:"serve/opn_express",method:"post",data:t})}function p(t){return Object(r.a)({url:"serve/open",method:"get",params:t})}function f(t){return Object(r.a)({url:"serve/checkCode",method:"post",data:t})}function h(t){return Object(r.a)({url:"serve/modify",method:"post",data:t})}function m(t){return Object(r.a)({url:"serve/update_phone",method:"post",data:t})}function b(t){return Object(r.a)({url:"serve/record",method:"get",params:t})}function y(t){return Object(r.a)({url:"serve/export_temp",method:"get",params:t})}function g(){return Object(r.a)({url:"serve/export_all",method:"get"})}function v(t){return Object(r.a)({url:"serve/captcha",method:"post",data:t})}function _(t){return Object(r.a)({url:"serve/register",method:"post",data:t})}function j(t){return Object(r.a)({url:"serve/meal_list",method:"get",params:t})}function O(t){return Object(r.a)({url:"serve/pay_meal",method:"post",data:t})}function k(t){return Object(r.a)({url:"notify/sms/record",method:"get",params:t})}function x(){return Object(r.a)({url:"merchant/store",method:"GET"})}function w(){return Object(r.a)({url:"merchant/store/address",method:"GET"})}function L(t){return Object(r.a)({url:"merchant/store/".concat(t.id),method:"POST",data:t})}function C(t){return Object(r.a)({url:"freight/express",method:"get",params:t})}function $(){return Object(r.a)({url:"/freight/express/create",method:"get"})}function D(t){return Object(r.a)({url:"freight/express/".concat(t,"/edit"),method:"get"})}function S(t){return Object(r.a)({url:"freight/express/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function E(){return Object(r.a)({url:"freight/express/sync_express",method:"get"})}function T(t){return Object(r.a)({url:"setting/role",method:"GET",params:t})}function P(t){return Object(r.a)({url:"setting/role/set_status/".concat(t.id,"/").concat(t.status),method:"PUT"})}function z(t){return Object(r.a)({url:"setting/role/".concat(t.id),method:"post",data:t})}function M(t){return Object(r.a)({url:"setting/role/".concat(t,"/edit"),method:"get"})}function R(){return Object(r.a)({url:"setting/role/create",method:"get"})}function N(t){return Object(r.a)({url:"app/wechat/kefu",method:"get",params:t})}function A(t){return Object(r.a)({url:"app/wechat/kefu/create",method:"get",params:t})}function I(){return Object(r.a)({url:"app/wechat/kefu/add",method:"get"})}function W(t){return Object(r.a)({url:"app/wechat/kefu",method:"post",data:t})}function B(t){return Object(r.a)({url:"app/wechat/kefu/set_status/".concat(t.id,"/").concat(t.account_status),method:"PUT"})}function G(t){return Object(r.a)({url:"app/wechat/kefu/".concat(t,"/edit"),method:"GET"})}function F(t,e){return Object(r.a)({url:"app/wechat/kefu/record/".concat(e),method:"GET",params:t})}function V(t){return Object(r.a)({url:"app/wechat/kefu/chat_list",method:"GET",params:t})}function K(){return Object(r.a)({url:"notify/sms/is_login",method:"GET"})}function U(){return Object(r.a)({url:"notify/sms/logout",method:"GET"})}function q(t){return Object(r.a)({url:"setting/city/list/".concat(t),method:"get"})}function J(t){return Object(r.a)({url:"setting/city/add/".concat(t),method:"get"})}function H(t){return Object(r.a)({url:"setting/city/".concat(t,"/edit"),method:"get"})}function Q(t){return Object(r.a)({url:"setting/shipping_templates/list",method:"get",params:t})}function Y(t){return Object(r.a)({url:"setting/shipping_templates/city_list",method:"get"})}function X(t,e){return Object(r.a)({url:"setting/shipping_templates/save/".concat(t),method:"post",data:e})}function Z(t){return Object(r.a)({url:"setting/shipping_templates/".concat(t,"/edit"),method:"get"})}function tt(){return Object(r.a)({url:"merchant/store/get_header",method:"get"})}function et(t){return Object(r.a)({url:"merchant/store",method:"get",params:t})}function nt(t,e){return Object(r.a)({url:"merchant/store/set_show/".concat(t,"/").concat(e),method:"put"})}function rt(t){return Object(r.a)({url:"merchant/store/get_info/".concat(t),method:"get"})}function it(t){return Object(r.a)({url:"merchant/store_staff",method:"get",params:t})}function at(){return Object(r.a)({url:"merchant/store_staff/create",method:"get"})}function ct(t){return Object(r.a)({url:"merchant/store_staff/".concat(t,"/edit"),method:"get"})}function ot(t,e){return Object(r.a)({url:"merchant/store_staff/set_show/".concat(t,"/").concat(e),method:"put"})}function st(t){return Object(r.a)({url:"merchant/verify_order",method:"get",params:t})}function ut(t){return Object(r.a)({url:"merchant/verify/spread_info/".concat(t),method:"get"})}function lt(){return Object(r.a)({url:"merchant/store_list",method:"get"})}function dt(){return Object(r.a)({url:"setting/city/clean_cache",method:"get"})}function pt(t){return Object(r.a)({url:"app/wechat/speechcraft",method:"get",params:t})}function ft(t){return Object(r.a)({url:"app/wechat/speechcraft/create",method:"get",params:t})}function ht(t){return Object(r.a)({url:"app/wechat/speechcraft/".concat(t,"/edit"),method:"get"})}function mt(t){return Object(r.a)({url:"app/wechat/kefu/login/".concat(t),method:"get"})}function bt(t){return Object(r.a)({url:"app/feedback",method:"get",params:t})}function yt(t){return Object(r.a)({url:"serve/sms/sign",method:"PUT",data:t})}function gt(){return Object(r.a)({url:"app/wechat/speechcraftcate",method:"get"})}function vt(){return Object(r.a)({url:"app/wechat/speechcraftcate/create",method:"get"})}function _t(t){return Object(r.a)({url:"app/wechat/speechcraftcate/".concat(t,"/edit"),method:"get"})}function jt(t){return Object(r.a)({url:"app/feedback/".concat(t,"/edit"),method:"get"})}function Ot(){return Object(r.a)({url:"serve/open",method:"get"})}function kt(){return Object(r.a)({url:"serve/dump_open",method:"get"})}function xt(t){return Object(r.a)({url:"setting/system_out/index",method:"get",params:t})}function wt(t,e){return Object(r.a)({url:"setting/system_out/set_status/".concat(t,"/").concat(e),method:"put"})}function Lt(t){return Object(r.a)({url:"setting/system_out/save",method:"post",params:t})}function Ct(t,e){return Object(r.a)({url:"setting/system_out/update/".concat(t),method:"post",params:e})}function $t(t){return Object(r.a)({url:"city",method:"get",params:t})}function Dt(t){return Object(r.a)({url:"setting/config/edit_new_build/"+t,method:"get"})}function St(){return Object(r.a)({url:"/setting/config/image",method:"get"})}function Et(t){return Object(r.a)({url:"setting/config/save_basics",method:"post",data:t})}function Tt(t){return Object(r.a)({url:"/setting/config/storage",method:"get",params:t})}function Pt(t){return Object(r.a)({url:"/setting/config/storage/synch/".concat(t),method:"put"})}function zt(t){return Object(r.a)({url:"/setting/config/storage/create/".concat(t),method:"get"})}function Mt(t){return Object(r.a)({url:"/setting/config/storage/status/".concat(t),method:"put"})}function Rt(t){return Object(r.a)({url:"/setting/config/storage/domain/".concat(t),method:"get"})}function Nt(t){return Object(r.a)({url:"/setting/config/storage/form/".concat(t),method:"get"})}function At(t){return Object(r.a)({url:"/order/delivery_order/list",method:"get",params:t})}function It(t){return Object(r.a)({url:"/order/delivery_order/cancelForm/".concat(t),method:"get"})}function Wt(t,e){return Object(r.a)({url:"/system/form/save/".concat(t),method:"post",data:e})}function Bt(t,e){return Object(r.a)({url:"/system/form/info/".concat(t),method:"get",params:e})}function Gt(t){return Object(r.a)({url:"/system/form/index",method:"get",params:t})}function Ft(t){return Object(r.a)({url:"setting/config/storage/save_type/".concat(t),method:"get"})}function Vt(t){return Object(r.a)({url:"/file/scan/upload",method:"post",headers:{"content-type":"multipart/form-data;"},data:t})}},b8b7:function(t,e,n){},c779:function(t,e,n){"use strict";var r=n("b8b7");n.n(r).a},d77b:function(t,e,n){"use strict";var r=n("06e6");n.n(r).a},f26e:function(t,e,n){"use strict";var r=n("56cf");n.n(r).a}}]);