1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-01454a3c"],{"4d5f":function(t,e,i){"use strict";i("66a4")},"66a4":function(t,e,i){},7897:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"divBox"},[i("el-card",{staticClass:"box-card"},[i("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+""+Math.floor(1e4*Math.random())}},on:{"selection-change":t.handleSelectionChange,rowclick:function(e){return e.stopPropagation(),t.closeEdit(e)}}},[i("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-form",{staticClass:"demo-table-expand demo-table-expand1",attrs:{"label-position":"left",inline:""}},[i("el-form-item",{attrs:{label:"平台分类:"}},[i("span",[t._v(t._s(e.row.storeCategory?e.row.storeCategory.cate_name:"-"))])]),t._v(" "),i("el-form-item",{attrs:{label:"商品分类:"}},[e.row.merCateId.length?t._l(e.row.merCateId,(function(e,s){return i("span",{key:s,staticClass:"mr10"},[t._v(t._s(e.category.cate_name))])})):i("span",[t._v("-")])],2),t._v(" "),i("el-form-item",{attrs:{label:"品牌:"}},[i("span",{staticClass:"mr10"},[t._v(t._s(e.row.brand?e.row.brand.brand_name:"-"))])]),t._v(" "),i("el-form-item",{attrs:{label:"市场价格:"}},[i("span",[t._v(t._s(t._f("filterEmpty")(e.row.ot_price)))])]),t._v(" "),i("el-form-item",{attrs:{label:"成本价:"}},[i("span",[t._v(t._s(t._f("filterEmpty")(e.row.cost)))])]),t._v(" "),i("el-form-item",{attrs:{label:"收藏:"}},[i("span",[t._v(t._s(t._f("filterEmpty")(e.row.care_count)))])]),t._v(" "),"7"===t.tableFrom.type?i("el-form-item",{key:"1",attrs:{label:"未通过原因:"}},[i("span",[t._v(t._s(e.row.refusal))])]):t._e()],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),t._v(" "),i("el-table-column",{attrs:{prop:"name",label:"商品名称","min-width":"200"}}),t._v(" "),i("el-table-column",{attrs:{prop:"content",label:"备注","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[e.row.content?i("span",{staticStyle:{color:"#efb32c"}},[t._v(t._s(e.row.content))]):i("span",[t._v("-")])]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"status",label:"商品状态","min-width":"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.status?i("span",{staticStyle:{color:"#13ce66"}},[t._v("已导入")]):i("span",{staticStyle:{color:"#ff0018"}},[t._v("未导入")])]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}})],1),t._v(" "),i("div",{staticClass:"block"},[i("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)],1)},a=[],n=i("c7eb"),o=(i("96cf"),i("1da1")),r=(i("7f7f"),i("55dd"),i("c4c8")),c=(i("c24f"),i("83d6")),l=i("bbcc"),u=i("5c96"),m={name:"ProductList",data:function(){return{props:{emitPath:!1},roterPre:c["roterPre"],BASE_URL:l["a"].https,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:"",product_type:""},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"}]},importInfo:{},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,dialogImport:!1,dialogImportImg:!1,is_audit:!1,deliveryType:[],deliveryList:[],labelForm:{},tempForm:{},isBatch:!1,open_svip:!1,product:"",merchantType:{type_code:""}}},mounted:function(){this.merchantType=this.$store.state.user.merchantType;var t=this.merchantType.type_name;"市级供应链"!==t?(this.product=0,this.tableFrom.product_type=""):(this.product=98,this.tableFrom.product_type=98),console.log(this.product),this.getLstFilterApi(),this.getCategorySelect(),this.getCategoryList(),this.getList(1),this.getLabelLst(),this.getTempLst(),this.productCon()},updated:function(){},methods:{tableRowClassName:function(t){var e=t.row,i=t.rowIndex;e.index=i},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(r["kb"])(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(r["ab"])().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(r["x"])().then((function(e){t.labelList=e.data})).catch((function(e){t.$message.error(e.message)}))},getTempLst:function(){var t=this;Object(r["Ab"])().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(r["Y"])(e.commisionForm).then((function(t){var i=t.message;e.$message.success(i),e.getList(""),e.dialogCommision=!1})))}))},submitSvipForm:function(t){var e=this;this.svipForm.ids=this.product_ids,Object(r["Z"])(this.svipForm).then((function(t){var i=t.message;e.$message.success(i),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(r["o"])(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(r["o"])(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(r["p"])(e.tempForm).then((function(t){var i=t.message;e.$message.success(i),e.getList(""),e.dialogFreight=!1})))}))},handleRestore:function(t){var e=this;this.$modalSure("恢复商品").then((function(){Object(r["qb"])(t).then((function(t){e.$message.success(t.message),e.getLstFilterApi(),e.getList("")})).catch((function(t){e.$message.error(t.message)}))}))},handlePreview:function(t){console.log(t),console.log("123"),this.previewVisible=!0,this.goodsId=t,this.previewKey=""},getCategorySelect:function(){var t=this;Object(r["s"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getCategoryList:function(){var t=this;Object(r["r"])().then((function(e){t.categoryList=e.data})).catch((function(e){t.$message.error(e.message)}))},getLstFilterApi:function(){var t=this;Object(r["Q"])().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(r["Yb"])(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 i=this;this.$modalSure("5"!==this.tableFrom.type?"加入回收站":"删除该商品").then((function(){"5"===i.tableFrom.type?Object(r["v"])(t).then((function(t){var e=t.message;i.$message.success(e),i.getList(""),i.getLstFilterApi()})).catch((function(t){var e=t.message;i.$message.error(e)})):Object(r["fb"])(t).then((function(t){var e=t.message;i.$message.success(e),i.getList(""),i.getLstFilterApi()})).catch((function(t){var e=t.message;i.$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(r["n"])(e.labelForm).then((function(t){var i=t.message;e.$message.success(i),e.getList(""),e.dialogLabel=!1,e.isBatch=!1})):Object(r["Vb"])(e.product_id,e.labelForm).then((function(t){var i=t.message;e.$message.success(i),e.getList(""),e.dialogLabel=!1})))}))},onchangeIsShow:function(t){var e=this;Object(r["Kb"])(t.product_id,t.is_show).then((function(t){var i=t.message;e.$message.success(i),e.getList(""),e.getLstFilterApi()})).catch((function(t){var i=t.message;e.$message.error(i)}))},importShort:function(){this.dialogImport=!0},importClose:function(){this.dialogImport=!1},importShortImg:function(){this.dialogImportImg=!0},importCloseImg:function(){this.dialogImportImg=!1},importXlsUpload:function(){var t=Object(o["a"])(Object(n["a"])().mark((function t(e){var i,s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log("上传",e),i=e.file,s=new FormData,s.append("file",i),Object(r["K"])(s).then((function(t){u["Message"].success(t.message)})).catch((function(t){u["Message"].error(t)}));case 5:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),importZipUpload:function(){var t=Object(o["a"])(Object(n["a"])().mark((function t(e){var i,s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:console.log("上传",e),i=e.file,s=new FormData,s.append("file",i),Object(r["J"])(s).then((function(t){u["Message"].success(t.message)})).catch((function(t){u["Message"].error(t)}));case 5:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}()}},h=m,d=(i("4d5f"),i("2877")),p=Object(d["a"])(h,s,a,!1,null,"5d58d76d",null);e["default"]=p.exports}}]); |