canyin-project/ybcy/views/channel/index/static/js/chunk-5989a394.7b922b70.js
2024-11-01 16:07:54 +08:00

1 line
45 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5989a394"],{"11ab":function(e,t,a){},"3b01":function(e,t,a){"use strict";var r=a("11ab"),o=a.n(r);o.a},"3bbe":function(e,t,a){var r=a("861d");e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"5a4a":function(e,t,a){"use strict";a.d(t,"B",(function(){return o})),a.d(t,"d",(function(){return n})),a.d(t,"G",(function(){return i})),a.d(t,"z",(function(){return s})),a.d(t,"r",(function(){return l})),a.d(t,"y",(function(){return c})),a.d(t,"W",(function(){return u})),a.d(t,"A",(function(){return d})),a.d(t,"F",(function(){return m})),a.d(t,"D",(function(){return f})),a.d(t,"f",(function(){return p})),a.d(t,"e",(function(){return h})),a.d(t,"g",(function(){return b})),a.d(t,"i",(function(){return g})),a.d(t,"w",(function(){return v})),a.d(t,"ab",(function(){return y})),a.d(t,"o",(function(){return _})),a.d(t,"Z",(function(){return x})),a.d(t,"C",(function(){return k})),a.d(t,"H",(function(){return w})),a.d(t,"q",(function(){return C})),a.d(t,"c",(function(){return T})),a.d(t,"h",(function(){return S})),a.d(t,"b",(function(){return j})),a.d(t,"u",(function(){return O})),a.d(t,"N",(function(){return $})),a.d(t,"m",(function(){return N})),a.d(t,"L",(function(){return D})),a.d(t,"x",(function(){return I})),a.d(t,"db",(function(){return M})),a.d(t,"j",(function(){return P})),a.d(t,"cb",(function(){return A})),a.d(t,"t",(function(){return L})),a.d(t,"J",(function(){return q})),a.d(t,"l",(function(){return R})),a.d(t,"I",(function(){return z})),a.d(t,"v",(function(){return F})),a.d(t,"S",(function(){return E})),a.d(t,"n",(function(){return G})),a.d(t,"R",(function(){return V})),a.d(t,"bb",(function(){return U})),a.d(t,"E",(function(){return B})),a.d(t,"s",(function(){return H})),a.d(t,"X",(function(){return J})),a.d(t,"T",(function(){return Y})),a.d(t,"Y",(function(){return X})),a.d(t,"V",(function(){return Z})),a.d(t,"Q",(function(){return K})),a.d(t,"k",(function(){return Q})),a.d(t,"M",(function(){return W})),a.d(t,"a",(function(){return ee})),a.d(t,"K",(function(){return te})),a.d(t,"U",(function(){return ae})),a.d(t,"P",(function(){return re})),a.d(t,"p",(function(){return oe})),a.d(t,"O",(function(){return ne}));var r=a("b775");function o(e){return Object(r["a"])({url:"channel/good/good-render",method:"get",params:e})}function n(e){return Object(r["a"])({url:"channel/good/attr-show",method:"get",params:e})}function i(e){return Object(r["a"])({url:"channel/good/goods-save",method:"post",data:e})}function s(e){return Object(r["a"])({url:"channel/good/good-detail",method:"get",params:e})}function l(e){return Object(r["a"])({url:"channel/good/get-good-list",method:"get",params:e})}function c(e){return Object(r["a"])({url:"channel/good/good-del",method:"post",data:e})}function u(e){return Object(r["a"])({url:"channel/good/set-good-num",method:"post",data:e})}function d(e){return Object(r["a"])({url:"channel/good/good-down",method:"post",data:e})}function m(e){return Object(r["a"])({url:"channel/good/goods-recovery",method:"post",data:e})}function f(e){return Object(r["a"])({url:"channel/good/good-usave",method:"post",data:e})}function p(e){return Object(r["a"])({url:"channel/category/get-category-list",method:"get",params:e})}function h(e){return Object(r["a"])({url:"channel/category/category-del",method:"post",data:e})}function b(e){return Object(r["a"])({url:"channel/category/category-save",method:"post",data:e})}function g(e){return Object(r["a"])({url:"channel/category/change-switch",method:"post",data:e})}function v(e){return Object(r["a"])({url:"channel/specs/get-specs-list",method:"get",params:e})}function y(e){return Object(r["a"])({url:"channel/specs/specs-save",method:"post",data:e})}function _(e){return Object(r["a"])({url:"channel/specs/change-specs",method:"post",data:e})}function x(e){return Object(r["a"])({url:"channel/specs/specs-del",method:"post",data:e})}function k(e){return Object(r["a"])({url:"channel/good/specs-list",method:"post",data:e})}function w(e){return Object(r["a"])({url:"channel/good/specs-save",method:"post",data:e})}function C(e){return Object(r["a"])({url:"channel/attribute/get-attr-list",method:"get",params:e})}function T(e){return Object(r["a"])({url:"channel/attribute/attr-save",method:"post",data:e})}function S(e){return Object(r["a"])({url:"channel/attribute/change-attr",method:"post",data:e})}function j(e){return Object(r["a"])({url:"channel/attribute/attr-del",method:"post",data:e})}function O(e){return Object(r["a"])({url:"channel/material/get-materia-list",method:"get",params:e})}function $(e){return Object(r["a"])({url:"channel/material/meteria-save",method:"post",data:e})}function N(e){return Object(r["a"])({url:"channel/material/change-materia",method:"post",data:e})}function D(e){return Object(r["a"])({url:"channel/material/materia-del",method:"post",data:e})}function I(e){return Object(r["a"])({url:"channel/unit/get-unit-list",method:"get",params:e})}function M(e){return Object(r["a"])({url:"channel/unit/unit-save",method:"post",data:e})}function P(e){return Object(r["a"])({url:"channel/unit/change-display",method:"post",data:e})}function A(e){return Object(r["a"])({url:"channel/unit/unit-del",method:"post",data:e})}function L(e){return Object(r["a"])({url:"channel/good-label/get-label-list",method:"get",params:e})}function q(e){return Object(r["a"])({url:"channel/good-label/label-save",method:"post",data:e})}function R(e){return Object(r["a"])({url:"channel/good-label/change-label",method:"post",data:e})}function z(e){return Object(r["a"])({url:"channel/good-label/label-del",method:"post",data:e})}function F(e){return Object(r["a"])({url:"channel/print/get-print-list",method:"get",params:e})}function E(e){return Object(r["a"])({url:"channel/print/print-save",method:"post",data:e})}function G(e){return Object(r["a"])({url:"channel/print/change-print",method:"post",data:e})}function V(e){return Object(r["a"])({url:"channel/print/print-del",method:"post",data:e})}function U(e){return Object(r["a"])({url:"channel/good/synchro-goods",method:"post",data:e})}function B(e){return Object(r["a"])({url:"channel/activity/goods-activity-list",method:"get",params:e})}function H(e){return Object(r["a"])({url:"channel/activity/save-goods-activity",method:"get",params:e})}function J(e){return Object(r["a"])({url:"channel/activity/save-goods-activity",method:"post",data:e})}function Y(e){return Object(r["a"])({url:"channel/activity/modify-goods-activity",method:"post",data:e})}function X(e){return Object(r["a"])({url:"channel/category/special-category",method:"get",params:e})}function Z(e){return Object(r["a"])({url:"channel/category/save-special",method:"post",data:e})}function K(e){return Object(r["a"])({url:"channel/category/modify-special",method:"post",data:e})}function Q(e){return Object(r["a"])({url:"channel/good/change-goods",method:"post",data:e})}function W(e){return Object(r["a"])({url:"channel/good/merge-goods",method:"post",data:e})}function ee(e){return Object(r["a"])({url:"channel/good/all-down",method:"post",data:e})}function te(e){return Object(r["a"])({url:"channel/comment/label-list",method:"get",params:e})}function ae(e){return Object(r["a"])({url:"channel/comment/save-label",method:"post",data:e})}function re(e){return Object(r["a"])({url:"channel/comment/modify-label",method:"post",data:e})}function oe(e){return Object(r["a"])({url:"channel/comment/comment-list",method:"get",params:e})}function ne(e){return Object(r["a"])({url:"channel/comment/modify-comment",method:"post",data:e})}},7156:function(e,t,a){var r=a("861d"),o=a("d2bb");e.exports=function(e,t,a){var n,i;return o&&"function"==typeof(n=t.constructor)&&n!==a&&r(i=n.prototype)&&i!==a.prototype&&o(e,i),e}},a434:function(e,t,a){"use strict";var r=a("23e7"),o=a("23cb"),n=a("a691"),i=a("50c4"),s=a("7b0b"),l=a("65f0"),c=a("8418"),u=a("1dde"),d=a("ae40"),m=u("splice"),f=d("splice",{ACCESSORS:!0,0:0,1:2}),p=Math.max,h=Math.min,b=9007199254740991,g="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!m||!f},{splice:function(e,t){var a,r,u,d,m,f,v=s(this),y=i(v.length),_=o(e,y),x=arguments.length;if(0===x?a=r=0:1===x?(a=0,r=y-_):(a=x-2,r=h(p(n(t),0),y-_)),y+a-r>b)throw TypeError(g);for(u=l(v,r),d=0;d<r;d++)m=_+d,m in v&&c(u,d,v[m]);if(u.length=r,a<r){for(d=_;d<y-r;d++)m=d+r,f=d+a,m in v?v[f]=v[m]:delete v[f];for(d=y;d>y-r+a;d--)delete v[d-1]}else if(a>r)for(d=y-r;d>_;d--)m=d+r-1,f=d+a-1,m in v?v[f]=v[m]:delete v[f];for(d=0;d<a;d++)v[d+_]=arguments[d+2];return v.length=y-r+a,u}})},a9e3:function(e,t,a){"use strict";var r=a("83ab"),o=a("da84"),n=a("94ca"),i=a("6eeb"),s=a("5135"),l=a("c6b6"),c=a("7156"),u=a("c04e"),d=a("d039"),m=a("7c73"),f=a("241c").f,p=a("06cf").f,h=a("9bf2").f,b=a("58a8").trim,g="Number",v=o[g],y=v.prototype,_=l(m(y))==g,x=function(e){var t,a,r,o,n,i,s,l,c=u(e,!1);if("string"==typeof c&&c.length>2)if(c=b(c),t=c.charCodeAt(0),43===t||45===t){if(a=c.charCodeAt(2),88===a||120===a)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+c}for(n=c.slice(2),i=n.length,s=0;s<i;s++)if(l=n.charCodeAt(s),l<48||l>o)return NaN;return parseInt(n,r)}return+c};if(n(g,!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var k,w=function(e){var t=arguments.length<1?0:e,a=this;return a instanceof w&&(_?d((function(){y.valueOf.call(a)})):l(a)!=g)?c(new v(x(t)),a,w):x(t)},C=r?f(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),T=0;C.length>T;T++)s(v,k=C[T])&&!s(w,k)&&h(w,k,p(v,k));w.prototype=y,y.constructor=w,i(o,g,w)}},bf19:function(e,t,a){"use strict";var r=a("23e7");r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},d2bb:function(e,t,a){var r=a("825a"),o=a("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,a={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(a,[]),t=a instanceof Array}catch(n){}return function(a,n){return r(a),o(n),t?e.call(a,n):a.__proto__=n,a}}():void 0)},ed08:function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return n}));a("a9e3"),a("ac1f"),a("5319"),a("bf19");function r(e){var t=new Date(e).toJSON(),a=new Date(+new Date(t)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return a}function o(e){var t=new Date(e),a=t.getFullYear(),r=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,o=t.getDate()<10?"0"+t.getDate():t.getDate(),n=t.getHours()<10?"0"+t.getHours():t.getHours(),i=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),s=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return a+"-"+r+"-"+o+" "+n+":"+i+":"+s}function n(e){var t=new Date(1e3*Number(e)),a=t.getFullYear()+"-",r=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",o=(t.getDate()<10?"0"+t.getDate():t.getDate())+" ",n=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",i=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",s=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),l=a+r+o+n+i+s;return l}},f8d5:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"addgood"},[a("div",{staticClass:"outmain ba_f color_6 fon_14"},[a("div",{staticClass:"title fon_16 wei t_l ba_f pad_20"},[e._v("商品详情")]),a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"基础信息",name:"1"}},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"排序"}},[a("el-input",{attrs:{placeholder:"请输入排序"},model:{value:e.form.sort,callback:function(t){e.$set(e.form,"sort",t)},expression:"form.sort"}})],1),a("el-form-item",{attrs:{label:"商品分类",required:!0,prop:"typeId"}},[a("el-cascader",{attrs:{options:e.optionsCategory},model:{value:e.form.typeId,callback:function(t){e.$set(e.form,"typeId",t)},expression:"form.typeId"}})],1),a("el-form-item",{attrs:{label:"商品名称",required:!0,prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"商品简介",required:!0,prop:"body"}},[a("el-input",{attrs:{type:"textarea",rows:6,placeholder:"请输入商品简介"},model:{value:e.form.body,callback:function(t){e.$set(e.form,"body","string"===typeof t?t.trim():t)},expression:"form.body"}})],1),a("el-form-item",{attrs:{label:"商品主图",required:!0,prop:"icon"}},[e.form.icon?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(1)},mouseleave:function(t){return e.leave(1)}}},[a("i",{ref:"imgicon1",staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.form.icon,1)}}})]),a("img",{staticClass:"wid",attrs:{src:e.form.icon},on:{click:function(t){return e.test(1)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(1)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),a("div",{staticClass:"yb_margin lh16"},[e._v("商品主图建议尺寸128px*128px")]),a("attachment-img",{ref:"img1",attrs:{type:"img",type2:e.storeId},on:{attachment:e.imgadd1}})],1),a("el-form-item",{attrs:{label:"商品图片",required:!0}},[e._l(e.form.media,(function(t,r){return a("div",{key:r,staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enterMultigraph(r,1)},mouseleave:function(t){return e.leaveMultigraph(r,1)}}},[a("i",{ref:"list1"+r,refInFor:!0,staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(a){return e.deleteMultiImage(t,2,"multigraph")}}})]),a("img",{staticClass:"wid img",attrs:{src:t},on:{click:function(t){return e.test(2)}}})])})),a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(2)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),a("div",{staticClass:"yb_margin lh16"},[e._v("商品详情图片建议尺寸:宽 512px")]),a("attachment-img",{ref:"img2",attrs:{type:"imgs",type2:e.storeId},on:{attachment:e.multigraph1}})],2),a("el-form-item",{attrs:{label:"最小购买量"}},[a("el-input-number",{attrs:{"controls-position":"right",min:1,max:1e8,placeholder:"请输入最小购买量"},model:{value:e.form.minNum,callback:function(t){e.$set(e.form,"minNum",t)},expression:"form.minNum"}})],1),a("el-form-item",{attrs:{label:"商品单位",required:!0,prop:"unit"}},[a("el-autocomplete",{attrs:{"value-key":"name","fetch-suggestions":e.querySearchAsync4,placeholder:"请选择商品单位"},model:{value:e.form.unit,callback:function(t){e.$set(e.form,"unit",t)},expression:"form.unit"}})],1),a("el-form-item",{attrs:{label:"售卖规格"}},[a("div",{staticClass:"spectable"},[a("div",{directives:[{name:"show",rawName:"v-show",value:this.form.spec.length<1,expression:"this.form.spec.length<1"}],staticClass:"specitem"},[a("div",{staticClass:"specitemrow flex mar_b30"},[a("div",{},[a("div",{staticClass:"flex"},[a("div",{staticClass:"rowname mar_r15"},[a("div",[a("span",{staticClass:"color-red"},[e._v("*")]),e._v("价格 ")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:e.form.price,callback:function(t){e.$set(e.form,"price",t)},expression:"form.price"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("div",{staticClass:"rowname mar_r15"},[a("div",[a("span",{staticClass:"color-red"},[e._v("*")]),e._v("包装费 ")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:e.form.boxMoney,callback:function(t){e.$set(e.form,"boxMoney",t)},expression:"form.boxMoney"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("div",{staticClass:"rowname mar_r15 rowkucun"},[a("div",[a("span",{staticClass:"color-red"},[e._v("*")]),e._v("库存 ")]),a("div",{staticClass:"flex"},[a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:e.form.stock,callback:function(t){e.$set(e.form,"stock",t)},expression:"form.stock"}},[a("template",{slot:"append"},[e._v("件")])],2),a("el-checkbox",{attrs:{"true-label":"1","false-label":"2",border:""},model:{value:e.form.fillType,callback:function(t){e.$set(e.form,"fillType",t)},expression:"form.fillType"}},[e._v("次日置满")]),a("div",[e.initial.more?a("el-button",{staticClass:"mar_l20",attrs:{size:"mini",type:"text"},on:{click:function(t){return e.showzhe()}}},[e._v("收起")]):a("el-button",{staticClass:"mar_l20",attrs:{size:"mini",type:"text"},on:{click:function(t){return e.showzhe()}}},[e._v("更多")])],1)],1)])]),a("div",{directives:[{name:"show",rawName:"v-show",value:e.initial.more,expression:"initial.more"}],staticClass:"flex mar_t10"},[a("div",{staticClass:"rowname mar_r15"},[a("div",[e._v("成本价格")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:e.form.costPrice,callback:function(t){e.$set(e.form,"costPrice",t)},expression:"form.costPrice"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("div",{staticClass:"rowname rowname2 mar_r15"},[a("div",[e._v("商品编号")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:e.form.goodCode,callback:function(t){e.$set(e.form,"goodCode",t)},expression:"form.goodCode"}})],1)])])])]),a("div",{staticClass:"specitem"},e._l(e.form.spec,(function(t,r){return a("div",{key:r,staticClass:"specitemrow flex mar_b30"},[a("div",{},[a("div",{staticClass:"flex"},[a("div",{staticClass:"rowname mar_r15"},[a("div",[e._v("规格名称")]),a("div",[a("el-autocomplete",{attrs:{"value-key":"name","fetch-suggestions":e.querySearchAsync,placeholder:"请输入内容"},on:{select:e.handleSelect},model:{value:t.specName,callback:function(a){e.$set(t,"specName",a)},expression:"item.specName"}})],1)]),a("div",{staticClass:"rowname mar_r15"},[a("div",[e._v("价格")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:t.price,callback:function(a){e.$set(t,"price",a)},expression:"item.price"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("div",{staticClass:"rowname mar_r15"},[a("div",[e._v("包装费")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:t.boxMoney,callback:function(a){e.$set(t,"boxMoney",a)},expression:"item.boxMoney"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("div",{staticClass:"rowname mar_r15 rowkucun"},[a("div",[e._v("库存")]),a("div",{staticClass:"flex"},[a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:t.stock,callback:function(a){e.$set(t,"stock",a)},expression:"item.stock"}},[a("template",{slot:"append"},[e._v("件")])],2),a("el-checkbox",{attrs:{"true-label":"1","false-label":"2",border:""},model:{value:t.fillType,callback:function(a){e.$set(t,"fillType",a)},expression:"item.fillType"}},[e._v("次日置满")]),a("div",[t.more?a("el-button",{staticClass:"mar_l20",attrs:{size:"mini",type:"text"},on:{click:function(t){return e.showzhe(r)}}},[e._v("收起")]):a("el-button",{staticClass:"mar_l20",attrs:{size:"mini",type:"text"},on:{click:function(t){return e.showzhe(r)}}},[e._v("更多")])],1)],1)])]),a("div",{directives:[{name:"show",rawName:"v-show",value:t.more,expression:"item.more"}],staticClass:"flex mar_t10"},[a("div",{staticClass:"rowname mar_r15"},[a("div",[e._v("成本价格")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:t.costPrice,callback:function(a){e.$set(t,"costPrice",a)},expression:"item.costPrice"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("div",{staticClass:"rowname rowname2 mar_r15"},[a("div",[e._v("商品编号")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:t.goodCode,callback:function(a){e.$set(t,"goodCode",a)},expression:"item.goodCode"}})],1)])]),a("div",{staticClass:"delbtn"},[a("el-button",{staticClass:"mar_t5 mar_l20",attrs:{size:"mini",type:"text"},on:{click:function(t){return e.delSpec(r)}}},[a("i",{staticClass:"el-icon-remove-outline mar_r5"}),e._v("删除 ")])],1)])})),0),a("div",{directives:[{name:"show",rawName:"v-show",value:this.form.spec.length<20,expression:"this.form.spec.length<20"}],staticClass:"subjectcolor2 curs",on:{click:e.addSpec}},[a("i",{staticClass:"el-icon-circle-plus mar_r5"}),e._v("添加规格最多20个 ")])]),a("div",{staticClass:"bor_b_df5 boxfor"})]),a("el-form-item",{attrs:{label:"售卖属性"}},[a("div",{staticClass:"spsx"},[a("div",{staticClass:"t_l"},[e._l(e.attribute,(function(t,r){return a("div",{key:r},[a("div",{staticClass:"clr flex wid mar_t10"},[a("div",{staticClass:"clr_l flex-g-0 pad_r_20 t_l"},[a("span",{staticClass:"color-red"},[e._v("*")]),e._v("属性名称: ")]),a("div",{staticClass:"clr_r flex-g-1 pad_l_30"},[a("span",{staticClass:"color-red"},[e._v("*")]),e._v("属性值(至少填写两个,最多八个) ")])]),a("div",{staticClass:"clr flex wid flex-y-top"},[a("div",{staticClass:"clr_l flex-g-0 pad_r_20 t_l shuxingname"},[a("el-autocomplete",{attrs:{"value-key":"name","fetch-suggestions":e.querySearchAsync2,placeholder:"如:辣度"},on:{select:e.handleSelect2},model:{value:t.attrName,callback:function(a){e.$set(t,"attrName",a)},expression:"item.attrName"}})],1),a("div",{staticClass:"clr_r flex-g-1 pad_l_30 flex atinputbox flex-wrap flex-y-top"},[e._l(t.attrStr,(function(r,o){return a("el-select",{key:o,staticClass:"atinput",attrs:{filterable:""},on:{blur:function(a){return e.selectValueBlur(a,t,o)},focus:function(a){return e.selectValueChange(a,t,o)}},model:{value:t.attrStr[o].name,callback:function(a){e.$set(t.attrStr[o],"name",a)},expression:"item.attrStr[index].name"}},e._l(t.attrShow,(function(e){return a("el-option",{key:e.sxz,attrs:{label:e.sxz,value:e.sxz}})})),1)})),a("el-button",{staticClass:"mar_t5",attrs:{size:"mini",type:"text"},on:{click:function(t){return e.delAttribute(r)}}},[a("i",{staticClass:"el-icon-remove-outline mar_r5"}),e._v("删除 ")])],2)]),a("div",{staticClass:"bor_b_df5 boxfor"})])})),a("div",{directives:[{name:"show",rawName:"v-show",value:this.attribute.length<20,expression:"this.attribute.length<20"}],staticClass:"subjectcolor2 curs",on:{click:e.addAttribute}},[a("i",{staticClass:"el-icon-circle-plus mar_r5"}),e._v("添加属性最多20个 ")])],2)]),a("div",{staticClass:"bor_b_df5 boxfor"})]),a("el-form-item",{attrs:{label:"售卖加料"}},[a("div",{staticClass:"spectable"},[a("div",{staticClass:"specitem"},e._l(e.form.feeding,(function(t,r){return a("div",{key:r,staticClass:"specitemrow flex mar_b30"},[a("div",{},[a("div",{staticClass:"flex"},[a("div",{staticClass:"rowname mar_r15"},[a("div",[e._v("加料名称")]),a("div",[a("el-autocomplete",{attrs:{"value-key":"name","fetch-suggestions":e.querySearchAsync3,placeholder:"如:杯型"},on:{select:function(t){return e.handleSelect3(t,r)},change:function(t){return e.handleSelectChage3(t,r)}},model:{value:t.materialName,callback:function(a){e.$set(t,"materialName",a)},expression:"item.materialName"}})],1)]),a("div",{staticClass:"rowname mar_r15"},[a("div",[e._v("价格")]),a("el-input",{staticClass:"atinput jlinptfist",attrs:{type:"number",placeholder:"","auto-complete":"off"},model:{value:t.salesPrice,callback:function(a){e.$set(t,"salesPrice",a)},expression:"item.salesPrice"}},[a("template",{slot:"append"},[e._v("元")])],2)],1),a("div",{staticClass:"rowname mar_r15 rowkucun",staticStyle:{width:"130px"}},[a("div",{staticClass:"color_f"},[e._v("库存")]),a("div",{staticClass:"flex"},[a("el-checkbox",{attrs:{"true-label":"1","false-label":"2",border:""},model:{value:t.fillType,callback:function(a){e.$set(t,"fillType",a)},expression:"item.fillType"}},[e._v("次日置满")])],1)])])]),a("div",{staticClass:"delbtn"},[a("el-button",{staticClass:"mar_t5",attrs:{size:"mini",type:"text"},on:{click:function(t){return e.delFeeding(r)}}},[a("i",{staticClass:"el-icon-remove-outline mar_r5"}),e._v("删除 ")])],1)])})),0),a("div",{directives:[{name:"show",rawName:"v-show",value:this.form.feeding.length<20,expression:"this.form.feeding.length<20"}],staticClass:"subjectcolor2 curs",on:{click:e.addFeeding}},[a("i",{staticClass:"el-icon-circle-plus mar_r5"}),e._v("添加加料最多20个 ")])]),a("div",{staticClass:"bor_b_df5 boxfor"})]),a("el-form-item",{attrs:{label:"售卖时间"}},[a("el-radio-group",{model:{value:e.form.salesType,callback:function(t){e.$set(e.form,"salesType",t)},expression:"form.salesType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("全时段售卖")]),a("el-radio",{attrs:{label:"2"}},[e._v("自定义时间")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.salesType,expression:"form.salesType=='2'"}]},[a("el-form-item",{attrs:{label:"选择时间段"}},[a("el-date-picker",{attrs:{type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:e.form.validity,callback:function(t){e.$set(e.form,"validity",t)},expression:"form.validity"}}),a("el-checkbox-group",{model:{value:e.form.weekDay,callback:function(t){e.$set(e.form,"weekDay",t)},expression:"form.weekDay"}},[a("el-checkbox",{attrs:{label:"周一"}}),a("el-checkbox",{attrs:{label:"周二"}}),a("el-checkbox",{attrs:{label:"周三"}}),a("el-checkbox",{attrs:{label:"周四"}}),a("el-checkbox",{attrs:{label:"周五"}}),a("el-checkbox",{attrs:{label:"周六"}}),a("el-checkbox",{attrs:{label:"周日"}})],1)],1),a("el-form-item",{attrs:{label:"售卖时间段"}},[a("el-radio-group",{model:{value:e.form.weekSalesType,callback:function(t){e.$set(e.form,"weekSalesType",t)},expression:"form.weekSalesType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("全时段售卖")]),a("el-radio",{attrs:{label:"2"}},[e._v("自定义时间")])],1),a("div",{directives:[{name:"show",rawName:"v-show",value:"2"==e.form.weekSalesType,expression:"form.weekSalesType=='2'"}],staticClass:"mar_t10"},[e._l(e.form.salesTimeStr,(function(t,r){return a("div",{key:r,staticClass:"time_item mar_b10"},[a("el-time-select",{staticStyle:{width:"200px"},attrs:{placeholder:"起始时间","picker-options":{start:"00:00",step:"00:15",end:"23:59"}},model:{value:t.startTime,callback:function(a){e.$set(t,"startTime",a)},expression:"item.startTime"}}),a("el-time-select",{staticClass:"mar_l20",staticStyle:{width:"200px"},attrs:{placeholder:"结束时间","picker-options":{start:"00:00",step:"00:15",end:"23:59",minTime:t.startTime}},model:{value:t.endTime,callback:function(a){e.$set(t,"endTime",a)},expression:"item.endTime"}}),a("el-button",{staticClass:"fon_12 mar_l10",attrs:{type:"text"},on:{click:function(t){return e.deltimeInterval(r)}}},[e._v("删除")])],1)})),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.form.salesTimeStr.length<3,expression:"form.salesTimeStr.length<3"}],attrs:{type:"text"},on:{click:e.addtimeInterval}},[a("Icon",{attrs:{type:"md-add"}}),e._v("添加时段 ")],1)],2)],1)],1),a("div",{staticClass:"bor_b_df5 boxfor"})],1),a("el-form-item",{attrs:{label:"参与热销排行"}},[a("el-radio-group",{model:{value:e.form.hotsaleType,callback:function(t){e.$set(e.form,"hotsaleType",t)},expression:"form.hotsaleType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("是")]),a("el-radio",{attrs:{label:"2"}},[e._v("否")])],1)],1),a("el-form-item",{attrs:{label:"特色分类"}},[a("el-radio-group",{model:{value:e.form.specialType,callback:function(t){e.$set(e.form,"specialType",t)},expression:"form.specialType"}},[a("el-radio-group",{model:{value:e.form.specialType,callback:function(t){e.$set(e.form,"specialType",t)},expression:"form.specialType"}},[a("el-radio",{attrs:{label:"0"}},[e._v("无")]),a("el-radio",{attrs:{label:"1"}},[e._v(e._s(e.xinping))]),a("el-radio",{attrs:{label:"2"}},[e._v(e._s(e.remai))]),a("el-radio",{attrs:{label:"3"}},[e._v(e._s(e.tuijian))])],1)],1)],1),a("el-form-item",{attrs:{label:"单点时不配送"}},[a("el-radio-group",{model:{value:e.form.aloneType,callback:function(t){e.$set(e.form,"aloneType",t)},expression:"form.aloneType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("是,不配送")]),a("el-radio",{attrs:{label:"2"}},[e._v("否,正常配送")])],1)],1),a("el-form-item",{attrs:{label:"商品详情"}},[a("baidu-ueditor",{attrs:{content:e.form.details,typestore:e.storeId},on:{ueditor:e.getUeditor}})],1)],1)],1),a("el-tab-pane",{attrs:{label:"其他信息",name:"3"}},[a("el-form",{ref:"form3",attrs:{model:e.form3,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"每单限购"}},[a("el-input-number",{attrs:{"controls-position":"right",min:0,max:1e8,placeholder:"请输入每单限购"},model:{value:e.form3.maxNum,callback:function(t){e.$set(e.form3,"maxNum",t)},expression:"form3.maxNum"}}),a("div",{staticClass:"yb_margin lh16"},[e._v("用户下单每单限购的数量")])],1),a("el-form-item",{attrs:{label:"虚拟销量"}},[a("el-input-number",{attrs:{"controls-position":"right",min:0,max:1e8,placeholder:"请输入虚拟销量"},model:{value:e.form3.virtualSales,callback:function(t){e.$set(e.form3,"virtualSales",t)},expression:"form3.virtualSales"}}),a("div",{staticClass:"yb_margin lh16"},[e._v("前台显示的商品总销量=设置的虚拟销量+真实销量值")])],1),a("el-form-item",{attrs:{label:"打印标签"}},[a("el-select",{attrs:{placeholder:"打印标签"},model:{value:e.form3.printLabel,callback:function(t){e.$set(e.form3,"printLabel",t)},expression:"form3.printLabel"}},e._l(e.printData,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.id}})})),1),a("div",{staticClass:"yb_margin lh16"},[e._v("打印机可按照标签打印此商品")])],1),a("el-form-item",{attrs:{label:"商品标签"}},[a("el-select",{attrs:{placeholder:"商品标签"},model:{value:e.form3.goodLabel,callback:function(t){e.$set(e.form3,"goodLabel",t)},expression:"form3.goodLabel"}},e._l(e.labelList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1)],1)],1)],1)],1)],1),a("el-dialog",{attrs:{title:"选择商品",visible:e.dialogTableVisible},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[a("el-table",{ref:"tableData",staticStyle:{width:"100%"},attrs:{data:e.tableData,"tooltip-effect":"dark"},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{prop:"id",label:"商品ID"}}),a("el-table-column",{attrs:{prop:"icon",label:"商品图片",width:"120"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:e.row.icon}})]}}])}),a("el-table-column",{attrs:{prop:"name",label:"商品名称","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{prop:"price",label:"商品价格",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" ¥"+e._s(t.row.price)+" ")]}}])})],1),a("span",{staticStyle:{display:"flex","justify-content":"space-between","align-items":"center","margin-top":"20px"}},[a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.size,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}}),a("el-button",{attrs:{type:"primary"},on:{click:e.choose}},[e._v("确 定")])],1)],1),a("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[a("el-button",{attrs:{type:"primary"},on:{click:e.onSubmit}},[e._v("保存")])],1)],1)},o=[],n=(a("99af"),a("4de4"),a("4160"),a("c975"),a("d81d"),a("a434"),a("b0c0"),a("d3b7"),a("25f0"),a("159b"),a("96cf"),a("1da1")),i=a("5530"),s=a("9893"),l=a("fc6e"),c=a("ed08"),u=a("5a4a"),d=a("2f62"),m={created:function(){this.init(),this.initlist(),console.log("this.$route.params.id;",this.$route.query.id),this.$route.query.id&&(this.id=this.$route.query.id,this.edit()),this.$route.query.goodsType&&(this.form.goodsType=this.$route.query.goodsType)},components:{attachmentImg:l["a"],baiduUeditor:s["a"]},computed:Object(i["a"])({},Object(d["d"])(["storeId"])),data:function(){return{content:"<h2>hello quill-editor111</h2>",activeName:"1",form:{sort:"1",body:"",name:"",typeId:[],icon:"",media:[],minNum:"",unit:"",boxMoney:"",price:"",stock:"",fillType:"",crossedPrice:"",costPrice:"",goodCode:"",salesType:"1",validity:[new Date,(new Date).getTime()+2592e6],weekDay:[],weekSalesType:"1",salesTimeStr:[],hotsaleType:"1",aloneType:"2",specialType:"0",spec:[],feeding:[],attribute:[],details:"",comboGoodsArr:[]},attribute:[],form2:{details:""},form3:{isMember:"",maxNum:"",virtualSales:"",goodLabel:0,printLabel:""},labelList:"",printData:[],initial:{more:""},optionsCategory:[],optionsUnit:[],specsData:[],attrsData:[],feedingData:[],attrShow:[],id:"",specialList:[],remai:"",xinping:"",tuijian:"",timeout:null,dialogTableVisible:!1,tableData:[],multipleSelection:[],page:{total:10,size:500,currentPage:1}}},methods:{initlist:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r,o,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a={page:e.page.currentPage,size:e.page.size,storeId:sessionStorage.getItem("storeId")||"",type:e.$route.query.type||"",goodsType:e.$route.query.goodsType||""},e.listLoading=!1,t.next=4,Object(u["r"])(a);case 4:r=t.sent,o=r.data,n=r.count,e.tableData=o.data,e.page.total=n;case 9:case"end":return t.stop()}}),t)})))()},chooseGood:function(){var e=this;if(this.form.id?this.tableData=this.tableData.filter((function(t){return t.id!=e.form.id&&""==t.comboGoodsArr})):this.tableData=this.tableData.filter((function(e){return""==e.comboGoodsArr})),this.dialogTableVisible=!0,this.form.comboGoodsArr.length>0){for(var t=this.form.comboGoodsArr.map((function(e){return{id:e.id}})),a=[],r=0;r<t.length;r++)a.push(t[r].id);this.$nextTick((function(){e.tableData.forEach((function(t){a.indexOf(t.id)>=0&&e.$refs.tableData.toggleRowSelection(t,!0)}))}))}},choose:function(){this.dialogTableVisible=!this.dialogTableVisible},handleSelectionChange:function(e){this.form.comboGoodsArr=e.map((function(e){return{num:1,id:e.id,name:e.name,icon:e.icon,price:e.price,storeId:e.storeId}}))},handleCurrentChange:function(e){this.page.currentPage=e,this.initlist()},querySearchAsync:function(e,t){var a=this.specsData,r=e?a.filter(this.createStateFilter(e)):a;clearTimeout(this.timeout),this.timeout=setTimeout((function(){t(r)}),100*Math.random())},createStateFilter:function(e){return function(t){return 0===t.name.toLowerCase().indexOf(e.toLowerCase())}},handleSelect:function(e){console.log(e)},querySearchAsync2:function(e,t){var a=this.attrsData,r=e?a.filter(this.createStateFilter(e)):a;clearTimeout(this.timeout),this.timeout=setTimeout((function(){t(r)}),100*Math.random())},handleSelect2:function(e){console.log(e)},querySearchAsync3:function(e,t){var a=this.feedingData,r=e?a.filter(this.createStateFilter(e)):a;clearTimeout(this.timeout),this.timeout=setTimeout((function(){t(r)}),100*Math.random())},handleSelect3:function(e,t){if(e.price)for(var a=0;a<this.form.feeding.length;a++)t==a&&(this.form.feeding[a].salesPrice=e.price)},handleSelectChage3:function(e,t){for(var a=0;a<this.form.feeding.length;a++)t==a&&(this.form.feeding[a].salesPrice="")},querySearchAsync4:function(e,t){var a=this.optionsUnit,r=e?a.filter(this.createStateFilter(e)):a;clearTimeout(this.timeout),this.timeout=setTimeout((function(){t(r)}),100*Math.random())},handleClick:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if("3"!=e.activeName){t.next=10;break}return t.next=3,Object(u["t"])();case 3:return a=t.sent,r=a.data,t.next=7,Object(u["v"])();case 7:o=t.sent,e.labelList=r,o.data&&(e.printData=o.data);case 10:case"end":return t.stop()}}),t)})))()},test:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;console.log(this.$refs,e),this.$refs["img"+e].dialogVisible=!0},enter:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="none"},leave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="inline-block"},imgadd1:function(e){this.form.icon=e.str},enterMultigraph:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.$refs["list".concat(t).concat(e)][0].style.display="none"},leaveMultigraph:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.$refs["list".concat(t).concat(e)][0].style.display="inline-block"},multigraph1:function(e){this.form.media&&this.form.media.length>0?this.form.media=this.form.media.concat(e.arr):this.form.media=e.arr},deleteMultiImage:function(e,t,a){if(Array.prototype.remove=function(e){var t=this.indexOf(e);t>-1&&this.splice(t,1)},"multigraph"==a)switch(t){case 2:this.form.media.remove(e);break}else switch(t){case 1:this.form.icon="";break}},init:function(){this.goodRender(),this.specialCategory()},specialCategory:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["Y"])({item:12});case 2:for(a=t.sent,r=a.data,e.specialList=r||[],e.specialList=r||[],o=0;o<e.specialList.length;o++)"热卖"==e.specialList[o].customName&&(e.remai=e.specialList[o].name),"新品"==e.specialList[o].customName&&(e.xinping=e.specialList[o].name),"推荐"==e.specialList[o].customName&&(e.tuijian=e.specialList[o].name);case 7:case"end":return t.stop()}}),t)})))()},edit:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["z"])({id:e.id,storeId:e.storeId});case 2:a=t.sent,r=a.data,console.log("编辑",r),e.form.sort=r.detail.sort,e.form.typeId=r.detail.typeId,e.form.aloneType=r.detail.aloneType,e.form.specialType=r.detail.specialType,e.form.body=r.detail.body,e.form.boxMoney=r.detail.boxMoney,e.form.crossedPrice=r.detail.crossedPrice,e.form.costPrice=r.detail.costPrice,e.form.fillType=r.detail.fillType,e.form.goodCode=r.detail.goodCode,e.form.hotsaleType=r.detail.hotsaleType,e.form.icon=r.detail.icon,e.form.media=r.detail.media,e.form.id=r.detail.id,e.form.minNum=r.detail.minNum,e.form.name=r.detail.name,e.form.price=r.detail.price,e.form.salesType=r.detail.salesType,e.form.specType=r.detail.specType,e.form.stock=r.detail.stock,e.form.unit=r.detail.unit,e.form.weekDay=r.detail.weekDay?r.detail.weekDay:[],e.form.weekSalesType=r.detail.weekSalesType,r.detail.comboGoodsArr?e.form.comboGoodsArr=JSON.parse(r.detail.comboGoodsArr):e.form.comboGoodsArr="",r.detail.startTime&&(e.form.validity=[r.detail.startTime,r.detail.endTime]),r.attrData&&(e.attribute=r.attrData.map((function(e){return{attrName:e.attrName,attrStr:e.attrStr}}))),r.meterData&&(e.form.feeding=r.meterData.map((function(e){return{materialName:e.materialName,salesPrice:e.SalesPrice,salesStock:e.SalesStock,fillType:e.fillType}}))),r.specsData&&(e.form.spec=r.specsData.map((function(e){return{specName:e.specsName,price:e.SalesPrice,stock:e.SalesStock,boxMoney:e.boxMoney,crossedPrice:e.crossedPrice,costPrice:e.costPrice,fillType:e.fillType,goodCode:e.goodCode,more:e.more,id:e.id,goodId:e.goodId}}))),r.hoursData&&(e.form.salesTimeStr=r.hoursData.map((function(e){return{startTime:e.startTime,endTime:e.endTime}}))),r.detail.details&&(e.form.details=r.detail.details),e.form3.maxNum=r.detail.maxNum,e.form3.isMember=r.detail.isMember,e.form3.virtualSales=r.detail.virtualSales,e.form3.goodLabel=r.detail.goodLabel?r.detail.goodLabel.toString():0,e.form3.printLabel=r.detail.printLabel;case 40:case"end":return t.stop()}}),t)})))()},goodRender:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["B"])({type:e.$route.query.goodsType,storeId:e.storeId});case 2:a=t.sent,r=a.data,e.optionsCategory=r.categoryData,e.optionsUnit=r.unitData,e.specsData=r.specsData,e.attrsData=r.attrData,e.feedingData=r.materData;case 9:case"end":return t.stop()}}),t)})))()},addSpec:function(){var e={specName:"",price:"",boxMoney:"",stock:"",fillType:"",more:!1,crossedPrice:"",costPrice:"",goodCode:""};this.$set(this.form.spec,this.form.spec.length,e)},delSpec:function(e){this.$delete(this.form.spec,e)},showzhe:function(e){if(e>=0)for(var t=0;t<this.form.spec.length;t++)t==e&&(this.form.spec[t].more?this.form.spec[t].more=!1:this.form.spec[t].more=!0);else this.initial.more?this.initial.more=!1:this.initial.more=!0},selectSpecBlur:function(e,t,a){console.log(e,t,a),t.specName=e.target.value},selectAttBlur:function(e,t,a){console.log(e,t,a)},selectAttChange:function(e,t){var a=this;return Object(n["a"])(regeneratorRuntime.mark((function r(){var o,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return o=a.attrsData.filter((function(t){return t.name===e})),r.next=3,Object(u["d"])({id:o[0].id,storeId:a.storeId});case 3:n=r.sent,t.attrShow=n.data.attr_str;case 5:case"end":return r.stop()}}),r)})))()},selectFeedingBlur:function(e,t){for(var a=0;a<this.feedingData.length;a++)this.feedingData[a].name==t.materialName&&(t.salesPrice=this.feedingData[a].price)},addAttribute:function(){var e={attrName:"",attrStr:[{name:""},{name:""},{name:""},{name:""},{name:""},{name:""},{name:""},{name:""}],attrShow:[]};this.$set(this.attribute,this.attribute.length,e)},delAttribute:function(e){this.$delete(this.attribute,e)},selectValueBlur:function(e,t,a){this.goodRender();for(var r=0;r<t.attrStr.length;r++)r==a&&(t.attrStr[a].name=e.target.value)},selectValueChange:function(e,t,a){var r=this;return Object(n["a"])(regeneratorRuntime.mark((function e(){var a,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(r.goodRender(),!t.attrName){e.next=7;break}return a=r.attrsData.filter((function(e){return e.name===t.attrName})),e.next=5,Object(u["d"])({id:a[0].id});case 5:o=e.sent,t.attrShow=o.data.attr_str;case 7:case"end":return e.stop()}}),e)})))()},delFeeding:function(e){this.$delete(this.form.feeding,e)},addFeeding:function(){var e={materialName:"",salesPrice:"",salesStock:"",fillType:""};this.$set(this.form.feeding,this.form.feeding.length,e)},addtimeInterval:function(){var e={startTime:"",endTime:""};this.$set(this.form.salesTimeStr,this.form.salesTimeStr.length,e)},deltimeInterval:function(e){this.$delete(this.form.salesTimeStr,e)},getUeditor:function(e){this.form.details=e},onSubmit:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r,o,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(console.log("submit!"),"1"!=e.activeName){t.next=5;break}e.$refs["form"].validate(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a){var r,o,n,i,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=18;break}return console.log(e.form),r=Object(c["a"])(e.form.validity[0]),o=Object(c["a"])(e.form.validity[1]),e.form.validity=[r,o],e.form.attribute=e.attribute,e.form.storeId=e.storeId,e.optionsUnit.forEach((function(t){t.id==e.form.unit&&(e.form.unit=t.name)})),t.next=10,Object(u["G"])(e.form);case 10:n=t.sent,i=n.msg,s=n.goodsId,e.id=s,e.$baseMessage(i,"success"),e.form.goodsType&&2==e.form.goodsType?e.$router.push({path:"/instoregoodlist"}):e.$router.push({path:"/storegoodlist?currentPage=".concat(e.$route.query.currentPage,"&activeName=").concat(e.$route.query.activeName,"&type=").concat(e.$route.query.type)}),t.next=19;break;case 18:return t.abrupt("return",!1);case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.next=27;break;case 5:if("2"!=e.activeName){t.next=17;break}return e.form2.id=e.id,e.form2.storeId=e.storeId,console.log(e.form2),t.next=11,Object(u["G"])(e.form2);case 11:a=t.sent,r=a.msg,e.$baseMessage(r,"success"),e.$router.push({path:"/storegoodlist?currentPage=".concat(e.$route.query.currentPage,"&activeName=").concat(e.$route.query.activeName,"&type=").concat(e.$route.query.type)}),t.next=27;break;case 17:if("3"!=e.activeName){t.next=27;break}return e.form3.id=e.id,e.form3.storeId=e.storeId,e.form3.isMember=2,t.next=23,Object(u["G"])(e.form3);case 23:o=t.sent,i=o.msg,e.$baseMessage(i,"success"),e.form.goodsType&&2==e.form.goodsType?e.$router.push({path:"/instoregoodlist?currentPage=".concat(e.$route.query.currentPage,"&activeName=").concat(e.$route.query.activeName,"&type=").concat(e.$route.query.type)}):e.$router.push({path:"/storegoodlist?currentPage=".concat(e.$route.query.currentPage,"&activeName=").concat(e.$route.query.activeName,"&type=").concat(e.$route.query.type)});case 27:case"end":return t.stop()}}),t)})))()}}},f=m,p=(a("3b01"),a("2877")),h=Object(p["a"])(f,r,o,!1,null,null,null);t["default"]=h.exports}}]);