1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-addGoods-freightTemplate"],{3108:function(e,t,i){"use strict";i.r(t);var n=i("b5437"),a=i.n(n);for(var c in n)["default"].indexOf(c)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(c);t["default"]=a.a},"3d51":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("v-uni-view",{staticClass:"container"},[i("v-uni-view",{staticClass:"title"},[i("v-uni-view",{staticClass:"search_box"},[i("search",{attrs:{holder:"请输入运费模板"},on:{getList:function(t){arguments[0]=t=e.$handleEvent(t),e.getShippingList.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"administration",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.handleAdministration.apply(void 0,arguments)}}},[e._v(e._s(e.administrationFlag?"完成":"管理"))])],1),i("v-uni-view",[e.selectFormList.length?i("v-uni-view",[i("select-form",{attrs:{platformClassification:e.selectFormList},on:{handleJumpLogic:function(t){arguments[0]=t=e.$handleEvent(t),e.handleJumpLogic.apply(void 0,arguments)}}})],1):e._e()],1),e.administrationFlag?i("v-uni-view",{staticClass:"finish"},[i("v-uni-view",{on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.selectAll.apply(void 0,arguments)}}},[i("span",{class:{select:e.allSelect}},[e.allSelect?i("span",{staticClass:"iconfont"},[e._v("")]):e._e()]),i("span",[e._v("全选("+e._s(e.selectNum)+")")])]),i("v-uni-view",{on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.subDel.apply(void 0,arguments)}}},[e._v("删除")])],1):i("v-uni-view",{staticClass:"handle"},[i("v-uni-view",{staticClass:"handle_button",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.newSpecifications.apply(void 0,arguments)}}},[e._v("新增运费模板")])],1)],1)},a=[]},"51c2":function(e,t,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(i("9b1b"));i("8f71"),i("bf0f"),i("2797"),i("c223"),i("aa9c");i("c25d");var c=n(i("4c4c")),s=n(i("eea6")),l=i("12ea"),o={components:{search:c.default,selectForm:s.default},data:function(){return{mer_id:"",allSelect:!1,administrationFlag:!1,selectNum:0,loaded:!1,loading:!1,where:{page:1,limit:999},selectFormList:[]}},watch:{selectFormList:{handler:function(e){this.selectNum=e.filter((function(e){return e.select})).length,this.selectNum==e.length?this.allSelect=!0:this.allSelect=!1},deep:!0}},onLoad:function(e){this.mer_id=e.mer_id},onShow:function(){this.getShippingList("")},onReachBottom:function(){this.getShippingList("")},methods:{getShippingList:function(e){var t=this;uni.showLoading({title:"加载中",mask:!0}),(0,l.templateList)(t.mer_id,(0,a.default)((0,a.default)({},t.where),{},{name:e})).then((function(e){uni.hideLoading(),t.selectFormList=e.data.list,t.selectFormList.length>0&&e.data.list.forEach((function(e){t.$set(e,"type","select"),t.$set(e,"label",e.name),t.$set(e,"jumpLogic",!0),t.$set(e,"select",!1),t.administrationFlag||t.$delete(e,"select")}))}),(function(e){t.$util.Tips({title:e.msg})}))},handleJumpLogic:function(e){uni.navigateTo({url:"/pages/product/addGoods/addFreightTemplate?mer_id=".concat(this.mer_id,"&shipping_id=").concat(e.shipping_template_id)})},newSpecifications:function(){uni.navigateTo({url:"/pages/product/addGoods/addFreightTemplate?mer_id=".concat(this.mer_id)})},subDel:function(){var e=this,t=[];if(e.selectFormList.forEach((function(e){e.select&&t.push(e.shipping_template_id)})),0==t.length)return e.$util.Tips({title:"请选择规格"});(0,l.templateDelete)(e.mer_id,{ids:t}).then((function(t){e.$util.Tips({title:t.message,icon:"success"}),e.where.page=1,e.selectFormList=[],e.getShippingList("")})).catch((function(t){return e.$util.Tips({title:t})}))},selectAll:function(){var e=this;this.allSelect=!this.allSelect,this.allSelect?this.selectFormList.forEach((function(t){e.$set(t,"select",!0)})):this.selectFormList.forEach((function(t){e.$set(t,"select",!1)}))},handleAdministratio
|