chunk-739fc780.aa0fc414.js 46 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-739fc780"],{"0f0e":function(t,e,n){"use strict";var r=n("c4c8"),a={name:"userLabel",props:{},data:function(){return{labelList:[],dataLabel:[],isUser:!1}},mounted:function(){},methods:{inArray:function(t,e){for(var n in e)if(e[n].id===t)return!0;return!1},userLabel:function(t){var e=this;this.dataLabel=t,Object(r.hb)().then((function(t){t.data.map((function(t){t.children&&t.children.length&&(e.isUser=!0,t.children.map((function(t){e.inArray(t.id,e.dataLabel)?t.disabled=!0:t.disabled=!1})))})),e.labelList=t.data})).catch((function(t){e.$Message.error(t.msg)}))},selectLabel:function(t){if(t.disabled){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id===t.id}))[0]);this.dataLabel.splice(e,1),t.disabled=!1}else this.dataLabel.push({label_name:t.label_name,id:t.id,tag_id:t.tag_id}),t.disabled=!0},subBtn:function(){this.$emit("activeData",JSON.parse(JSON.stringify(this.dataLabel)))},cancel:function(){this.$emit("close")}}},i=(n("47fb"),n("2877")),o=Object(i.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"label-wrapper"},[n("div",{staticClass:"list-box"},[t._l(t.labelList,(function(e,r){return t.isUser?n("div",{key:r,staticClass:"label-box"},[e.children&&e.children.length?n("div",{staticClass:"title"},[t._v("\n "+t._s(e.label_name)+"\n ")]):t._e(),e.children&&e.children.length?n("div",{staticClass:"list"},t._l(e.children,(function(e,r){return n("div",{key:r,staticClass:"label-item",class:{on:e.disabled},on:{click:function(n){return t.selectLabel(e)}}},[t._v("\n "+t._s(e.label_name)+"\n ")])})),0):t._e()]):t._e()})),t.isUser?t._e():n("div",[t._v("暂无标签")])],2),n("div",{staticClass:"footer"},[n("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")]),n("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")])],1)])}),[],!1,null,"ea2c8f16",null);e.a=o.exports},"0fc4":function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o}));var r=n("b6bd");function a(){return Object(r.a)({url:"erp/config",method:"get"})}function i(t){return Object(r.a)({url:"store/erp/shop",method:"get",params:t})}function o(t){return Object(r.a)({url:"product/import_erp_product",method:"post",data:t})}},"193a":function(t,e,n){},3539:function(t,e,n){},"47fb":function(t,e,n){"use strict";var r=n("702e");n.n(r).a},"4f9c":function(t,e,n){"use strict";var r=n("3539");n.n(r).a},"4fd3":function(t,e,n){"use strict";var r=n("c4c8"),a=n("d708"),i={name:"taoBao",data:function(){return{roterPre:a.a.roterPre,soure_link:"",spinShow:!1,grid:{xl:8,lg:8,md:12,sm:24,xs:24},grid2:{xl:12,lg:12,md:12,sm:24,xs:24},copyConfig:{copy_type:"",copy_num:0},artFrom:{type:"taobao",url:""}}},computed:{},created:function(){},mounted:function(){this.getCopyConfig()},methods:{mealPay:function(t){this.$router.push({path:this.roterPre+"/setting/sms/sms_pay/index",query:{type:t}})},getCopyConfig:function(){var t=this;Object(r.k)().then((function(e){t.copyConfig.copy_type=e.data.copy_type,t.copyConfig.copy_num=e.data.copy_num}))},add:function(){var t=this;if(this.soure_link){if(!/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/.test(this.soure_link))return this.$Message.warning("请输入以http开头的地址!");this.spinShow=!0,this.artFrom.url=this.soure_link,Object(r.l)(this.artFrom).then((function(e){var n=e.data.productInfo;t.$emit("on-close",n),t.spinShow=!1})).catch((function(e){t.spinShow=!1,t.$Message.error(e.msg)}))}else this.$Message.warning("请输入链接地址!")}}},o=(n("af98"),n("2877")),s=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"Box"},[n("Card",[n("div",[t._v("生成的商品默认是没有上架的,请手动上架商品!\n "),2==t.copyConfig.copy_type?n("a",{attrs:{href:"http://help.crmeb.net/crmeb-v4/1863579",target:"_blank"}},[t._v("如何配置密钥")]):n("span",[t._v("您当前剩余"+t._s(t.copyConfig.copy_num)+"条采集次数,"),n("a",{attrs:{href:"#"},on:{click:function(e){return t.mealPay("copy")}}},[t._v("增加采集次数")])])]),n("div",[t._v("商品采集设置:设置 > 系统设置 > 第三方接口设置 > 采集商品配置")])]),n("Form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{"label-width":120,"label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{attrs:{gutter:24,type:"flex"}},[n("Col",{attrs:{span:"18"}},[n("FormItem",{attrs:{label:"链接地址:"}},[n("Input",{staticClass:"numPut",attrs:{search:"","enter-button":"确定",placeholder:"请输入链接地址"},on:{"on-search":t.add},model:{value:t.soure_link,callback:function(e){t.soure_link=e},expression:"soure_link"}})],1)],1)],1)],1),t.spinShow?n("Spin",{attrs:{size:"large",fix:""}}):t._e()],1)}),[],!1,null,"0633a2e6",null);e.a=s.exports},"52fd":function(t,e,n){"use strict";var r=n("87ad");n.n(r).a},5671:function(t,e,n){"use strict";var r=n("2f62"),a=n("73f5");function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s={name:"index",data:function(){return{selectEquips:[],selectEquipsIds:[],modal_loading:!1,treeSelect:[],formValidate:{page:1,limit:10,cate_id:[],name:""},total:0,loading:!1,grid:{xl:10,lg:10,md:12,sm:24,xs:24},tableList:[],columns:[{type:"selection",width:60,align:"center"},{title:"ID",key:"id",width:60},{title:"门店图片",slot:"image",minWidth:80},{title:"门店名称",key:"name",minWidth:80},{title:"门店分类",key:"cate_name",minWidth:80},{title:"联系电话",key:"phone",minWidth:90},{title:"门店地址",key:"address",ellipsis:!0,minWidth:150},{title:"营业时间",key:"day_time",minWidth:120},{title:"营业状态",key:"status_name",minWidth:80}]}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(n,!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(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"}}),created:function(){},mounted:function(){this.getList(),this.goodsCategory()},methods:{sortData:function(){var t=this;this.selectEquipsIds.length&&this.tableList.forEach((function(e){t.selectEquipsIds.includes(e.id)&&(e._checked=!0)}))},TableSelectRow:function(t,e){this.selectEquipsIds.includes(e.id)||(this.selectEquipsIds.push(e.id),this.selectEquips.push(e))},TableSelectCancelRow:function(t,e){var n=this.selectEquipsIds.indexOf(e.id);-1!=n&&(this.selectEquipsIds.splice(n,1),this.selectEquips.splice(n,1))},selectAll:function(){for(var t=this.tableList.length-1;t>=0;t--)this.TableSelectRow(null,this.tableList[t])},cancelAll:function(){for(var t=this.tableList.length-1;t>=0;t--)this.TableSelectCancelRow(null,this.tableList[t])},handleSelectAll:function(){this.$refs.table.selectAll(!1)},pageChange:function(t){this.formValidate.page=t,this.getList()},goodsCategory:function(){var t=this;Object(a.a)(1).then((function(e){t.treeSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},getList:function(){var t=this;this.loading=!0,Object(a.J)(this.formValidate).then((function(e){t.tableList=e.data.list,t.total=e.data.count,t.sortData(),t.loading=!1})).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},ok:function(){var t=[];this.selectEquips.forEach((function(e){var n={image:e.image,product_id:e.id,store_name:e.store_name,temp_id:e.temp_id};t.push(n)})),t.length>0?this.$emit("getStoreId",this.selectEquips):this.$Message.warning("请先选择商品")},userSearchs:function(){this.formValidate.page=1,this.getList()}}},c=(n("89f9"),n("2877")),l=Object(c.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"goodList"},[n("Form",{ref:"formValidate",staticClass:"tabform",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""}},[n("FormItem",{attrs:{label:"门店分类:","label-for":"pid"}},[n("Cascader",{staticClass:"input-add",attrs:{data:t.treeSelect,placeholder:"请选择门店分类","change-on-select":"",filterable:""},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1),n("FormItem",{attrs:{label:"门店搜索:","label-for":"name"}},[n("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入门店名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}}),n("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("搜索")])],1)],1),n("Table",{ref:"table",staticClass:"mr-20",attrs:{"no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果",columns:t.columns,data:t.tableList,loading:t.loading,height:"350"},on:{"on-select-all":t.selectAll,"on-select-all-cancel":t.cancelAll,"on-select":t.TableSelectRow,"on-select-cancel":t.TableSelectCancelRow},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return[n("viewer",[n("div",{staticClass:"tabBox_img"},[n("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})])])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1),n("div",{staticClass:"footer",attrs:{slot:"footer"},slot:"footer"},[n("Button",{attrs:{type:"primary",size:"large",loading:t.modal_loading,long:""},on:{click:t.ok}},[t._v("提交")])],1)],1)}),[],!1,null,"7dca7c24",null);e.a=l.exports},"5d4b":function(t,e,n){"use strict";var r=n("a34a"),a=n.n(r),i=n("c4c8");function o(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var s={name:"menusFrom",props:{formValidate:{type:Object,default:null},fromName:{type:Number,default:0}},data:function(){return{ruleValidate:{brand_name:[{required:!0,message:"请输入品牌名称",trigger:"blur"}]},type:1,modals:!1,FromData:[],titleFrom:"",grid:{xl:24,lg:24,md:12,sm:24,xs:24}}},mounted:function(){this.getAddFrom()},methods:{getAddFrom:function(){var t=this;Object(i.e)().then(function(){var e,n=(e=a.a.mark((function e(n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.FromData=n.data;case 1:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function s(t){o(i,r,a,s,c,"next",t)}function c(t){o(i,r,a,s,c,"throw",t)}s(void 0)}))});return function(t){return n.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},handleReset:function(){this.modals=!1,this.$parent.getData()},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){t?2==e.type?Object(i.E)(e.formValidate.id,e.formValidate).then((function(t){e.$Message.success(t.msg),e.getAddFrom(),e.$parent.getData(),e.modals=!1})).catch((function(t){e.$Message.error(t.msg)})):Object(i.B)(e.formValidate).then((function(t){e.$Message.success(t.msg),e.getAddFrom(),e.fromName?e.$parent.getBrandList():e.$parent.getData(),e.modals=!1})).catch((function(t){e.$Message.error(t.msg)})):e.$Message.error("请输入品牌名称")}))},cancle:function(){this.modals=!1}}},c=(n("c1b5"),n("2877")),l=Object(c.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Modal",{attrs:{width:"700",scrollable:"","footer-hide":"",closable:"",title:t.titleFrom,"z-index":1,"class-name":"vertical-center-modal"},on:{"on-cancel":t.handleReset},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[n("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":110,rules:t.ruleValidate},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"上级品牌:"}},[n("Cascader",{attrs:{data:t.FromData,placeholder:"请选择上级品牌","change-on-select":""},model:{value:t.formValidate.fid,callback:function(e){t.$set(t.formValidate,"fid",e)},expression:"formValidate.fid"}})],1)],1),n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"品牌名称:",prop:"brand_name"}},[n("Input",{attrs:{maxlength:"10",placeholder:"请输入品牌名称",prop:""},model:{value:t.formValidate.brand_name,callback:function(e){t.$set(t.formValidate,"brand_name",e)},expression:"formValidate.brand_name"}})],1)],1),n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"品牌排序:"}},[n("InputNumber",{staticStyle:{width:"100%"},attrs:{step:1,placeholder:"请输入品牌排序"},model:{value:t.formValidate.sort,callback:function(e){t.$set(t.formValidate,"sort",e)},expression:"formValidate.sort"}})],1)],1),n("Col",t._b({},"Col",t.grid,!1),[n("FormItem",{attrs:{label:"是否显示:"}},[n("i-switch",{attrs:{size:"large","true-value":1,"false-value":0},model:{value:t.formValidate.is_show,callback:function(e){t.$set(t.formValidate,"is_show",e)},expression:"formValidate.is_show"}},[n("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),n("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1),n("Col",{attrs:{span:"24"}},[n("div",{staticClass:"style-add"},[n("Button",{staticClass:"mr14",attrs:{type:"default"},on:{click:t.cancle}},[t._v("取消")]),n("Button",{attrs:{type:"primary"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("确认")])],1)])],1)],1)],1)}),[],!1,null,"0f37e54f",null);e.a=l.exports},"61f7":function(t,e,n){"use strict";function r(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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(n,!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var a=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:s(a))}return e}function s(t){return("00"+t).substr(t.length)}n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return d}));var c={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},l=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){return a({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return f.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}l(u,"请输入%s"),l(d,"%s格式不正确");var f=Object.keys(c).reduce((function(t,e){return t[e]=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:i({},e,t);return a({message:n.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o,{},r)},l(t[e],c[e]),t}),{})},"645a":function(t,e,n){"use strict";var r={name:"attrList",props:{attrs:{type:Array,default:function(){return[]}}},data:function(){return{}},mounted:function(){},methods:{selectAttr:function(t,e){t.select=!t.select,this.$emit("activeData",JSON.parse(JSON.stringify(this.attrs)))},cancel:function(){this.$emit("close")},reset:function(){var t=this.attrs;t.map((function(t){t.details.map((function(t){t.select=!1}))})),this.attrs=t},subBtn:function(){this.$emit("subAttrs")}}},a=(n("c96c"),n("2877")),i=Object(a.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"label-wrapper"},[n("div",{staticClass:"list-box"},t._l(t.attrs,(function(e,r){return n("div",{key:r,staticClass:"label-box"},[n("div",{staticClass:"title"},[t._v(t._s(e.value))]),n("div",{staticClass:"list"},t._l(e.details,(function(e,r){return n("div",{key:r,staticClass:"label-item",class:e.select?"on":"",on:{click:function(n){return t.selectAttr(e,r)}}},[t._v(t._s(e.name))])})),0)])})),0),n("div",{staticClass:"footer"},[n("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")]),n("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.reset}},[t._v("重置")]),n("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")])],1)])}),[],!1,null,"80e1fd3c",null);e.a=i.exports},"68bc":function(t,e,n){},"6fd3":function(t,e,n){"use strict";var r=n("2f62"),a=n("c4c8");function i(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 o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s={name:"addAttr",data:function(){return{spinShow:!1,modal_loading:!1,grid:{xl:3,lg:3,md:12,sm:24,xs:24},modal:!1,index:1,rules:{rule_name:[{required:!0,message:"请输入分类名称",trigger:"blur"}]},formDynamic:{rule_name:"",spec:[]},attrsName:"",attrsVal:"",formDynamicNameData:[],isBtn:!1,formDynamicName:[],results:[],result:[],ids:0,title:"添加商品规格"}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(n,!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(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:110},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:{onCancel:function(){this.clear()},addBtn:function(){if(""==this.formDynamic.rule_name.trim())return this.$Message.error("请输入分类名称");this.isBtn=!0},getIofo:function(t){var e=this;this.spinShow=!0,this.ids=t.id,this.title="编辑商品规格",Object(a.kb)(t.id).then((function(t){e.formDynamic=t.data.info,e.spinShow=!1})).catch((function(t){e.spinShow=!1,e.$Message.error(t.msg)}))},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){return!!t&&(0===e.formDynamic.spec.length?e.$Message.warning("请至少添加一条商品规格!"):(e.modal_loading=!0,void setTimeout((function(){Object(a.jb)(e.formDynamic,e.ids).then((function(t){e.$Message.success(t.msg),setTimeout((function(){e.modal=!1,e.modal_loading=!1}),500),setTimeout((function(){e.$emit("getList"),e.clear()}),600)})).catch((function(t){e.modal_loading=!1,e.$Message.error(t.msg)}))}),1200)))}))},clear:function(){this.$refs.formDynamic.resetFields(),this.formDynamic.spec=[],this.isBtn=!1,this.ids=0,this.title="添加商品规格",this.attrsName="",this.attrsVal=""},offAttrName:function(){this.isBtn=!1},cancle:function(){this.modal=!1,this.clear()},handleRemove:function(t){this.formDynamic.spec.splice(t,1)},handleRemove2:function(t,e){t.splice(e,1)},createAttrName:function(){if(this.attrsName&&this.attrsVal){var t={value:this.attrsName,detail:[this.attrsVal]};this.formDynamic.spec.push(t);var e={};this.formDynamic.spec=this.formDynamic.spec.reduce((function(t,n){return!e[n.value]&&(e[n.value]=t.push(n)),t}),[]),this.attrsName="",this.attrsVal="",this.isBtn=!1}else this.$Message.warning("请添加规格名称或规格值")},createAttr:function(t,e){if(t){this.formDynamic.spec[e].detail.push(t);var n={};this.formDynamic.spec[e].detail=this.formDynamic.spec[e].detail.reduce((function(t,e){return!n[e]&&(n[e]=t.push(e)),t}),[])}else this.$Message.warning("请添加属性")}}},c=(n("9088"),n("2877")),l=Object(c.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Modal",{attrs:{scrollable:"",title:t.title,"class-name":"vertical-center-modal",width:"950"},on:{"on-cancel":t.onCancel},model:{value:t.modal,callback:function(e){t.modal=e},expression:"modal"}},[n("Form",{ref:"formDynamic",staticClass:"attrFrom",attrs:{model:t.formDynamic,rules:t.rules,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[n("Row",{attrs:{gutter:24}},[n("Col",{attrs:{span:"24"}},[n("Col",{staticClass:"mb15",attrs:{span:"8"}},[n("FormItem",{attrs:{label:"分类名称:",prop:"rule_name"}},[n("Input",{attrs:{placeholder:"请输入分类名称",maxlength:20},model:{value:t.formDynamic.rule_name,callback:function(e){t.$set(t.formDynamic,"rule_name",e)},expression:"formDynamic.rule_name"}})],1)],1)],1),t._l(t.formDynamic.spec,(function(e,r){return n("Col",{key:r,staticClass:"noForm",attrs:{span:"23"}},[n("FormItem",[n("div",{staticClass:"acea-row row-middle"},[n("span",{staticClass:"mr5"},[t._v(t._s(e.value))]),n("Icon",{attrs:{type:"ios-close-circle"},on:{click:function(e){return t.handleRemove(r)}}})],1),n("div",{staticClass:"rulesBox"},[t._l(e.detail,(function(r,a){return n("Tag",{key:a,attrs:{type:"dot",closable:"",color:"primary",name:r},on:{"on-close":function(n){return t.handleRemove2(e.detail,a)}}},[t._v(t._s(r))])})),n("Input",{staticClass:"width20",attrs:{maxlength:"30","show-word-limit":"",search:"","enter-button":"添加",placeholder:"请输入属性名称"},on:{"on-search":function(n){return t.createAttr(e.detail.attrsVal,r)}},model:{value:e.detail.attrsVal,callback:function(n){t.$set(e.detail,"attrsVal",n)},expression:"item.detail.attrsVal"}})],2)])],1)})),t.isBtn?n("Col",{staticClass:"mt10",attrs:{span:"24"}},[n("Col",{staticClass:"mt10 mr15",attrs:{span:"8"}},[n("FormItem",{attrs:{label:"规格名称:"}},[n("Input",{attrs:{placeholder:"请输入规格名称",maxlength:"30","show-word-limit":""},model:{value:t.attrsName,callback:function(e){t.attrsName=e},expression:"attrsName"}})],1)],1),n("Col",{staticClass:"mt10 mr20",attrs:{span:"8"}},[n("FormItem",{attrs:{label:"规格值:"}},[n("Input",{attrs:{maxlength:"30","show-word-limit":"",placeholder:"请输入规格值"},model:{value:t.attrsVal,callback:function(e){t.attrsVal=e},expression:"attrsVal"}})],1)],1),n("Col",{staticClass:"mr20",attrs:{span:"8"}},[n("div",{staticClass:"sub"},[n("Button",{staticClass:"mr20",attrs:{type:"primary"},on:{click:t.createAttrName}},[t._v("确定")]),n("Button",{on:{click:t.offAttrName}},[t._v("取消")])],1)])],1):t._e(),t.spinShow?n("Spin",{attrs:{size:"large",fix:""}}):t._e()],2),t.isBtn?t._e():n("Button",{staticClass:"ml95 mt10",attrs:{type:"primary"},on:{click:t.addBtn}},[t._v("添加新规格")])],1),n("div",{attrs:{slot:"footer"},slot:"footer"},[n("Button",{on:{click:t.cancle}},[t._v("取消")]),n("Button",{attrs:{type:"primary",loading:t.modal_loading},on:{click:function(e){return t.handleSubmit("formDynamic")}}},[t._v("确定")])],1)],1)}),[],!1,null,"07a10b5d",null);e.a=l.exports},"702e":function(t,e,n){},"73f5":function(t,e,n){"use strict";n.d(e,"y",(function(){return a})),n.d(e,"r",(function(){return i})),n.d(e,"n",(function(){return o})),n.d(e,"q",(function(){return s})),n.d(e,"s",(function(){return c})),n.d(e,"t",(function(){return l})),n.d(e,"j",(function(){return u})),n.d(e,"i",(function(){return d})),n.d(e,"P",(function(){return f})),n.d(e,"h",(function(){return m})),n.d(e,"v",(function(){return p})),n.d(e,"u",(function(){return h})),n.d(e,"w",(function(){return b})),n.d(e,"p",(function(){return g})),n.d(e,"G",(function(){return v})),n.d(e,"H",(function(){return y})),n.d(e,"E",(function(){return _})),n.d(e,"F",(function(){return O})),n.d(e,"g",(function(){return w})),n.d(e,"B",(function(){return j})),n.d(e,"C",(function(){return k})),n.d(e,"D",(function(){return C})),n.d(e,"O",(function(){return x})),n.d(e,"J",(function(){return $})),n.d(e,"I",(function(){return S})),n.d(e,"e",(function(){return D})),n.d(e,"N",(function(){return L})),n.d(e,"l",(function(){return M})),n.d(e,"K",(function(){return V})),n.d(e,"L",(function(){return I})),n.d(e,"M",(function(){return B})),n.d(e,"k",(function(){return F})),n.d(e,"o",(function(){return P})),n.d(e,"z",(function(){return E})),n.d(e,"m",(function(){return N})),n.d(e,"x",(function(){return A})),n.d(e,"f",(function(){return T})),n.d(e,"A",(function(){return R})),n.d(e,"b",(function(){return q})),n.d(e,"d",(function(){return W})),n.d(e,"c",(function(){return J})),n.d(e,"a",(function(){return z}));var r=n("b6bd");function a(t){return Object(r.a)({url:"merchant/store_list",method:"get",params:t})}function i(t){return Object(r.a)({url:"store/order/list",method:"get",params:t})}function o(t){return Object(r.a)({url:"store/order/chart",method:"get",params:t})}function s(t){return Object(r.a)({url:"store/order/header",method:"get"})}function c(t){return Object(r.a)({url:"store/recharge",method:"get",params:t})}function l(t){return Object(r.a)({url:"store/vip_order",method:"get",params:t})}function u(t){return Object(r.a)({url:"store/order/edit/".concat(t),method:"get"})}function d(t){return Object(r.a)({url:"store/order/distribution/".concat(t),method:"get"})}function f(t){return Object(r.a)({url:"store/order/write_update/".concat(t),method:"put"})}function m(t){return Object(r.a)({url:"store/order/info/".concat(t),method:"get"})}function p(t){return Object(r.a)({url:"order/remark/".concat(t.id),method:"put",data:t.remark})}function h(t){return Object(r.a)({url:"store/recharge/remark/".concat(t.id),method:"put",data:t.remark})}function b(t){return Object(r.a)({url:"store/vip/remark/".concat(t.id),method:"put",data:t.remark})}function g(t,e){return Object(r.a)({url:"store/order/export/".concat(e),method:"post",data:t})}function v(t){return Object(r.a)({url:"store/finance_flow/list",method:"get",params:t})}function y(t,e){return Object(r.a)({url:"store/finance_flow/mark/".concat(t),method:"put",params:e})}function _(t){return Object(r.a)({url:"store/finance_flow/fund_record",method:"get",params:t})}function O(t){return Object(r.a)({url:"store/finance_flow/fund_record_info",method:"get",params:t})}function w(t){return Object(r.a)({url:"/export/storeFinanceRecord",method:"get",params:t})}function j(t){return Object(r.a)({url:"/store/extract/list",method:"get",params:t})}function k(t,e){return Object(r.a)({url:"store/extract/mark/".concat(t),method:"post",data:e})}function C(t,e){return Object(r.a)({url:"store/extract/verify/".concat(t),method:"post",data:e})}function x(t){return Object(r.a)({url:"store/extract/transfer/".concat(t),method:"get"})}function $(t){return Object(r.a)({url:"store/store",method:"get",params:t})}function S(t){return Object(r.a)({url:"store/store/get_info/".concat(t),method:"get"})}function D(t){return Object(r.a)({url:"city",method:"get",params:t})}function L(t,e){return Object(r.a)({url:"store/store/".concat(t),method:"post",data:e})}function M(){return Object(r.a)({url:"store/store/address",method:"get"})}function V(t){return Object(r.a)({url:"store/store/login/".concat(t),method:"get"})}function I(t,e){return Object(r.a)({url:"store/store/set_show/".concat(t,"/").concat(e),method:"put"})}function B(t){return Object(r.a)({url:"store/share/order",method:"post",params:t})}function F(t){return Object(r.a)({url:"store/home/header",method:"get",params:t})}function P(t){return Object(r.a)({url:"store/home/orderChart",method:"get",params:t})}function E(t){return Object(r.a)({url:"store/home/store",method:"get",params:t})}function N(t){return Object(r.a)({url:"store/home/operate",method:"get",params:t})}function A(t){return Object(r.a)({url:"store/store/reset_admin/".concat(t),method:"get"})}function T(t,e,n){return Object(r.a)({url:"export/storeFlowExport?store_id=".concat(t,"&keyword=").concat(e,"&data=").concat(n),method:"get"})}function R(t){return Object(r.a)({url:"/store/category",params:t,method:"get"})}function q(t){return Object(r.a)({url:"/store/category/create/".concat(t),method:"get"})}function W(t){return Object(r.a)({url:"/store/category/tree/".concat(t),method:"get"})}function J(t){return Object(r.a)({url:"/store/category/set_show/".concat(t.id,"/").concat(t.is_show),method:"PUT"})}function z(t){return Object(r.a)({url:"store/category/cascader_list/".concat(t),method:"get"})}},"87ad":function(t,e,n){},"89f9":function(t,e,n){"use strict";var r=n("a41d");n.n(r).a},9088:function(t,e,n){"use strict";var r=n("68bc");n.n(r).a},"99f4":function(t,e,n){},a41d:function(t,e,n){},a6b9:function(t,e,n){"use strict";n.d(e,"J",(function(){return a})),n.d(e,"n",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"y",(function(){return s})),n.d(e,"z",(function(){return c})),n.d(e,"o",(function(){return l})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return d})),n.d(e,"v",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"B",(function(){return p})),n.d(e,"j",(function(){return h})),n.d(e,"l",(function(){return b})),n.d(e,"w",(function(){return g})),n.d(e,"r",(function(){return v})),n.d(e,"s",(function(){return y})),n.d(e,"u",(function(){return _})),n.d(e,"x",(function(){return O})),n.d(e,"K",(function(){return w})),n.d(e,"t",(function(){return j})),n.d(e,"k",(function(){return k})),n.d(e,"m",(function(){return C})),n.d(e,"q",(function(){return x})),n.d(e,"A",(function(){return $})),n.d(e,"g",(function(){return S})),n.d(e,"f",(function(){return D})),n.d(e,"p",(function(){return L})),n.d(e,"i",(function(){return M})),n.d(e,"F",(function(){return V})),n.d(e,"G",(function(){return I})),n.d(e,"I",(function(){return B})),n.d(e,"d",(function(){return F})),n.d(e,"H",(function(){return P})),n.d(e,"e",(function(){return E})),n.d(e,"C",(function(){return N})),n.d(e,"E",(function(){return A})),n.d(e,"L",(function(){return T})),n.d(e,"D",(function(){return R}));var r=n("b6bd");function a(t){return Object(r.a)({url:"supplier/supplier",method:"get",params:t})}function i(t){return Object(r.a)({url:"/supplier/supplier/".concat(t),method:"get"})}function o(t){return Object(r.a)({url:"supplier/supplier",method:"post",data:t})}function s(t,e){return Object(r.a)({url:"supplier/supplier/".concat(t),method:"put",data:e})}function c(t,e){return Object(r.a)({url:"/supplier/supplier/set_status/".concat(t,"/").concat(e),method:"put"})}function l(t){return Object(r.a)({url:"/supplier/list",method:"get",params:t})}function u(t){return Object(r.a)({url:"/supplier/order/list",method:"get",params:t})}function d(t){return Object(r.a)({url:"/supplier/order/deliver_remind/".concat(t.supplier_id,"/").concat(t.id),method:"put"})}function f(t){return Object(r.a)({url:"/supplier/order/info/".concat(t),method:"get"})}function m(t){return Object(r.a)({url:"/supplier/order/distribution_info",method:"get",params:{ids:t}})}function p(t,e){return Object(r.a)({url:"/supplier/order/split_order/"+t,method:"get",params:e})}function h(t){return Object(r.a)({url:"/supplier/order/status/".concat(t.id),method:"get",params:t.datas})}function b(t){return Object(r.a)({url:"/supplier/order/refund/".concat(t),method:"get"})}function g(t){return Object(r.a)({url:"/supplier/refund/list",method:"get",params:t})}function v(t){return Object(r.a)({url:"/supplier/home/header",method:"get",params:t})}function y(t){return Object(r.a)({url:"/supplier/home/order",method:"get",params:t})}function _(t){return Object(r.a)({url:"/supplier/home/order_channel",method:"get",params:t})}function O(t){return Object(r.a)({url:"/supplier/home/order_type",method:"get",params:t})}function w(t){return Object(r.a)({url:"/supplier/supplier/login/".concat(t),method:"get"})}function j(t){return Object(r.a)({url:"/supplier/home/supplier",method:"get",params:t})}function k(t){return Object(r.a)({url:"/supplier/refund/detail/".concat(t),method:"get"})}function C(t){return Object(r.a)({url:"/supplier/refund/refund/".concat(t),method:"get"})}function x(t){return Object(r.a)({url:"/supplier/order/no_refund/".concat(t),method:"get"})}function $(t){return Object(r.a)({url:"/supplier/order/refund_integral/".concat(t),method:"get"})}function S(t){return Object(r.a)({url:"/supplier/order/distribution/".concat(t),method:"get"})}function D(t){return Object(r.a)({url:"/supplier/apply/list",method:"get",params:t})}function L(t){return Object(r.a)({url:"/supplier/apply/verify/form/".concat(t),method:"get"})}function M(t){return Object(r.a)({url:"/supplier/apply/mark/form/".concat(t),method:"get"})}function V(t){return Object(r.a)({url:"/supplier/flowing_water/fund_record_info",method:"get",params:t})}function I(t){return Object(r.a)({url:"/supplier/flowing_water/list",method:"get",params:t})}function B(t,e){return Object(r.a)({url:"/supplier/flowing_water/mark/".concat(t),method:"put",params:e})}function F(t){return Object(r.a)({url:"/export/supplierWaterExport",method:"get",params:t})}function P(t){return Object(r.a)({url:"/supplier/flowing_water/fund_record",method:"get",params:t})}function E(t){return Object(r.a)({url:"/export/supplierWaterRecord",method:"get",params:t})}function N(t){return Object(r.a)({url:"/supplier/extract/list",method:"get",params:t})}function A(t,e){return Object(r.a)({url:"/supplier/extract/verify/".concat(t),method:"post",data:e})}function T(t){return Object(r.a)({url:"/supplier/extract/transfer/".concat(t),method:"get"})}function R(t,e){return Object(r.a)({url:"/supplier/extract/mark/".concat(t),method:"post",data:e})}},ad69:function(t,e,n){"use strict";var r=n("a34a"),a=n.n(r),i=n("d708"),o=n("c276"),s=n("2e83"),c=n("c4c8");function l(t,e,n,r,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,a)}var u={name:"addCarMy",props:{virtualList:{type:Array,default:function(){return[]}}},data:function(){return{cartMyType:1,fixedCar:{disk_info:"",stock:0},cardUrl:i.a.apiBaseURL+"/file/upload/1",header:{}}},created:function(){this.getToken()},mounted:function(){},methods:{getCarMyList:function(){var t,e=(t=a.a.mark((function t(){var e,n,r,i,o;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],n=[],r=[],i="",t.next=3,this.getExcelData();case 3:o=t.sent,i||(i=o.filename),n.length||(n=o.filekey),e.length||(e=o.header),r=o.export,Object(s.a)(e,n,i,r);case 9:case"end":return t.stop()}}),t,this)})),function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function o(t){l(i,r,a,o,s,"next",t)}function s(t){l(i,r,a,o,s,"throw",t)}o(void 0)}))});return function(){return e.apply(this,arguments)}}(),getExcelData:function(){return new Promise((function(t,e){Object(c.o)().then((function(e){return t(e.data)}))}))},removeVirtual:function(t){this.virtualList.splice(t,1)},upFile:function(t){var e=this;Object(c.t)({file:t.data.src}).then((function(t){e.$emit("changeVirtual",JSON.parse(JSON.stringify(t.data)))})).catch((function(t){return e.$Message.error(t.msg)}))},handleFormatError:function(t){return this.$Message.error("必须上传xlsx格式文件")},getToken:function(){this.header["Authori-zation"]="Bearer "+o.a.cookies.get("token")},cancel:function(){this.$emit("closeCarMy")},handleAdd:function(){this.virtualList.push({key:"",value:""})},beforeUpload:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){e(!0)}))}))},subBtn:function(){if(1==this.cartMyType){if(this.fixedCar.cartMyType=1,""==this.fixedCar.disk_info)return this.$Message.error("请填写卡密信息");if(!this.fixedCar.stock)return this.$Message.error("请填写库存数量");this.$emit("fixdBtn",JSON.parse(JSON.stringify(this.fixedCar)))}else{for(var t={cartMyType:2,virtualList:this.virtualList},e=0;e<this.virtualList.length;e++)if(!this.virtualList[e].value)return this.$Message.error("请输入所有卡密");this.$emit("fixdBtn",JSON.parse(JSON.stringify(t)))}}}},d=(n("52fd"),n("2877")),f=Object(d.a)(u,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"carMywrapper"},[n("div",{staticClass:"type-radio"},[n("Form",{attrs:{"label-width":80}},[n("FormItem",{attrs:{label:"卡密类型:"}},[n("RadioGroup",{attrs:{size:"large"},model:{value:t.cartMyType,callback:function(e){t.cartMyType=e},expression:"cartMyType"}},[n("Radio",{attrs:{label:1}},[t._v("固定卡密")]),n("Radio",{attrs:{label:2}},[t._v("一次性卡密")])],1),1==t.cartMyType?n("div",[n("div",{staticClass:"stock-disk"},[n("Input",{attrs:{size:"large",type:"textarea",rows:4,placeholder:"填写卡密信息"},model:{value:t.fixedCar.disk_info,callback:function(e){t.$set(t.fixedCar,"disk_info",e)},expression:"fixedCar.disk_info"}})],1),n("div",{staticClass:"stock-input"},[n("Input",{attrs:{type:"number",size:"large",placeholder:"填写库存数量"},model:{value:t.fixedCar.stock,callback:function(e){t.$set(t.fixedCar,"stock",e)},expression:"fixedCar.stock"}},[n("span",{attrs:{slot:"append"},slot:"append"},[t._v("件")])])],1)]):t._e(),2==t.cartMyType?n("div",{staticClass:"scroll-virtual"},t._l(t.virtualList,(function(e,r){return n("div",{key:r,staticClass:"acea-row row-middle mb10"},[n("span",{staticClass:"mr10 virtual-title"},[t._v("卡号"+t._s(r+1)+":")]),n("Input",{staticClass:"mr10 width15",attrs:{type:"text",placeholder:"请输入卡号(非必填)"},model:{value:e.key,callback:function(n){t.$set(e,"key","string"==typeof n?n.trim():n)},expression:"item.key"}}),n("span",{staticClass:"mr10 virtual-title"},[t._v("卡密"+t._s(r+1)+":")]),n("Input",{staticClass:"mr10 width15",attrs:{type:"text",placeholder:"请输入卡密"},model:{value:e.value,callback:function(n){t.$set(e,"value","string"==typeof n?n.trim():n)},expression:"item.value"}}),n("span",{staticClass:"deteal-btn",on:{click:function(e){return t.removeVirtual(r)}}},[t._v("删除")])],1)})),0):t._e(),2==t.cartMyType?n("div",{staticClass:"add-more"},[n("Button",{attrs:{type:"primary"},on:{click:t.handleAdd}},[t._v("添加卡密")]),n("Upload",{ref:"upload",staticClass:"ml10",attrs:{action:t.cardUrl,"before-upload":t.beforeUpload,headers:t.header,"on-success":t.upFile,format:["xlsx"],"on-format-error":t.handleFormatError}},[n("Button",{attrs:{type:"success"}},[t._v("导入卡密")])],1),n("Button",{staticClass:"download",attrs:{type:"default",icon:"ios-download-outline"},on:{click:t.getCarMyList}},[t._v("下载卡密模板")])],1):t._e()],1)],1)],1),n("div",{staticClass:"footer"},[n("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")]),n("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")])],1)])}),[],!1,null,"230761d4",null);e.a=f.exports},af70:function(t,e,n){},af98:function(t,e,n){"use strict";var r=n("99f4");n.n(r).a},c1b5:function(t,e,n){"use strict";var r=n("af70");n.n(r).a},c96c:function(t,e,n){"use strict";var r=n("193a");n.n(r).a},e449:function(t,e,n){"use strict";var r=n("b7be"),a=n("61f7");function i(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")}()}var o={name:"index",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(a.a)(e,"yyyy-MM-dd hh:mm")}}},props:{couponids:{type:Array},updateIds:{type:Array},updateName:{type:Array},luckDraw:{type:Boolean,default:!1},discount:{type:Boolean,default:!1}},data:function(){return{currentid:0,productRow:{},isTemplate:!1,loading:!1,tableFrom:{receive_type:3,type:"send",page:1,limit:10},total:0,ids:[],texts:[],columns:[{title:"ID",key:"id",width:60},{title:"优惠券名称",key:"title",minWidth:150},{title:"适用类型",slot:"type",minWidth:80},{title:"面值",slot:"coupon_price",minWidth:100},{title:"最低消费额",key:"use_min_price",minWidth:100},{title:"发布数量",slot:"count",minWidth:120},{title:"有效期限",slot:"start_time",minWidth:120},{title:"状态",slot:"status",minWidth:80}],couponList:[],selectedIds:new Set,selectedNames:new Set,couponVal:[]}},mounted:function(){},watch:{updateIds:function(t){this.selectedIds=new Set(t)},updateName:function(t){this.selectedNames=new Set(t)}},created:function(){var t=this,e={width:60,align:"center",render:function(e,n){var r=n.row.id,a=!1;a=t.currentid===r;var i=t;return e("div",[e("Radio",{props:{value:a},on:{"on-change":function(){i.currentid=r,t.productRow=n.row}}})])}};this.luckDraw?this.columns.unshift(e):this.columns.unshift({type:"selection",width:60,align:"center"})},methods:{unique:function(t){var e=new Map;return t.filter((function(t){return!e.has(t.id)&&e.set(t.id,1)}))},changeCheckbox:function(t){this.couponVal=t},handleSelectAll:function(t){var e=this;if(!this.discount){if(0===t.length){var n=this;n.$refs.table.data.forEach((function(t){if(n.selectedIds.has(t.id)){n.selectedIds.delete(t.id);var e=n.unique(Array.from(n.selectedNames));n.unique(Array.from(n.selectedNames)).forEach((function(n,r){n.id===t.id&&e.splice(r,1)})),n.selectedNames=new Set(e)}}))}else t.forEach((function(t){e.selectedIds.add(t.id),e.selectedNames.add({id:t.id,title:t.title})}));this.$nextTick((function(){e.setChecked()}))}},handleSelectRow:function(t,e){var n=this;this.discount||(this.selectedIds.add(e.id),this.selectedNames.add({id:e.id,title:e.title}),this.$nextTick((function(){n.setChecked()})))},handleCancelRow:function(t,e){var n=this;if(!this.discount){this.selectedIds.delete(e.id);var r=Array.from(this.selectedNames);Array.from(this.selectedNames).forEach((function(t,n){t.id===e.id&&r.splice(n,1)})),this.selectedNames=new Set(r),this.$nextTick((function(){n.setChecked()}))}},setChecked:function(){this.ids=i(this.selectedIds),this.texts=i(this.selectedNames);var t=this.$refs.table.objData;for(var e in t)this.selectedIds.has(t[e].id)&&(t[e]._isChecked=!0)},cancel:function(){this.isTemplate=!1,this.luckDraw&&(this.currentid=0)},tableList:function(){var t=this;this.loading=!0,Object(r.nb)(this.tableFrom).then((function(e){var n=e.data;t.couponList=n.list,t.discount||t.$nextTick((function(){t.setChecked()})),t.total=n.count,t.loading=!1}))},ok:function(){this.luckDraw?(this.$emit("getCouponId",this.productRow),this.currentid=0):this.discount?this.$emit("getCouponList",this.couponVal):this.$emit("nameId",this.ids,this.texts)},receivePageChange:function(t){this.tableFrom.page=t,this.tableList()}}},s=n("2877"),c=Object(s.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("Modal",{attrs:{title:"优惠券列表",width:"60%"},on:{"on-ok":t.ok,"on-cancel":t.cancel},model:{value:t.isTemplate,callback:function(e){t.isTemplate=e},expression:"isTemplate"}},[n("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns,data:t.couponList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},on:{"on-select":t.handleSelectRow,"on-select-cancel":t.handleCancelRow,"on-select-all":t.handleSelectAll,"on-select-all-cancel":t.handleSelectAll,"on-selection-change":t.changeCheckbox},scopedSlots:t._u([{key:"coupon_price",fn:function(e){var r=e.row;return[1==r.coupon_type?n("span",[t._v(t._s(r.coupon_price)+"元")]):t._e(),2==r.coupon_type?n("span",[t._v(t._s(parseFloat(r.coupon_price)/10)+"折("+t._s(r.coupon_price.toString().split(".")[0])+"%)")]):t._e()]}},{key:"count",fn:function(e){var r=e.row;return e.index,[r.is_permanent?n("span",[t._v("不限量")]):n("div",[n("span",{staticClass:"fa"},[t._v("发布:"+t._s(r.total_count))]),n("span",{staticClass:"sheng"},[t._v("剩余:"+t._s(r.remain_count))])])]}},{key:"start_time",fn:function(e){var r=e.row;return e.index,[r.start_time?n("div",[t._v("\n "+t._s(t._f("formatDate")(r.start_time))+" - "+t._s(t._f("formatDate")(r.end_time))+"\n ")]):n("span",[t._v("不限时")])]}},{key:"type",fn:function(e){var r=e.row;return[1===r.type?n("span",[t._v("品类券")]):2===r.type?n("span",[t._v("商品券")]):3===r.type?n("span",[t._v("会员券")]):n("span",[t._v("通用券")])]}},{key:"status",fn:function(e){var r=e.row;return e.index,[n("Tag",{directives:[{name:"show",rawName:"v-show",value:1===r.status,expression:"row.status===1"}],attrs:{color:"blue"}},[t._v("正常")]),n("Tag",{directives:[{name:"show",rawName:"v-show",value:0===r.status,expression:"row.status===0"}],attrs:{color:"gold"}},[t._v("未开启")]),n("Tag",{directives:[{name:"show",rawName:"v-show",value:-1===r.status,expression:"row.status=== -1"}],attrs:{color:"red"}},[t._v("已失效")])]}}])}),n("div",{staticClass:"acea-row row-right page"},[n("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.tableFrom.limit},on:{"on-change":t.receivePageChange}})],1)],1)],1)}),[],!1,null,"65e1da4a",null);e.a=c.exports},f1c7:function(t,e,n){"use strict";var r=n("c4c8"),a={name:"storeLabelList",props:{},data:function(){return{labelList:[],dataLabel:[],isStore:!1}},mounted:function(){},methods:{inArray:function(t,e){for(var n in e)if(e[n].id===t)return!0;return!1},storeLabel:function(t){var e=this;this.dataLabel=t,Object(r.cb)().then((function(t){t.data.map((function(t){t.children&&t.children.length&&(e.isStore=!0,t.children.map((function(t){e.inArray(t.id,e.dataLabel)?t.disabled=!0:t.disabled=!1})))})),e.labelList=t.data})).catch((function(t){e.$Message.error(t.msg)}))},selectLabel:function(t){if(t.disabled){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id===t.id}))[0]);this.dataLabel.splice(e,1),t.disabled=!1}else this.dataLabel.push({label_name:t.label_name,id:t.id}),t.disabled=!0},subBtn:function(){this.$emit("activeData",JSON.parse(JSON.stringify(this.dataLabel)))},cancel:function(){this.$emit("close")}}},i=(n("4f9c"),n("2877")),o=Object(i.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"label-wrapper"},[n("div",{staticClass:"list-box"},[t._l(t.labelList,(function(e,r){return t.isStore?n("div",{key:r,staticClass:"label-box"},[e.children&&e.children.length?n("div",{staticClass:"title"},[t._v(t._s(e.label_name))]):t._e(),e.children&&e.children.length?n("div",{staticClass:"list"},t._l(e.children,(function(e,r){return n("div",{key:r,staticClass:"label-item",class:{on:e.disabled},on:{click:function(n){return t.selectLabel(e)}}},[t._v(t._s(e.label_name))])})),0):t._e()]):t._e()})),t.isStore?t._e():n("div",[t._v("暂无标签")])],2),n("div",{staticClass:"footer"},[n("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")]),n("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")])],1)])}),[],!1,null,"96f98f60",null);e.a=o.exports}}]);