zx/public/mer/js/chunk-311fda06.35c0a1fd.js

1 line
24 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

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

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-311fda06"],{"0ffe":function(t,e,a){"use strict";a("145d")},"145d":function(t,e,a){},"504c":function(t,e,a){var l=a("9e1e"),s=a("0d58"),i=a("6821"),r=a("52a7").f;t.exports=function(t){return function(e){var a,n=i(e),o=s(n),c=o.length,d=0,u=[];while(c>d)a=o[d++],l&&!r.call(n,a)||u.push(t?[a,n[a]]:n[a]);return u}}},"6ece":function(t,e,a){"use strict";a.r(e);var l=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":"85px",inline:""}},[a("el-form-item",{attrs:{label:"活动状态:",prop:"type"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.type,callback:function(e){t.$set(t.tableFrom,"type",e)},expression:"tableFrom.type"}},t._l(t.preSaleStatusList,(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:"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:"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:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入预售商品名称/ID",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",[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"},[a("el-tabs",{on:{"tab-click":function(e){return t.getList(1)}},model:{value:t.tableFrom.presell_type,callback:function(e){t.$set(t.tableFrom,"presell_type",e)},expression:"tableFrom.presell_type"}},t._l(t.headeNum,(function(t,e){return a("el-tab-pane",{key:e,attrs:{name:t.presell_type.toString(),label:t.title+"("+t.count+")"}})})),1),t._v(" "),a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/presell/create"}}},[a("el-button",{staticClass:"mt5",attrs:{size:"small",type:"primary"}},[t._v("\n 添加预售商品\n ")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"mt20",attrs:{data:t.tableData.data,size:"small","row-class-name":t.tableRowClassName},on:{rowclick:function(e){return e.stopPropagation(),t.closeEdit(e)}}},[a("el-table-column",{attrs:{prop:"product_presell_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.product.image,"preview-src-list":[t.row.product.image]}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"250"}}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"预售价","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{label:"预售活动状态","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0===e.row.presell_status?"未开始":1===e.row.presell_status?"正在进行":"已结束"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"预售活动日期","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",[t._v("开始日期:"+t._s(e.row.start_time&&e.row.start_time?e.row.start_time.slice(0,10):""))]),t._v(" "),a("div",[t._v("结束日期:"+t._s(e.row.end_time&&e.row.end_time?e.row.end_time.slice(0,10):""))])]}}])}),t._v(" "),"1"===t.tableFrom.presell_type?a("el-table-column",{attrs:{label:"成功/参与人次","min-width":"90",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.tattend_one&&e.row.tattend_one.pay)+" / "+t._s(e.row.tattend_one&&e.row.tattend_one.all))])]}}],null,!1,2898212109)}):t._e(),t._v(" "),"2"===t.tableFrom.presell_type?a("el-table-column",{attrs:{label:"第一阶段 | 成功/参与人次","render-header":t.renderheader,"min-width":"90",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.tattend_one&&e.row.tattend_one.pay)+" / "+t._s(e.row.tattend_one&&e.row.tattend_one.all))])]}}],null,!1,2898212109)}):t._e(),t._v(" "),"2"===t.tableFrom.presell_type?a("el-table-column",{attrs:{label:"第二阶段 | 成功/参与人次","render-header":t.renderheader,"min-width":"90",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.tattend_two&&e.row.tattend_two.pay)+" / "+t._s(e.row.tattend_two&&e.row.tattend_two.all))])]}}],null,!1,649476621)}):t._e(),t._v(" "),a("el-table-column",{attrs:{prop:"seles",label:"已售商品数","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock_count",label:"限量","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"限量剩余","min-width":"90"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"上/下架","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"上架","inactive-text":"下架",width:55},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"}})]}}])}),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:"product.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["product"]["sort"],callback:function(a){t.$set(e.row["product"],"sort",t._n(a))},expression:"scope.row['product']['sort']"}})],1):a("span",{on:{dblclick:function(a){return a.stopPropagation(),t.tabClick(e.row)}}},[t._v(t._s(e.row["product"]["sort"]))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"审核状态","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0===e.row.product_status?"待审核":1===e.row.product_status?"审核通过":"审核失败"))]),t._v(" "),-1===e.row.product_status||-2===e.row.product_status?a("span",{staticStyle:{"font-size":"12px"}},[a("br"),t._v("\n 原因:"+t._s(e.row.refusal)+"\n ")]):t._e()]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"240",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[0===e.row.presell_status?a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/presell/create/"+e.row.product_presell_id}}},[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"}},[t._v("编辑")])],1):t._e(),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handlePreview(e.row.product_presell_id)}}},[t._v("预览")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEditLabel(e.row)}}},[t._v("编辑标签")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.goDetail(e.row.product_presell_id)}}},[t._v("详情")]),t._v(" "),1!==e.row.product.presell_status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.product_presell_id,e.$index)}}},[t._v("删除")]):t._e()]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),t.dialogVisible?a("el-dialog",{attrs:{title:"预售商品详情",center:"",visible:t.dialogVisible,width:"660px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-top":"5px"}},[a("div",{staticClass:"box-container"},[a("div",{staticClass:"title"},[t._v("基本信息")]),t._v(" "),a("div",{staticClass:"acea-row"},[a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("商品ID")]),t._v(t._s(t.formValidate.product_id))]),t._v(" "),a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("商品名称:")]),a("span",[t._v(t._s(t.formValidate.store_name))])]),t._v(" "),a("div",{staticClass:"list sp100 image"},[a("label",{staticClass:"name"},[t._v("商品图:")]),t._v(" "),a("img",{staticStyle:{"max-width":"150px",height:"80px"},attrs:{src:t.formValidate.image}})]),t._v(" "),a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("商品信息:")]),t._v(" "),0===t.formValidate.spec_type?a("div",[a("el-table",{staticClass:"tabNumWidth",attrs:{data:t.OneattrValue,border:"",size:"small"}},[a("el-table-column",{attrs:{align:"center",label:"预售价格","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["presell_price"]))])]}}],null,!1,1547007341)}),t._v(" "),2===t.formValidate.presell_type?a("el-table-column",{attrs:{align:"center",label:"预售定金","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["down_price"]))])]}}],null,!1,2160669390)}):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("span",[t._v(t._s(e.row["sales"]))])]}}],null,!1,703426790)})],1)],1):t._e(),t._v(" "),1===t.formValidate.spec_type?a("div",{staticClass:"labeltop",attrs:{label:"规格列表:"}},[a("el-table",{attrs:{data:t.ManyAttrValue,height:"250",size:"small","tooltip-effect":"dark","row-key":function(t){return t.id}}},[t.manyTabDate?t._l(t.manyTabDate,(function(e,l){return a("el-table-column",{key:l,attrs:{align:"center",label:t.manyTabTit[l].title,"min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{staticClass:"priceBox",domProps:{textContent:t._s(e.row[l])}})]}}],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("span",[t._v(t._s(e.row["presell_price"]))])]}}],null,!1,1547007341)}),t._v(" "),2===t.formValidate.presell_type?a("el-table-column",{attrs:{align:"center",label:"预售定金","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row["down_price"]))])]}}],null,!1,2160669390)}):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("span",[t._v(t._s(e.row["sales"]))])]}}],null,!1,703426790)})],2)],1):t._e()])]),t._v(" "),a("div",{staticClass:"title",staticStyle:{"margin-top":"20px"}},[t._v("预售商品活动信息")]),t._v(" "),a("div",{staticClass:"acea-row"},[a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("预售简介:")]),t._v(t._s(t.formValidate.store_info))]),t._v(" "),a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("预售活动日期:")]),t._v(t._s(t.formValidate.start_time+"-"+t.formValidate.end_time))]),t._v(" "),2===t.formValidate.presell_type?a("div",{staticClass:"list sp100"},[a("label",{staticClass:"name"},[t._v("尾款支付日期:")]),t._v(t._s(t.formValidate.final_start_time+"-"+t.formValidate.final_end_time))]):t._e(),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("审核状态:")]),t._v(t._s(1===t.formValidate.product_status?"审核通过":0===t.formValidate.product_status?"未审核":"审核未通过"))]),t._v(" "),1===t.formValidate.presell_type?a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("预售成功/参与人次:")]),t._v(t._s((t.formValidate.tattend_one&&t.formValidate.tattend_one.pay)+"/"+(t.formValidate.tattend_one&&t.formValidate.tattend_one.all)))]):t._e(),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("限量:")]),t._v(t._s(t.formValidate.stock_count))]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("限量剩余:")]),t._v(t._s(t.formValidate.stock))]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("限购件数:")]),t._v(t._s(t.formValidate.pay_count)+"0为不限制购买数量")]),t._v(" "),2===t.formValidate.presell_type?a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("第一阶段(定金支付)成功/参与人次:")]),t._v(t._s((t.formValidate.tattend_one&&t.formValidate.tattend_one.pay)+"/"+(t.formValidate.tattend_one&&t.formValidate.tattend_one.all)))]):t._e(),t._v(" "),2===t.formValidate.presell_type?a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("第二阶段(尾款支付)成功/参与人次:")]),t._v(t._s((t.formValidate.tattend_two&&t.formValidate.tattend_two.pay)+"/"+(t.formValidate.tattend_two&&t.formValidate.tattend_two.all)))]):t._e(),t._v(" "),2===t.formValidate.presell_type?a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("发货时间:")]),t._v(t._s("支付尾款后"+t.formValidate.delivery_day+"天内"))]):t._e(),t._v(" "),1===t.formValidate.presell_type?a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("发货时间:")]),t._v(t._s(1===t.formValidate.delivery_type?"支付成功后"+t.formValidate.delivery_day+"天内":"预售结束后"+t.formValidate.delivery_day+"天内"))]):t._e(),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("预售活动状态:")]),t._v(t._s(0===t.formValidate.presell_status?"未开始":1===t.formValidate.presell_status?"正在进行":"已结束"))]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("显示状态:")]),t._v(t._s(1===t.formValidate.is_show?"显示":"隐藏"))]),t._v(" "),a("div",{staticClass:"list sp"},[a("label",{staticClass:"name"},[t._v("创建时间:")]),t._v(t._s(t.formValidate.create_time))])])])])]):t._e(),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":2,"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",{staticStyle:{width:"100%"},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:{type:"primary",size:"small"},on:{click:function(e){return t.submitForm("labelForm")}}},[t._v("提交")])],1)],1):t._e()],1)},s=[],i=a("c80c"),r=(a("96cf"),a("3b8d")),n=(a("7f7f"),a("8615"),a("ac6a"),a("28a5"),a("55dd"),a("c4c8")),o=a("b7be"),c=a("8c98"),d=a("83d6"),u={product_id:"",image:"",slider_image:[],store_name:"",store_info:"",start_day:"",end_day:"",start_time:"",end_time:"",is_open_recommend:1,is_open_state:1,is_show:1,presell_type:1,keyword:"",brand_id:"",cate_id:"",mer_cate_id:[],unit_name:"",integral:0,sort:0,is_good:0,temp_id:"",preSale_date:"",finalPayment_date:"",delivery_type:1,delivery_day:10,create_time:"",attrValue:[{image:"",price:null,down_price:null,presell_price:null,cost:null,ot_price:null,old_stock:null,stock:null,bar_code:"",weight:null,volume:null}],attr:[],extension_type:0,content:"",spec_type:0,is_gift_bag:0,tattend_two:{},tattend_one:{}},_={name:"ProductList",components:{previewBox:c["a"]},data:function(){return{headeNum:[{count:0,presell_type:1,title:"全款预售"},{count:0,presell_type:2,title:"定金预售"}],props:{emitPath:!1},roterPre:d["roterPre"],listLoading:!0,tableData:{data:[],total:0},preSaleStatusList:[{label:"未开始",value:0},{label:"正在进行",value:1},{label:"已结束",value:2}],productStatusList:[{label:"上架显示",value:1},{label:"下架",value:0},{label:"平台关闭",value:-1}],fromList:{custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"已审核",val:"1"},{text:"审核失败",val:"-1"}]},tableFrom:{page:1,limit:20,keyword:"",mer_labels:"",product_status:this.$route.query.status?this.$route.query.status:"",type:"",presell_type:this.$route.query.type?this.$route.query.type:"1",us_status:"",product_presell_id:this.$route.query.id?this.$route.query.id:""},product_presell_id:this.$route.query.id?this.$route.query.id:"",product_id:"",modals:!1,dialogVisible:!1,loading:!0,manyTabTit:{},manyTabDate:{},formValidate:Object.assign({},u),OneattrValue:[Object.assign({},u.attrValue[0])],ManyAttrValue:[Object.assign({},u.attrValue[0])],attrInfo:{},tabClickIndex:"",previewVisible:!1,goodsId:"",previewKey:"",dialogLabel:!1,labelForm:{},labelList:[]}},watch:{product_presell_id:function(t,e){this.getList("")},$route:function(t,e){this.$route.query.product_presell_id&&this.getList("")}},mounted:function(){this.getList(""),this.getLabelLst()},methods:{searchReset:function(){this.$refs.searchForm.resetFields(),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.product.sort||t.row.product.sort<0)&&(t.row.product.sort=0),Object(o["ab"])(t.row.product_presell_id,{sort:t.row.product.sort}).then((function(t){e.closeEdit()})).catch((function(t){}))},closeEdit:function(){this.tabClickIndex=null},renderheader:function(t,e){var a=e.column;e.$index;return t("span",{},[t("span",{},a.label.split("|")[0]),t("br"),t("span",{},a.label.split("|")[1])])},watCh:function(t){var e=this,a={},l={};this.formValidate.attr.forEach((function(t,e){a["value"+e]={title:t.value},l["value"+e]=""})),this.ManyAttrValue.forEach((function(t,a){var l=Object.values(t.detail).sort().join("/");e.attrInfo[l]&&(e.ManyAttrValue[a]=e.attrInfo[l])})),this.attrInfo={},this.ManyAttrValue.forEach((function(t){e.attrInfo[Object.values(t.detail).sort().join("/")]=t})),this.manyTabTit=a,this.manyTabDate=l},getLabelLst:function(){var t=this;Object(n["A"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},handleClose:function(){this.dialogLabel=!1},onEditLabel:function(t){this.dialogLabel=!0,this.product_id=t.product_presell_id,this.labelForm={mer_labels:t.mer_labels}},submitForm:function(t){var e=this;this.$refs[t].validate((function(t){t&&Object(n["Rb"])(e.product_id,e.labelForm).then((function(t){var a=t.message;e.$message.success(a),e.getList(""),e.dialogLabel=!1}))}))},goDetail:function(t){var e=this;this.dialogVisible=!0,this.loading=!0,this.formValidate={},Object(n["V"])(t).then(function(){var t=Object(r["a"])(Object(i["a"])().mark((function t(a){var l;return Object(i["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.loading=!1,l=a.data,e.formValidate={product_id:l.product.product_id,image:l.product.image,slider_image:l.product.slider_image,store_name:l.store_name,store_info:l.store_info,presell_type:l.presell_type?l.presell_type:1,delivery_type:l.delivery_type?l.delivery_type:1,delivery_day:l.delivery_day?l.delivery_day:10,start_time:l.start_time?l.start_time:"",end_time:l.end_time?l.end_time:"",final_start_time:l.final_start_time?l.final_start_time:"",final_end_time:l.final_end_time?l.final_end_time:"",brand_id:l.product.brand_id,cate_id:l.cate_id?l.cate_id:"",mer_cate_id:l.mer_cate_id,unit_name:l.product.unit_name,sort:l.product.sort,is_good:l.product.is_good,temp_id:l.product.temp_id,is_show:l.is_show,attr:l.product.attr,extension_type:l.extension_type,content:l.content,spec_type:l.product.spec_type,is_gift_bag:l.product.is_gift_bag,tattend_two:l.tattend_two,tattend_one:l.tattend_one,create_time:l.create_time,presell_status:l.presell_status,product_status:l.product_status,pay_count:l.pay_count,stock:l.stock,stock_count:l.stock_count},0===e.formValidate.spec_type?(e.OneattrValue=l.product.attrValue,e.OneattrValue[0].down_price=e.OneattrValue[0].presellSku?e.OneattrValue[0].presellSku.down_price:0,e.OneattrValue[0].presell_price=e.OneattrValue[0].presellSku?e.OneattrValue[0].presellSku.presell_price:0,e.OneattrValue[0].sales=e.OneattrValue[0].presellSku?e.OneattrValue[0].presellSku.seles:0):(e.ManyAttrValue=[],l.product.attrValue.forEach((function(t,a){t.presellSku&&(e.$set(t,"down_price",t.presellSku.down_price),e.$set(t,"presell_price",t.presellSku.presell_price),e.$set(t,"sales",t.presellSku.seles),e.ManyAttrValue.push(t))})),e.watCh(e.formValidate.attr)),console.log(e.ManyAttrValue),e.fullscreenLoading=!1,e.formValidate.preSale_date=[l.start_time,l.end_time],e.formValidate.finalPayment_date=[l.final_start_time,l.final_end_time];case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.fullscreenLoading=!1,e.$message.error(t.message)}))},handlePreview:function(t){this.previewVisible=!0,this.goodsId=t,this.previewKey=""},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(n["W"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.headeNum[0]["count"]=t.data.stat.all,e.headeNum[1]["count"]=t.data.stat.down,console.log(e.headeNum),e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},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("删除该商品吗").then((function(){Object(n["Y"])(t).then((function(t){var l=t.message;a.$message.success(l),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},onchangeIsShow:function(t){var e=this;Object(n["ab"])(t.product_presell_id,t.is_show).then((function(t){var a=t.message;e.$message.success(a),e.getList("")})).catch((function(t){var a=t.message;e.$message.error(a)}))}}},p=_,m=(a("0ffe"),a("2877")),v=Object(m["a"])(p,l,s,!1,null,"b90898de",null);e["default"]=v.exports},8615:function(t,e,a){var l=a("5ca1"),s=a("504c")(!1);l(l.S,"Object",{values:function(t){return s(t)}})}}]);