UNPKG

beehole-store-server

Version:

www.bee-hole.com

1 lines 16.3 kB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-eccfa5f0","chunk-23b18e87"],{1100:function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("a-card",{attrs:{bordered:!1}},[e.ShowEditCarryModal?t("carry-mode-edit-form",{ref:"CarryModeEditForm",on:{ok:e.getList,close:function(t){e.ShowEditCarryModal=!1}}}):e._e(),t("a-table",{attrs:{loading:e.loading,rowKey:"carry_id",size:"middle",columns:e.columns,"data-source":e.list,pagination:!1},scopedSlots:e._u([{key:"carrypost",fn:function(o,i){return t("span",{},[1==i.extra_condition&&i.sub_mode.length>0?t("div",e._l(i.sub_mode,(function(o,i){return t("div",{key:i},[1==o.condition_interval?t("div",[1==o.billing_method?t("div",[e._v(" 商品总价格¥"+e._s(o.start_interval)+"~¥"+e._s(o.end_interval)+",价格¥"+e._s(o.fixed_freight)+" ")]):e._e(),2==o.billing_method?t("div",[e._v(" 商品总价格¥"+e._s(o.start_interval)+"~¥"+e._s(o.end_interval)+",首重 "+e._s(o.first_piece)+" kg ¥"+e._s(o.first_amount)+" 续重每 "+e._s(o.second_piece)+"kg ¥"+e._s(o.second_amount)+" ")]):e._e(),3==o.billing_method?t("div",[e._v(" 商品总价格¥"+e._s(o.start_interval)+"~¥"+e._s(o.end_interval)+",首件 "+e._s(o.first_piece)+" 件 ¥"+e._s(o.first_amount)+" 续件每 "+e._s(o.second_piece)+"件 ¥"+e._s(o.second_amount)+" ")]):e._e()]):e._e(),2==o.condition_interval?t("div",[1==o.billing_method?t("div",[e._v(" 商品总重量"+e._s(o.start_interval)+"kg~"+e._s(o.end_interval)+"kg,价格¥"+e._s(o.fixed_freight)+" ")]):e._e(),2==o.billing_method?t("div",[e._v(" 商品总重量"+e._s(o.start_interval)+"kg~"+e._s(o.end_interval)+"kg,首重 "+e._s(o.first_piece)+" kg ¥"+e._s(o.first_amount)+" 续重每 "+e._s(o.second_piece)+"kg ¥"+e._s(o.second_amount)+" ")]):e._e(),3==o.billing_method?t("div",[e._v(" 商品总重量"+e._s(o.start_interval)+"kg~"+e._s(o.end_interval)+"kg,首件 "+e._s(o.first_piece)+" 件 ¥"+e._s(o.first_amount)+" 续件每 "+e._s(o.second_piece)+"件 ¥"+e._s(o.second_amount)+" ")]):e._e()]):e._e(),3==o.condition_interval?t("div",[1==o.billing_method?t("div",[e._v(" 商品总件数"+e._s(o.start_interval)+"件~"+e._s(o.end_interval)+"件,价格¥"+e._s(o.fixed_freight)+" ")]):e._e(),2==o.billing_method?t("div",[e._v(" 商品总件数"+e._s(o.start_interval)+"件~"+e._s(o.end_interval)+"件,首重 "+e._s(o.first_piece)+" kg ¥"+e._s(o.first_amount)+" 续重每 "+e._s(o.second_piece)+"kg ¥"+e._s(o.second_amount)+" ")]):e._e(),3==o.billing_method?t("div",[e._v(" 商品总件数"+e._s(o.start_interval)+"件~"+e._s(o.end_interval)+"件,首件 "+e._s(o.first_piece)+" 件 ¥"+e._s(o.first_amount)+" 续件每 "+e._s(o.second_piece)+"件 ¥"+e._s(o.second_amount)+" ")]):e._e()]):e._e()])})),0):e._e(),0==i.extra_condition?t("div",[1==i.billing_method?t("div",[e._v("价格:¥"+e._s(i.fixed_freight))]):e._e(),2==i.billing_method?t("div",[e._v(" 首重 "+e._s(i.first_piece)+" kg ¥"+e._s(i.first_amount)+" 续重每 "+e._s(i.second_piece)+"kg ¥"+e._s(i.second_amount)+" ")]):e._e(),3==i.billing_method?t("div",[e._v(" 首件 "+e._s(i.first_piece)+" 件 ¥"+e._s(i.first_amount)+" 续件每 "+e._s(i.second_piece)+"件 ¥"+e._s(i.second_amount)+" ")]):e._e()]):e._e()])}},{key:"operation",fn:function(o,i){return t("span",{},[t("a",{on:{click:function(t){return e.handleCarryModeEdit(i)}}},[e._v(" "+e._s(e.$t("view.postfee.update_fee"))+" ")])])}}])})],1)],1)},a=[],n=(o("a9e3"),o("f214")),r=o("1b6c"),s=o("fd7b"),d={name:"DictData",props:{type:{type:String},fareId:{type:Number}},components:{CarryModeEditForm:s["default"]},data:function(){return{ShowEditCarryModal:!1,list:[],selectedRowKeys:[],selectedRows:[],advanced:!1,single:!0,multiple:!0,ids:[],dictLabels:[],loading:!1,total:0,statusOptions:[],queryParam:{page:1,limit:100,fare_id:void 0},columns:[{title:Object(r["a"])("view.postfee.postfee_name"),dataIndex:"carry_name"},{title:Object(r["a"])("view.postfee.fee"),dataIndex:"carrypost",scopedSlots:{customRender:"carrypost"}},{title:Object(r["a"])("view.postfee.operation"),dataIndex:"operation",width:"15%",scopedSlots:{customRender:"operation"}}]}},filters:{},created:function(){this.queryParam.fare_id=this.fareId,this.getList()},computed:{},watch:{},methods:{getList:function(){this.loading=!0;var e=this;Object(n["b"])({fare_id:this.fareId}).then((function(t){e.list=t.list,e.loading=!1}))},handleCarryModeEdit:function(e){var t=this;this.ShowEditCarryModal=!0,this.$nextTick((function(){return t.$refs.CarryModeEditForm.handleCarryModeEdit(e)}))}}},c=d,l=o("2877"),u=Object(l["a"])(c,i,a,!1,null,null,null);t["default"]=u.exports},"1b6c":function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return r}));var i=o("5530"),a=o("bf0f");function n(e,t){return function(){return Object(a["b"])(e,Object(i["a"])({},t))}}function r(e,t){return Object(a["b"])(e,Object(i["a"])({},t))}},"24ba":function(e,t,o){"use strict";o.r(t);o("b0c0");var i=function(){var e=this,t=e._self._c;return t("ant-modal",{attrs:{visible:e.open,"modal-title":e.formTitle,"adjust-size":!0,modalWidth:"800",modalHeight:"400"},on:{cancel:e.cancel}},[t("a-form-model",{ref:"form",attrs:{slot:"content",model:e.form,rules:e.rules,layout:"vertical"},slot:"content"},[t("a-row",{staticClass:"form-row",attrs:{gutter:32}},[t("a-col",{attrs:{lg:24,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:e.$t("view.postfee.area_name"),prop:"fare_name"}},[t("a-input",{attrs:{placeholder:e.$t("component.postfee.input.area_name")},model:{value:e.form.fare_name,callback:function(t){e.$set(e.form,"fare_name",t)},expression:"form.fare_name"}})],1)],1),t("a-col",{attrs:{lg:24,md:12,sm:24}},[t("a-form-item",{attrs:{label:e.$t("view.postfee.area"),prop:"region"}},[t("a-checkbox-group",{model:{value:e.form.region,callback:function(t){e.$set(e.form,"region",t)},expression:"form.region"}},e._l(e.CountryList,(function(o){return t("a-checkbox",{key:o.simple_speech,attrs:{value:o.simple_speech}},[e._v(e._s(e.$t(o.name)))])})),1)],1)],1)],1)],1),t("template",{slot:"footer"},[t("a-button",{on:{click:e.cancel}},[e._v(" "+e._s(e.$t("component.postfee.cancle.btn"))+" ")]),t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("component.postfee.save.btn"))+" ")])],1)],2)},a=[],n=o("5530"),r=o("5a92"),s=Object(n["a"])({},r["default"]),d=s,c=(o("5d1e"),o("2877")),l=Object(c["a"])(d,i,a,!1,null,null,null);t["default"]=l.exports},"4c35":function(e,t,o){"use strict";o.r(t);o("b0c0");var i=function(){var e=this,t=e._self._c;return t("ant-modal",{attrs:{visible:e.open,"modal-title":e.formTitle,"adjust-size":!0,modalWidth:"800",modalHeight:"400"},on:{cancel:e.cancel}},[t("a-form-model",{ref:"form",attrs:{slot:"content",model:e.form,rules:e.rules,layout:"vertical"},slot:"content"},[t("a-row",{staticClass:"form-row",attrs:{gutter:32}},[t("a-col",{attrs:{lg:24,md:12,sm:24}},[t("a-form-model-item",{attrs:{label:e.$t("view.postfee.area_name"),prop:"fare_name"}},[t("a-input",{attrs:{placeholder:e.$t("component.postfee.input.area_name")},model:{value:e.form.fare_name,callback:function(t){e.$set(e.form,"fare_name",t)},expression:"form.fare_name"}})],1)],1),t("a-col",{attrs:{lg:24,md:12,sm:24}},[t("a-form-item",{attrs:{label:e.$t("view.postfee.area"),prop:"region"}},[t("a-checkbox-group",{model:{value:e.form.region,callback:function(t){e.$set(e.form,"region",t)},expression:"form.region"}},e._l(e.CountryList,(function(o){return t("a-checkbox",{key:o.simple_speech,attrs:{value:o.simple_speech}},[e._v(e._s(e.$t(o.name)))])})),1)],1)],1)],1)],1),t("template",{slot:"footer"},[t("a-button",{on:{click:e.cancel}},[e._v(" "+e._s(e.$t("component.postfee.cancle.btn"))+" ")]),t("a-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("component.postfee.save.btn"))+" ")])],1)],2)},a=[],n=o("5530"),r=o("5a92"),s=Object(n["a"])({},r["default"]),d=s,c=(o("bc84"),o("2877")),l=Object(c["a"])(d,i,a,!1,null,null,null);t["default"]=l.exports},"5a92":function(e,t,o){"use strict";o.r(t);var i=o("5530"),a=o("2dd7"),n=o("f214"),r=o("c7a1"),s=o("5880");t["default"]={name:"CreateForm",props:{shop_id:0},components:{AntModal:a["a"]},data:function(){return{open:!1,attachmentRefName:"addUploaderFile",editAttachmentRefName:"editUploaderFile",formId:"",labelCol:{span:4},wrapperCol:{span:14},loading:!1,total:0,id:void 0,formTitle:"",contentEditorEdit:"",form:{fare_id:void 0,fare_name:"",region:[]},rules:{},CountryList:[]}},filters:{},created:function(){},computed:Object(i["a"])({},Object(s["mapGetters"])(["shopId"])),watch:{},mounted:function(){},methods:{cancel:function(){this.open=!1,this.reset(),this.$emit("close")},reset:function(){this.form={fare_id:void 0,fare_name:"",region:[]},this.form1={}},handleAdd:function(){this.reset(),this.open=!0,this.formTitle=this.$t("view.postfee.add.area"),this.getCountryList()},handleUpdate:function(e){var t=this;this.reset(),this.getCountryList();var o=e.fare_id;Object(n["a"])(o).then((function(e){t.open=!0,t.form=e.list[0],t.form.region=JSON.parse(t.form.region),t.formTitle=t.$t("view.postfee.update.area")}))},getCountryList:function(){var e=this;Object(r["b"])({shop_id:this.shopId,name:"PsCountry"}).then((function(t){if(t.list&&t.list[0].config)try{e.CountryList=JSON.parse(t.list[0].config)}catch(o){e.$notification["error"]({message:"警告",description:o})}else e.$notification["error"]({message:"警告",description:"请去配置可发货国家"})}))},submitForm:function(){var e=this,t=this;t.shop_id&&(this.form.shop_id=t.shopId),this.$refs.form.validate((function(o){if(!o)return!1;var i=JSON.parse(JSON.stringify(e.form));if(void 0!==i.fare_id){if(!i.region.length)return t.$message.error("没有选择国家,无法保存",3),!1;i.region=JSON.stringify(i.region),Object(n["e"])(i).then((function(t){e.$message.success("修改成功",3),e.open=!1,e.$emit("ok"),e.$emit("close")}))}else{if(!i.region.length)return t.$message.error("没有选择国家,无法保存",3),!1;i.region=JSON.stringify(i.region),Object(n["e"])(i).then((function(o){t.$message.success("新增成功",3),t.open=!1,t.$emit("ok"),e.$emit("close")}))}}))}}}},"5d1e":function(e,t,o){"use strict";o("beaf")},"9b8e":function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("a-card",{staticClass:"table-card",attrs:{bordered:!1}},[e.showAddModal?t("fare-template-add-form",{ref:"FareTemplateAddForm",attrs:{shop_id:e.shopId},on:{ok:e.getList,close:function(t){e.showAddModal=!1}}}):e._e(),e.showEditModal?t("fare-template-edit-form",{ref:"FareTemplateEditForm",on:{ok:e.getList,close:function(t){e.showEditModal=!1}}}):e._e(),e.ShowAddCarryModal?t("carry-mode-add-form",{ref:"CarryModeAddForm",attrs:{shop_id:e.shopId},on:{ok:e.addModeBack,close:function(t){e.ShowAddCarryModal=!1}}}):e._e(),t("advance-table",{attrs:{columns:e.columns,"data-source":e.list,title:e.$t("view.postfee.postfee.management"),loading:e.loading,rowKey:"fare_id",size:"middle",tableKey:"system-notic-NoticIndex-table","format-conditions":!0,pagination:{current:e.queryParam.page,pageSize:e.queryParam.limit,total:e.total,showSizeChanger:!0,showLessItems:!0,showQuickJumper:!0,showTotal:function(t,o){return e.$t("view.order.list.table.total",{num:o[0]+"-"+o[1],total:t})},onChange:e.changeSize,onShowSizeChange:e.onSizeChange}},on:{refresh:e.getList},scopedSlots:e._u([{key:"expandedRowRender",fn:function(e){var o=e.record;return t("span",{},[t("model-list",{ref:"ModelList"+o.fare_id,attrs:{fareId:o.fare_id}})],1)}},{key:"operation",fn:function(o){o.text;var i=o.record;return t("span",{},[t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:postfee:edit"],expression:"['system:postfee:edit']"}],on:{click:function(t){return e.handleUpdate(i)}}},[e._v(" "+e._s(e.$t("view.postfee.update.postfee"))+" ")]),t("a-divider",{attrs:{type:"vertical"}}),t("a",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:carrymode:add"],expression:"['system:carrymode:add']"}],on:{click:function(t){return e.handleCarryModeAdd(i)}}},[e._v(" "+e._s(e.$t("view.postfee.add.postfee"))+" ")])],1)}}])},[t("div",{staticClass:"table-operations",attrs:{slot:"button"},slot:"button"},[t("a-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:notice:add"],expression:"['system:notice:add']"}],attrs:{type:"primary"},on:{click:e.handleAdd}},[t("a-icon",{attrs:{type:"plus"}}),e._v(e._s(e.$t("view.postfee.add.area"))+" ")],1)],1)])],1)],1)},a=[],n=o("5530"),r=(o("d81d"),o("5d9e")),s=o("f214"),d=o("5880"),c=o("4c35"),l=o("24ba"),u=o("4526"),f=o("1100"),m=o("1b6c"),_={name:"Postfee",components:{AdvanceTable:r["a"],FareTemplateAddForm:c["default"],FareTemplateEditForm:l["default"],CarryModeAddForm:u["default"],ModelList:f["default"]},data:function(){return{list:[],main_domain:{},advanced:!1,loading:!1,sunloading:!1,total:0,labelCol:{span:6},wrapperCol:{span:18},queryParam:{page:1,limit:10,fare_name:""},addModalRefName:"addModal",columns:[{title:Object(m["a"])("view.postfee.area_name"),dataIndex:"fare_name"},{title:Object(m["a"])("view.postfee.area"),dataIndex:"region"},{title:Object(m["a"])("view.postfee.operation"),dataIndex:"operation",width:"200",scopedSlots:{customRender:"operation"}}],showAddModal:!1,showEditModal:!1,ShowAddCarryModal:!1,ShowEditCarryModal:!1}},filters:{noticeTypeFilter:function(e){var t="blue";return"1"===e&&(t="orange"),t}},created:function(){this.getList()},computed:Object(n["a"])({},Object(d["mapGetters"])(["shopId"])),watch:{},methods:{getList:function(){var e=this;this.loading=!0,this.shopId&&(this.queryParam.shop_id=this.shopId),Object(s["c"])(this.queryParam).then((function(t){if(t.list){for(var o in e.list=t.list,e.list)e.list[o].region=JSON.parse(e.list[o].region);e.total=t.total_count}else e.$message.success("没有运费数据!",3);e.loading=!1}))},addModeBack:function(e){var t=this;this.getList(),e&&this.$refs["ModelList"+e]&&this.$nextTick((function(){return t.$refs["ModelList"+e].getList()}))},handleQuery:function(){this.queryParam.page=1,this.getList()},resetQuery:function(){this.queryParam={page:1,limit:10},this.handleQuery()},onShowSizeChange:function(e,t){this.queryParam.limit=t,this.getList()},onSizeChange:function(e,t){this.queryParam.page=1,this.queryParam.limit=t,this.getList()},changeSize:function(e,t){this.queryParam.page=e,this.queryParam.limit=t,this.getList()},onSelectChange:function(e,t){this.selectedRowKeys=e,this.selectedRows=t,this.ids=this.selectedRows.map((function(e){return e.id})),this.single=1!==e.length,this.multiple=!e.length},toggleAdvanced:function(){this.advanced=!this.advanced},handleAdd:function(){var e=this;this.showAddModal=!0,this.$nextTick((function(){return e.$refs.FareTemplateAddForm.handleAdd()}))},handleUpdate:function(e){var t=this;this.showEditModal=!0,this.$nextTick((function(){return t.$refs.FareTemplateEditForm.handleUpdate(e)}))},handleCarryModeAdd:function(e){var t=this;this.ShowAddCarryModal=!0,this.$nextTick((function(){return t.$refs.CarryModeAddForm.handleCarryModeAdd(e)}))}}},p=_,h=o("2877"),g=Object(h["a"])(p,i,a,!1,null,null,null);t["default"]=g.exports},bc84:function(e,t,o){"use strict";o("e057")},beaf:function(e,t,o){},c7a1:function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return r})),o.d(t,"d",(function(){return s})),o.d(t,"e",(function(){return d})),o.d(t,"f",(function(){return c})),o.d(t,"g",(function(){return l})),o.d(t,"c",(function(){return u}));var i=o("b775"),a={configAdd:"/mallconfig/save",configList:"/mallconfig/list",huobiGet:"/pmethod/currency/get",huobiSet:"/pmethod/currencyrates/set",systemGet:"/config/sys/get",systemSet:"/config/sys/set",copyrightApi:"/config/copyright"};function n(e){return Object(i["b"])({url:a.configAdd,method:"post",data:e})}function r(e){return Object(i["b"])({url:a.configList,method:"post",params:e})}function s(e){return Object(i["b"])({url:a.huobiGet,method:"get",params:e})}function d(e){return Object(i["b"])({url:a.huobiSet,method:"post",params:e})}function c(e){return Object(i["b"])({url:a.systemGet,method:"post",params:e})}function l(e){return Object(i["b"])({url:a.systemSet,method:"post",data:e})}function u(e){return Object(i["b"])({url:a.copyrightApi,method:"post",data:e})}},e057:function(e,t,o){}}]);