Merge branch 'label' of https://gitee.com/three-make-money/temu-plugin into label
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="admin-right">
|
||||
<el-tooltip class="item" effect="dark" content="金币信息" placement="top">
|
||||
<div class="left" @click="toActive">
|
||||
<div class="left" @click="openMember(1)">
|
||||
<div :style="{marginLeft: '0px'}">{{ $store.state.userInfo.coin }}</div>
|
||||
<span style="margin-right: 10px;"><img src="../assets/coin.png" width="30"/></span>
|
||||
</div>
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-button type="button" :class="'el-button el-button--primary'" @click="sign">签到</el-button>
|
||||
<!--<el-button type="button" :class="'el-button el-button--primary'" @click="openFolder">打开文件夹</el-button>-->
|
||||
<el-tooltip class="item" effect="dark" content="用户激活" placement="top">
|
||||
<div class="left" @click="toActive">
|
||||
<div class="left" @click="openMember(0)">
|
||||
<span>会员信息:</span>
|
||||
<div :style="{marginLeft: '10px', color: $store.state.userInfo.flag == 1? 'green': 'red'}">{{ getStateInfo }}</div>
|
||||
</div>
|
||||
@@ -203,7 +203,7 @@
|
||||
<template slot="title">
|
||||
<div slot="title" style="display: inline-block; ">
|
||||
<span>标签管理</span>
|
||||
<el-button type="text" style="margin-left: 57px; padding: 0;" @click.stop="openMember">开通</el-button>
|
||||
<el-button type="text" style="margin-left: 57px; padding: 0;" @click.stop="openMember(2)">开通</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<el-menu-item index="/labelsTemplate">模板管理</el-menu-item>
|
||||
@@ -252,11 +252,6 @@
|
||||
<div id="kefu" @click="gotoKefu">
|
||||
<label slot="reference" class="topBtn" title="联系客服"></label>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="开通标签会员"
|
||||
:close-on-click-modal="false"
|
||||
width="1200">
|
||||
</el-dialog>
|
||||
<LablesMember ref="LablesMember"></LablesMember>
|
||||
</div>
|
||||
</template>
|
||||
@@ -338,8 +333,8 @@
|
||||
}
|
||||
},
|
||||
|
||||
openMember() {
|
||||
this.$refs.LablesMember.show()
|
||||
openMember(index) {
|
||||
this.$refs.LablesMember.show(index)
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
|
||||
@@ -187,9 +187,9 @@ import {timestampToTime} from '@/utils/date'
|
||||
this.isLoading = false
|
||||
},
|
||||
async syncProduct(mallId, mallName) {
|
||||
let res = await sendChromeAPIMessage({url: 'bg-visage-mms/product/skc/pageQuery',
|
||||
anti:true,
|
||||
needMallId: true,
|
||||
let res = await sendChromeAPIMessage({url: 'bg-visage-mms/product/skc/pageQuery',
|
||||
anti:true,
|
||||
needMallId: true,
|
||||
mallId: mallId,
|
||||
data: {
|
||||
pageSize: this.pageSize,
|
||||
@@ -250,9 +250,9 @@ import {timestampToTime} from '@/utils/date'
|
||||
let start = now.getTime()
|
||||
let end = start + 86400*1000 - 1000
|
||||
|
||||
let res = await sendChromeAPIMessage({url: 'bgSongbird-api/supplier/deliverGoods/management/pageQueryDeliveryBatch',
|
||||
anti:true,
|
||||
needMallId: true,
|
||||
let res = await sendChromeAPIMessage({url: 'bgSongbird-api/supplier/deliverGoods/management/pageQueryDeliveryBatch',
|
||||
anti:true,
|
||||
needMallId: true,
|
||||
mallId: mallId,
|
||||
data: {
|
||||
pageNo: this.pageNo,
|
||||
@@ -290,12 +290,12 @@ import {timestampToTime} from '@/utils/date'
|
||||
...temp,
|
||||
sku: item2.productSkuId,
|
||||
num: item2.skuNum
|
||||
}
|
||||
}
|
||||
})
|
||||
this.deliveryOrderList.push(temp)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
if (res.result.list.length == this.pageSize) {
|
||||
this.pageNo ++
|
||||
await this.syncDeliveryOrder(mallId, mallName)
|
||||
@@ -357,5 +357,5 @@ import {timestampToTime} from '@/utils/date'
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="left">
|
||||
<div class="search-item">
|
||||
<el-radio-group v-model="addType" @click="lableList = [], search.productSkuId = '', search.productSkcId = ''">
|
||||
<el-radio-button label="1">按备货单打印</el-radio-button>
|
||||
<el-radio-button label="1">按发货单打印</el-radio-button>
|
||||
<el-radio-button label="2">按SKC打印</el-radio-button>
|
||||
<el-radio-button label="3">按SKU打印</el-radio-button>
|
||||
</el-radio-group>
|
||||
@@ -153,7 +153,7 @@
|
||||
toPrint(row) {
|
||||
this.isLoading = true
|
||||
if (this.addType === '1') {
|
||||
this.$http.post(`/api/template/getPage?productSkuId=${row.productSkuId}`).then(res => {
|
||||
this.$http.post(`/api/template/myTemplate?productSkuId=${row.productSkuId}`).then(res => {
|
||||
if (!res.data.records.length) {
|
||||
this.isLoading = false
|
||||
return this.$message.error('该SKU未配置模板')
|
||||
@@ -222,7 +222,7 @@
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.$http.post('/api/templateSku/getPage', null, {
|
||||
this.$http.post('/api/templateSku/getMySkuPage', null, {
|
||||
params: this.search
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
|
||||
@@ -442,6 +442,7 @@
|
||||
await this.requestSKUList(true)
|
||||
await this.$sleepSync(500)
|
||||
}
|
||||
this.isLoading = false
|
||||
},
|
||||
|
||||
requestSKUList(flag) {
|
||||
@@ -482,6 +483,8 @@
|
||||
} else {
|
||||
!flag && (this.isLoading = false)
|
||||
}
|
||||
} else {
|
||||
this.isLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -499,7 +502,7 @@
|
||||
|
||||
getList () {
|
||||
this.pageShow = true
|
||||
this.$http.post(`/api/templateSku/getPage`, null, {
|
||||
this.$http.post(`/api/templateSku/getMySkuPage`, null, {
|
||||
params: {
|
||||
...this.search,
|
||||
templateId: this.id
|
||||
@@ -531,6 +534,8 @@
|
||||
this.getList()
|
||||
}
|
||||
|
||||
this.btnLoading = false
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
@@ -4,6 +4,12 @@
|
||||
slot="title"
|
||||
title="模板管理"
|
||||
isShowBottomBorder>
|
||||
<template #rightBtn>
|
||||
<div class="tips" slot="rightBtn" :class="[$store.state.labelInfo.isExpires ? 'active' : '']">
|
||||
<p>有效期:{{ $store.state.labelInfo.expireTime }}</p>
|
||||
<p>已使用SKU数:{{ $store.state.labelInfo.skuUsed }}/{{ $store.state.labelInfo.skuTotal }}</p>
|
||||
</div>
|
||||
</template>
|
||||
</ai-title>
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
@@ -46,7 +52,7 @@
|
||||
</ai-search-bar>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-button type="button" :class="'el-button el-button--primary'" @click="toAdd('')">添加</el-button>
|
||||
<el-button type="button" class="el-button el-button--primary" @click="toAdd('')">添加</el-button>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
@@ -58,30 +64,37 @@
|
||||
style="margin-top: 8px;"
|
||||
@getList="getList"
|
||||
:loading="isLoading">
|
||||
<el-table-column slot="options" label="操作" align="center" fixed="right" width="220px">
|
||||
<el-table-column slot="options" label="操作" align="center" fixed="right" width="240px">
|
||||
<template v-slot="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toAddSku(row.id)">管理SKU</el-button>
|
||||
<!-- <el-button type="text" @click="savePDF(row.id)">保存PDF</el-button> -->
|
||||
<el-button type="text" @click="toAdd(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<Print ref="printRef" :isPrint="true"></Print>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Print from '@/components/print/Print'
|
||||
export default {
|
||||
name: 'PringTemplate',
|
||||
|
||||
components: {
|
||||
Print
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
colConfigs: [
|
||||
{ prop: 'name', label: '模板名称', align: 'left' },
|
||||
{ prop: 'skuTotal', label: '绑定SKU数量', align: 'center' },
|
||||
{ prop: 'createTime', label: '创建时间', align: 'center' },
|
||||
{ prop: 'createTime', label: '创建时间', align: 'center' }
|
||||
],
|
||||
isLoading: false,
|
||||
tableData: [],
|
||||
@@ -105,13 +118,31 @@
|
||||
this.$router.push(`/addLabelsTemplate?id=${id}`)
|
||||
},
|
||||
|
||||
savePDF (id) {
|
||||
this.isLoading = true
|
||||
|
||||
this.$http.post(`/api/template/detail?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
const template = JSON.parse(res.data.content)
|
||||
|
||||
this.$http.post(`/api/templateSku/getMySkuPage?size=-1&templateId=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
const html = this.$refs.printRef.toPrint(template, res.data.records)
|
||||
console.log(html)
|
||||
this.isLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
toAddSku (id) {
|
||||
this.$router.push(`/skuManage?id=${id}`)
|
||||
},
|
||||
|
||||
getList () {
|
||||
this.isLoading = true
|
||||
this.$http.post('/api/template/getPage', null, {
|
||||
this.$http.post('/api/template/myTemplate', null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
@@ -151,5 +182,24 @@
|
||||
.search-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: green;
|
||||
|
||||
&.active {
|
||||
color: red;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user