Merge branch 'master' of https://gitee.com/three-make-money/temu-plugin
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "TEMU助手",
|
"name": "TEMU助手",
|
||||||
"description": "TEMU助手 - 自动化提高生产效率",
|
"description": "TEMU助手 - 自动化提高生产效率",
|
||||||
"version": "1.0",
|
"version": "2.0",
|
||||||
"background": {
|
"background": {
|
||||||
"service_worker": "/background.js"
|
"service_worker": "/background.js"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const dateUtil = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const userCheck = () => {
|
const userCheck = (mallId) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
store.dispatch('getUserInfo').then(res => {
|
store.dispatch('getUserInfo').then(res => {
|
||||||
if (res.flag != 1) {
|
if (res.flag != 1) {
|
||||||
@@ -99,7 +99,7 @@ const userCheck = () => {
|
|||||||
reject('您的账号未激活或已失效,请激活后使用')
|
reject('您的账号未激活或已失效,请激活后使用')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (res.type != 4 && store.state.mallId != store.state.userInfo.mallId) {
|
if (res.type != 4 && mallId != store.state.userInfo.mallId) {
|
||||||
Message.error('您当前登录的TEMU账号与会员绑定账号不一致')
|
Message.error('您当前登录的TEMU账号与会员绑定账号不一致')
|
||||||
reject('您当前登录的TEMU账号与会员绑定账号不一致')
|
reject('您当前登录的TEMU账号与会员绑定账号不一致')
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -248,7 +248,6 @@ import { Message } from 'element-ui'
|
|||||||
if (res.errorCode == 1000000) {
|
if (res.errorCode == 1000000) {
|
||||||
this.productPage.total = res.result.total
|
this.productPage.total = res.result.total
|
||||||
this.productTableData = res.result.pageItems.map((item) => {
|
this.productTableData = res.result.pageItems.map((item) => {
|
||||||
console.log(item.createdAt)
|
|
||||||
return {
|
return {
|
||||||
productSpu: item.productId,
|
productSpu: item.productId,
|
||||||
productSkc: item.productSkcId,
|
productSkc: item.productSkcId,
|
||||||
@@ -256,6 +255,8 @@ import { Message } from 'element-ui'
|
|||||||
createTime: timestampToTime(item.createdAt)
|
createTime: timestampToTime(item.createdAt)
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
Message.error("【拼多多】" + res.errorMsg)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -153,17 +153,10 @@ import { Message } from 'element-ui'
|
|||||||
Message.error("请先选择店铺")
|
Message.error("请先选择店铺")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$http.post('/api/malluser/info').then(res => {
|
this.$userCheck(this.mallId).then(() => {
|
||||||
if (res.code == 0) {
|
this.getList()
|
||||||
this.$store.commit('setUserInfo', res.data)
|
}).catch((err) => {
|
||||||
if (res.data.flag != 1) {
|
console.log(err)
|
||||||
Message.error('您的账号未激活或已失效,请激活后使用')
|
|
||||||
this.$store.commit('setActiveDlgShow', true)
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getList () {
|
getList () {
|
||||||
@@ -197,10 +190,9 @@ import { Message } from 'element-ui'
|
|||||||
} else {
|
} else {
|
||||||
Message.success('销售数据加载完成,可进行导出')
|
Message.success('销售数据加载完成,可进行导出')
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Message.error("【拼多多】" + res.errorMsg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(this.list)
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
startDownload() {
|
startDownload() {
|
||||||
|
|||||||
@@ -127,7 +127,12 @@
|
|||||||
if (this.$store.state.userInfo.flag == 0) {
|
if (this.$store.state.userInfo.flag == 0) {
|
||||||
return '未激活';
|
return '未激活';
|
||||||
} else if (this.$store.state.userInfo.flag == 1) {
|
} else if (this.$store.state.userInfo.flag == 1) {
|
||||||
return this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime;
|
if (this.$store.state.userInfo.type != 4) {
|
||||||
|
return `(${this.$store.state.userInfo.mallName})` + this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime;
|
||||||
|
} else {
|
||||||
|
return this.vipType[this.$store.state.userInfo.type] + '/有效期至' + this.$store.state.userInfo.expireTime
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return '已过期';
|
return '已过期';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
<el-button type="text" @click="edit(row)">修改姓名</el-button>
|
<el-button type="text" @click="edit(row)">修改姓名</el-button>
|
||||||
|
<el-button type="text" @click="remove(row)">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -136,6 +137,19 @@
|
|||||||
this.isShowForm = true
|
this.isShowForm = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
remove (e) {
|
||||||
|
this.$confirm('确定要删除该条数据?', '温馨提示', {
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http.post(`/api/malluser/delWxuser?id=${e.id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
collection (id, isFavorite) {
|
collection (id, isFavorite) {
|
||||||
this.$confirm(isFavorite === '0' ? '确定收藏该文章?' : '确定取消收藏?', '温馨提示', {
|
this.$confirm(isFavorite === '0' ? '确定收藏该文章?' : '确定取消收藏?', '温馨提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
style="margin-top: 8px;"
|
style="margin-top: 8px;"
|
||||||
@getList="getList">center
|
@getList="getList">
|
||||||
<el-table-column slot="productName" width="480px" label="商品信息" align="center">
|
<el-table-column slot="productName" width="480px" label="商品信息" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="product">
|
<div class="product">
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="isShow = false">取 消</el-button>
|
<el-button @click="isShow = false">关 闭</el-button>
|
||||||
<el-button type="primary" @click="onConfirm">添加</el-button>
|
<el-button type="primary" @click="onConfirm">添加</el-button>
|
||||||
</span>
|
</span>
|
||||||
</AiDialog>
|
</AiDialog>
|
||||||
@@ -176,10 +176,12 @@
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
isBegin: false,
|
isBegin: false,
|
||||||
timer: null,
|
|
||||||
choosedList: [],
|
choosedList: [],
|
||||||
arr: [],
|
arr: [],
|
||||||
robTotal: 0
|
robTotal: 0,
|
||||||
|
pageSize: 100,
|
||||||
|
currentPage: 1,
|
||||||
|
step: 400
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -188,9 +190,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
this.mallId = this.mallList[0].mallId
|
|
||||||
this.mallName = this.mallList[0].mallName
|
|
||||||
this.getList()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -198,11 +197,19 @@
|
|||||||
this.arr = e
|
this.arr = e
|
||||||
},
|
},
|
||||||
mallChange() {
|
mallChange() {
|
||||||
let mallInfo = this.mallList.filter(item => {
|
this.$userCheck(this.mallId).then(() => {
|
||||||
return item.mallId == this.mallId
|
let mallInfo = this.mallList.filter(item => {
|
||||||
|
return item.mallId == this.mallId
|
||||||
|
})
|
||||||
|
this.mallName = mallInfo[0].mallName
|
||||||
|
|
||||||
|
// 下载数据
|
||||||
|
this.tableData = []
|
||||||
|
this.currentPage = 1
|
||||||
|
this.getList()
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
})
|
})
|
||||||
this.mallName = mallInfo.mallName
|
|
||||||
this.getList()
|
|
||||||
},
|
},
|
||||||
onConfirm () {
|
onConfirm () {
|
||||||
if (this.arr.length == 0) {
|
if (this.arr.length == 0) {
|
||||||
@@ -221,14 +228,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getList () {
|
getList () {
|
||||||
this.tableData = []
|
|
||||||
sendChromeAPIMessage({
|
sendChromeAPIMessage({
|
||||||
url: 'oms/bg/venom/api/supplier/purchase/manager/querySubOrderList',
|
url: 'oms/bg/venom/api/supplier/purchase/manager/querySubOrderList',
|
||||||
needMallId: true,
|
needMallId: true,
|
||||||
mallId: this.mallId,
|
mallId: this.mallId,
|
||||||
data: {
|
data: {
|
||||||
"pageNo": 1,
|
"pageNo": this.currentPage,
|
||||||
"pageSize": 100,
|
"pageSize": this.pageSize,
|
||||||
"urgencyType": 0,
|
"urgencyType": 0,
|
||||||
"isCustomGoods": false,
|
"isCustomGoods": false,
|
||||||
"statusList": [
|
"statusList": [
|
||||||
@@ -236,11 +242,12 @@
|
|||||||
]
|
]
|
||||||
}}).then((res) => {
|
}}).then((res) => {
|
||||||
if (res.errorCode == 1000000) {
|
if (res.errorCode == 1000000) {
|
||||||
|
let length = res.result.subOrderForSupplierList.length
|
||||||
res.result.subOrderForSupplierList = res.result.subOrderForSupplierList.filter((item) => {
|
res.result.subOrderForSupplierList = res.result.subOrderForSupplierList.filter((item) => {
|
||||||
return item.isCanJoinDeliverPlatform;
|
return item.isCanJoinDeliverPlatform;
|
||||||
})
|
})
|
||||||
this.tableData = res.result.subOrderForSupplierList.map((item) => {
|
res.result.subOrderForSupplierList.map((item) => {
|
||||||
return {
|
this.tableData.push({
|
||||||
robTotal: 0,
|
robTotal: 0,
|
||||||
subPurchaseOrderSn: item.subPurchaseOrderSn,
|
subPurchaseOrderSn: item.subPurchaseOrderSn,
|
||||||
originalPurchaseOrderSn: item.originalPurchaseOrderSn,
|
originalPurchaseOrderSn: item.originalPurchaseOrderSn,
|
||||||
@@ -253,10 +260,15 @@
|
|||||||
category: item.category,
|
category: item.category,
|
||||||
mallId: this.mallId,
|
mallId: this.mallId,
|
||||||
mallName: this.mallName
|
mallName: this.mallName
|
||||||
};
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (this.pageSize == length) {
|
||||||
|
this.currentPage ++
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Message.error("【拼多多】" + res.error_msg)
|
Message.error("【拼多多】" + res.errorMsg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -274,39 +286,35 @@
|
|||||||
beginRob() {
|
beginRob() {
|
||||||
if (this.isBegin) {
|
if (this.isBegin) {
|
||||||
this.isBegin = false;
|
this.isBegin = false;
|
||||||
for (let i = 0;i < this.timer.length; i++) {
|
|
||||||
clearInterval(this.timer[i].timer);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$userCheck().then(() => {
|
if (this.choosedList.length <= 0) {
|
||||||
if (this.choosedList.length <= 0) {
|
Message.error('请选择备货单');
|
||||||
Message.error('请选择备货单');
|
return;
|
||||||
return;
|
}
|
||||||
|
|
||||||
|
this.robTotal = this.choosedList.length
|
||||||
|
this.isBegin = true;
|
||||||
|
|
||||||
|
for (let i = 0;i < this.choosedList.length; i++) {
|
||||||
|
/*setTimeout(() => {
|
||||||
|
let t = setInterval(this.robFunc(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId), 1000);
|
||||||
|
this.timer.push({id: this.choosedList[i].subPurchaseOrderSn, timer: t})
|
||||||
|
}, 100 * i)*/
|
||||||
|
setTimeout(() => {
|
||||||
|
this.rob(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId)
|
||||||
|
}, this.step * i)
|
||||||
|
}
|
||||||
|
|
||||||
|
let _this = this;
|
||||||
|
let tt = setInterval(function() {
|
||||||
|
if (_this.choosedList.length == 0) {
|
||||||
|
_this.isBegin = false;
|
||||||
|
clearInterval(tt);
|
||||||
}
|
}
|
||||||
|
}, 1000)
|
||||||
this.robTotal = this.choosedList.length
|
|
||||||
this.isBegin = true;
|
|
||||||
this.timer = [];
|
|
||||||
|
|
||||||
for (let i = 0;i < this.choosedList.length; i++) {
|
|
||||||
setTimeout(() => {
|
|
||||||
let t = setInterval(this.robFunc(this.choosedList[i].subPurchaseOrderSn, this.choosedList[i].mallId), 1000);
|
|
||||||
this.timer.push({id: this.choosedList[i].subPurchaseOrderSn, timer: t})
|
|
||||||
}, 100 * i)
|
|
||||||
}
|
|
||||||
|
|
||||||
let _this = this;
|
|
||||||
let tt = setInterval(function() {
|
|
||||||
if (_this.choosedList.length == 0) {
|
|
||||||
_this.isBegin = false;
|
|
||||||
clearInterval(tt);
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}).catch((err) => {
|
|
||||||
console.log(err)
|
|
||||||
})
|
|
||||||
// this.$http.post('/api/malluser/info').then(res => {
|
// this.$http.post('/api/malluser/info').then(res => {
|
||||||
// if (res.code == 0) {
|
// if (res.code == 0) {
|
||||||
// this.$store.commit('setUserInfo', res.data)
|
// this.$store.commit('setUserInfo', res.data)
|
||||||
@@ -339,15 +347,6 @@
|
|||||||
"subPurchaseOrderSn": sn
|
"subPurchaseOrderSn": sn
|
||||||
}}).then((res) => {
|
}}).then((res) => {
|
||||||
if (res.errorCode == 1000000) {
|
if (res.errorCode == 1000000) {
|
||||||
|
|
||||||
|
|
||||||
let t = this.timer.filter((item) => {
|
|
||||||
return item.id == sn;
|
|
||||||
})
|
|
||||||
if (t.length > 0) {
|
|
||||||
clearInterval(t[0].timer)
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let j = 0; j < this.choosedList.length; j++) {
|
for (let j = 0; j < this.choosedList.length; j++) {
|
||||||
if (this.choosedList[j].subPurchaseOrderSn == sn) {
|
if (this.choosedList[j].subPurchaseOrderSn == sn) {
|
||||||
this.addSuccessInfo(this.choosedList[j]);
|
this.addSuccessInfo(this.choosedList[j]);
|
||||||
@@ -363,6 +362,11 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.isBegin) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.rob(sn, mallId)
|
||||||
|
}, this.choosedList.length * this.step)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,9 +2,7 @@
|
|||||||
<div class="admin-home" v-loading="isLoading">
|
<div class="admin-home" v-loading="isLoading">
|
||||||
<ai-card hideTitle>
|
<ai-card hideTitle>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>TEMU助手是为致力于“拼多多跨境卖家中心”通过自动化的方式,提高TEMU运营管理效率。</p>
|
<p>“TEMU助手”是致力于为“拼多多跨境卖家中心”提供自动化服务的智能工具,可以提高TEMU平台的运营及管理效率,欢迎大家关注微信公众号“TEMU助手”,与我们沟通交流,共同创造最有助于卖家发展的助手功能,助力广大卖家,让中国货走向全世界~</p>
|
||||||
<p>在使用卖家中心过程中,有觉得不方便之处,或者重复劳动力的地方可与我们沟通,我们竭尽全力为大家打造实用的智能化工具。</p>
|
|
||||||
<p>欢迎大家扫描下方二维码与我们沟通交流,获取最新智能化研发进展,一起经营跨境电商,让中国货走向全世界</p>
|
|
||||||
</div>
|
</div>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
|
|||||||
Reference in New Issue
Block a user