"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[59596],{59596:function(e,t,a){a.r(t),a.d(t,{default:function(){return s}});var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"g-pa-xl",staticStyle:{background:"white"}},[t("el-form",{ref:"form",staticClass:"g-mt-md",attrs:{inline:!0,model:e.form,"label-width":"80px"},nativeOn:{submit:function(e){e.preventDefault()}}},[t("el-form-item",{attrs:{"label-width":"0px"}},[t("el-input",{staticStyle:{width:"600px"},attrs:{placeholder:"请输入内容"},model:{value:e.form.link,callback:function(t){e.$set(e.form,"link",t)},expression:"form.link"}},[t("el-select",{staticStyle:{width:"125px"},attrs:{slot:"prepend"},slot:"prepend",model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.crawlerType,(function([e,a]){return t("el-option",{key:e,attrs:{label:a,value:e}})})),1)],1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.transferGoods()}}},[e._v("确认搬家")])],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.fetchDataSource(1)}}},[e._v("刷新列表")])],1),t("div",{staticStyle:{color:"red"}},[e._v(" 注意："),t("br"),e._v("1.搬家后的商品默认为下架状态，需要手动上架"),t("br"),e._v(" 2.搬运的商品价格=速卖通价格，运费为0，建议商家调整价格和运费后再上架"),t("br"),e._v(" 3.部分商品类目无法自动匹配，需要您手动匹配后才可销售"),t("br"),e._v(" 4.目前仅支持搬运速卖通和1688的店铺和商品"),t("br")])],1),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.dataSource.records}},[t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"link",label:"链接地址"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"type",label:"类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.getCrawlerType(t.row.type))+" ")]}}])}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.getCrawlerStatus(t.row.status))+" ")]}}])}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"num",label:"已搬商品数"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"create_time",label:"申请时间"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"finish_time",label:"完成时间"}}),t("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"actions",label:"操作"},scopedSlots:e._u([{key:"default",fn:function({row:a}){return[t("el-button",{attrs:{type:"text"},on:{click:function(t){return e.showEditModal(a)}}},[e._v("导出")])]}}])})],1),t("div",{staticClass:"g-pagination-container"},[t("el-pagination",{attrs:{"current-page":e.dataSource.pageNow,"page-sizes":[20,50,100],"page-size":e.dataSource.pageSize,layout:"sizes, prev, pager, next, jumper",background:"",total:e.dataSource.rowCount},on:{"size-change":function(t){return e.fetchDataSource(null,t)},"current-change":function(t){return e.fetchDataSource(t)}}})],1)],1)},n=[],l={data(){return{crawlerType:new Map([[0,"店铺链接"],[1,"商品链接"]]),form:{type:0},dataSource:{records:[],pageNow:1,pageSize:20},loading:!1}},mounted(){this.fetchDataSource()},methods:{getCrawlerType(e){return this.crawlerType.get(e)},getCrawlerStatus(e){const t=new Map([[0,"搬家中"],[1,"已完成"]]);return t.get(e)},transferGoods(){this.form.link&&this.form.link.length>0&&this.$store.dispatch({type:"product/transferGoods",payload:{...this.form}}).then((e=>{e&&this.fetchDataSource()}))},async fetchDataSource(e,t){this.loading=!0;const a={pageNow:e||this.dataSource.pageNow,pageSize:t||this.dataSource.pageSize},r=await this.$store.dispatch({type:"product/transferGoodsList",payload:a});r&&(this.dataSource=r),this.loading=!1}}},o=l,i=a(81656),c=(0,i.A)(o,r,n,!1,null,null,null),s=c.exports}}]);