(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-def826fe"],{"33b6":function(t,e,r){},"6fd3":function(t,e,r){r("498a"),r("14d9"),r("13d5"),r("a434"),r("e9f5"),r("9485"),r("d3b7");var n=r("c4c8"),a={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}},computed:{},methods:{onCancel:function(){this.ids=0,this.clear()},onClose:function(){this.ids=0,this.clear(),this.modal=!1},addBtn:function(){this.isBtn=!0},getIofo:function(t){var e=this;this.spinShow=!0,this.ids=t.id,Object(n.A)(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(n.z)(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.attrsName="",this.attrsVal="",this.ids=0},offAttrName:function(){this.isBtn=!1},handleRemove:function(t){this.formDynamic.spec.splice(t,1)},handleRemove2:function(t,e){t.splice(e,1)},createAttrName:function(){var t,e;this.attrsName&&this.attrsVal?(t={value:this.attrsName,detail:[this.attrsVal]},this.formDynamic.spec.push(t),e={},this.formDynamic.spec=this.formDynamic.spec.reduce((function(t,r){return e[r.value]||(e[r.value]=t.push(r)),t}),[]),this.attrsName="",this.attrsVal="",this.isBtn=!1):this.$message.warning("请添加规格名称或规格值")},createAttr:function(t,e){var r;t?(this.formDynamic.spec[e].detail.push(t),r={},this.formDynamic.spec[e].detail=this.formDynamic.spec[e].detail.reduce((function(t,e){return r[e]||(r[e]=t.push(e)),t}),[])):this.$message.warning("请添加属性")}}};r("71d8"),r=r("2877"),r=Object(r.a)(a,(function(){var t=this,e=t._self._c;return e("el-dialog",{directives:[{name:"loading",rawName:"v-loading",value:t.spinShow,expression:"spinShow"}],attrs:{visible:t.modal,title:"商品规格",width:"1000px"},on:{"update:visible":function(e){t.modal=e},closed:t.onCancel}},[e("el-form",{ref:"formDynamic",staticClass:"attrFrom",attrs:{model:t.formDynamic,rules:t.rules,"label-width":"110px","label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-row",{attrs:{gutter:24}},[e("el-col",{attrs:{span:24}},[e("el-col",{attrs:{span:8}},[e("el-form-item",{attrs:{label:"规格模板名称:",prop:"rule_name"}},[e("el-input",{attrs:{placeholder:"请输入标题名称",maxlength:20},model:{value:t.formDynamic.rule_name,callback:function(e){t.$set(t.formDynamic,"rule_name","string"==typeof e?e.trim():e)},expression:"formDynamic.rule_name"}})],1)],1)],1),t._l(t.formDynamic.spec,(function(r,n){return e("el-col",{key:n,staticClass:"noForm",attrs:{span:23}},[e("el-form-item",[e("div",{staticClass:"acea-row row-middle"},[e("span",{staticClass:"mr5"},[t._v(t._s(r.value))]),e("i",{staticClass:"el-icon-close",staticStyle:{"font-size":"14px"},on:{click:function(e){return t.handleRemove(n)}}})]),e("div",{staticClass:"rulesBox"},[t._l(r.detail,(function(n,a){return e("el-tag",{key:a,staticClass:"mr14 mb10",attrs:{closable:"",color:"primary"},on:{close:function(e){return t.handleRemove2(r.detail,a)}}},[t._v(t._s(n))])})),e("el-input",{staticClass:"mb10 form_content_width",attrs:{placeholder:"请输入属性名称"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.createAttr(r.detail.attrsVal,n)}},model:{value:r.detail.attrsVal,callback:function(e){t.$set(r.detail,"attrsVal","string"==typeof e?e.trim():e)},expression:"item.detail.attrsVal"}},[e("template",{slot:"append"},[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.createAttr(r.detail.attrsVal,n)}}},[t._v("确定")])],1)],2)],2)])],1)})),t.isBtn?e("el-col",{staticClass:"mt10",attrs:{span:24}},[e("el-col",{staticClass:"mr15",attrs:{span:8}},[e("el-form-item",{attrs:{label:"规格名称:"}},[e("el-input",{attrs:{placeholder:"请输入规格"},model:{value:t.attrsName,callback:function(e){t.attrsName=e},expression:"attrsName"}})],1)],1),e("el-col",{staticClass:"mr20",attrs:{span:8}},[e("el-form-item",{attrs:{label:"规格值:"}},[e("el-input",{attrs:{placeholder:"请输入规格值"},model:{value:t.attrsVal,callback:function(e){t.attrsVal=e},expression:"attrsVal"}})],1)],1),e("el-col",{attrs:{span:2}},[e("el-button",{attrs:{type:"primary"},on:{click:t.createAttrName}},[t._v("确定")])],1),e("el-col",{attrs:{span:2}},[e("el-button",{on:{click:t.offAttrName}},[t._v("取消")])],1)],1):t._e()],2),t.isBtn?t._e():e("el-button",{staticClass:"add",attrs:{type:"primary"},on:{click:t.addBtn}},[t._v("添加新规格")])],1),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.onClose}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",loading:t.modal_loading},on:{click:function(e){return t.handleSubmit("formDynamic")}}},[t._v("确定")])],1)],1)}),[],!1,null,"0fec9316",null);e.a=r.exports},"71d8":function(t,e,r){r("33b6")},"7f08":function(t,e,r){r.r(e);var n=r("2909"),a=r("5530"),o=(r("caad"),r("a15b"),r("14d9"),r("e9f5"),r("7d54"),r("d3b7"),r("6062"),r("1e70"),r("79a4"),r("c1a1"),r("8b00"),r("a4e7"),r("1e5a"),r("72c3"),r("3ca3"),r("159b"),r("ddb0"),r("2f62")),c=r("6fd3"),i=r("c4c8");c={name:"productAttr",components:{addAttr:c.a},data:function(){return{loading:!1,artFrom:{page:1,limit:20,rule_name:""},tableList:[],total:0,selectedIds:new Set,ids:[],multipleSelection:[]}},computed:Object(a.a)({},Object(o.c)("admin/order",["orderChartType"])),created:function(){this.getDataList()},methods:{getRowKey:function(t){return t.id},handleSelectAll:function(t){var e=this;0===t.length?this.$refs.table.data.forEach((function(t){e.selectedIds.has(t.id)&&e.selectedIds.delete(t.id)})):t.forEach((function(t){e.selectedIds.add(t.id)})),this.$nextTick((function(){e.setChecked()}))},handleSelectRow:function(t){for(var e=this,r=[],n=[],a=0;a