This commit is contained in:
刘仕伟
2024-01-23 22:40:02 +08:00
parent 21b754497b
commit 0047e3dbe7
4 changed files with 133 additions and 12 deletions

View File

@@ -199,7 +199,7 @@ export default {
flag = true
}
})
if (!flag) {
if (!flag && (item1.specKeyId != 1001 && item1.specKeyId != 43404162)) {
specIds.push({spec_key_id: item1.spec_key_id, spec_value: item1.spec_value})
}
})
@@ -265,7 +265,7 @@ export default {
flag = true
}
})
if (!flag) {
if (!flag && (item1.specKeyId != 1001 && item1.specKeyId != 43404162)) {
specIds.push({specKeyId: item1.specKeyId, specValue: item1.specValue})
}
})

View File

@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "TEMU助手",
"description": "TEMU助手 - 自动化提高生产效率",
"version": "3.1.7",
"version": "3.1.8",
"background": {
"service_worker": "/background.js"
},

View File

@@ -442,12 +442,7 @@ import {sendTemuAPIMessage, sendSheinAPIMessage} from '@/api/chromeApi'
res.goods.map(item => {
let total = 0
if (item.pretreatInfo?.sellingPointUniversalLabels) {
for (let i = 0; i < item.pretreatInfo.sellingPointUniversalLabels.length; i++) {
if (item.pretreatInfo.sellingPointUniversalLabels[i].starComment) {
total = item.pretreatInfo.sellingPointUniversalLabels[i].starComment?.comment_num || 0
break
}
}
total = item.pretreatInfo.sellingPointUniversalLabels[0].starComment?.comment_num || 0
}
reqData.details.push({

View File

@@ -29,6 +29,11 @@
<div></div>
</div>
</el-badge>
<el-badge v-if="errorList.length > 0" :value="errorList.length" style="margin-right: 10px">
<div class="errorTips" style="cursor: pointer" @click="errorDlgShow = true">
<div></div>
</div>
</el-badge>
<el-badge :value="successList.length" class="item">
<el-button :icon="'el-icon-tickets'" @click="successDlgShow = true" circle></el-button>
</el-badge>
@@ -117,7 +122,11 @@
</div>
<div class="search-item">
<label style="width:90px">SKC</label>
<el-input size="small" style="display: inline" placeholder="请输入SKC多SKC用,隔开" v-model="skc"></el-input>
<el-input size="small" style="display: inline" placeholder="请输入SKCSKC用,隔开" v-model="skc"></el-input>
</div>
<div class="search-item">
<label style="width:90px">备货单号</label>
<el-input size="small" style="display: inline" placeholder="请输入备货单号,多个备货单号用,隔开" v-model="searchSns"></el-input>
</div>
</template>
<template #right>
@@ -200,6 +209,39 @@
</span>
</AiDialog>
<AiDialog
title="抢仓异常列表"
:visible.sync="errorDlgShow"
:close-on-click-modal="false"
customFooter
width="1290px">
<ai-table
:tableData="errorList"
:col-configs="errorListColConfigs"
:total="errorList.length"
height="500"
:isShowPagination="false"
style="margin-top: 8px;">
<el-table-column slot="url" label="处理" show-overflow-tooltip align="center">
<template slot-scope="{ row }">
<div>
<a class="el-link el-link--primary" v-if="row.url" :href="row.url" target="_blank">去处理</a>
</div>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" width="80px" show-overflow-tooltip align="center" fixed="right">
<template slot-scope="{ row }">
<div class="table-options">
<el-button type="text" @click="removeError(row.sn)">移除</el-button>
</div>
</template>
</el-table-column>
</ai-table>
<span slot="footer" class="dialog-footer">
<el-button @click="errorDlgShow = false"> </el-button>
</span>
</AiDialog>
<AiDialog
title="抢仓设置"
:visible.sync="robDlgShow"
@@ -301,9 +343,16 @@
{ prop: 'productName', label: '商品名称', "show-overflow-tooltip": true, width: '580px' },
{ prop: 'productSn', label: '货号' }
],
errorListColConfigs: [
{ prop: 'sn', width: '180px', label: '备货单号', align: 'left' },
{ prop: 'mallName', label: '店铺名称', width: '180px', align: 'center' },
{ prop: 'errorMsg', label: '错误信息', width: '380px', align: 'center' },
{ slot: 'url' }
],
mallId: '',
mallName: '',
skc: '',
searchSns: '',
tableData: [],
total: 0,
isBegin: false,
@@ -339,7 +388,9 @@
robDlgShow: false,
addressList: []
addressList: [],
errorList: [],
errorDlgShow: false
}
},
@@ -480,6 +531,7 @@
if (valid) {
this.networkErrorCount = 0
this.robDlgShow = false
this.errorList = []
this.beginRob()
}
})
@@ -497,7 +549,8 @@
"statusList": [
1
],
productSkcIdList: this.skc? this.skc.split(','): null
productSkcIdList: this.skc? this.skc.split(','): null,
subPurchaseOrderSnList: this.searchSns? this.searchSns.split(','): null
}}).then((res) => {
if (res.errorCode == 1000000) {
let length = res.result.subOrderForSupplierList.length
@@ -552,6 +605,14 @@
}
}
},
removeError(sn) {
for (let i = 0; i < this.errorList.length; i++) {
if (this.errorList[i].sn == sn) {
this.errorList.splice(i, 1)
break
}
}
},
getStyle(url) {
return "background-image: url(" + url + "); width: 72px; height: 72px; cursor: pointer; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.14);";
},
@@ -606,6 +667,13 @@
this.addSuccessInfo(this.choosedList[j]);
this.sendNotification(this.choosedList[j]);
this.choosedList.splice(j, 1);
for (let k = 0; k < this.errorList.length; k++) {
if (this.errorList[k].sn == sn) {
this.errorList.splice(k, 1);
break
}
}
break;
}
}
@@ -632,6 +700,27 @@
this.isShowWarning = true
this.warningText = '账号异常,请更换“卖家中心”账号'
}
if (res.errorCode == 1000000 && !res.result.isSuccess) {
if (res.result.errorInfoList[0]) {
if (res.result.errorInfoList[0].errorCode == -10007) {
let temp = this.errorList.filter(item => {
return item.sn == sn
})
if (temp.length == 0) {
let mallInfo = this.mallList.filter(item1 => {
return item1.mallId == this.mallId
})
let mallName = mallInfo[0].mallName
this.errorList.push({
sn: res.result.errorInfoList[0].id,
errorMsg: res.result.errorInfoList[0].errorMsg,
mallName: mallName,
url: res.result.errorInfoList[0].extraInfoMap?.url
})
}
}
}
}
if (this.isBegin) {
// 继续抢
setTimeout(() => {
@@ -809,6 +898,43 @@
}
}
.errorTips {
position: relative;
width: 40px;
height: 40px;
border-radius: 50%;
background: rgb(255, 0, 0);
@keyframes warn {
0% {
transform: translate(-50%, -50%) scale(0);
opacity: 1;
}
100% {
transform: translate(-50%, -50%) scale(1.1);
opacity: 0;
}
}
div {
position: absolute;
left: 50%;
top: 50%;
z-index: 11;
width: 100px;
height: 100px;
border-radius: 50%;
animation: warn 0.9s ease-out;
animation-iteration-count: infinite;
box-shadow: 1px 1px 30px #EF2D02;
transform: translate(-50%, -50%) scale(0.2);
transition: all ease-in-out 0.6s;
background: rgba(255, 0, 0, .6);
}
}
.order-manage_productInfo__1pD83>img {
width: 60px;