diff --git a/package.json b/package.json index 6848310..dc30477 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,8 @@ "crypto-js": "^4.0.0", "dayjs": "^1.11.9", "element-ui": "^2.15.13", + "file-saver": "^2.0.5", + "html2canvas": "^1.4.1", "query-string": "^9.0.0", "spark-md5": "^3.0.2", "v-viewer": "^1.6.4", @@ -22,7 +24,8 @@ "vue-qr": "^4.0.9", "vue-router": "^3.2.0", "vuex": "^3.4.0", - "vuex-persistedstate": "^4.1.0" + "vuex-persistedstate": "^4.1.0", + "xlsx": "^0.18.5" }, "devDependencies": { "@babel/core": "^7.12.16", diff --git a/public/js/download.js b/public/js/download.js index 0453bee..142dc60 100644 --- a/public/js/download.js +++ b/public/js/download.js @@ -1,3 +1,8 @@ +function matchSheinDomain(url) { + const urlPattern = /https:\/\/([\da-z\.-]+)\.shein\.com\/([\S.-]+)-p-([\S.-]+)/ + return urlPattern.test(url); +} + function init() { if (window.location.href.startsWith('https://www.aliexpress.com/item/')) { const popup = document.createElement("div") @@ -187,6 +192,111 @@ function init() { }) document.body.appendChild(popup) } + } else if (matchSheinDomain(window.location.href)) { + const popup = document.createElement("div") + popup.innerText = "下载图片" + const styles = { + position: "fixed", + right: '10px', + top: '60px', + zIndex: 9999, + padding: "8px", + background: "#409EFF", + color: "#fff", + borderRadius: "8px", + cursor: "pointer" + } + for (const e in styles) { + popup.style[e] = styles[e] + } + + popup.addEventListener('click', async () => { + var baseList = []; + var downloadList = [] + + let bannerIdx = 1, detailIdx = 1 + baseList.push({type: 0, index: bannerIdx++, src: window.gbRawData.productIntroData.goods_imgs.main_image.origin_image}) + var detailImages = window.gbRawData.productIntroData.goods_imgs.detail_image + + for (var i = 0; i < detailImages.length; i++) { + if (!(detailImages[i].isMoreDetail)) { + baseList.push({type: 0, index: bannerIdx++, src: detailImages[i].origin_image}) + } else { + baseList.push({type: 1, index: detailIdx++, src: detailImages[i].origin_image}) + } + } + + var video = document.querySelector('video') + if (window.gbRawData.productIntroData.goods_imgs.video_url) { + baseList.push({type: 2, index: 1, src: window.gbRawData.productIntroData.goods_imgs.video_url}) + } + + var zip = new JSZip(); + var imgsBanner = zip.folder("轮播图"); + var imgsDetail = zip.folder("详情图"); + var videos = zip.folder("视频"); + + for (var k = 0; k < baseList.length; k++) { + let type = baseList[k].type + let index = baseList[k].index + if (type == 2) { + let x = new XMLHttpRequest() + x.open('GET', baseList[k].src, true) + x.responseType = 'blob' + x.onload = (e) => { + downloadList.push({type: type, index: index, data: x.response}); + if (downloadList.length === baseList.length && downloadList.length > 0) { + for (let l = 0; l < downloadList.length; l++) { + if (downloadList[l].type == '0') { + imgsDetail.file(`详情图${downloadList[l].index}.png`, downloadList[l].data, { base64: true }); + } else if (downloadList[l].type == '1') { + imgsBanner.file(`轮播图${downloadList[l].index}.png`, downloadList[l].data, { base64: true }); + } else if (downloadList[l].type == '2') { + videos.file(`视频.mp4`, downloadList[l].data, { Blob: true }); + } + } + zip.generateAsync({ type: "blob" }).then(function (content) { + // see FileSaver.js + saveAs(content, "shein_" + id + ".zip"); + }); + } + } + x.send() + } else { + let image = new Image(); + // 解决跨域 Canvas 污染问题 + image.setAttribute("crossOrigin", "anonymous"); + image.onload = function () { + let canvas = document.createElement("canvas"); + canvas.width = image.width; + canvas.height = image.height; + let context = canvas.getContext("2d"); + context.drawImage(image, 0, 0, image.width, image.height); + let url = canvas.toDataURL(); // 得到图片的base64编码数据 + canvas.toDataURL("image/png"); + downloadList.push({type: type, index: index, data: url.substring(22)}); // 去掉base64编码前的 data:image/png;base64, + if (downloadList.length === baseList.length && downloadList.length > 0) { + for (let l = 0; l < downloadList.length; l++) { + if (downloadList[l].type == '0') { + imgsDetail.file(`详情图${downloadList[l].index}.png`, downloadList[l].data, { base64: true }); + } else if (downloadList[l].type == '1') { + imgsBanner.file(`轮播图${downloadList[l].index}.png`, downloadList[l].data, { base64: true }); + } else if (downloadList[l].type == '2') { + videos.file(`视频.mp4`, downloadList[l].data, { Blob: true }); + } + } + zip.generateAsync({ type: "blob" }).then(function (content) { + // see FileSaver.js + saveAs(content, "shein_" + id + ".zip"); + }); + } + }; + image.src = baseList[k].src; + } + } + }) + document.body.appendChild(popup) + } } diff --git a/public/rules_7.json b/public/rules_7.json new file mode 100644 index 0000000..b4c61d0 --- /dev/null +++ b/public/rules_7.json @@ -0,0 +1,29 @@ +[ + { + "id": 18, + "priority": 1, + "action": { + "type": "modifyHeaders", + "requestHeaders": [ + { + "header": "Origin", + "operation": "set", + "value": "https://img.ltwebstatic.com" + }, + { + "header": "Referer", + "operation": "set", + "value": "https://img.ltwebstatic.com" + }, + { + "header": "Sec-Fetch-Mode", + "operation": "set", + "value": "no-cors" + } + ] + }, + "condition": { + "urlFilter": "||img.ltwebstatic.com" + } + } +] \ No newline at end of file diff --git a/public/rules_8.json b/public/rules_8.json new file mode 100644 index 0000000..1efbc83 --- /dev/null +++ b/public/rules_8.json @@ -0,0 +1,24 @@ +[ + { + "id": 19, + "priority": 1, + "action": { + "type": "modifyHeaders", + "requestHeaders": [ + { + "header": "Origin", + "operation": "set", + "value": "https://www.geiwohuo.com/" + }, + { + "header": "Referer", + "operation": "set", + "value": "https://www.geiwohuo.com/" + } + ] + }, + "condition": { + "urlFilter": "||www.geiwohuo.com" + } + } +] \ No newline at end of file diff --git a/public/rules_9.json b/public/rules_9.json new file mode 100644 index 0000000..c78d649 --- /dev/null +++ b/public/rules_9.json @@ -0,0 +1,24 @@ +[ + { + "id": 20, + "priority": 1, + "action": { + "type": "modifyHeaders", + "requestHeaders": [ + { + "header": "Origin", + "operation": "set", + "value": "https://agentseller.temu.com/" + }, + { + "header": "Referer", + "operation": "set", + "value": "https://agentseller.temu.com/" + } + ] + }, + "condition": { + "urlFilter": "||agentseller.temu.com" + } + } +] \ No newline at end of file diff --git a/src/api/chromeApi.js b/src/api/chromeApi.js index c37d080..36368b0 100644 --- a/src/api/chromeApi.js +++ b/src/api/chromeApi.js @@ -26,6 +26,32 @@ export async function sendChromeAPIMessage(message) { }) } + +/** + * 向Chrome发送消息 + * @param message 消息 + */ +export async function sendTemuSellerAgentMessage(message) { + message.type = 'api' + if (!message.url.startsWith('http')) { + message.url = "https://agentseller.temu.com/" + message.url; + } + message.anti = message.anti || false + if (message.needMallId) { + // 如果参数中没有携带MallId,则从state中获取 + if (!message.mallId) { + message.mallId = store.state.mallId; + } + } + if (message.anti) { + message.anti = await genAnti.a() + } + return new Promise((resolve) => { + // @ts-ignore + chrome.runtime.sendMessage(message, resolve) + }) +} + /** * 向Chrome发送消息 * @param message 消息 @@ -74,7 +100,11 @@ export async function sendSheinAPIMessage(message) { */ export async function sendGeiwohuoAPIMessage(message) { message.type = 'geiwohuoApi' - message.url = "https://sso.geiwohuo.com/" + message.url; + if (message.isWWW) { + message.url = "https://www.geiwohuo.com/" + message.url; + } else { + message.url = "https://sso.geiwohuo.com/" + message.url; + } return new Promise((resolve) => { // @ts-ignore chrome.runtime.sendMessage(message, resolve) diff --git a/src/components/AiCopyFromTemu.vue b/src/components/AiCopyFromTemu.vue index 50a16a3..cdba9a2 100644 --- a/src/components/AiCopyFromTemu.vue +++ b/src/components/AiCopyFromTemu.vue @@ -368,13 +368,17 @@ export default { let content = data let i = 0 if (this.form.isSameCategory) { - let res2 = await this.$http.post('/api/innerCategory/fullById',null , { + /*let res2 = await this.$http.post('/api/innerCategory/fullById',null , { params: { id: reqData.catId } - }) - for (; i < res2.data.length; i++) { - content['cat' + (i+1) + 'Id'] = res2.data[i] + })*/ + for (; i < 10; i++) { + if (content['cat' + (i+1) + 'Id']) { + continue + }else { + break + } } let res3 = await sendChromeAPIMessage({ @@ -422,6 +426,9 @@ export default { content['cat' + (i+1) + 'Id'] = this.form.targetCatId[i] } } + if (content['cat'+(i+1)+'Id'] != reqData.catId) { + content['cat'+(++i)+'Id'] = reqData.catId + } for (; i < 10; i++) { content['cat' + (i+1) + 'Id'] = '' } diff --git a/src/manifest.development.json b/src/manifest.development.json index f946080..9788813 100644 --- a/src/manifest.development.json +++ b/src/manifest.development.json @@ -21,7 +21,8 @@ "*://*.alicdn.com/", "*://*.amazon.com/", "*://*.shein.com/", - "*://*.geiwohuo.com/" + "*://*.geiwohuo.com/", + "*://*.ltwebstatic.com/" ], "permissions": [ "cookies", @@ -51,13 +52,26 @@ "id": "6", "enabled": true, "path": "rules_6.json" + },{ + "id": "7", + "enabled": true, + "path": "rules_7.json" + },{ + "id": "8", + "enabled": true, + "path": "rules_8.json" + },{ + "id": "9", + "enabled": true, + "path": "rules_9.json" }] }, "content_scripts": [ { "matches": [ "*://*.aliexpress.com/item/*", - "*://*.amazon.com/*" + "*://*.amazon.com/*", + "*://*.shein.com/*" ], "js": [ "/content.js" @@ -67,7 +81,7 @@ "web_accessible_resources": [ { "resources": [ "js/download.js","js/jszip.min.js","js/FileSaver.js" ], - "matches": [ "*://*.aliexpress.com/*", "*://*.amazon.com/*" ] + "matches": [ "*://*.aliexpress.com/*", "*://*.amazon.com/*", "*://*.shein.com/*" ] } ] } diff --git a/src/manifest.production.json b/src/manifest.production.json index b33a91e..7299469 100644 --- a/src/manifest.production.json +++ b/src/manifest.production.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "TEMU助手", "description": "TEMU助手 - 自动化提高生产效率", - "version": "3.2.1", + "version": "3.2.3", "background": { "service_worker": "/background.js" }, @@ -21,7 +21,8 @@ "*://*.alicdn.com/", "*://*.amazon.com/", "*://*.shein.com/", - "*://*.geiwohuo.com/" + "*://*.geiwohuo.com/", + "*://*.ltwebstatic.com/" ], "permissions": [ "cookies", @@ -55,13 +56,26 @@ "id": "6", "enabled": true, "path": "rules_6.json" + },{ + "id": "7", + "enabled": true, + "path": "rules_7.json" + },{ + "id": "8", + "enabled": true, + "path": "rules_8.json" + },{ + "id": "9", + "enabled": true, + "path": "rules_9.json" }] }, "content_scripts": [ { "matches": [ "*://*.aliexpress.com/item/*", - "*://*.amazon.com/*" + "*://*.amazon.com/*", + "*://*.shein.com/*" ], "js": [ "/content.js" @@ -71,7 +85,7 @@ "web_accessible_resources": [ { "resources": [ "js/download.js","js/jszip.min.js","js/FileSaver.js" ], - "matches": [ "*://*.aliexpress.com/*", "*://*.amazon.com/*" ] + "matches": [ "*://*.aliexpress.com/*", "*://*.amazon.com/*", "*://*.shein.com/*" ] } ] } diff --git a/src/router/index.js b/src/router/index.js index 129195e..c4accf1 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -85,15 +85,20 @@ const router = new VueRouter({ name: 'copyProduct', component: () => import('../view/product/CopyProduct.vue') }, + { + path: 'sellerSelect', + name: 'sellerSelect', + component: () => import('../view/product/SellerSelect.vue') + }, { path: 'draft', name: 'draft', component: () => import('../view/product/Draft.vue') }, { - path: 'copyProductShein', - name: 'copyProductShein', - component: () => import('../view/product/CopyProductShein.vue') + path: 'findSeller', + name: 'findSeller', + component: () => import('../view/product/FindSeller.vue') }, { path: 'copyProductAliExpress', @@ -172,21 +177,56 @@ const router = new VueRouter({ component: () => import('../view/CoinFlow.vue') }, + { + path: 'costManageTemu', + name: 'costManageTemu', + component: () => import('../view/sale/CostManageTemu.vue') + }, { path: 'saleData', name: 'saleData', component: () => import('../view/sale/ExportSaleData.vue') }, - { - path: 'saleDataShein', - name: 'saleDataShein', - component: () => import('../view/sale/ExportSaleDataShein.vue') - }, { path: 'saleOut', name: 'saleOut', component: () => import('../view/sale/ExportSaleOutData.vue') }, + { + path: 'afterSaleStat', + name: 'afterSaleStat', + component: () => import('../view/sale/AfterSaleStat.vue') + }, + { + path: 'afterSaleDeductStat', + name: 'afterSaleDeductStat', + component: () => import('../view/sale/AfterSaleDeductStat.vue') + }, + { + path: 'costManageShein', + name: 'costManageShein', + component: () => import('../view/shein/CostManageShein.vue') + }, + { + path: 'certCenterShein', + name: 'certCenterShein', + component: () => import('../view/shein/CertCenterShein.vue') + }, + { + path: 'saleDataShein', + name: 'saleDataShein', + component: () => import('../view/shein/ExportSaleDataShein.vue') + }, + { + path: 'saleStatShein', + name: 'saleStatShein', + component: () => import('../view/shein/ExportSaleStatShein.vue') + }, + { + path: 'copyProductShein', + name: 'copyProductShein', + component: () => import('../view/shein/CopyProductShein.vue') + }, // { // path: 'statistics', diff --git a/src/store/index.js b/src/store/index.js index ab9578a..62b4aed 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -13,6 +13,8 @@ export default new Vuex.Store({ mallName: '', mallList: [], activeDlgShow: false, + showSheinAlert: false, + showTemuAlert: false, userInfo: {} }, @@ -46,6 +48,12 @@ export default new Vuex.Store({ }, setActiveDlgShow(state, flag) { state.activeDlgShow = flag + }, + setSheinAlertShow(state, flag) { + state.showSheinAlert = flag + }, + setTemuAlertShow(state, flag) { + state.showTemuAlert = flag } }, diff --git a/src/utils/product.js b/src/utils/product.js index c2f19b1..9a2e6f6 100644 --- a/src/utils/product.js +++ b/src/utils/product.js @@ -18,8 +18,9 @@ export function transform(leftData) { rightData.materialMultiLanguages = leftData.productLocalExtAttr.materialMultiLanguages; rightData.productI18nReqs = leftData.productI18nList; rightData.productPropertyReqs = []; + let flag = false for (let i = 0; i < leftData.productPropertyList.length; i++) { - rightData.productPropertyReqs.push({ + let val = { valueUnit: leftData.productPropertyList[i].valueUnit, propValue: leftData.productPropertyList[i].propValue, propName: leftData.productPropertyList[i].propName, @@ -29,9 +30,31 @@ export function transform(leftData) { pid: leftData.productPropertyList[i].pid, templatePid: leftData.productPropertyList[i].templatePid, valueExtendInfo: leftData.productPropertyList[i].valueExtendInfo - }); + } + /*if (leftData.productPropertyList[i].vid == 41500) { + if (config.brandId) { + flag = true + val.pid = 41500 + val.propName = config.brandName + } + }*/ + rightData.productPropertyReqs.push(val); } + /*if (config.brandId && !flag) { + rightData.productPropertyReqs.push({ + "valueUnit": "", + "propValue": config.brandName, + "propName": "品牌名", + "refPid": 1960, + "vid": 41500, + "controlType": 1, + "pid": config.brandId, + "templatePid": 1151553, + "valueExtendInfo": "" + }) + }*/ + // SKC let rightSkc = []; let leftSkc = leftData.productSkcList; @@ -159,6 +182,7 @@ export function transformSubmitForHalf(leftData, config, draftId) { rightData.materialMultiLanguages = leftData.productLocalExtAttr.materialMultiLanguages; rightData.productI18nReqs = leftData.productI18nList; rightData.productPropertyReqs = []; + if (!leftData.productPropertyList) return rightData for (let i = 0; i < leftData.productPropertyList.length; i++) { rightData.productPropertyReqs.push({ valueUnit: leftData.productPropertyList[i].valueUnit, @@ -240,6 +264,7 @@ export function transformSubmitForHalf(leftData, config, draftId) { } rightSkuItem.productSkuStockQuantityReq = productSkuStockQuantityReq rightSkuItem.currencyType = leftSkuItem.currencyType; + rightSkuItem.supplierPrice = leftSkuItem.supplierPrice + config.upMoney * 100; rightSkcItem.productSkuReqs.push(rightSkuItem); } @@ -255,6 +280,14 @@ export function transformSubmitForHalf(leftData, config, draftId) { rightData.carouselImageI18nReqs = leftData.carouselImageI18nVOList; rightData.materialImgUrl = leftData.materialImgUrl; rightData.goodsLayerDecorationReqs = leftData.goodsLayerDecorationVOList; + rightData.goodsLayerDecorationReqs.map(item => { + if (item.type == 'image') { + item.contentList.map(item1 => { + delete item1.text + delete item1.textModuleDetails + }) + } + }) rightData.sizeTemplateIds = !leftData.sizeTemplateIds ? []: leftData.sizeTemplateIds; rightData.showSizeTemplateIds = !leftData.showSizeTemplateIds ? []: leftData.showSizeTemplateIds; rightData.goodsModelReqs = !leftData.goodsModelList ? []: leftData.goodsModelList; diff --git a/src/view/Home.vue b/src/view/Home.vue index 6d6e1eb..fb6d18a 100644 --- a/src/view/Home.vue +++ b/src/view/Home.vue @@ -70,8 +70,11 @@ 商品列表 商品复制 - 草稿箱管理 - 商品复制(希音) + 查找买手 + + 草稿箱管理 + + 上新生命周期管理 @@ -126,18 +129,31 @@ 销售管理 - 销售管理(TEMU) - 销售数据(SHEIN) + 成本管理 + 销售管理 售罄看板 + 售后统计 + 售后赔付统计 + + + + 成本管理 + 销售数据 + 证书中心 + 商品复制 + 商家账单统计 弹窗消息 - + 新手园地 @@ -164,6 +180,27 @@ :before-close="handleClose"> + + 1、检查“SHEIN商家后台”是否登录,如没登录,请先登录,之后再刷新助手
+ 2、如果SHEIN商家后台已经登录,仍然弹出当前窗口,则需要SHEIN进行二次授权,二次授权可在菜单“商品管理->商品列表”,任意选择一个商品,在“价格”一栏,点击修改,在新打开的页面中可看到“正在鉴权”的字样,即可完成二次授权 + + 关 闭 + +
+ + 请先打开卖家中心“结算数据->售后管理”页面进行二次授权,去打开
+ + 关 闭 + +
@@ -174,7 +211,7 @@ diff --git a/src/view/product/FindSeller.vue b/src/view/product/FindSeller.vue new file mode 100644 index 0000000..e6cd1ce --- /dev/null +++ b/src/view/product/FindSeller.vue @@ -0,0 +1,118 @@ + + + + + \ No newline at end of file diff --git a/src/view/product/ProductList.vue b/src/view/product/ProductList.vue index a732e8d..9b9203a 100644 --- a/src/view/product/ProductList.vue +++ b/src/view/product/ProductList.vue @@ -3,12 +3,13 @@ @@ -80,11 +142,20 @@ import JsonExcel from 'vue-json-excel' form: { mallId: '' }, + startPage: 1, + endPage: 10, reqData: { productName: '', page: 1, pageSize: 100, - skcSiteStatus: '' + skcSiteStatus: '', + bindSiteId: '', + certPunishTypes: [], + productCertAuditStatuses: [], + jitStockQuantitySection: { + leftValue: '', + rightValue: '' + } }, options: [ {label: '是', value: 1}, @@ -100,6 +171,9 @@ import JsonExcel from 'vue-json-excel' { prop: 'extCode', label: 'SKC货号', width: '100px', align: 'left' }, { prop: 'skuExtCode', label: 'SKU货号', width: '160px', align: 'left' }, { prop: 'specName', label: 'SKU属性', width: '100px', align: 'left' }, + { prop: 'skuStockQuantity', label: '库存', width: '100px', align: 'left' }, + { prop: 'productCertAuditStatus', label: '资质上传状态', width: '120px', align: 'left' }, + { prop: 'certPunishType', label: '合规下架风险', width: '120px', align: 'left' }, { prop: 'supplierPrice', label: '申报价格(CNY)', width: '180px', align: 'left' }, { prop: 'todaySalesVolume', label: '今日销量', width: '100px', align: 'left' }, { prop: 'createdAt', label: '上架时间', width: '160px', align: 'left' } @@ -117,17 +191,47 @@ import JsonExcel from 'vue-json-excel' "SKC货号": "extCode", "SKU货号": "skuExtCode", "SKU属性": "specName", + "库存": "skuStockQuantity", + "资质上传状态": "productCertAuditStatus", + "合规下架风险": "certPunishType", "申报价格(CNY)": "supplierPrice", "今日销量": "todaySalesVolume", "上架时间": "createdAt" }, - currentIndex: 0 + certPunishTypes: [ + {id: 1, name: '已经处罚'}, + {id: 2, name: '即将下架'}, + {id: 3, name: '下架风险预警'}, + ], + productCertAuditStatusList: [ + {id: 1, name: '待上传'}, + {id: 2, name: '上传中'}, + {id: 3, name: '上传失败'}, + {id: 4, name: '上传成功'}, + ], + currentIndex: 0, + siteList: [] } }, components: { JsonExcel }, + created () { + this.getSiteList() + }, methods: { + async getSiteList() { + let res = await sendChromeAPIMessage({ + url: 'bg-visage-mms/config/common/site/query', + needMallId: true, + mallId: this.$store.state.mallList[0].mallId, + data: {}}) + if (res.success && res.errorCode == 1000000) { + this.siteList = res.result.siteBaseList.filter(item => { + return item.matchSemiManaged + }) + } + }, beforeGetList() { this.$userCheck(this.form.mallId).then(() => { this.toLoad() @@ -140,7 +244,19 @@ import JsonExcel from 'vue-json-excel' Message.error("请选择店铺") return } - this.reqData.page = 1 + if (!this.startPage || (this.startPage < 1)) { + Message.error("起始页不能为空,且不能小于1") + return + } + if (!this.endPage || (this.startPage < 1)) { + Message.error("结束页不能为空") + return + } + if (this.startPage > this.endPage) { + Message.error("起始页不能大于结束页") + return + } + this.reqData.page = this.startPage this.tableData = [] this.currentIndex = 0 this.isLoading = true @@ -164,6 +280,24 @@ import JsonExcel from 'vue-json-excel' data.skcSiteStatus = item.skcSiteStatus == '1'? '在售': '' data.createdAt = timestampToTime(item.createdAt) data.extCode = item.extCode + data.productCertAuditStatus = '-' + if (item.productCertAuditStatus == 1) { + data.productCertAuditStatus = '待上传' + } else if (item.productCertAuditStatus == 2) { + data.productCertAuditStatus = '上传中' + } else if (item.productCertAuditStatus == 3) { + data.productCertAuditStatus = '上传失败' + } else if (item.productCertAuditStatus == 4) { + data.productCertAuditStatus = '上传成功' + } + data.certPunishType = '-' + if (item.productCertPunish?.certPunishType == 1) { + data.certPunishType = '已经处罚' + } else if (item.productCertPunish?.certPunishType == 2) { + data.certPunishType = '即将下架' + } else if (item.productCertPunish?.certPunishType == 3) { + data.certPunishType = '下架风险预警' + } data.category = '' for (let i = 1; i < 11; i++) { @@ -179,21 +313,23 @@ import JsonExcel from 'vue-json-excel' let temp = item.productSkuSummaries[k].productSkuSpecList.map(item2 => { return item2.parentSpecName + ":" + item2.specName }) + let skuStockQuantity = '-' + if (item.productSkuSummaries[k].productSkuSemiManagedStock) { + skuStockQuantity = item.productSkuSummaries[k].productSkuSemiManagedStock.skuStockQuantity + } data = {...data, productSkuId: item.productSkuSummaries[k].productSkuId, skuExtCode: item.productSkuSummaries[k].extCode, supplierPrice: item.productSkuSummaries[k].supplierPrice / 100, specName: temp.join(","), + skuStockQuantity, todaySalesVolume: item.productSkuSummaries[k].todaySalesVolume} this.tableData.push(data) } } - if (this.reqData.page == 1 && res.result.pageItems.length == 0) { - this.isLoading = false - } - else if (res.result.pageItems.length == 100) { + if (res.result.pageItems.length == this.reqData.pageSize && this.reqData.page < this.endPage) { this.reqData.page ++ this.load() } else { diff --git a/src/view/product/SellerSelect.vue b/src/view/product/SellerSelect.vue new file mode 100644 index 0000000..28569d7 --- /dev/null +++ b/src/view/product/SellerSelect.vue @@ -0,0 +1,272 @@ + + + + + \ No newline at end of file diff --git a/src/view/sale/AfterSaleDeductStat.vue b/src/view/sale/AfterSaleDeductStat.vue new file mode 100644 index 0000000..cb6aa75 --- /dev/null +++ b/src/view/sale/AfterSaleDeductStat.vue @@ -0,0 +1,270 @@ + + + + + \ No newline at end of file diff --git a/src/view/sale/AfterSaleStat.vue b/src/view/sale/AfterSaleStat.vue new file mode 100644 index 0000000..6469b2e --- /dev/null +++ b/src/view/sale/AfterSaleStat.vue @@ -0,0 +1,301 @@ + + + + + \ No newline at end of file diff --git a/src/view/sale/CostManageTemu.vue b/src/view/sale/CostManageTemu.vue new file mode 100644 index 0000000..a085499 --- /dev/null +++ b/src/view/sale/CostManageTemu.vue @@ -0,0 +1,361 @@ + + + + + diff --git a/src/view/sale/ExportSaleData.vue b/src/view/sale/ExportSaleData.vue index 739331b..4b60f38 100644 --- a/src/view/sale/ExportSaleData.vue +++ b/src/view/sale/ExportSaleData.vue @@ -68,12 +68,12 @@