You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
68 KiB
1 lines
68 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1531c036"],{"063b":function(t,e,a){},"2e72":function(t,e,a){},"504c":function(t,e,a){var i=a("9e1e"),l=a("0d58"),o=a("6821"),r=a("52a7").f;t.exports=function(t){return function(e){var a,n=o(e),s=l(n),c=s.length,u=0,m=[];while(c>u)a=s[u++],i&&!r.call(n,a)||m.push(t?[a,n[a]]:n[a]);return m}}},"669c":function(t,e,a){"use strict";a("7f44")},"7f44":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)}})},"8f4b":function(t,e,a){"use strict";a("063b")},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("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("el-tabs",{on:{"tab-click":function(e){t.getList(1),t.getLstFilterApi()}},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:"container"},[a("el-form",{attrs:{size:"small","label-width":"120px",inline:!0}},[a("el-form-item",{attrs:{label:"平台商品分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{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:"商户商品分类:"}},[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:"是否为礼包:"}},[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:"会员价设置:"}},[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:"商品状态:"}},[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:"标签:"}},[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:"运费模板:"}},[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:"关键字搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称,关键字"},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"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1),t._v(" "),a("router-link",{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:"mini",disabled:1!=t.tableFrom.type||0==t.multipleSelection.length},on:{click:t.batchOff}},[t._v("批量下架")]),t._v(" "),a("el-button",{attrs:{size:"mini",disabled:2!=t.tableFrom.type||0==t.multipleSelection.length},on:{click:t.batchShelf}},[t._v("批量上架")]),t._v(" "),a("el-button",{attrs:{size:"mini",disabled:0==t.multipleSelection.length},on:{click:t.batchLabel}},[t._v("批量设置标签")]),t._v(" "),a("el-button",{attrs:{size:"mini",disabled:0==t.multipleSelection.length},on:{click:t.batchFreight}},[t._v("批量设置运费")]),t._v(" "),a("el-button",{attrs:{size:"mini",disabled:0==t.multipleSelection.length},on:{click:t.batchCommision}},[t._v("批量设置佣金")]),t._v(" "),1==t.open_svip?a("el-button",{attrs:{size:"mini",disabled:0==t.multipleSelection.length},on:{click:t.batchSvip}},[t._v("批量设置会员价")]):t._e()],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini","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:{type:"selection","reserve-selection":!0,width:"55"}}),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:""}},[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":"80"},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":"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"商品售价","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"svip_price",label:"会员价","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.svip_price||"-"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"sales",label:"销量","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"70"}}),t._v(" "),a("el-table-column",{attrs:{prop:"integral_total",label:"积分抵扣","min-width":"70"}}),t._v(" "),a("el-table-column",{attrs:{prop:"integral_price_total",label:"积分抵扣金额","min-width":"90"}}),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":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"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,132813036)}):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:{prop:"stock",label:"标签","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.mer_labels,(function(e,i){return a("div",{key:i,staticClass:"label-list"},[t._v(t._s(e.name))])}))}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[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("router-link",{attrs:{to:{path:t.roterPre+"/product/list/addProduct/"+e.row.product_id+"?type=copy"}}},[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"}},[t._v("复制")])],1):t._e(),t._v(" "),"5"!==t.tableFrom.type?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handlePreview(e.row.product_id)}}},[t._v("预览")]):t._e(),t._v(" "),5!=t.tableFrom.type?a("router-link",{attrs:{to:{path:t.roterPre+"/product/reviews/?product_id="+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&&"1"==t.is_audit?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onAuditFree(e.row)}}},[t._v("免审编辑")]):t._e(),t._v(" "),"5"!==t.tableFrom.type?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEditLabel(e.row)}}},[t._v("编辑标签")]):t._e(),t._v(" "),"5"===t.tableFrom.type?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleRestore(e.row.product_id)}}},[t._v("恢复商品")]):t._e(),t._v(" "),"1"!==t.tableFrom.type&&"3"!==t.tableFrom.type&&"4"!==t.tableFrom.type?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.product_id,e.$index)}}},[t._v(t._s("5"===t.tableFrom.type?"删除":"加入回收站"))]):t._e()]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, 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:"800px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogLabel=e}}},[a("el-form",{ref:"labelForm",attrs:{model:t.labelForm},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",[a("el-select",{staticClass:"selWidth",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}})})),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.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",{staticStyle:{color:"#1890ff"},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()],1)},l=[],o=(a("7f7f"),a("55dd"),a("c4c8")),r=a("83d6"),n=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:"rgb(237, 64, 20)"}},[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",align:"center"},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)},s=[],c=a("75fc"),u=a("bd86"),m=(a("28a5"),a("8615"),a("ac6a"),a("2d63")),d=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-sizes":[10,20],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)]):t._e()},f=[],_={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(o["Z"])(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=_,b=(a("669c"),a("2877")),g=Object(b["a"])(h,p,f,!1,null,"3500ed7a",null),v=g.exports,y=a("bbcc"),w=a("5f87"),k={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}]},x={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量(KG)"},volume:{title:"体积(m³)"}},F={name:"CopyTaoBao",props:{deliveryList:{type:Array,default:[]},deliveryType:{type:Array,default:[]}},components:{ueditorFrom:d["a"],copyRecord:v},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({},k.attrValue[0])],ManyAttrValue:[Object.assign({},k.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({},x),formValidate:Object.assign({},k),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({},k.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(o["v"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCopyCount:function(){var t=this;Object(o["Y"])().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(m["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(o["wb"])().then((function(e){t.shippingList=e.data}))},getGuaranteeList:function(){var t=this;Object(o["B"])().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(o["q"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategorySelect:function(){var t=this;Object(o["r"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getBrandListApi:function(){var t=this;Object(o["p"])().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 o=[];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(o.push(r),l===t.length-2){var n={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("_$_");n["detail"]||(n["detail"]={}),n["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(n.detail).forEach((function(t,e){n["value"+e]=t})),a.push(n)}}))})),e=o.length?o:[]}));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(u["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(o["s"])(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(o["X"])(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}))}}},C=F,V=(a("e96b"),Object(b["a"])(C,n,s,!1,null,"3cd1b9b0",null)),$=V.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:"商户商品分类:",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(" "),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",align:"center"},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=[],S={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}]},O={price:{title:"售价"},cost:{title:"成本价"},ot_price:{title:"市场价"},stock:{title:"库存"},bar_code:{title:"商品编号"},weight:{title:"重量(KG)"},volume:{title:"体积(m³)"}},j={name:"editAttr",components:{},data:function(){return{product_id:"",roterPre:r["roterPre"],modals:!1,loading:!1,loading1:!1,OneattrValue:[Object.assign({},S.attrValue[0])],ManyAttrValue:[Object.assign({},S.attrValue[0])],manyTabDate:{},count:0,modal_loading:!1,images:"",modalPic:!1,isChoice:"",columns:[],merCateList:[],propsMer:{emitPath:!1,multiple:!0},ruleInline:{mer_cate_id:[{required:!0,message:"请选择商户分类",trigger:"change",type:"array",min:"1"}]},formThead:Object.assign({},O),formValidate:Object.assign({},S),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({},S.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(m["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(o["r"])().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 o=[];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(o.push(r),l===t.length-2){var n={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("_$_");n["detail"]||(n["detail"]={}),n["detail"][a[0]]=a.length>1?a[1]:""})),Object.values(n.detail).forEach((function(t,e){n["value"+e]=t})),a.push(n)}}))})),e=o.length?o:[]}));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(u["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(o["cb"])(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(o["u"])(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("请选择商户商品分类!")}))}}},T=j,A=(a("da80"),Object(b["a"])(T,B,L,!1,null,"5e47370c",null)),P=A.exports,z=a("8c98"),D={name:"ProductList",components:{taoBao:$,previewBox:z["a"],editAttr:P},data:function(){return{props:{emitPath:!1},roterPre:r["roterPre"],headeNum:[],labelList:[],tempList:[],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,mer_cate_id:"",cate_id:"",keyword:"",temp_id:"",type:this.$route.query.type?this.$route.query.type:"1",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}],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:"",previewVisible:!1,dialogLabel:!1,dialogFreight:!1,dialogCommision:!1,dialogSvip:!1,is_audit:!1,deliveryType:[],deliveryList:[],labelForm:{},tempForm:{},isBatch:!1,open_svip:!1}},mounted:function(){this.getLstFilterApi(),this.getCategorySelect(),this.getCategoryList(),this.getList(1),this.getLabelLst(),this.getTempLst(),this.productCon()},methods:{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(o["gb"])(t.row.product_id,{sort:t.row.sort}).then((function(t){e.closeEdit()})).catch((function(t){}))},closeEdit:function(){this.tabClickIndex=null},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(o["W"])().then((function(e){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)}))},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}})},getLabelLst:function(){var t=this;Object(o["v"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getTempLst:function(){var t=this;Object(o["wb"])().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(){if(0===this.multipleSelection.length)return this.$message.warning("请先选择商品");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(o["U"])(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(o["V"])(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.multipleSelection.length)return this.$message.warning("请先选择商品");var e={status:1,ids:this.product_ids};Object(o["n"])(e).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.multipleSelection.length)return this.$message.warning("请先选择商品");var e={status:0,ids:this.product_ids};Object(o["n"])(e).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(o["o"])(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(o["mb"])(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=""},getCategorySelect:function(){var t=this;Object(o["r"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategoryList:function(){var t=this;Object(o["q"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getLstFilterApi:function(){var t=this;Object(o["M"])().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(o["eb"])(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(o["t"])(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(o["bb"])(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){if(this.dialogLabel=!0,this.product_id=t.product_id,t.mer_labels&&t.mer_labels.length){var e=t.mer_labels.map((function(t){return t.product_label_id}));this.labelForm={mer_labels:e}}else this.labelForm={mer_labels:[]}},submitForm:function(t){var e=this;this.$refs[t].validate((function(t){t&&(e.isBatch?Object(o["m"])(e.labelForm).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.dialogLabel=!1,e.isBatch=!1})):Object(o["Rb"])(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(o["Gb"])(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)}))}}},E=D,I=(a("8f4b"),Object(b["a"])(E,i,l,!1,null,"96691330",null));e["default"]=I.exports},da80:function(t,e,a){"use strict";a("e797")},e797:function(t,e,a){},e96b:function(t,e,a){"use strict";a("2e72")}}]); |