zx/public/mer/js/chunk-72a6affd.fdd866d1.js

1 line
106 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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-72a6affd"],{3567:function(t,e,a){},"504c":function(t,e,a){var i=a("9e1e"),l=a("0d58"),s=a("6821"),r=a("52a7").f;t.exports=function(t){return function(e){var a,o=s(e),n=l(o),c=n.length,d=0,u=[];while(c>d)a=n[d++],i&&!r.call(o,a)||u.push(t?[a,o[a]]:o[a]);return u}}},6902:function(t,e,a){},"6fd1":function(t,e,a){"use strict";a("7a41")},"7a41":function(t,e,a){},8615:function(t,e,a){var i=a("5ca1"),l=a("504c")(!1);i(i.S,"Object",{values:function(t){return l(t)}})},8668:function(t,e,a){},"877a":function(t,e,a){},"9e70":function(t,e,a){"use strict";a("6902")},a71a:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAC6JJREFUeF7tnWtsHNUVx//nztiOk5DwfrRCgAI00CaUl0ikUjk7DjTlA6iUQAOUpwR9IloeIbF3Z9cmPNTyKKKqaBtAhVQx0FYVUkTwrE0rFRCoaUJFGx4iopQ2JKEkxiRZz72nmnXWsR17d9a7O3NnMvPN2nPP4//z3TkzO3cuoczRZu8+0eDmZQAvAmg+gEOZQeXGJJ81VgEiMIBPAN4EUJ+kwpp+u3XLZFEnhHVBB5/kGupeAr4JQDQ25cR7jQooBp41pVi+vpveG+/rAMCptHsdCXoYjENqDJwMD1IBwgArviWfMx8fHXYMYCsj7wBwX5B5JbHqrsCdTta4v+R1BHBx5hKtrnu4xGHgCjDz9aWZXATsnXOlqTYmX8uBs2hMQMKA4YozvHNyEXAqI9cSsLQx0RKvYSjAQE8+a1xO+y6F3k265TAwNDSmklSYQ1ZGrgBwd0NDJc7DUmAlWRn3RYDaw8ogidtIBbjXm8FbARzdyDCJ79AU+MgDvBdAc2gpJIEbqUCBUmlZIEJTI6MkvsNRgBlDCeBwtA8kagI4EJnDC5IADk/7QCIngAORObwgCeDwtA8kcgI4EJnDC5IADk/7QCIngAORObwgCeDwtA8kcgI4EJnDC5IADk/7QCIngAORObwgCeDwtA8kcgI4EJnDC5IADk/7QCIngAORObwgBx9ghrd0Tu6T3AxP+mAixx1wAeA/seKXmGhDkzLeLJjYNnAcvEeU0PrezpnmtOknmBDzmek8MC4C4YRgpA8mSkwB0yYQPUrTsLZ3Oe30LyWTlcMCuOoGEF0J8DT/Y/W0jBdgordJqdt7c8YfAfLW0E75WGzz5ySUTYwborwgIB6Ah8+rD3y2S3S+/CDtnjLVCQa227yAWT0J4NR6+g3KVxwADxLzNb0587nJRLush41tb2KegDyHmI4Hqdlg4TKwHSw2k4u/OKvIezZ8wmOJzbMKSq4G0aVBgalXnKgDHlRKXdTX1fTSRIK0d/KZLNTNYFwKwhFlRFNgbGCBJxTEE/02fXqALTOlbPlzAt1cL/GD8BNpwJL5iv6cuXa8UMNLYeWDYLq4ehFpBxN3H3G6eOSZpVS6nBp2w0zttnqKgWXV+w1nRHQBMz/q5Mzvj5fNSsvvgYpvKJhRi6TM/KoSQ1eMf7nJBbf9d4acefTLYJ5Xi/+gxkYTMGFrM8Sp62zaNVooyx56CCxuqZt4hK0k3cW9XS1vjPaZsvksYvVaFLrrSAJmwq1523hoDNwM3wGo+r9bhLBVorBg/Ey20u6vQORdQml9RBHwoCRx7OhGqL2DT2ND/a1xC+jotcO/SAtHn5NTXTyHXPWW7rM4eoCZn3NypvfurpHDyrhPAvTtRk4lpXBTX5fx2Ni46s8Af6WRcWv1HT3AhB87tvFAqfAlP+OWwna1A1RbU1VJSGZszueMuWPOxZ1DHSREV6WxYX4eOcDM/PV8zlxXEm2xzeeo4Yan4Yck97R+u+WfpUCL0u5Fguj5hgeuIUDkAJMh5vemaaSrtWz3CjD9tgYNfA8l4st7bbOnNKA9x/NYqk2+HYRgGDnASoq5fd20uaRVyuYbidUvg9COCd/J28YvSrG+2rHnlCajyWu0tD0iB5gZP8znjEf2A5ZriPGtQBRmPO3kjKtKsaw03wRSI8ADyaHKIJEDDNAeBv9EEL/BTEsAXFtlzbWaP8ZCPA+p5hOwEoTWWh02cnwEATdSjvj51hWwQvGnvOFHayJ3EFoAHKnDTRC9ADP+A4FuicGefnvW9siBHZVwm73rSAMzlkKhA4TjwqpFI8D8uiRjSb9NkQY7HmSbzUcaLNcBdE4YkLUAzIRtVNg9z1k1c9KnKsIQp14xrRWfHsPNrW8Q46h6+fTrRwvAYKxwcsY9fpOOop2VlneBsCro3LUALGnolH572jtBFx9kvDZ7z8kGN70dZEwvVviAGbL5f2LGukcomh2zT2JLfsAthcPUIAiGzyF1MQsfMKAkidkTPuhWlxL1cNJm80yDlfcQfqBbFOkAGJLkmf12s/eDfWyPNrvwZYONDUEXqAVgEF/t2OZT1Ra/uItPGdrrfh6m/KCh53BmsrKF0xjiWMHmO71Zer/aXC3bvQpMv6l2XK32egAGVjlZY6XfYiybTwcrT6yz9o+hV5RJ1/Z17v+lya+/cnZWjheyVKsJGPmxn4kc06Tr1nfQv/zGsDLS2zLB2zoh0EMLwAz6XT4rfK0aSHXwHDL4VYAPfJCdsNUwxbnVCF9O7UWdfLYQynuo/oBHcBnY0kTi7Bds+tgPMSujfg/wJX5s62mjBWAw3nVyxsl+Ckul3R4iumxSW8avnZxxox9flWysjOoDuG0yOyZ0522js5If73MrLd8BYY4f23ra6AGYMPTZTjG78sIxplRa7SDCYZOLQB84WXF8rSItfIBbp+/kXQCXWSTOrztZ89xKsRbeyq3TZ1XyVcnL1D7XA7CXO7lnOHZL+cdfbBYW8wDA08uU+7GTNcqtQ/KlVPudH8/mabM/KWvM+IeTM06v5NCy984Hmxsr2TXic40A++ukU2n3FSI6b3IxOO9kTaseYllpuaXCiv+nnKxxdaVYYXXQXl7aACbC3b220VFJrPY0X8yk/jChHXvLw8TX8llaX8mPn88XdRa+K4Tx6CS2BSaxMG/TXyv5ardlNzN8XyVU8lfN59oArqqTtuVtxHTPuPNjAYwfOblJgVSjy4itZctVUFgOGrPr+SCYb3AmWNk4UZBURj1H4G9MKYEaB2kDuJpO2qu5zea5BtRSMB8D0L8liZ5+mxryg8W+dcaXMHC4YLxPQjz9ok0f+tU+rA5aq69o+O6k/cqqh12xg56tdoLD2ZdKnxnst5PWg5vvLMLsoPWawUXA/jpp3+pqYBhmB60dYL+dtAbcfKcQZgetHWCAnnWyYvLbkL5l1ccwzA5aP8BV3JPWB2H5TMLsoHUEPPTZgJ970tHAG3YHrR9gAJLcef12y9+jgbB8lm323i8ZbI55gUvQdel1mRSzTjrsDlrLGUxAd2/W32+sQc+GauO1Z2QXAxXvr1frtxp7/WZwjDppK6OeAXjMC2OqgVMPW/0Ax6iTDruD1vIrGowhKcSsfpv21OM/OCwfxQ76ELUTFM496FLd+s3gmHTSOnTQes5g75Y08ZW9trkmrNlXj7g6dNDaAmagOx/xTjqVkV0UcgetLeA43JPWoYPWGfBbTlZ8oR5flWH5sDJqM8Ch7/OgZZPlPUOLwqfHOvfM2hEWoFrinn/XwFHNzTM+LP9MdS0R/I/VFLD3vCduc3LGT/2Xoo/lorS8XRDu1yEjbQFH9b0d56/g45qa1cYw3scx0T+UtoCHk+VXmsm4cPyr+3WYGRPlUNx+h+ULAC3QJUfNARcvijdKeJtj7H+Nry7ijc6jzd471+CmtQDP1yk//QEPq1UgwpOAWoPd5ga3FYM6iGjuxgy0umcCYhkzrmnclgJTrzYqgPdX6C1PAdypl1y/kQSY41Y81M95nTxFD3CdCj9Y3CSAY046AZwAjrkCMS8vmcEJ4JgrEPPykhmcAI65AjEvL5nBCeCYKxDz8pIZnACOuQIxLy+ZwQngmCsQ8/KSGXwwALYy0tsQoznmtR6s5RXIykhvQ6qjD1YFYl73R2Rl3BcBao95oQdpedzrzWBvLwFvT4HkiJ8CK6nN3n2iwc3vBr2nT/y01K4iJakwh7y0Uhm5loCl2qWYJDRlBRjoyWeNy4uAL+jgk6SpNoJxyJQ9JgP1UYAwYLjijPXd9F4RcHEWp93riGi1PlkmmUxVAWa+Pp8zH/fGjwD2/rAy8g4A903VcTJOCwXudLLGyOK3MYBHZrKgh5Ovay1g+U+CMMCKbynN3NLAAwCXzsmuoe4lwHvPU6A7ZvqvKLHcp4Bi4FlTiuXeOXe8KhMCLhntu4RaBvAigLyFVYcyj/1aT2QOVgEiMIBPAN4EUJ+kwpp+u3XLZFn8H9n+/ja0qvajAAAAAElFTkSuQmCC"},b83b:function(t,e,a){"use strict";a("3567")},c437:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:t.tableFrom,size:"small","label-width":"95px",inline:!0}},[a("el-form-item",{attrs:{label:"平台分类:",prop:"cate_id"}},[a("el-cascader",{ref:"myCascader",staticClass:"selWidth",attrs:{filterable:"",options:t.categoryList,props:t.props,clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.cate_id,callback:function(e){t.$set(t.tableFrom,"cate_id",e)},expression:"tableFrom.cate_id"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商户分类:",prop:"mer_cate_id"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.mer_cate_id,callback:function(e){t.$set(t.tableFrom,"mer_cate_id",e)},expression:"tableFrom.mer_cate_id"}},t._l(t.merCateList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"是否为礼包:",prop:"is_gift_bag"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.is_gift_bag,callback:function(e){t.$set(t.tableFrom,"is_gift_bag",e)},expression:"tableFrom.is_gift_bag"}},[a("el-option",{attrs:{label:"是",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"否",value:"0"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"会员价:",prop:"svip_price_type"}},[a("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.svip_price_type,callback:function(e){t.$set(t.tableFrom,"svip_price_type",e)},expression:"tableFrom.svip_price_type"}},[a("el-option",{attrs:{label:"未设置",value:"0"}}),t._v(" "),a("el-option",{attrs:{label:"默认设置",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"自定义设置",value:"2"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商品状态:",prop:"us_status"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:t.getList},model:{value:t.tableFrom.us_status,callback:function(e){t.$set(t.tableFrom,"us_status",e)},expression:"tableFrom.us_status"}},t._l(t.productStatusList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"标签:",prop:"mer_labels"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:"",filterable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.mer_labels,callback:function(e){t.$set(t.tableFrom,"mer_labels",e)},expression:"tableFrom.mer_labels"}},t._l(t.labelList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"运费模板:",prop:"temp_id"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:"",filterable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.temp_id,callback:function(e){t.$set(t.tableFrom,"temp_id",e)},expression:"tableFrom.temp_id"}},t._l(t.tempList,(function(t){return a("el-option",{key:t.shipping_template_id,attrs:{label:t.name,value:t.shipping_template_id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"系统表单:",prop:"form_id"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:"",filterable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.form_id,callback:function(e){t.$set(t.tableFrom,"form_id",e)},expression:"tableFrom.form_id"}},t._l(t.formList,(function(t){return a("el-option",{key:t.form_id,attrs:{label:t.name,value:t.form_id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"关键字:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称,关键字",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品类型:",prop:"is_ficti"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.is_ficti,callback:function(e){t.$set(t.tableFrom,"is_ficti",e)},expression:"tableFrom.is_ficti"}},t._l(t.productTypeList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14 dataBox"},[a("el-tabs",{on:{"tab-click":t.getProduct},model:{value:t.tableFrom.type,callback:function(e){t.$set(t.tableFrom,"type",e)},expression:"tableFrom.type"}},t._l(t.headeNum,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.type.toString(),label:t.name+"("+t.count+")"}})})),1),t._v(" "),a("div",{staticClass:"mt5 mb14"},[a("router-link",{staticClass:"mr10",attrs:{to:{path:t.roterPre+"/product/list/addProduct"}}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("添加商品")])],1),t._v(" "),a("el-button",{attrs:{size:"small",type:"success"},on:{click:t.onCopy}},[t._v("商品采集")]),t._v(" "),a("el-button",{attrs:{size:"small",disabled:0==t.checkedIds.length&&!t.allCheck,type:"default"},on:{click:t.openBatch}},[t._v("批量设置")]),t._v(" "),a("el-button",{attrs:{size:"small",disabled:1!=t.tableFrom.type||0==t.checkedIds.length&&!t.allCheck},on:{click:t.batchOff}},[t._v("批量下架")]),t._v(" "),a("el-button",{attrs:{size:"small",disabled:2!=t.tableFrom.type||0==t.checkedIds.length&&!t.allCheck},on:{click:t.batchShelf}},[t._v("批量上架")])],1),t._v(" "),t.checkedIds.length>0||t.allCheck?a("el-alert",{staticClass:"mb10",attrs:{title:t.allCheck?"已选择 "+t.tableData.total+" 项":"已选择 "+t.checkedIds.length+" 项",type:"info","show-icon":""}}):t._e(),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small","row-class-name":t.tableRowClassName,"row-key":function(t){return t.product_id}},on:{"selection-change":t.handleSelectionChange,rowclick:function(e){return e.stopPropagation(),t.closeEdit(e)}}},[a("el-table-column",{attrs:{width:"50"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-popover",{staticClass:"tabPop",attrs:{placement:"top-start",width:"100",trigger:"hover"}},[a("div",[a("span",{staticClass:"spBlock onHand",class:{check:"dan"===t.chkName},on:{click:function(a){return t.onHandle("dan",e.$index)}}},[t._v("选中本页")]),t._v(" "),a("span",{staticClass:"spBlock onHand",class:{check:"duo"===t.chkName},on:{click:function(e){return t.onHandle("duo")}}},[t._v("选中全部")])]),t._v(" "),a("el-checkbox",{attrs:{slot:"reference",value:"dan"===t.chkName&&t.checkedPage.indexOf(t.tableFrom.page)>-1||"duo"===t.chkName},on:{change:t.changeType},slot:"reference"})],1)]}},{key:"default",fn:function(e){return[a("el-checkbox",{attrs:{disabled:e.row.cancel_time,value:!e.row.cancel_time&&(t.checkedIds.indexOf(e.row.product_id)>-1||"duo"===t.chkName&&-1===t.noChecked.indexOf(e.row.product_id))},on:{change:function(a){return t.changeOne(a,e.row)}}})]}}])}),t._v(" "),a("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form",{staticClass:"demo-table-expand demo-table-expand1",attrs:{"label-position":"left",inline:"","label-width":"90px"}},[a("el-form-item",{attrs:{label:"平台分类:"}},[a("span",[t._v(t._s(e.row.storeCategory?e.row.storeCategory.cate_name:"-"))])]),t._v(" "),a("el-form-item",{attrs:{label:"商品分类:"}},[e.row.merCateId.length?t._l(e.row.merCateId,(function(e,i){return a("span",{key:i,staticClass:"mr10"},[t._v(t._s(e.category.cate_name))])})):a("span",[t._v("-")])],2),t._v(" "),a("el-form-item",{attrs:{label:"品牌:"}},[a("span",{staticClass:"mr10"},[t._v(t._s(e.row.brand?e.row.brand.brand_name:"其他"))])]),t._v(" "),a("el-form-item",{attrs:{label:"市场价格:"}},[a("span",[t._v(t._s(t._f("filterEmpty")(e.row.ot_price)))])]),t._v(" "),a("el-form-item",{attrs:{label:"成本价:"}},[a("span",[t._v(t._s(t._f("filterEmpty")(e.row.cost)))])]),t._v(" "),a("el-form-item",{attrs:{label:"收藏:"}},[a("span",[t._v(t._s(t._f("filterEmpty")(e.row.care_count)))])]),t._v(" "),"7"===t.tableFrom.type?a("el-form-item",{key:"1",attrs:{label:"未通过原因:"}},[a("span",[t._v(t._s(e.row.refusal))])]):t._e()],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"70"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"230"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[a("span",{staticClass:"tags_name",class:"name"+e.row.spec_type},[t._v(t._s(0==e.row.spec_type?"[单规格]":"[多规格]"))]),t._v(t._s(e.row.store_name||"-"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"商品售价","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{prop:"sales",label:"销量","min-width":"70"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"70"}}),t._v(" "),a("el-table-column",{attrs:{prop:"sort",align:"center",label:"排序","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.index===t.tabClickIndex?a("span",[a("el-input",{attrs:{type:"number",maxlength:"300",size:"mini",autofocus:""},on:{blur:function(a){return t.inputBlur(e)}},model:{value:e.row["sort"],callback:function(a){t.$set(e.row,"sort",t._n(a))},expression:"scope.row['sort']"}})],1):a("span",{on:{dblclick:function(a){return a.stopPropagation(),t.tabClick(e.row)}}},[t._v(t._s(e.row["sort"]))])]}}])}),t._v(" "),Number(t.tableFrom.type)<5?a("el-table-column",{key:"1",attrs:{prop:"status",label:"上/下架","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,width:55,"active-text":"上架","inactive-text":"下架"},on:{change:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_show,callback:function(a){t.$set(e.row,"is_show",a)},expression:"scope.row.is_show"}})]}}],null,!1,2333319388)}):t._e(),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"商品状态","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("productStatusFilter")(e.row.us_status)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":5==t.tableFrom.type?"100":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.onDetails(e.row.product_id)}}},[t._v("详情")]),t._v(" "),5!=t.tableFrom.type?a("router-link",{attrs:{to:{path:t.roterPre+"/product/list/addProduct/"+e.row.product_id}}},[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"}},[t._v("编辑")])],1):t._e(),t._v(" "),"5"!==t.tableFrom.type?a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.handlePreview(e.row.product_id)}}},[t._v("预览")]):t._e(),t._v(" "),a("el-dropdown",[a("span",{staticClass:"el-dropdown-link"},[t._v("\n 更多"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t._v(" "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},["5"!==t.tableFrom.type&&"1"==t.is_audit?a("el-dropdown-item",{nativeOn:{click:function(a){return t.onAuditFree(e.row)}}},[t._v("免审编辑")]):t._e(),t._v(" "),5!=t.tableFrom.type?a("el-dropdown-item",[a("router-link",{attrs:{to:{path:t.roterPre+"/product/list/addProduct/"+e.row.product_id+"?type=copy"}}},[t._v("\n 复制商品\n ")])],1):t._e(),t._v(" "),"5"!==t.tableFrom.type?a("el-dropdown-item",{nativeOn:{click:function(a){return t.onEditLabel(e.row)}}},[t._v("编辑标签")]):t._e(),t._v(" "),5!=t.tableFrom.type?a("el-dropdown-item",[a("router-link",{attrs:{to:{path:t.roterPre+"/product/reviews/?product_id="+e.row.product_id}}},[t._v("\n 查看评价\n ")])],1):t._e(),t._v(" "),"1"!==t.tableFrom.type&&"3"!==t.tableFrom.type&&"4"!==t.tableFrom.type?a("el-dropdown-item",{nativeOn:{click:function(a){return t.handleDelete(e.row.product_id,e.$index)}}},[t._v(t._s("5"===t.tableFrom.type?"删除":"加入回收站"))]):t._e(),t._v(" "),"5"===t.tableFrom.type?a("el-dropdown-item",{nativeOn:{click:function(a){return t.handleRestore(e.row.product_id)}}},[t._v("恢复商品")]):t._e()],1)],1)]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,background:"",layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),a("tao-bao",{ref:"taoBao",attrs:{deliveryType:t.deliveryType,deliveryList:t.deliveryList},on:{getSuccess:t.getSuccess}}),t._v(" "),t.previewVisible?a("div",[a("div",{staticClass:"bg",on:{click:function(e){e.stopPropagation(),t.previewVisible=!1}}}),t._v(" "),t.previewVisible?a("preview-box",{ref:"previewBox",attrs:{"goods-id":t.goodsId,"product-type":0,"preview-key":t.previewKey}}):t._e()],1):t._e(),t._v(" "),t.dialogLabel?a("el-dialog",{attrs:{title:"选择标签",visible:t.dialogLabel,width:"470px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogLabel=e}}},[a("el-form",{ref:"labelForm",attrs:{model:t.labelForm,size:"small"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",[a("el-select",{staticClass:"width100",attrs:{clearable:"",multiple:"",placeholder:"请选择"},model:{value:t.labelForm.mer_labels,callback:function(e){t.$set(t.labelForm,"mer_labels",e)},expression:"labelForm.mer_labels"}},t._l(t.labelList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id.toString()}})})),1)],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogLabel=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.submitForm("labelForm")}}},[t._v("提交")])],1)],1):t._e(),t._v(" "),a("edit-attr",{ref:"editAttr"}),t._v(" "),t.dialogFreight?a("el-dialog",{attrs:{title:"选择运费模板",visible:t.dialogFreight,width:"800px","before-close":t.handleFreightClose},on:{"update:visible":function(e){t.dialogFreight=e}}},[a("el-form",{ref:"tempForm",attrs:{model:t.tempForm,rules:t.tempRule},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{prop:"temp_id"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",placeholder:"请选择"},model:{value:t.tempForm.temp_id,callback:function(e){t.$set(t.tempForm,"temp_id",e)},expression:"tempForm.temp_id"}},t._l(t.tempList,(function(t){return a("el-option",{key:t.shipping_template_id,attrs:{label:t.name,value:t.shipping_template_id}})})),1)],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitTempForm("tempForm")}}},[t._v("提交")])],1)],1):t._e(),t._v(" "),t.dialogCommision?a("el-dialog",{attrs:{title:"设置佣金",visible:t.dialogCommision,width:"600px"},on:{"update:visible":function(e){t.dialogCommision=e}}},[a("el-form",{ref:"commisionForm",attrs:{model:t.commisionForm,rules:t.commisionRule},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"一级佣金比例:",prop:"extension_one"}},[a("el-input-number",{staticClass:"priceBox",attrs:{precision:2,step:.1,min:0,max:1,"controls-position":"right"},model:{value:t.commisionForm.extension_one,callback:function(e){t.$set(t.commisionForm,"extension_one",e)},expression:"commisionForm.extension_one"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"二级佣金比例:",prop:"extension_two"}},[a("el-input-number",{staticClass:"priceBox",attrs:{precision:2,step:.1,min:0,max:1,"controls-position":"right"},model:{value:t.commisionForm.extension_two,callback:function(e){t.$set(t.commisionForm,"extension_two",e)},expression:"commisionForm.extension_two"}})],1),t._v(" "),a("el-form-item",[a("span",[t._v("备注:订单交易成功后给上级返佣的比例,例:0.5 = 返订单金额的50%")])])],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitCommisionForm("commisionForm")}}},[t._v("提交")])],1)],1):t._e(),t._v(" "),t.dialogSvip?a("el-dialog",{attrs:{title:"批量设置付费会员价",visible:t.dialogSvip,width:"700px"},on:{"update:visible":function(e){t.dialogSvip=e}}},[a("el-form",{ref:"svipForm",attrs:{model:t.svipForm,"label-width":"80px"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"参与方式:"}},[a("el-radio-group",{model:{value:t.svipForm.svip_price_type,callback:function(e){t.$set(t.svipForm,"svip_price_type",e)},expression:"svipForm.svip_price_type"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("不设置会员价")]),t._v(" "),a("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("默认设置会员价")])],1)],1),t._v(" "),a("el-form-item",[t._v("\n 备注:默认设置会员价是指商户在 "),a("router-link",{staticClass:"member-link",attrs:{to:{path:t.roterPre+"/systemForm/Basics/svip"}}},[t._v(" [设置-付费会员设置] ")]),t._v(" 中设置的会员折扣价,选择后每个商品默认展示此处设置的会员折扣价。\n ")],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitSvipForm("svipForm")}}},[t._v("提交")])],1)],1):t._e(),t._v(" "),t.batchModal?a("el-dialog",{attrs:{title:"批量设置",visible:t.batchModal,width:"750px"},on:{"update:visible":function(e){t.batchModal=e}}},[a("div",[a("el-alert",{attrs:{title:"每次只能修改一项,如需修改多项,请多次操作。",type:"warning",closable:!1}}),t._v(" "),a("div",{staticClass:"batch-tab mt20"},[a("el-tabs",{attrs:{"tab-position":t.tabPosition},model:{value:t.batchName,callback:function(e){t.batchName=e},expression:"batchName"}},[a("el-tab-pane",{attrs:{label:"商品分类",name:"cate"}},[a("el-form",{attrs:{size:"small","label-width":"120px",inline:!0}},[a("el-form-item",{attrs:{label:"平台商品分类:"}},[a("el-cascader",{staticClass:"width100",attrs:{options:t.categoryList,props:t.props,clearable:""},model:{value:t.batchData.cate_id,callback:function(e){t.$set(t.batchData,"cate_id",e)},expression:"batchData.cate_id"}})],1)],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"商品标签",name:"label"}},[a("el-form",{attrs:{size:"small","label-width":"120px",inline:!0}},[a("el-form-item",{attrs:{label:"商品标签:"}},[a("el-select",{staticClass:"width100",attrs:{clearable:"",multiple:"",placeholder:"请选择"},model:{value:t.batchData.mer_labels,callback:function(e){t.$set(t.batchData,"mer_labels",e)},expression:"batchData.mer_labels"}},t._l(t.labelList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"配送方式",name:"delivery_method"}},[a("el-form",{attrs:{size:"small","label-width":"120px",inline:!0}},[a("el-form-item",{attrs:{label:"配送方式:"}},[a("el-checkbox-group",{model:{value:t.batchData.delivery_way,callback:function(e){t.$set(t.batchData,"delivery_way",e)},expression:"batchData.delivery_way"}},t._l(t.deliveryList,(function(e){return a("el-checkbox",{key:e.value,attrs:{label:e.value}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"运费设置",name:"postage"}},[a("el-form",{attrs:{size:"small","label-width":"120px"}},[a("el-form-item",{attrs:{label:"运费设置:"}},[a("el-radio-group",{model:{value:t.batchData.delivery_free,callback:function(e){t.$set(t.batchData,"delivery_free",e)},expression:"batchData.delivery_free"}},[a("el-radio",{attrs:{label:1}},[t._v("包邮")]),t._v(" "),a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("运费模板")])],1)],1),t._v(" "),0==t.batchData.delivery_free?a("el-form-item",[a("el-select",{staticClass:"width100",attrs:{clearable:"",placeholder:"请选择"},model:{value:t.batchData.temp_id,callback:function(e){t.$set(t.batchData,"temp_id",e)},expression:"batchData.temp_id"}},t._l(t.tempList,(function(t){return a("el-option",{key:t.shipping_template_id,attrs:{label:t.name,value:t.shipping_template_id}})})),1)],1):t._e()],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"佣金设置",name:"commission"}},[a("el-form",{attrs:{size:"small","label-width":"120px",inline:!1}},[a("el-form-item",{attrs:{label:"一级佣金比例:"}},[a("el-input-number",{staticClass:"width100",attrs:{precision:2,step:.1,min:0,max:1,"controls-position":"right"},model:{value:t.batchData.extension_one,callback:function(e){t.$set(t.batchData,"extension_one",e)},expression:"batchData.extension_one"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"二级佣金比例:"}},[a("el-input-number",{staticClass:"width100",attrs:{precision:2,step:.1,min:0,max:1,"controls-position":"right"},model:{value:t.batchData.extension_two,callback:function(e){t.$set(t.batchData,"extension_two",e)},expression:"batchData.extension_two"}})],1),t._v(" "),a("el-form-item",[a("span",{staticStyle:{color:"#909399"}},[t._v("备注:订单交易成功后给上级返佣的比例,例:0.5 = 返订单金额的50%")])])],1)],1),t._v(" "),1==t.open_svip?a("el-tab-pane",{attrs:{label:"付费会员设置",name:"member"}},[a("el-form",{attrs:{"label-width":"120px"}},[a("el-form-item",{attrs:{label:"参与方式:"}},[a("el-radio-group",{model:{value:t.batchData.svip_price_type,callback:function(e){t.$set(t.batchData,"svip_price_type",e)},expression:"batchData.svip_price_type"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("不设置会员价")]),t._v(" "),a("el-radio",{staticClass:"radio",attrs:{label:1}},[t._v("默认设置会员价")])],1)],1),t._v(" "),a("el-form-item",[t._v("\n 备注:默认设置会员价是指商户在 "),a("router-link",{staticClass:"member-link",attrs:{to:{path:t.roterPre+"/systemForm/Basics/svip"}}},[t._v(" [设置-付费会员设置] ")]),t._v(" 中设置的会员折扣价,选择后每个商品默认展示此处设置的会员折扣价。\n ")],1)],1)],1):t._e(),t._v(" "),a("el-tab-pane",{attrs:{label:"系统表单",name:"sys_form"}},[a("el-form",{attrs:{"label-width":"120px"}},[a("el-form-item",{attrs:{label:"系统表单:"}},[a("el-select",{staticClass:"width100",attrs:{size:"small",clearable:""},on:{change:t.getFormInfo},model:{value:t.batchData.mer_form_id,callback:function(e){t.$set(t.batchData,"mer_form_id",e)},expression:"batchData.mer_form_id"}},t._l(t.formList,(function(e){return a("el-option",{key:e.form_id,attrs:{value:e.form_id,label:e.name}},[t._v(t._s(e.name)+"\n ")])})),1)],1),t._v(" "),t.formData.length>0?a("el-form-item",[a("el-table",{staticClass:"specsList",attrs:{border:"",data:t.formData,size:"small"}},[a("el-table-column",{attrs:{prop:"label",label:"表单标题","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"type",label:"表单类型","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t._f("formTypeFilter")(i.type)))])]}}],null,!1,2322340139)}),t._v(" "),a("el-table-column",{attrs:{"min-width":"100",label:"是否必填"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.val?"必填":"不必填"))])]}}],null,!1,3982042071)})],1)],1):t._e()],1)],1),t._v(" "),a("el-tab-pane",{attrs:{label:"商品价格设置",name:"price"}},[a("el-form",{attrs:{size:"small","label-width":"60px"}},[a("el-form-item",{attrs:{label:"单选:"}},[a("el-radio-group",{on:{change:t.changePrice},model:{value:t.batchData.price_type,callback:function(e){t.$set(t.batchData,"price_type",e)},expression:"batchData.price_type"}},[a("el-radio",{attrs:{label:"add"}},[t._v("增加")]),t._v(" "),a("el-radio",{attrs:{label:"sub"}},[t._v("减少")]),t._v(" "),a("el-radio",{attrs:{label:"mul"}},[t._v("折扣")])],1)],1),t._v(" "),a("el-form-item",[a("el-input-number",{staticClass:"width100",attrs:{precision:2,step:.1,min:0,"controls-position":"right"},model:{value:t.batchData.price_number,callback:function(e){t.$set(t.batchData,"price_number",e)},expression:"batchData.price_number"}}),t._v(" "),a("span",{staticStyle:{color:"#909399"}},[t._v("("+t._s("add"==t.batchData.price_type||"sub"==t.batchData.price_type?"元":"%")+")")])],1),t._v(" "),a("el-form-item",[a("div",{staticStyle:{color:"#F56464"}},[t._v("注:批量设置价格为敏感操作,请谨慎操作!")])])],1)],1)],1)],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:t.submitBatchForm}},[t._v("提交")])],1)]):t._e(),t._v(" "),a("pro-detail",{ref:"proDetail",attrs:{productId:t.product_id,configData:t.configData,drawer:t.drawer},on:{closeDrawer:t.closeDrawer,changeDrawer:t.changeDrawer}})],1)},l=[],s=(a("7f7f"),a("ac6a"),a("55dd"),a("c4c8")),r=a("83d6"),o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"Box"},[t.modals?a("el-dialog",{attrs:{visible:t.modals,width:"70%",title:"商品采集","custom-class":"dialog-scustom"},on:{"update:visible":function(e){t.modals=e}}},[a("el-card",[a("div",[t._v("复制淘宝、天猫、京东、苏宁、1688")]),t._v("\n 生成的商品默认是没有上架的,请手动上架商品!\n "),a("span",{staticStyle:{color:"#F56464"}},[t._v("商品复制次数剩余:"+t._s(t.count)+"次")]),t._v(" "),a("router-link",{attrs:{to:{path:t.roterPre+"/setting/sms/sms_pay/index?type=copy"}}},[a("el-button",{attrs:{size:"small",type:"text"}},[t._v("增加采集次数")])],1),t._v(" "),a("el-button",{staticStyle:{"margin-left":"15px"},attrs:{size:"small",type:"primary"},on:{click:t.openRecords}},[t._v("查看商品复制记录")])],1),t._v(" "),a("el-form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{model:t.formValidate,rules:t.ruleInline,"label-width":"130px","label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"链接地址:"}},[a("el-input",{staticClass:"numPut",attrs:{search:"",placeholder:"请输入链接地址"},model:{value:t.soure_link,callback:function(e){t.soure_link=e},expression:"soure_link"}}),t._v(" "),a("el-button",{attrs:{loading:t.loading,size:"small",type:"primary"},on:{click:t.add}},[t._v("确定")])],1),t._v(" "),a("div",[t.isData?a("div",[a("el-form-item",{attrs:{label:"商品名称:",prop:"store_name"}},[a("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:t.formValidate.store_name,callback:function(e){t.$set(t.formValidate,"store_name",e)},expression:"formValidate.store_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商品类型:",prop:"type"}},t._l(t.virtual,(function(e,i){return a("div",{key:i,staticClass:"virtual",class:t.formValidate.type==e.id?"virtual_boder":"virtual_boder2",on:{click:function(a){return t.virtualbtn(e.id,2)}}},[a("div",{staticClass:"virtual_top"},[t._v(t._s(e.tit))]),t._v(" "),a("div",{staticClass:"virtual_bottom"},[t._v("("+t._s(e.tit2)+")")]),t._v(" "),t.formValidate.type==e.id?a("div",{staticClass:"virtual_san"}):t._e(),t._v(" "),t.formValidate.type==e.id?a("div",{staticClass:"virtual_dui"},[t._v(" ✓")]):t._e()])})),0),t._v(" "),a("el-form-item",{attrs:{label:"商品简介:",prop:"store_info","label-for":"store_info"}},[a("el-input",{attrs:{type:"textarea",rows:3,placeholder:"请输入商品简介"},model:{value:t.formValidate.store_info,callback:function(e){t.$set(t.formValidate,"store_info",e)},expression:"formValidate.store_info"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"平台商品分类:",prop:"cate_id"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.categoryList,clearable:""},model:{value:t.formValidate.cate_id,callback:function(e){t.$set(t.formValidate,"cate_id",e)},expression:"formValidate.cate_id"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商户商品分类:",prop:"mer_cate_id"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.merCateList,props:t.propsMer,clearable:""},model:{value:t.formValidate.mer_cate_id,callback:function(e){t.$set(t.formValidate,"mer_cate_id",e)},expression:"formValidate.mer_cate_id"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"品牌选择:",prop:"brand_id"}},[a("el-select",{staticClass:"selWidth",attrs:{filterable:"",placeholder:"请选择"},model:{value:t.formValidate.brand_id,callback:function(e){t.$set(t.formValidate,"brand_id",e)},expression:"formValidate.brand_id"}},t._l(t.BrandList,(function(t){return a("el-option",{key:t.brand_id,attrs:{label:t.brand_name,value:t.brand_id}})})),1)],1),t._v(" "),a("el-form-item",t._b({attrs:{label:"商品关键字:",prop:"keyword","label-for":"keyword"}},"el-form-item",t.grid,!1),[a("el-input",{attrs:{placeholder:"请输入商品关键字"},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"单位:",prop:"unit_name","label-for":"unit_name"}},[a("el-input",{attrs:{placeholder:"请输入单位"},model:{value:t.formValidate.unit_name,callback:function(e){t.$set(t.formValidate,"unit_name",e)},expression:"formValidate.unit_name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"单次最多购买件数:"}},[a("el-input-number",{attrs:{min:0,placeholder:"请输入购买件数"},model:{value:t.formValidate.once_count,callback:function(e){t.$set(t.formValidate,"once_count",e)},expression:"formValidate.once_count"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"送货方式:",prop:"delivery_way"}},[a("div",{staticClass:"acea-row"},[a("el-checkbox-group",{model:{value:t.formValidate.delivery_way,callback:function(e){t.$set(t.formValidate,"delivery_way",e)},expression:"formValidate.delivery_way"}},t._l(t.deliveryList,(function(e){return a("el-checkbox",{key:e.value,attrs:{label:e.value}},[t._v("\n "+t._s(e.name)+"\n ")])})),1)],1)]),t._v(" "),2==t.formValidate.delivery_way.length||1==t.formValidate.delivery_way.length&&2==t.formValidate.delivery_way[0]?a("el-form-item",{attrs:{label:"是否包邮:"}},[a("el-radio-group",{model:{value:t.formValidate.delivery_free,callback:function(e){t.$set(t.formValidate,"delivery_free",e)},expression:"formValidate.delivery_free"}},[a("el-radio",{staticClass:"radio",attrs:{label:0}},[t._v("否")]),t._v(" "),a("el-radio",{attrs:{label:1}},[t._v("是")])],1)],1):t._e(),t._v(" "),0==t.formValidate.delivery_free&&(2==t.formValidate.delivery_way.length||1==t.formValidate.delivery_way.length&&2==t.formValidate.delivery_way[0])?a("el-form-item",t._b({attrs:{label:"运费模板:",prop:"temp_id"}},"el-form-item",t.grid,!1),[a("el-select",{attrs:{clearable:""},model:{value:t.formValidate.temp_id,callback:function(e){t.$set(t.formValidate,"temp_id",e)},expression:"formValidate.temp_id"}},t._l(t.shippingList,(function(t){return a("el-option",{key:t.shipping_template_id,attrs:{label:t.name,value:t.shipping_template_id}})})),1)],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"商品标签:"}},[a("el-select",{staticClass:"selWidthd",attrs:{multiple:"",placeholder:"请选择"},model:{value:t.formValidate.mer_labels,callback:function(e){t.$set(t.formValidate,"mer_labels",e)},expression:"formValidate.mer_labels"}},t._l(t.labelList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"平台保障服务:"}},[a("div",{staticClass:"acea-row"},[a("el-select",{staticClass:"selWidthd mr20",attrs:{placeholder:"请选择",clearable:""},model:{value:t.formValidate.guarantee_template_id,callback:function(e){t.$set(t.formValidate,"guarantee_template_id",e)},expression:"formValidate.guarantee_template_id"}},t._l(t.guaranteeList,(function(t){return a("el-option",{key:t.guarantee_template_id,attrs:{label:t.template_name,value:t.guarantee_template_id}})})),1)],1)]),t._v(" "),a("el-form-item",{attrs:{label:"商品图:"}},[a("div",{staticClass:"pictrueBox"},[t.formValidate.image?a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.formValidate.image,expression:"formValidate.image"}]})]):t._e()])]),t._v(" "),a("el-form-item",{attrs:{label:"商品轮播图:"}},[a("div",{staticClass:"acea-row"},t._l(t.formValidate.slider_image,(function(e,i){return a("div",{key:i,staticClass:"lunBox mr15",attrs:{draggable:"true"},on:{dragstart:function(a){return t.handleDragStart(a,e)},dragover:function(a){return a.preventDefault(),t.handleDragOver(a,e)},dragenter:function(a){return t.handleDragEnter(a,e)},dragend:function(a){return t.handleDragEnd(a,e)}}},[a("div",{staticClass:"pictrue"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e,expression:"item"}]})]),t._v(" "),a("div",{staticClass:"buttonGroup"},[a("el-button",{staticClass:"small-btn",nativeOn:{click:function(a){return t.checked(e,i)}}},[t._v("主图")]),t._v(" "),a("el-button",{staticClass:"small-btn",nativeOn:{click:function(e){return t.handleRemove(i)}}},[t._v("移除")])],1)])})),0)]),t._v(" "),1===t.formValidate.spec_type&&t.ManyAttrValue.length>1?a("el-form-item",{staticClass:"labeltop",attrs:{label:"批量设置:"}},[a("el-table",{attrs:{data:t.oneFormBatch}},[a("el-table-column",{attrs:{label:"图片","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"acea-row row-middle row-center-wrapper",on:{click:function(e){return t.modalPicTap("1","dan","pi")}}},[t.oneFormBatch[0].image?a("div",{staticClass:"pictrue pictrueTab"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.oneFormBatch[0].image,expression:"oneFormBatch[0].image"}]})]):a("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,3503723231)}),t._v(" "),a("el-table-column",{attrs:{label:"售价","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0"},model:{value:t.oneFormBatch[0].price,callback:function(e){t.$set(t.oneFormBatch[0],"price",e)},expression:"oneFormBatch[0].price"}})]}}],null,!1,2340413431)}),t._v(" "),a("el-table-column",{attrs:{label:"成本价","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0"},model:{value:t.oneFormBatch[0].cost,callback:function(e){t.$set(t.oneFormBatch[0],"cost",e)},expression:"oneFormBatch[0].cost"}})]}}],null,!1,3894142481)}),t._v(" "),a("el-table-column",{attrs:{label:"市场价","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0"},model:{value:t.oneFormBatch[0].ot_price,callback:function(e){t.$set(t.oneFormBatch[0],"ot_price",e)},expression:"oneFormBatch[0].ot_price"}})]}}],null,!1,3434216275)}),t._v(" "),a("el-table-column",{attrs:{label:"库存","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",model:{value:t.oneFormBatch[0].stock,callback:function(e){t.$set(t.oneFormBatch[0],"stock",t._n(e))},expression:"oneFormBatch[0].stock"}})]}}],null,!1,86708727)}),t._v(" "),a("el-table-column",{attrs:{label:"商品编号","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:t.oneFormBatch[0].bar_code,callback:function(e){t.$set(t.oneFormBatch[0],"bar_code",e)},expression:"oneFormBatch[0].bar_code"}})]}}],null,!1,989028316)}),t._v(" "),a("el-table-column",{attrs:{label:"重量(KG)","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0"},model:{value:t.oneFormBatch[0].weight,callback:function(e){t.$set(t.oneFormBatch[0],"weight",e)},expression:"oneFormBatch[0].weight"}})]}}],null,!1,3785536346)}),t._v(" "),a("el-table-column",{attrs:{label:"体积(m²)","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:"0"},model:{value:t.oneFormBatch[0].volume,callback:function(e){t.$set(t.oneFormBatch[0],"volume",e)},expression:"oneFormBatch[0].volume"}})]}}],null,!1,1353389234)}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("a",{staticClass:"ela-btn",attrs:{href:"javascript: void(0);"},on:{click:t.batchAdd}},[t._v("添加")]),t._v(" "),a("a",{staticClass:"ela-btn",attrs:{href:"javascript: void(0);"},on:{click:t.batchDel}},[t._v("清空")])]}}],null,!1,2952505336)})],1)],1):t._e(),t._v(" "),0===t.formValidate.spec_type?a("el-form-item",{staticClass:"labeltop",attrs:{label:"规格列表:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.OneattrValue,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",on:{click:function(a){return t.modalPicTap("1","dan",e.$index)}}},[e.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,2217564926)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"商品编号"===t.formThead[i].title?"text":"number",min:0},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}})]}}],null,!0)})})),t._v(" "),1===t.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:0},model:{value:e.row.extension_one,callback:function(a){t.$set(e.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,2286159726)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:0},model:{value:e.row.extension_two,callback:function(a){t.$set(e.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,4057305350)})]:t._e()],2)],1):t._e(),t._v(" "),1===t.formValidate.spec_type?a("el-form-item",{staticClass:"labeltop",attrs:{label:"规格列表:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.ManyAttrValue,border:"",size:"mini"}},[t.manyTabDate?t._l(t.manyTabDate,(function(e,i){return a("el-table-column",{key:i,attrs:{align:"center",label:t.manyTabTit[i].title,"min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[i])}})]}}],null,!0)})})):t._e(),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"},on:{click:function(a){return t.modalPicTap("2","duo",e.$index)}}},[e.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:e.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,477089504)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"商品编号"===t.formThead[i].title?"text":"number"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}})]}}],null,!0)})})),t._v(" "),1===t.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:0},model:{value:e.row.extension_one,callback:function(a){t.$set(e.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,2286159726)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticClass:"priceBox",attrs:{type:"number",min:0},model:{value:e.row.extension_two,callback:function(a){t.$set(e.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,4057305350)})]:t._e()],2)],1):t._e(),t._v(" "),a("el-form-item",{attrs:{label:"商品详情:"}},[a("ueditorFrom",{attrs:{content:t.formValidate.content},model:{value:t.formValidate.content,callback:function(e){t.$set(t.formValidate,"content",e)},expression:"formValidate.content"}})],1),t._v(" "),a("el-form-item",[a("el-button",{staticClass:"submission",attrs:{loading:t.loading1,type:"primary"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1):t._e()])],1)],1):t._e(),t._v(" "),a("copy-record",{ref:"copyRecord"})],1)},n=[],c=a("75fc"),d=a("bd86"),u=(a("28a5"),a("8615"),a("2d63")),m=a("ef0d"),p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.showRecord?a("el-dialog",{attrs:{title:"复制记录",visible:t.showRecord,width:"900px"},on:{"update:visible":function(e){t.showRecord=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"ID",prop:"mer_id","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{label:"使用次数",prop:"num","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{label:"复制商品平台名称",prop:"type","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{label:"剩余次数",prop:"number","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品复制链接",prop:"info","min-width":"180"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作时间",prop:"create_time","min-width":"120"}})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)]):t._e()},_=[],v={name:"CopyRecord",data:function(){return{showRecord:!1,loading:!1,tableData:{data:[],total:0},tableFrom:{page:1,limit:10}}},methods:{getRecord:function(){var t=this;this.showRecord=!0,this.loading=!0,Object(s["gb"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.loading=!1})).catch((function(e){t.$message.error(e.message),t.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getRecord()},pageChangeLog:function(t){this.tableFromLog.page=t,this.getRecord()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getRecord()}}},h=v,f=(a("b83b"),a("2877")),b=Object(f["a"])(h,p,_,!1,null,"0d59e33c",null),g=b.exports,y=a("bbcc"),w=a("5f87"),C={store_name:"",cate_id:"",temp_id:"",type:0,guarantee_template_id:"",keyword:"",unit_name:"",store_info:"",image:"",slider_image:[],content:"",ficti:0,once_count:0,give_integral:0,is_show:0,price:0,cost:0,ot_price:0,stock:0,soure_link:"",attrs:[],items:[],delivery_way:[],mer_labels:[],delivery_free:0,spec_type:0,is_copoy:1,attrValue:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]},k={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量KG"},volume:{title:"体积(m³)"}},x={name:"CopyTaoBao",props:{deliveryList:{type:Array,default:[]},deliveryType:{type:Array,default:[]}},components:{ueditorFrom:m["a"],copyRecord:g},data:function(){var t=y["a"].https+"/upload/image/0/file?ueditor=1&token="+Object(w["a"])();return{roterPre:r["roterPre"],modals:!1,loading:!1,loading1:!1,BaseURL:y["a"].https||"http://localhost:8080",OneattrValue:[Object.assign({},C.attrValue[0])],ManyAttrValue:[Object.assign({},C.attrValue[0])],columnsBatch:[{title:"图片",slot:"image",align:"center",minWidth:80},{title:"售价",slot:"price",align:"center",minWidth:95},{title:"成本价",slot:"cost",align:"center",minWidth:95},{title:"市场价",slot:"ot_price",align:"center",minWidth:95},{title:"库存",slot:"stock",align:"center",minWidth:95},{title:"商品编号",slot:"bar_code",align:"center",minWidth:120},{title:"重量KG",slot:"weight",align:"center",minWidth:95},{title:"体积(m³)",slot:"volume",align:"center",minWidth:95}],manyTabDate:{},count:0,modal_loading:!1,images:"",soure_link:"",modalPic:!1,isChoice:"",gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},columns:[],virtual:[{tit:"普通商品",id:0,tit2:"物流发货"},{tit:"虚拟商品",id:1,tit2:"虚拟发货"}],categoryList:[],merCateList:[],BrandList:[],propsMer:{emitPath:!1,multiple:!0},tableFrom:{mer_cate_id:"",cate_id:"",keyword:"",type:"1",is_gift_bag:""},ruleInline:{cate_id:[{required:!0,message:"请选择商品分类",trigger:"change"}],mer_cate_id:[{required:!0,message:"请选择商户分类",trigger:"change",type:"array",min:"1"}],temp_id:[{required:!0,message:"请选择运费模板",trigger:"change",type:"number"}],brand_id:[{required:!0,message:"请选择品牌",trigger:"change"}],store_info:[{required:!0,message:"请输入商品简介",trigger:"blur"}],delivery_way:[{required:!0,message:"请选择送货方式",trigger:"change"}]},grid:{xl:8,lg:8,md:12,sm:24,xs:24},grid2:{xl:12,lg:12,md:12,sm:24,xs:24},myConfig:{autoHeightEnabled:!1,initialFrameHeight:500,initialFrameWidth:"100%",UEDITOR_HOME_URL:"/UEditor/",serverUrl:t,imageUrl:t,imageFieldName:"file",imageUrlPrefix:"",imageActionName:"upfile",imageMaxSize:2048e3,imageAllowFiles:[".png",".jpg",".jpeg",".gif",".bmp"]},formThead:Object.assign({},k),formValidate:Object.assign({},C),items:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}],shippingList:[],guaranteeList:[],isData:!1,artFrom:{type:"taobao",url:""},tableIndex:0,labelPosition:"right",labelWidth:"120",isMore:"",taoBaoStatus:{},attrInfo:{},labelList:[],oneFormBatch:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]}},computed:{attrValue:function(){var t=Object.assign({},C.attrValue[0]);return delete t.image,t}},watch:{},created:function(){this.goodsCategory(),this.getCategorySelect(),this.getBrandListApi()},mounted:function(){this.productGetTemplate(),this.getGuaranteeList(),this.getCopyCount(),this.getLabelLst()},methods:{getLabelLst:function(){var t=this;Object(s["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCopyCount:function(){var t=this;Object(s["fb"])().then((function(e){t.count=e.data.count}))},openRecords:function(){this.$refs.copyRecord.getRecord()},batchDel:function(){this.oneFormBatch=[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]},batchAdd:function(){var t,e=Object(u["a"])(this.ManyAttrValue);try{for(e.s();!(t=e.n()).done;){var a=t.value;this.$set(a,"image",this.oneFormBatch[0].image),this.$set(a,"price",this.oneFormBatch[0].price),this.$set(a,"cost",this.oneFormBatch[0].cost),this.$set(a,"ot_price",this.oneFormBatch[0].ot_price),this.$set(a,"stock",this.oneFormBatch[0].stock),this.$set(a,"bar_code",this.oneFormBatch[0].bar_code),this.$set(a,"weight",this.oneFormBatch[0].weight),this.$set(a,"volume",this.oneFormBatch[0].volume),this.$set(a,"extension_one",this.oneFormBatch[0].extension_one),this.$set(a,"extension_two",this.oneFormBatch[0].extension_two)}}catch(i){e.e(i)}finally{e.f()}},delAttrTable:function(t){this.ManyAttrValue.splice(t,1)},productGetTemplate:function(){var t=this;Object(s["xb"])().then((function(e){t.shippingList=e.data}))},getGuaranteeList:function(){var t=this;Object(s["G"])().then((function(e){t.guaranteeList=e.data}))},handleRemove:function(t){this.formValidate.slider_image.splice(t,1)},checked:function(t,e){this.formValidate.image=t},goodsCategory:function(){var t=this;Object(s["t"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategorySelect:function(){var t=this;Object(s["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getBrandListApi:function(){var t=this;Object(s["s"])().then((function(e){t.BrandList=e.data})).catch((function(e){t.$message.error(e.message)}))},virtualbtn:function(t,e){this.formValidate.type=t,this.productCon()},watCh:function(t){var e=this,a={},i={};this.formValidate.attr.forEach((function(t,e){a["value"+e]={title:t.value},i["value"+e]=""})),this.ManyAttrValue=this.attrFormat(t),console.log(this.ManyAttrValue),this.ManyAttrValue.forEach((function(t,a){var i=Object.values(t.detail).sort().join("/");e.attrInfo[i]&&(e.ManyAttrValue[a]=e.attrInfo[i]),t.image=e.formValidate.image})),this.attrInfo={},this.ManyAttrValue.forEach((function(t){"undefined"!==t.detail&&null!==t.detail&&(e.attrInfo[Object.values(t.detail).sort().join("/")]=t)})),this.manyTabTit=a,this.manyTabDate=i,this.formThead=Object.assign({},this.formThead,a)},attrFormat:function(t){var e=[],a=[];return i(t);function i(t){if(t.length>1)t.forEach((function(i,l){0===l&&(e=t[l]["detail"]);var s=[];e.forEach((function(e){t[l+1]&&t[l+1]["detail"]&&t[l+1]["detail"].forEach((function(i){var r=(0!==l?"":t[l]["value"]+"_$_")+e+"-$-"+t[l+1]["value"]+"_$_"+i;if(s.push(r),l===t.length-2){var o={image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0,brokerage:0,brokerage_two:0};r.split("-$-").forEach((function(t,e){var a=t.split("_$_");o["detail"]||(o["detail"]={}),o["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(o.detail).forEach((function(t,e){o["value"+e]=t})),a.push(o)}}))})),e=s.length?s:[]}));else{var i=[];t.forEach((function(t,e){t["detail"].forEach((function(e,l){i[l]=t["value"]+"_"+e,a[l]={image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,detail:Object(d["a"])({},t["value"],e)},Object.values(a[l].detail).forEach((function(t,e){a[l]["value"+e]=t}))}))})),e.push(i.join("$&"))}return console.log(a),a}},add:function(){var t=this;if(this.soure_link){var e=/(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/;if(!e.test(this.soure_link))return this.$message.warning("请输入以http开头的地址");this.artFrom.url=this.soure_link,this.loading=!0,Object(s["v"])(this.artFrom).then((function(e){var a=e.data.info;t.columns=a.info&&a.info.header||t.columnsBatch,t.taoBaoStatus=a.info?a.info:"",t.formValidate={content:a.description||"",is_show:0,type:0,soure_link:t.soure_link,attr:a.info&&a.info.attr||[],delivery_way:a.delivery_way&&a.delivery_way.length?a.delivery_way.map(String):t.deliveryType,delivery_free:a.delivery_free?a.delivery_free:0,attrValue:a.info&&a.info.value||[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}],spec_type:a.spec_type,image:a.image,slider_image:a.slider_image,store_info:a.store_info,store_name:a.store_name,unit_name:a.unit_name},0===t.formValidate.spec_type?t.OneattrValue=a.info&&a.info.value||[{image:t.formValidate.image,price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]:(t.ManyAttrValue=a.info&&a.info.value||[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}],t.watCh(t.formValidate.attr)),t.formValidate.image&&(t.oneFormBatch[0].image=t.formValidate.image),t.isData=!0,t.loading=!1})).catch((function(e){t.$message.error(e.message),t.loading=!1}))}else this.$message.warning("请输入链接地址!")},handleSubmit:function(t){var e=this;this.$refs[t].validate((function(t){t?(e.modal_loading=!0,e.formValidate.cate_id=e.formValidate.cate_id instanceof Array?e.formValidate.cate_id.pop():e.formValidate.cate_id,e.formValidate.once_count=e.formValidate.once_count||0,1===e.formValidate.spec_type?e.formValidate.attrValue=e.ManyAttrValue:(e.formValidate.attrValue=e.OneattrValue,e.formValidate.attr=[]),e.formValidate.is_copoy=1,e.loading1=!0,Object(s["eb"])(e.formValidate).then((function(t){e.$message.success("商品默认为不上架状态请手动上架商品!"),e.loading1=!1,setTimeout((function(){e.modal_loading=!1}),500),setTimeout((function(){e.modals=!1}),600),e.$emit("getSuccess")})).catch((function(t){e.modal_loading=!1,e.$message.error(t.message),e.loading1=!1}))):e.formValidate.cate_id||e.$message.warning("请填写商品分类!")}))},modalPicTap:function(t,e,a){this.tableIndex=a;var i=this;this.$modalUpload((function(e){console.log(i.formValidate.attr[i.tableIndex]),"1"===t&&("pi"===a?i.oneFormBatch[0].image=e[0]:i.OneattrValue[0].image=e[0]),"2"===t&&(i.ManyAttrValue[i.tableIndex].image=e[0]),i.modalPic=!1}),t)},getPic:function(t){this.callback(t),this.formValidate.attr[this.tableIndex].pic=t.att_dir,this.modalPic=!1},handleDragStart:function(t,e){this.dragging=e},handleDragEnd:function(t,e){this.dragging=null},handleDragOver:function(t){t.dataTransfer.dropEffect="move"},handleDragEnter:function(t,e){if(t.dataTransfer.effectAllowed="move",e!==this.dragging){var a=Object(c["a"])(this.formValidate.slider_image),i=a.indexOf(this.dragging),l=a.indexOf(e);a.splice.apply(a,[l,0].concat(Object(c["a"])(a.splice(i,1)))),this.formValidate.slider_image=a}},addCustomDialog:function(t){window.UE.registerUI("test-dialog",(function(t,e){var a=new window.UE.ui.Dialog({iframeUrl:"/admin/widget.images/index.html?fodder=dialog",editor:t,name:e,title:"上传图片",cssRules:"width:1200px;height:500px;padding:20px;"});this.dialog=a;var i=new window.UE.ui.Button({name:"dialog-button",title:"上传图片",cssRules:"background-image: url(../../../assets/images/icons.png);background-position: -726px -77px;",onclick:function(){a.render(),a.open()}});return i}))}}},D=x,F=(a("9e70"),Object(f["a"])(D,o,n,!1,null,"eb973472",null)),V=F.exports,B=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"Box"},[t.modals?a("el-dialog",{attrs:{visible:t.modals,width:"80%",title:"免审核商品信息编辑","custom-class":"dialog-scustom"},on:{"update:visible":function(e){t.modals=e}}},[a("el-form",{ref:"formValidate",staticClass:"formValidate mt20",attrs:{model:t.formValidate,rules:t.ruleInline,"label-width":"120px","label-position":"right"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("div",[a("div",[a("el-form-item",{attrs:{label:"商户商品分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:t.merCateList,props:{multiple:!0,checkStrictly:!0,emitPath:!1},clearable:""},model:{value:t.formValidate.mer_cate_id,callback:function(e){t.$set(t.formValidate,"mer_cate_id",e)},expression:"formValidate.mer_cate_id"}})],1),t._v(" "),1===t.formValidate.spec_type&&t.ManyAttrValue.length>1?a("el-form-item",{staticClass:"labeltop",attrs:{label:"批量设置:"}},[a("el-table",{attrs:{data:t.oneFormBatch,size:"mini"}},[a("el-table-column",{attrs:{label:"图片","min-width":"150",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"acea-row row-middle row-center-wrapper"},[t.oneFormBatch[0].image?a("div",{staticClass:"pictrue pictrueTab"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.oneFormBatch[0].image,expression:"oneFormBatch[0].image"}]})]):a("div",{staticClass:"upLoad pictrueTab acea-row row-center-wrapper"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,2622395115)}),t._v(" "),a("el-table-column",{attrs:{label:"售价","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.oneFormBatch[0].price,callback:function(e){t.$set(t.oneFormBatch[0],"price",e)},expression:"oneFormBatch[0].price"}})]}}],null,!1,92719458)}),t._v(" "),a("el-table-column",{attrs:{label:"成本价","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.oneFormBatch[0].cost,callback:function(e){t.$set(t.oneFormBatch[0],"cost",e)},expression:"oneFormBatch[0].cost"}})]}}],null,!1,2696007940)}),t._v(" "),a("el-table-column",{attrs:{label:"市场价","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.oneFormBatch[0].ot_price,callback:function(e){t.$set(t.oneFormBatch[0],"ot_price",e)},expression:"oneFormBatch[0].ot_price"}})]}}],null,!1,912438278)}),t._v(" "),a("el-table-column",{attrs:{label:"库存","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.oneFormBatch[0].stock,callback:function(e){t.$set(t.oneFormBatch[0],"stock",e)},expression:"oneFormBatch[0].stock"}})]}}],null,!1,429960335)}),t._v(" "),a("el-table-column",{attrs:{label:"商品编号","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{model:{value:t.oneFormBatch[0].bar_code,callback:function(e){t.$set(t.oneFormBatch[0],"bar_code",e)},expression:"oneFormBatch[0].bar_code"}})]}}],null,!1,989028316)}),t._v(" "),a("el-table-column",{attrs:{label:"重量(KG)","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.oneFormBatch[0].weight,callback:function(e){t.$set(t.oneFormBatch[0],"weight",e)},expression:"oneFormBatch[0].weight"}})]}}],null,!1,976765487)}),t._v(" "),a("el-table-column",{attrs:{label:"体积(m²)","min-width":"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:t.oneFormBatch[0].volume,callback:function(e){t.$set(t.oneFormBatch[0],"volume",e)},expression:"oneFormBatch[0].volume"}})]}}],null,!1,1463276615)}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("a",{staticClass:"ela-btn",attrs:{href:"javascript: void(0);"},on:{click:t.batchAdd}},[t._v("添加")]),t._v(" "),a("a",{staticClass:"ela-btn",attrs:{href:"javascript: void(0);"},on:{click:t.batchDel}},[t._v("清空")])]}}],null,!1,2952505336)})],1)],1):t._e(),t._v(" "),0===t.formValidate.spec_type?a("el-form-item",{staticClass:"labeltop",attrs:{label:"规格列表:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.OneattrValue,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"upLoadPicBox"},[t.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:t.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,2631442157)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return["商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}})]}}],null,!0)})})),t._v(" "),1===t.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:e.row.extension_one,callback:function(a){t.$set(e.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,1308693019)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:e.row.extension_two,callback:function(a){t.$set(e.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,899977843)})]:t._e()],2)],1):t._e(),t._v(" "),1===t.formValidate.spec_type?a("el-form-item",{staticClass:"labeltop",attrs:{label:"规格列表:"}},[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.ManyAttrValue,border:"",size:"mini"}},[t.manyTabDate?t._l(t.manyTabDate,(function(e,i){return a("el-table-column",{key:i,attrs:{align:"center",label:t.manyTabTit[i].title,"min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[i])}})]}}],null,!0)})})):t._e(),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"}},[t.row.image?a("div",{staticClass:"pictrue tabPic"},[a("img",{attrs:{src:t.row.image}})]):a("div",{staticClass:"upLoad tabPic"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]}}],null,!1,324277957)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return["商品编号"===t.formThead[i].title?a("el-input",{staticClass:"priceBox",attrs:{type:"text"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}}):a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:e.row[i],callback:function(a){t.$set(e.row,i,a)},expression:"scope.row[iii]"}})]}}],null,!0)})})),t._v(" "),1===t.formValidate.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:e.row.extension_one,callback:function(a){t.$set(e.row,"extension_one",a)},expression:"scope.row.extension_one"}})]}}],null,!1,1308693019)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{staticClass:"priceBox",attrs:{min:0,"controls-position":"right"},model:{value:e.row.extension_two,callback:function(a){t.$set(e.row,"extension_two",a)},expression:"scope.row.extension_two"}})]}}],null,!1,899977843)})]:t._e()],2)],1):t._e(),t._v(" "),a("el-form-item",[a("el-button",{staticClass:"submission",attrs:{loading:t.loading1,type:"primary"},on:{click:function(e){return t.handleSubmit("formValidate")}}},[t._v("提交")])],1)],1)])])],1):t._e()],1)},L=[],A={store_name:"",cate_id:"",temp_id:"",type:0,guarantee_template_id:"",keyword:"",unit_name:"",store_info:"",image:"",slider_image:[],content:"",ficti:0,once_count:0,give_integral:0,is_show:0,price:0,cost:0,ot_price:0,stock:0,attrs:[],items:[],delivery_way:[],mer_labels:[],delivery_free:0,spec_type:0,is_copoy:1,attrValue:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]},$={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量KG"},volume:{title:"体积(m³)"}},S={name:"editAttr",components:{},data:function(){return{product_id:"",roterPre:r["roterPre"],modals:!1,loading:!1,loading1:!1,OneattrValue:[Object.assign({},A.attrValue[0])],ManyAttrValue:[Object.assign({},A.attrValue[0])],manyTabDate:{},count:0,modal_loading:!1,images:"",modalPic:!1,isChoice:"",columns:[],merCateList:[],ruleInline:{mer_cate_id:[{required:!0,message:"请选择商户分类",trigger:"change",type:"array",min:"1"}]},formThead:Object.assign({},$),formValidate:Object.assign({},A),items:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}],tableIndex:0,attrInfo:{},oneFormBatch:[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]}},computed:{attrValue:function(){var t=Object.assign({},A.attrValue[0]);return delete t.image,t}},watch:{"formValidate.attr":{handler:function(t){1===this.formValidate.spec_type&&this.watCh(t)},immediate:!1,deep:!0}},created:function(){this.getCategorySelect()},mounted:function(){},methods:{batchDel:function(){this.oneFormBatch=[{image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0}]},batchAdd:function(){var t,e=Object(u["a"])(this.ManyAttrValue);try{for(e.s();!(t=e.n()).done;){var a=t.value;this.$set(a,"image",this.oneFormBatch[0].image),this.$set(a,"price",this.oneFormBatch[0].price),this.$set(a,"cost",this.oneFormBatch[0].cost),this.$set(a,"ot_price",this.oneFormBatch[0].ot_price),this.$set(a,"stock",this.oneFormBatch[0].stock),this.$set(a,"bar_code",this.oneFormBatch[0].bar_code),this.$set(a,"weight",this.oneFormBatch[0].weight),this.$set(a,"volume",this.oneFormBatch[0].volume),this.$set(a,"extension_one",this.oneFormBatch[0].extension_one),this.$set(a,"extension_two",this.oneFormBatch[0].extension_two)}}catch(i){e.e(i)}finally{e.f()}},getCategorySelect:function(){var t=this;Object(s["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},watCh:function(t){var e=this,a={},i={};this.formValidate.attr.forEach((function(t,e){a["value"+e]={title:t.value},i["value"+e]=""})),this.ManyAttrValue=this.attrFormat(t),console.log(this.ManyAttrValue),this.ManyAttrValue.forEach((function(t,a){var i=Object.values(t.detail).sort().join("/");e.attrInfo[i]&&(e.ManyAttrValue[a]=e.attrInfo[i]),t.image=e.formValidate.image})),this.attrInfo={},this.ManyAttrValue.forEach((function(t){"undefined"!==t.detail&&null!==t.detail&&(e.attrInfo[Object.values(t.detail).sort().join("/")]=t)})),this.manyTabTit=a,this.manyTabDate=i,this.formThead=Object.assign({},this.formThead,a)},attrFormat:function(t){var e=[],a=[];return i(t);function i(t){if(t.length>1)t.forEach((function(i,l){0===l&&(e=t[l]["detail"]);var s=[];e.forEach((function(e){t[l+1]&&t[l+1]["detail"]&&t[l+1]["detail"].forEach((function(i){var r=(0!==l?"":t[l]["value"]+"_$_")+e+"-$-"+t[l+1]["value"]+"_$_"+i;if(s.push(r),l===t.length-2){var o={image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0,brokerage:0,brokerage_two:0};r.split("-$-").forEach((function(t,e){var a=t.split("_$_");o["detail"]||(o["detail"]={}),o["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(o.detail).forEach((function(t,e){o["value"+e]=t})),a.push(o)}}))})),e=s.length?s:[]}));else{var i=[];t.forEach((function(t,e){t["detail"].forEach((function(e,l){i[l]=t["value"]+"_"+e,a[l]={image:"",price:0,cost:0,ot_price:0,stock:0,bar_code:"",weight:0,volume:0,brokerage:0,brokerage_two:0,detail:Object(d["a"])({},t["value"],e)},Object.values(a[l].detail).forEach((function(t,e){a[l]["value"+e]=t}))}))})),e.push(i.join("$&"))}return a}},getAttrDetail:function(t){var e=this;this.product_id=t,this.loading=!0,this.modals=!0,Object(s["jb"])(t).then((function(t){var a=t.data;e.formValidate={attr:a.attr||[],attrValue:a.attrValue,mer_cate_id:a.mer_cate_id,spec_type:a.spec_type},0===e.formValidate.spec_type?e.OneattrValue=a.attrValue:(e.ManyAttrValue=a.attrValue,e.ManyAttrValue.forEach((function(t){"undefined"!==t.detail&&null!==t.detail&&(e.attrInfo[Object.values(t.detail).sort().join("/")]=t)})),e.$watch("formValidate.attr",e.watCh)),e.loading=!1})).catch((function(t){e.$message.error(t.message),e.loading=!1}))},handleSubmit:function(t){var e=this;e.$refs[t].validate((function(t){t?(1===e.formValidate.spec_type?e.formValidate.attrValue=e.ManyAttrValue:(e.formValidate.attrValue=e.OneattrValue,e.formValidate.attr=[]),e.loading1=!0,Object(s["y"])(e.product_id,e.formValidate).then((function(t){e.loading1=!1,e.$message.success(t.message),setTimeout((function(){e.modals=!1}),500)})).catch((function(t){e.$message.error(t.message),e.loading1=!1}))):e.formValidate.mer_cate_id||e.$message.warning("请选择商户商品分类!")}))}}},O=S,T=(a("e0cb"),Object(f["a"])(O,B,L,!1,null,"38d8eebe",null)),j=T.exports,P=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-drawer",{attrs:{"with-header":!1,visible:t.drawer,size:"1100px",direction:t.direction,"before-close":t.handleClose},on:{"update:visible":function(e){t.drawer=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[a("div",{staticClass:"head"},[a("div",{staticClass:"full"},[a("img",{staticClass:"order_icon",attrs:{src:t.orderImg,alt:""}}),t._v(" "),a("div",{staticClass:"text"},[a("div",{staticClass:"title"},[t._v(t._s(t.productData.store_name))]),t._v(" "),a("div",[a("span",{staticClass:"mr20"},[t._v("商品ID"+t._s(t.productData.product_id))])])])]),t._v(" "),a("ul",{staticClass:"list"},[a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("类型")]),t._v(" "),a("div",[t._v(t._s(0==t.productData.type?"普通商品":1==t.productData.type?"虚拟商品":"卡密商品"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("状态")]),t._v(" "),a("div",[t._v(t._s(1==t.productData.status?"上架显示":"下架"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("销量")]),t._v(" "),a("div",[t._v(t._s(t.productData.sales))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("库存")]),t._v(" "),a("div",[t._v(t._s(t.productData.stock))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"title"},[t._v("创建时间")]),t._v(" "),a("div",[t._v(t._s(t.productData.create_time))])])])]),t._v(" "),a("el-tabs",{attrs:{type:"border-card"},on:{"tab-click":t.tabClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"基本信息",name:"basic"}},[a("div",{staticClass:"section"},[a("ul",{staticClass:"list"},[a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("封面图:")]),t._v(" "),a("img",{staticStyle:{width:"40px",height:"40px","margin-right":"12px"},attrs:{src:t.productData.image}})]),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("轮播图:")]),t._v(" "),t._l(t.productData.slider_image,(function(t,e){return a("img",{key:e,staticStyle:{width:"40px",height:"40px","margin-right":"12px"},attrs:{src:t}})}))],2)]),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("商品简介:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.store_info||"-"))])]),t._v(" "),a("ul",{staticClass:"list"},[a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("平台分类:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.storeCategory&&t.productData.storeCategory.cate_name||"-"))])]),t._v(" "),t.productData.merCateId&&t.productData.merCateId.length>0?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("商户分类:")]),t._v(" "),t.productData.merCateId.length?a("div",{staticClass:"value"},t._l(t.productData.merCateId,(function(e){return a("span",{key:e.mer_cate_id},[t._v(t._s(e.category&&e.category.cate_name)+"    ")])})),0):a("div",{staticClass:"value"},[a("span",[t._v("-")])])]):t._e(),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("商品标签:")]),t._v(" "),t.productData.mer_labels&&t.productData.mer_labels_data.length||t.productData.sys_labels_data&&t.productData.sys_labels_data.length?a("div",{staticClass:"value"},[t.productData.mer_labels_data&&t.productData.mer_labels_data.length?t._l(t.productData.mer_labels_data,(function(e,i){return a("span",{key:i,staticClass:"value-item"},[t._v(" "+t._s(e)+" ")])})):t._e(),t._v(" "),t.productData.sys_labels_data&&t.productData.sys_labels_data.length?t._l(t.productData.sys_labels_data,(function(e,i){return a("span",{key:i,staticClass:"value-item"},[t._v(" "+t._s(e)+" ")])})):t._e()],2):a("div",{staticClass:"value"},[a("span",[t._v("-")])])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("品牌选择:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.brand&&t.productData.brand.brand_name||"其它"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("单位:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.unit_name||"-"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("关键字:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.keyword||"-"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("配送方式:")]),t._v(" "),0==t.productData.type?[2==t.productData.delivery_way.length?a("div",{staticClass:"value"},[t._v("快递/到店自提")]):1==t.productData.delivery_way.length?a("div",[t._v(t._s(1==t.productData.delivery_way[0]?"到店自提":"快递"))]):t._e()]:[1==t.productData.type?a("div",{staticClass:"value"},[t._v("虚拟发货")]):2==t.productData.type?a("div",{staticClass:"value"},[t._v("卡密发货")]):t._e()]],2)]),t._v(" "),t.productData.video_link?a("ul",{staticClass:"list"},[a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("主图视频:")]),t._v(" "),a("video",{staticStyle:{width:"300px",height:"150px","border-radius":"10px"},attrs:{src:t.productData.video_link,controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")])])]):t._e()])]),t._v(" "),a("el-tab-pane",{attrs:{label:"规格与价格",name:"goods"}},[a("div",{staticClass:"section"},[a("ul",{staticClass:"list"},[a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("佣金设置:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(1==t.productData.extension_type?"单独设置":"默认设置"))])]),t._v(" "),t.productData.mer_svip_status?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("付费会员价:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(0==t.productData.svip_price_type?"不设置会员价":1==t.productData.svip_price_type?"默认设置会员价":"自定义设置会员价"))])]):t._e(),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("规格:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(1==t.productData.spec_type?"多规格":"单规格"))])])])]),t._v(" "),a("div",{staticClass:"section",staticStyle:{"margin-top":"50px"}},[a("div",{staticClass:"title"},[t._v("规格列表:")]),t._v(" "),a("div",{staticClass:"list"},[0===t.productData.spec_type?[a("el-table",{staticClass:"tabNumWidth ones",attrs:{data:t.OneattrValue,border:"",size:"mini"}},[a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"pictrue tabPic"},[a("img",{staticStyle:{width:"36px",height:"36px","border-radius":"4px"},attrs:{src:t.row.image}})])]}}],null,!1,2965278653)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[i])}})]}}],null,!0)})})),t._v(" "),1===t.productData.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row.extension_one)}})]}}],null,!1,102250766)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row.extension_two)}})]}}],null,!1,4284057702)})]:t._e()],2)]:t._e(),t._v(" "),1===t.productData.spec_type?[a("el-table",{staticClass:"tabNumWidth ones",attrs:{data:t.ManyAttrValue,border:"",size:"mini"}},[t.manyTabDate?t._l(t.manyTabDate,(function(e,i){return a("el-table-column",{key:i,attrs:{align:"center",label:t.manyTabTit[i].title,"min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[i])}})]}}],null,!0)})})):t._e(),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"图片","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"pictrue tabPic"},[a("img",{staticStyle:{width:"36px",height:"36px","border-radius":"4px"},attrs:{src:t.row.image}})])]}}],null,!1,2965278653)}),t._v(" "),t._l(t.attrValue,(function(e,i){return a("el-table-column",{key:i,attrs:{label:t.formThead[i].title,align:"center","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox"},[t._v(t._s(e.row[i]))])]}}],null,!0)})})),t._v(" "),1===t.productData.extension_type?[a("el-table-column",{attrs:{align:"center",label:"一级返佣(元)","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox"},[t._v(t._s(e.row.extension_one))])]}}],null,!1,1519547738)}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"二级返佣(元)","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox"},[t._v(t._s(e.row.extension_two))])]}}],null,!1,603129202)})]:t._e()],2)]:t._e()],2)])]),t._v(" "),a("el-tab-pane",{attrs:{label:"商品详情",name:"detail"}},[a("div",{staticClass:"section"},[a("div",{staticClass:"contentPic",domProps:{innerHTML:t._s(t.productData.content)}})])]),t._v(" "),a("el-tab-pane",{attrs:{label:"营销信息",name:"marketing"}},[a("div",{staticClass:"section"},[a("ul",{staticClass:"list"},[a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("店铺推荐:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.is_good?"是":"否"))])]),t._v(" "),t.productData.is_gift_bag?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("平台推荐:")]),t._v(" "),t.productData.is_best?a("div",{staticClass:"value"},[a("span",{staticClass:"value-item"},[t._v("推荐礼包")])]):a("div",{staticClass:"value-item"},[t._v("无")])]):a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("平台推荐:")]),t._v(" "),t.productData.is_benefit||t.productData.is_new||t.productData.is_best||t.productData.is_hot?a("div",{staticClass:"value"},[t.productData.is_benefit?a("span",{staticClass:"value-item"},[t._v("促销单品")]):t._e(),t._v(" "),t.productData.is_new?a("span",{staticClass:"value-item"},[t._v("首发新品")]):t._e(),t._v(" "),t.productData.is_best?a("span",{staticClass:"value-item"},[t._v("精品推荐")]):t._e(),t._v(" "),t.productData.is_hot?a("span",{staticClass:"value-item"},[t._v("热门榜单")]):t._e()]):a("div",{staticClass:"value-item"},[t._v("无")])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("分销礼包:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.is_gift_bag?"是":"否"))])]),t._v(" "),t.productData.star?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("平台推荐星级:")]),t._v(" "),a("div",{staticClass:"value"},[a("el-rate",{attrs:{disabled:"",colors:t.colors},model:{value:t.productData.star,callback:function(e){t.$set(t.productData,"star",e)},expression:"productData.star"}})],1)]):t._e(),t._v(" "),t.configData.integral_status?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("积分抵扣比例:")]),t._v(" "),-1==t.productData.integral_rate?a("div",{staticClass:"value"},[t._v("默认设置"+t._s("("+t.configData.integral_rate+"%)"))]):t.productData.integral_rate>=0?a("div",{staticClass:"value"},[t._v("单独设置"+t._s("("+t.productData.integral_rate+"%)"))]):t._e()]):t._e(),t._v(" "),t.configData.integral_status?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("积分抵扣金额:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.integral_price_total)+"元")])]):t._e(),t._v(" "),t.productData.coupon&&t.productData.coupon.length>0?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("优惠券(赠送券)")]),t._v(" "),a("div",{staticClass:"value"},t._l(t.productData.coupon,(function(e,i){return a("span",{key:i,staticClass:"value-item"},[t._v(" "+t._s(e.title)+" ")])})),0)]):t._e(),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("收藏人数:")]),t._v(" "),a("div",{staticClass:"value"},[a("span",[t._v(" "+t._s(t.productData.care_count)+"人")])])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("已售数量:")]),t._v(" "),a("div",{staticClass:"value"},[a("span",[t._v(" "+t._s(t.productData.ficti)+" (指手动添加数量)")])])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("实际销量 ")]),t._v(" "),a("div",{staticClass:"value"},[a("span",[t._v(" "+t._s(t.productData.sales-t.productData.ficti)+" (指实际售出数量)")])])])])])]),t._v(" "),a("el-tab-pane",{attrs:{label:"其它信息",name:"others"}},[a("div",{staticClass:"section"},[a("ul",{staticClass:"list"},[a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("支持退款:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.refund_switch?"是":"否"))])]),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("最少购买件数:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(0==t.productData.once_min_count?"不限购":t.productData.once_min_count))])]),t._v(" "),0!=t.productData.pay_limit?a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("限购类型:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(1==t.productData.pay_limit?"单次限购":"长期限购")+t._s(t.productData.once_max_count+"("+t.productData.unit_name+")"))])]):t._e(),t._v(" "),t.productData.guarantee?a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("保障服务:")]),t._v(" "),a("div",{staticClass:"value",staticStyle:{width:"250px"}},[a("span",[t._v(t._s(t.productData.guarantee.template_name))]),t._v(" "),t.productData.guarantee.templateValue&&t.productData.guarantee.templateValue.length>0?a("div",{staticStyle:{display:"inline"}},[t._v("\n 【"),t._l(t.productData.guarantee.templateValue,(function(e,i){return a("span",{key:i,staticClass:"value-temp"},[t._v(t._s(e.value&&e.value.guarantee_name))])})),t._v("】\n ")],2):t._e()])]):t._e(),t._v(" "),a("li",{staticClass:"item"},[a("div",{staticClass:"item-title"},[t._v("审核拒绝原因:")]),t._v(" "),a("div",{staticClass:"value"},[t._v(t._s(t.productData.refusal||"-"))])])])]),t._v(" "),a("div",{staticClass:"section"},[a("ul",{staticStyle:{padding:"0","margin-top":"50px"}},[a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("商户商品参数:")]),t._v(" "),a("div",{staticClass:"value",staticStyle:{width:"721px"}},[a("el-table",{ref:"tableParameter",staticClass:"ones",attrs:{border:"",data:t.merParams,"row-key":"parameter_value_id",size:"small"}},[a("el-table-column",{attrs:{align:"center",label:"参数名称",width:"360"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"参数值",width:"360"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.value))])]}}])})],1)],1)]),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("平台商品参数:")]),t._v(" "),a("div",{staticClass:"value",staticStyle:{width:"721px"}},[a("el-table",{ref:"tableParameter",staticClass:"ones",attrs:{border:"",data:t.sysParams,"row-key":"parameter_value_id",size:"small"}},[a("el-table-column",{attrs:{align:"center",label:"参数名称",width:"360"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"参数值",width:"360"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.value))])]}}])})],1)],1)]),t._v(" "),a("li",{staticClass:"item item100"},[a("div",{staticClass:"item-title"},[t._v("关联系统表单:")]),t._v(" "),t.productData.mer_form_id?t.productData.mer_form_id&&0==t.formData.length?a("div",{staticClass:"value"},[t._v("表单已被删除")]):t.formData.length>0&&t.productData.mer_form_id&&"others"==t.activeName?a("div",{staticStyle:{width:"350px"}},[a("iframe",{ref:"iframe",staticClass:"iframe-box",staticStyle:{"min-height":"300px"},attrs:{src:t.formUrl,frameborder:"0"}})]):t._e():a("div",{staticClass:"value"},[t._v("关闭")])])])])]),t._v(" "),a("el-tab-pane",{attrs:{label:"商品操作记录",name:"records"}},[a("div",{staticClass:"section"},[a("el-form",{attrs:{size:"small","label-width":"80px"}},[a("div",{staticClass:"acea-row"},[a("el-form-item",{attrs:{label:"操作端:"}},[a("el-select",{staticStyle:{width:"140px","margin-right":"20px"},attrs:{placeholder:"请选择",clearable:"",filterable:""},on:{change:function(e){return t.getRecordData(t.productId)}},model:{value:t.recordForm.type,callback:function(e){t.$set(t.recordForm,"type",e)},expression:"recordForm.type"}},[a("el-option",{attrs:{label:"平台端",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"商户端",value:"2"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"操作时间:"}},[a("el-date-picker",{staticStyle:{width:"380px","margin-right":"20px"},attrs:{type:"datetimerange",placeholder:"选择日期","value-format":"yyyy/MM/dd HH:mm:ss",clearable:""},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1)],1)]),t._v(" "),a("el-table",{ref:"productRecords",staticClass:"ones",attrs:{data:t.recordData.data,"row-key":"operate_log_id",size:"small"}},[a("el-table-column",{attrs:{align:"center",label:"序号","min-width":"60",prop:"operate_log_id"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作记录","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.category_name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作端","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.type))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作角色","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.operator_role_nickname))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作人","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.operator_nickname))])]}}])}),t._v(" "),a("el-table-column",{attrs:{align:"center",label:"操作时间","min-width":"100",prop:"create_time"}})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-size":t.recordForm.limit,"current-page":t.recordForm.page,layout:"prev, pager, next, jumper",total:t.recordData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)])],1)],1)])],1)},I=[],z={image:"",slider_image:[],store_name:"",store_info:"",keyword:"",brand_id:"",cate_id:"",mer_cate_id:[],unit_name:"",sort:0,is_show:0,is_benefit:0,is_new:0,is_good:0,temp_id:"",params:[],attrValue:[{image:"",price:null,svip_price:null,cost:null,ot_price:null,stock:null,bar_code:"",weight:null,volume:null}],attr:[],selectRule:"",extension_type:0,content:"",spec_type:0},N={price:{title:"售价"},svip_price:{title:"付费会员价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量KG"},volume:{title:"体积(m³)"}},R={components:{},props:{drawer:{type:Boolean,default:!1},configData:{type:Object,default:{}}},data:function(){return{loading:!0,productId:"",direction:"rtl",activeName:"basic",productData:{},formThead:Object.assign({},N),manyTabDate:{},manyTabTit:{},OneattrValue:[Object.assign({},z.attrValue[0])],ManyAttrValue:[Object.assign({},z.attrValue[0])],svip_type:0,mer_svip_status:0,orderImg:a("a71a"),merParams:[],sysParams:[],formData:[],formUrl:"",baseURL:y["a"].httpUrl||"http://localhost:8080",timeVal:[],recordData:{data:[],total:0},recordForm:{type:"",date:"",page:1,limit:10},colors:["#99A9BF","#F7BA2A","#FF9900"]}},computed:{attrValue:function(){var t=Object.assign({},z.attrValue[0]);return 0!=this.svip_type&&0!=this.mer_svip_status||delete t.svip_price,delete t.image,t}},filters:{},methods:{handleClose:function(){this.activeName="basic",this.$emit("closeDrawer")},getInfo:function(t){var e=this;this.loading=!0,this.productId=t,Object(s["jb"])(t).then((function(a){e.loading=!1,e.productData=a.data,e.mer_svip_status=a.data.mer_svip_status,e.svip_type=a.data.svip_price_type,0===e.productData.spec_type?e.OneattrValue=a.data.attrValue:e.ManyAttrValue=a.data.attrValue;var i={},l={};if(e.productData.attr.forEach((function(t,e){i["value"+e]={title:t.value},l["value"+e]=""})),e.manyTabDate=l,e.manyTabTit=i,e.checkboxGroup=[],e.formThead=Object.assign({},e.formThead,i),e.sysParams=[],e.merParams=[],a.data.params&&a.data.params.length>0)for(var s=0;s<a.data.params.length;s++)0==a.data.params[s]["mer_id"]?e.sysParams.push(a.data.params[s]):e.merParams.push(a.data.params[s]);a.data.mer_form_id&&e.getFormInfo(a.data.mer_form_id),e.getRecordData(t),e.loading=!1})).catch((function(t){e.$message.error(t.message),e.loading=!1}))},getFormInfo:function(t){var e=this;Object(s["j"])(t).then((function(a){e.formData=a.data;var i=1e3*(new Date).getTime(),l="".concat(e.baseURL,"/pages/admin/system_form/index?inner_frame=1&form_id=").concat(t,"&time=").concat(i);e.formUrl=l})).catch((function(t){e.$message.error(t.message)}))},onchangeTime:function(t){this.timeVal=t,this.recordForm.date=t?this.timeVal.join("-"):"",this.getRecordData(this.productId)},getRecordData:function(){var t=this;Object(s["T"])(this.productId,this.recordForm).then((function(e){t.recordData.data=e.data.list,t.recordData.total=e.data.count})).catch((function(e){t.$message.error(e.message)}))},pageChange:function(t){this.recordForm.page=t,this.getRecordData()},handleSizeChange:function(t){this.recordForm.limit=t,this.getRecordData()},tabClick:function(t){}}},E=R,M=(a("6fd1"),Object(f["a"])(E,P,I,!1,null,"4a11d84b",null)),W=M.exports,Y=a("8c98"),U={name:"ProductList",components:{taoBao:V,previewBox:Y["a"],editAttr:j,proDetail:W},data:function(){return{props:{emitPath:!1},roterPre:r["roterPre"],drawer:!1,headeNum:[],labelList:[],tempList:[],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,mer_cate_id:"",cate_id:"",keyword:"",temp_id:"",form_id:"",type:this.$route.query.type?this.$route.query.type:"1",is_ficti:"",is_gift_bag:"",us_status:"",mer_labels:"",svip_price_type:"",product_id:this.$route.query.id?this.$route.query.id:""},categoryList:[],merCateList:[],modals:!1,tabClickIndex:"",multipleSelection:[],productStatusList:[{label:"上架显示",value:1},{label:"下架",value:0},{label:"平台关闭",value:-1}],productTypeList:[{label:"普通商品",value:0},{label:"虚拟商品",value:1},{label:"卡密商品",value:2}],tempRule:{temp_id:[{required:!0,message:"请选择运费模板",trigger:"change"}]},commisionRule:{extension_one:[{required:!0,message:"请输入一级佣金",trigger:"change"}],extension_two:[{required:!0,message:"请输入二级佣金",trigger:"change"}]},commisionForm:{extension_one:0,extension_two:0},svipForm:{svip_price_type:0},goodsId:"",previewKey:"",product_id:"",configData:{},previewVisible:!1,dialogLabel:!1,dialogFreight:!1,dialogCommision:!1,dialogSvip:!1,is_audit:!1,deliveryType:[],deliveryList:[],labelForm:{},tempForm:{},isBatch:!1,open_svip:!1,batchModal:!1,tabPosition:"left",formList:[],formData:[],batchName:"cate",batchData:{delivery_way:[],price_type:"add",delivery_free:1,extension_one:0,extension_two:0,price_number:0},chkName:"",checkedIds:[],noChecked:[],checkedPage:[],allCheck:!1}},mounted:function(){this.getLstFilterApi(),this.getCategorySelect(),this.getCategoryList(),this.getFormList(),this.getList(1),this.getLabelLst(),this.getTempLst(),this.productCon()},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),this.$refs.myCascader.$refs.panel.checkesValue=[],this.$refs.myCascader.$refs.panel.clearCheckedNodes(),this.$refs.myCascader.$refs.panel.activePath=[],this.$refs.myCascader.$refs.panel.syncActivePath(),this.getList(1)},tableRowClassName:function(t){var e=t.row,a=t.rowIndex;e.index=a},tabClick:function(t){this.tabClickIndex=t.index},inputBlur:function(t){var e=this;(!t.row.sort||t.row.sort<0)&&(t.row.sort=0),Object(s["nb"])(t.row.product_id,{sort:t.row.sort}).then((function(t){e.closeEdit()})).catch((function(t){}))},closeEdit:function(){this.tabClickIndex=null},onHandle:function(t){this.chkName=this.chkName===t?"":t,this.changeType(!(""===this.chkName))},changeType:function(t){t?this.chkName||(this.chkName="dan"):(this.chkName="",this.allCheck=!1);var e=this.checkedPage.indexOf(this.tableFrom.page);"dan"===this.chkName?this.checkedPage.push(this.tableFrom.page):e>-1&&this.checkedPage.splice(e,1),this.syncCheckedId()},syncCheckedId:function(){var t=this,e=this.tableData.data.map((function(t){return t.product_id}));"duo"===this.chkName?(this.checkedIds=[],this.allCheck=!0):"dan"===this.chkName?(this.allCheck=!1,e.forEach((function(e){var a=t.checkedIds.indexOf(e);-1===a&&t.checkedIds.push(e)}))):e.forEach((function(e){var a=t.checkedIds.indexOf(e);a>-1&&t.checkedIds.splice(a,1)})),console.log(this.checkedIds)},changeOne:function(t,e){if(t)if("duo"===this.chkName){var a=this.noChecked.indexOf(e.product_id);a>-1&&this.noChecked.splice(a,1)}else{var i=this.checkedIds.indexOf(e.product_id);-1===i&&this.checkedIds.push(e.product_id)}else if("duo"===this.chkName){var l=this.noChecked.indexOf(e.product_id);-1===l&&this.noChecked.push(e.product_id)}else{var s=this.checkedIds.indexOf(e.product_id);s>-1&&this.checkedIds.splice(s,1)}},changePrice:function(){"div"==this.batchData.price_type?this.batchData.price_number=1:this.batchData.price_number=0},submitBatchForm:function(){var t=this;console.log(this.batchName);var e=this.batchName;switch(e){case"cate":if(!this.batchData.cate_id)return this.$message.warning("请选择商品分类!");break;case"delivery_method":if(!this.batchData.delivery_way.length)return this.$message.warning("请选择配送方式!");break;case"postage":if(0!=this.batchData.delivery_free&&1!=this.batchData.delivery_free)return this.$message.warning("请选择运费设置!");if(0==this.batchData.delivery_free&&!this.batchData.temp_id)return this.$message.warning("请选择运费模板!");break;case"commission":this.batchData.extension_one=this.batchData.extension_one||0,this.batchData.extension_two=this.batchData.extension_two||0;break;case"price":if("div"==this.batchData.price_type&&0==this.batchData.price_number)return this.$message.warning("除数不能为0");break}var a=this.batchData;a.batch_type=this.batchName,this.allCheck?(a.batch_select_type="all",a.where=this.tableFrom):(a.batch_select_type="select",a.ids=this.checkedIds),Object(s["o"])(a).then((function(e){t.batchModal=!1,t.$message.success(e.message)})).catch((function(e){t.$message.error(e.message)}))},handleSelectionChange:function(t){this.multipleSelection=t;var e=[];this.multipleSelection.map((function(t){e.push(t.product_id)})),this.product_ids=e},productCon:function(){var t=this;Object(s["db"])().then((function(e){t.configData=e.data,t.is_audit=e.data.is_audit,t.open_svip=1==e.data.mer_svip_status&&1==e.data.svip_switch_status,t.deliveryType=e.data.delivery_way.map(String),2==t.deliveryType.length?t.deliveryList=[{value:"1",name:"到店自提"},{value:"2",name:"快递配送"}]:1==t.deliveryType.length&&"1"==t.deliveryType[0]?t.deliveryList=[{value:"1",name:"到店自提"}]:t.deliveryList=[{value:"2",name:"快递配送"}]})).catch((function(e){t.$message.error(e.message)}))},getFormList:function(){var t=this;Object(s["k"])().then((function(e){t.formList=e.data})).catch((function(e){t.$message.error(e.message)}))},getFormInfo:function(){var t=this;this.batchData.mer_form_id?Object(s["j"])(this.batchData.mer_form_id).then((function(e){t.formData=e.data})).catch((function(e){t.$message.error(e.message)})):this.formData=[]},getSuccess:function(){this.getLstFilterApi(),this.getList(1)},handleClose:function(){this.dialogLabel=!1},handleFreightClose:function(){this.dialogFreight=!1},onClose:function(){this.modals=!1},onCopy:function(){this.$router.push({path:this.roterPre+"/product/list/addProduct",query:{type:1}})},openBatch:function(){this.batchModal=!0},getLabelLst:function(){var t=this;Object(s["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getTempLst:function(){var t=this;Object(s["xb"])().then((function(e){t.tempList=e.data})).catch((function(e){t.$message.error(e.message)}))},onAuditFree:function(t){this.$refs.editAttr.getAttrDetail(t.product_id)},batchCommision:function(){this.dialogCommision=!0},batchSvip:function(){if(0===this.multipleSelection.length)return this.$message.warning("请先选择商品");this.dialogSvip=!0},submitCommisionForm:function(t){var e=this;this.$refs[t].validate((function(t){t&&(e.commisionForm.ids=e.product_ids,Object(s["bb"])(e.commisionForm).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.dialogCommision=!1})))}))},submitSvipForm:function(t){var e=this;this.svipForm.ids=this.product_ids,Object(s["cb"])(this.svipForm).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.dialogSvip=!1}))},batchShelf:function(){var t=this;if(0===this.checkedIds.length&&!this.allCheck)return this.$message.warning("请先选择商品");var e=[];this.allCheck?this.tableData.data.map((function(t){e.push(t.product_id)})):e=this.checkedIds;var a={status:1,ids:e};Object(s["q"])(a).then((function(e){t.$message.success(e.message),t.getLstFilterApi(),t.getList("")})).catch((function(e){t.$message.error(e.message)}))},batchOff:function(){var t=this;if(0===this.checkedIds.length&&!this.allCheck)return this.$message.warning("请先选择商品");var e=[];this.allCheck?this.tableData.data.map((function(t){e.push(t.product_id)})):e=this.checkedIds;var a={status:0,ids:e};Object(s["q"])(a).then((function(e){t.$message.success(e.message),t.getLstFilterApi(),t.getList("")})).catch((function(e){t.$message.error(e.message)}))},batchLabel:function(){this.labelForm={mer_labels:[],ids:this.product_ids},this.isBatch=!0,this.dialogLabel=!0},batchFreight:function(){this.dialogFreight=!0},submitTempForm:function(t){var e=this;this.$refs[t].validate((function(t){t&&(e.tempForm.ids=e.product_ids,Object(s["r"])(e.tempForm).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.dialogFreight=!1})))}))},handleRestore:function(t){var e=this;this.$modalSure("恢复商品").then((function(){Object(s["tb"])(t).then((function(t){e.$message.success(t.message),e.getLstFilterApi(),e.getList("")})).catch((function(t){e.$message.error(t.message)}))}))},handlePreview:function(t){this.previewVisible=!0,this.goodsId=t,this.previewKey=""},onDetails:function(t){this.product_id=t,this.drawer=!0,this.$refs.proDetail.getInfo(t)},changeDrawer:function(t){this.drawer=t},closeDrawer:function(){this.drawer=!1},getCategorySelect:function(){var t=this;Object(s["u"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategoryList:function(){var t=this;Object(s["t"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getProduct:function(){this.getList(),this.changeType()},getLstFilterApi:function(){var t=this;Object(s["S"])().then((function(e){t.headeNum=e.data})).catch((function(e){t.$message.error(e.message)}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(s["lb"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)})),this.getLstFilterApi()},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},handleDelete:function(t,e){var a=this;this.$modalSure("5"!==this.tableFrom.type?"加入回收站":"删除该商品").then((function(){"5"===a.tableFrom.type?Object(s["w"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList(""),a.getLstFilterApi()})).catch((function(t){var e=t.message;a.$message.error(e)})):Object(s["ib"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList(""),a.getLstFilterApi()})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},onEditLabel:function(t){this.dialogLabel=!0,this.product_id=t.product_id,this.labelForm={mer_labels:t.mer_labels}},submitForm:function(t){var e=this;this.$refs[t].validate((function(t){t&&(e.isBatch?Object(s["p"])(e.labelForm).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.dialogLabel=!1,e.isBatch=!1})):Object(s["Sb"])(e.product_id,e.labelForm).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.dialogLabel=!1})))}))},onchangeIsShow:function(t){var e=this;Object(s["Cb"])(t.product_id,t.is_show).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.getLstFilterApi()})).catch((function(t){var a=t.message;e.$message.error(a)}))}}},X=U,H=(a("d33c"),Object(f["a"])(X,i,l,!1,null,"2e4c7970",null));e["default"]=H.exports},d33c:function(t,e,a){"use strict";a("877a")},e0cb:function(t,e,a){"use strict";a("8668")}}]);