This commit is contained in:
yanran200730
2023-09-12 16:28:20 +08:00
4 changed files with 39 additions and 3 deletions

View File

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

View File

@@ -140,6 +140,7 @@
</template> </template>
<script> <script>
import { mapState } from 'vuex'
import {sendChromeAPIMessage} from '@/api/chromeApi' import {sendChromeAPIMessage} from '@/api/chromeApi'
import JsonExcel from 'vue-json-excel' import JsonExcel from 'vue-json-excel'
import {formatDate} from '@/utils/date' import {formatDate} from '@/utils/date'
@@ -154,6 +155,7 @@ import { Message } from 'element-ui'
last30DaySkcList: [], last30DaySkcList: [],
last30DaySkuList: [], last30DaySkuList: [],
mallId: '', mallId: '',
mallName: '',
type: '0', type: '0',
isLoading: false, isLoading: false,
pageSize: 10, pageSize: 10,
@@ -169,6 +171,7 @@ import { Message } from 'element-ui'
endDate: '', endDate: '',
jsonFields: { jsonFields: {
"商品名称": "productName", "商品名称": "productName",
"店铺名称": "mallName",
"SPU": "productId", "SPU": "productId",
"SKC": "productSkcId", "SKC": "productSkcId",
"SKU ID": "productSkuId", "SKU ID": "productSkuId",
@@ -219,6 +222,7 @@ import { Message } from 'element-ui'
}, },
computed: { computed: {
...mapState(['mallList']),
colConfigs () { colConfigs () {
return [ return [
{ {
@@ -228,6 +232,13 @@ import { Message } from 'element-ui'
width: '280px', width: '280px',
align: 'left' align: 'left'
}, },
{
prop: 'mallName',
label: '店铺名称',
"show-overflow-tooltip": true,
width: '120px',
align: 'left'
},
{ {
prop: 'productId', prop: 'productId',
label: 'SPU', label: 'SPU',
@@ -321,6 +332,14 @@ import { Message } from 'element-ui'
align: 'left', align: 'left',
fixed: 'left' fixed: 'left'
}, },
{
prop: 'mallName',
label: '店铺名称',
"show-overflow-tooltip": true,
width: '120px',
align: 'left',
fixed: 'left'
},
{ {
prop: 'productId', prop: 'productId',
label: 'SPU', label: 'SPU',
@@ -371,6 +390,7 @@ import { Message } from 'element-ui'
last30DaysSkcJsonFields () { last30DaysSkcJsonFields () {
let jsonFields = { let jsonFields = {
"商品名称": "productName", "商品名称": "productName",
"店铺名称": "mallName",
"SPU": "productId", "SPU": "productId",
"SKC": "productSkcId", "SKC": "productSkcId",
"SKC货号": "skcExtCode", "SKC货号": "skcExtCode",
@@ -397,6 +417,14 @@ import { Message } from 'element-ui'
align: 'left', align: 'left',
fixed: 'left' fixed: 'left'
}, },
{
prop: 'mallName',
label: '店铺名称',
"show-overflow-tooltip": true,
width: '120px',
align: 'left',
fixed: 'left'
},
{ {
prop: 'productId', prop: 'productId',
label: 'SPU', label: 'SPU',
@@ -461,6 +489,7 @@ import { Message } from 'element-ui'
last30DaysSkuJsonFields () { last30DaysSkuJsonFields () {
let jsonFields = { let jsonFields = {
"商品名称": "productName", "商品名称": "productName",
"店铺名称": "mallName",
"SPU": "productId", "SPU": "productId",
"SKC": "productSkcId", "SKC": "productSkcId",
"SKC货号": "skcExtCode", "SKC货号": "skcExtCode",
@@ -512,6 +541,11 @@ import { Message } from 'element-ui'
Message.error("请先选择店铺") Message.error("请先选择店铺")
return return
} }
let mallInfo = this.mallList.filter(item => {
return item.mallId == this.mallId
})
this.mallName = mallInfo[0].mallName
this.isLoading = true this.isLoading = true
this.$userCheck(this.mallId).then(() => { this.$userCheck(this.mallId).then(() => {
this.last30DaySkcList = [] this.last30DaySkcList = []
@@ -560,9 +594,11 @@ import { Message } from 'element-ui'
data.skcExtCode = item.skcExtCode; data.skcExtCode = item.skcExtCode;
data.purchaseConfig = item.purchaseConfig; data.purchaseConfig = item.purchaseConfig;
data.productSkcPicture = item.productSkcPicture; data.productSkcPicture = item.productSkcPicture;
data.mallName = this.mallName;
this.last30DaySkcList.push({ this.last30DaySkcList.push({
productName: item.productName, productName: item.productName,
mallName: this.mallName,
productId: item.productId, productId: item.productId,
productSkcId: item.productSkcId, productSkcId: item.productSkcId,
skcExtCode: item.skcExtCode, skcExtCode: item.skcExtCode,
@@ -623,6 +659,7 @@ import { Message } from 'element-ui'
this.last30DaySkuList = this.list.map(item => { this.last30DaySkuList = this.list.map(item => {
let temp = { let temp = {
productName: item.productName, productName: item.productName,
mallName: this.mallName,
productId: item.productId, productId: item.productId,
productSkcId: item.productSkcId, productSkcId: item.productSkcId,
productSkuId: item.productSkuId, productSkuId: item.productSkuId,

View File

@@ -563,7 +563,6 @@
if (!res.errorCode && res.error_code && (res.error_code == 40002)) { if (!res.errorCode && res.error_code && (res.error_code == 40002)) {
this.isShowWarning = true this.isShowWarning = true
this.warningText = '账号异常,请更换“卖家中心”账号' this.warningText = '账号异常,请更换“卖家中心”账号'
this.isBegin = false
} }
if (this.isBegin) { if (this.isBegin) {
// 继续抢 // 继续抢

View File

@@ -346,7 +346,7 @@
}, },
remove(sn) { remove(sn) {
for (let i = 0; i < this.choosedList.length; i++) { for (let i = 0; i < this.choosedList.length; i++) {
if (this.choosedList[i].subPurchaseOrderSn == sn) { if (this.choosedList[i].subPurchaseOrderBasicVO.subPurchaseOrderSn == sn) {
this.choosedList.splice(i, 1) this.choosedList.splice(i, 1)
break break
} }