徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jiuhaoshenghuo/public/view_admin/js/chunk-401c3a25.067065c0.js

1 line
37 KiB

4 months ago
(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.yb)().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