调整
This commit is contained in:
@@ -25,6 +25,11 @@ const router = new VueRouter({
|
|||||||
name: 'changePwd',
|
name: 'changePwd',
|
||||||
component: () => import('../view/login/ChangePwd')
|
component: () => import('../view/login/ChangePwd')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'waitCreate',
|
||||||
|
name: 'waitCreate',
|
||||||
|
component: () => import('../view/shipping/WaitCreate.vue')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'normalSendGoods',
|
path: 'normalSendGoods',
|
||||||
name: 'NormalSendGoods',
|
name: 'NormalSendGoods',
|
||||||
@@ -131,6 +136,11 @@ const router = new VueRouter({
|
|||||||
name: 'info',
|
name: 'info',
|
||||||
component: () => import('../view/Info.vue')
|
component: () => import('../view/Info.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'priceFollow',
|
||||||
|
name: 'priceFollow',
|
||||||
|
component: () => import('../view/PriceFollow.vue')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'message',
|
path: 'message',
|
||||||
name: 'message',
|
name: 'message',
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
<i class="el-icon-shopping-cart-2"></i>
|
<i class="el-icon-shopping-cart-2"></i>
|
||||||
<span slot="title">备货单管理</span>
|
<span slot="title">备货单管理</span>
|
||||||
</template>
|
</template>
|
||||||
|
<el-menu-item index="/waitCreate">创建备货单</el-menu-item>
|
||||||
<el-menu-item index="/normalSendGoods">抢仓发货</el-menu-item>
|
<el-menu-item index="/normalSendGoods">抢仓发货</el-menu-item>
|
||||||
<el-menu-item index="/shippingDesk">发货台管理</el-menu-item>
|
<el-menu-item index="/shippingDesk">发货台管理</el-menu-item>
|
||||||
<el-menu-item index="/waitPackageList">待装箱发货单</el-menu-item>
|
<el-menu-item index="/waitPackageList">待装箱发货单</el-menu-item>
|
||||||
@@ -128,6 +129,10 @@
|
|||||||
<i class="el-icon-info"></i>
|
<i class="el-icon-info"></i>
|
||||||
<span slot="title">弹窗消息</span>
|
<span slot="title">弹窗消息</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
<el-menu-item index="/priceFollow">
|
||||||
|
<i class="el-icon-money"></i>
|
||||||
|
<span slot="title">调价管理</span>
|
||||||
|
</el-menu-item>
|
||||||
<el-menu-item index="/learning">
|
<el-menu-item index="/learning">
|
||||||
<i class="el-icon-eleme"></i>
|
<i class="el-icon-eleme"></i>
|
||||||
<span slot="title">新手园地</span>
|
<span slot="title">新手园地</span>
|
||||||
|
|||||||
@@ -13,16 +13,6 @@
|
|||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
style="margin-top: 8px;"
|
style="margin-top: 8px;"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="send" label="是否发送通知" align="center">
|
|
||||||
<template v-slot="{ row }">
|
|
||||||
<el-switch
|
|
||||||
active-value="1"
|
|
||||||
inactive-value="0"
|
|
||||||
@change="e => onChange(row.id, e)"
|
|
||||||
v-model="row.isSend">
|
|
||||||
</el-switch>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column slot="options" label="操作" align="center" fixed="right" width="140px">
|
<el-table-column slot="options" label="操作" align="center" fixed="right" width="140px">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
|
|||||||
234
src/view/PriceFollow.vue
Normal file
234
src/view/PriceFollow.vue
Normal file
@@ -0,0 +1,234 @@
|
|||||||
|
<template>
|
||||||
|
<ai-list class="Learning" v-loading="isLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading">
|
||||||
|
<ai-title
|
||||||
|
slot="title"
|
||||||
|
title="跟价管理"
|
||||||
|
tips="点击“一键拒绝”之后,需要回到“卖家中心”刷新界面,调价弹窗即可消失"
|
||||||
|
isShowBottomBorder>
|
||||||
|
</ai-title>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-table
|
||||||
|
:tableData="tableData"
|
||||||
|
:col-configs="colConfigs"
|
||||||
|
:isShowPagination="false"
|
||||||
|
style="margin-top: 8px;"
|
||||||
|
@getList="getList">
|
||||||
|
<el-table-column slot="options" label="操作" align="center" fixed="right" width="140px">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<div class="table-options">
|
||||||
|
<el-button type="text" @click="edit(row)">处理</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
<AiDialog
|
||||||
|
title="调价列表"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
customFooter
|
||||||
|
width="80%">
|
||||||
|
<ai-table
|
||||||
|
:tableData="priceList"
|
||||||
|
:col-configs="priceColConfigs"
|
||||||
|
:isShowPagination="false"
|
||||||
|
style="margin-top: 8px;">
|
||||||
|
<el-table-column slot="newSupplyPrice" label="调整后价格" align="center">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<div style="color: red">{{row.newSupplyPrice }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="price" label="当前价格" align="center">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
<div style="color: green">{{row.price }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
<div class="dialog-footer" slot="footer">
|
||||||
|
<el-button @click="isShow = false">关闭</el-button>
|
||||||
|
<el-button @click="rejectAll()" type="primary">一键拒绝</el-button>
|
||||||
|
</div>
|
||||||
|
</AiDialog>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
import {sendChromeAPIMessage} from '@/api/chromeApi'
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
colConfigs: [
|
||||||
|
{ prop: 'mallName', label: '店铺名称', align: 'left' },
|
||||||
|
{ prop: 'priceTotal', label: '调价数量', align: 'left' }
|
||||||
|
],
|
||||||
|
priceColConfigs: [
|
||||||
|
{ prop: 'productName', label: '商品名称', align: 'left' },
|
||||||
|
{ prop: 'skcId', label: 'SKC', align: 'left' },
|
||||||
|
{ prop: 'spec', label: 'SKU属性集', align: 'left' },
|
||||||
|
{ slot: 'newSupplyPrice', label: '调价后价格', align: 'left' },
|
||||||
|
{ slot: 'price', label: '当前价格', align: 'left' }
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
dataList: [],
|
||||||
|
priceList: [],
|
||||||
|
total: 0,
|
||||||
|
isShow: false,
|
||||||
|
id: '',
|
||||||
|
currentMallId: '',
|
||||||
|
isLoading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created () {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['mallList']),
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
async getList () {
|
||||||
|
this.isLoading = true
|
||||||
|
for (let i = 0; i < this.mallList.length; i++) {
|
||||||
|
let mallInfo = this.mallList[i]
|
||||||
|
let res = await sendChromeAPIMessage({
|
||||||
|
url: 'marvel-mms/cn/api/kiana/gmp/bg/magneto/api/price/priceAdjust/gmpReducePricePopup',
|
||||||
|
needMallId: true,
|
||||||
|
mallId: mallInfo.mallId,
|
||||||
|
data: {}})
|
||||||
|
if (res.success && res.errorCode == 1000000) {
|
||||||
|
let tempData = []
|
||||||
|
res.result.popUpAutoPass12.adjustList.map(item => {
|
||||||
|
let temp = {
|
||||||
|
id: item.id,
|
||||||
|
productName: item.productName,
|
||||||
|
skcId: item.skcId,
|
||||||
|
popUpType: 1,
|
||||||
|
newSupplyPrice: item.newSupplyPrice / 100,
|
||||||
|
}
|
||||||
|
item.skuInfoItemList.map(item1 => {
|
||||||
|
tempData.push({...temp, price: item1.price / 100, spec: item1.spec})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
res.result.popUpAutoPass24.adjustList.map(item => {
|
||||||
|
let temp = {
|
||||||
|
id: item.id,
|
||||||
|
productName: item.productName,
|
||||||
|
skcId: item.skcId,
|
||||||
|
popUpType: 2,
|
||||||
|
newSupplyPrice: item.newSupplyPrice / 100,
|
||||||
|
}
|
||||||
|
item.skuInfoItemList.map(item1 => {
|
||||||
|
tempData.push({...temp, price: item1.price / 100, spec: item1.spec})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
res.result.popUpOthers.adjustList.map(item => {
|
||||||
|
let temp = {
|
||||||
|
id: item.id,
|
||||||
|
productName: item.productName,
|
||||||
|
skcId: item.skcId,
|
||||||
|
popUpType: 3,
|
||||||
|
newSupplyPrice: item.newSupplyPrice / 100,
|
||||||
|
}
|
||||||
|
item.skuInfoItemList.map(item1 => {
|
||||||
|
tempData.push({...temp, price: item1.price / 100, spec: item1.spec})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.dataList.push({mallId: mallInfo.mallId, data: tempData})
|
||||||
|
this.tableData.push({mallId: mallInfo.mallId, mallName: mallInfo.mallName, priceTotal: (res.result.popUpAutoPass12.total + res.result.popUpAutoPass24.total + res.result.popUpOthers.total)})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.isLoading = false
|
||||||
|
},
|
||||||
|
edit(row) {
|
||||||
|
let temp = this.dataList.filter(item => {
|
||||||
|
return item.mallId == row.mallId
|
||||||
|
})
|
||||||
|
this.priceList = temp[0].data
|
||||||
|
this.currentMallId = temp[0].mallId
|
||||||
|
this.isShow = true
|
||||||
|
},
|
||||||
|
async rejectAll() {
|
||||||
|
let check = await this.$userCheck(this.currentMallId)
|
||||||
|
if (!this.currentMallId) {
|
||||||
|
Message.error("请选择要操作的店铺")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.priceList.length == 0) {
|
||||||
|
Message.success("该店铺无调价通知,无需处理")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let maxOrderId = 0
|
||||||
|
let ids = this.priceList.map(item => {
|
||||||
|
if (item.popUpType == 1) {
|
||||||
|
if (maxOrderId < item.id) maxOrderId = item.id
|
||||||
|
return item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let res = null
|
||||||
|
if (ids.length > 0) {
|
||||||
|
res = await sendChromeAPIMessage({
|
||||||
|
url: 'marvel-mms/cn/api/kiana/gmp/bg/magneto/api/price/adjust/price-reduce-popup-click',
|
||||||
|
needMallId: true,
|
||||||
|
mallId: this.currentMallId,
|
||||||
|
data: {
|
||||||
|
"rejectOrderIdList": ids,
|
||||||
|
"maxOrderId": maxOrderId,
|
||||||
|
"popUpType": 1,
|
||||||
|
"createTime": new Date().getTime() * 1000
|
||||||
|
}})
|
||||||
|
}
|
||||||
|
maxOrderId = 0
|
||||||
|
ids = this.priceList.map(item => {
|
||||||
|
if (item.popUpType == 2) {
|
||||||
|
if (maxOrderId < item.id) maxOrderId = item.id
|
||||||
|
return item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (ids.length > 0) {
|
||||||
|
res = await sendChromeAPIMessage({
|
||||||
|
url: 'marvel-mms/cn/api/kiana/gmp/bg/magneto/api/price/adjust/price-reduce-popup-click',
|
||||||
|
needMallId: true,
|
||||||
|
mallId: this.currentMallId,
|
||||||
|
data: {
|
||||||
|
"rejectOrderIdList": ids,
|
||||||
|
"maxOrderId": maxOrderId,
|
||||||
|
"popUpType": 2,
|
||||||
|
"createTime": new Date().getTime() * 1000
|
||||||
|
}})
|
||||||
|
}
|
||||||
|
maxOrderId = 0
|
||||||
|
ids = this.priceList.map(item => {
|
||||||
|
if (item.popUpType == 3) {
|
||||||
|
if (maxOrderId < item.id) maxOrderId = item.id
|
||||||
|
return item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (ids.length > 0) {
|
||||||
|
res = await sendChromeAPIMessage({
|
||||||
|
url: 'marvel-mms/cn/api/kiana/gmp/bg/magneto/api/price/adjust/price-reduce-popup-click',
|
||||||
|
needMallId: true,
|
||||||
|
mallId: this.currentMallId,
|
||||||
|
data: {
|
||||||
|
"rejectOrderIdList": ids,
|
||||||
|
"maxOrderId": maxOrderId,
|
||||||
|
"popUpType": 3,
|
||||||
|
"createTime": new Date().getTime() * 1000
|
||||||
|
}})
|
||||||
|
}
|
||||||
|
if (res.success && res.errorCode == 1000000) {
|
||||||
|
Message.success("调价通知一键拒绝成功")
|
||||||
|
this.isShow = false
|
||||||
|
} else {
|
||||||
|
Message.error("调价通知一键拒绝失败")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
|
|
||||||
@@ -365,6 +365,7 @@ import {sendTemuAPIMessage, sendSheinAPIMessage} from '@/api/chromeApi'
|
|||||||
"mall_id": row.content,
|
"mall_id": row.content,
|
||||||
"filter_items": "0:1",
|
"filter_items": "0:1",
|
||||||
"page_number": this.pageNo,
|
"page_number": this.pageNo,
|
||||||
|
"scene_code": "mall_rule",
|
||||||
"page_size": this.pageSize
|
"page_size": this.pageSize
|
||||||
}}).then((res) => {
|
}}).then((res) => {
|
||||||
if (this.isBatchCollect && (index+1) == this.selectRows.length) {
|
if (this.isBatchCollect && (index+1) == this.selectRows.length) {
|
||||||
|
|||||||
551
src/view/shipping/WaitCreate.vue
Normal file
551
src/view/shipping/WaitCreate.vue
Normal file
@@ -0,0 +1,551 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<ai-list class="list" v-loading="isLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading">
|
||||||
|
<ai-title
|
||||||
|
slot="title"
|
||||||
|
title="创建备货单"
|
||||||
|
tips="请先在当前浏览器登录“拼多多跨境卖家中心”,期间保持登录状态"
|
||||||
|
isShowBottomBorder>
|
||||||
|
</ai-title>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-search-bar>
|
||||||
|
<template #left>
|
||||||
|
<el-dropdown @command="handleClick">
|
||||||
|
<el-button type="primary" :disabled="isBegin">添加待创建备货单</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="byStore">按店铺添加</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="loadAll">一键添加所有</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
<!--<el-button type="primary" :disabled="isBegin" @click="isShow = true">添加备货单</el-button>
|
||||||
|
<el-button type="primary" :disabled="isBegin" @click="loadAll">一键加载全部</el-button>-->
|
||||||
|
</el-dropdown>
|
||||||
|
<el-button v-if="!isBegin" type="button" :class="'el-button el-button--primary'" @click="beginCreateConfirm">开始创建</el-button>
|
||||||
|
<el-button v-else type="button" :icon="isBegin? 'el-icon-loading': ''" :class="isBegin ? 'el-button el-button--danger': 'el-button el-button--primary'" @click="beginCreate()">{{ `结束创建(${choosedList.length}/${createTotal})` }}</el-button>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</ai-search-bar>
|
||||||
|
<ai-table
|
||||||
|
:tableData="choosedList"
|
||||||
|
:col-configs="robColConfigs"
|
||||||
|
:total="total"
|
||||||
|
height="500"
|
||||||
|
:isShowPagination="false"
|
||||||
|
style="margin-top: 8px;">
|
||||||
|
<el-table-column slot="productName" width="480px" label="基本信息" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="product">
|
||||||
|
<img :src="scope.row.productSkcPicture">
|
||||||
|
<div class="right">
|
||||||
|
<div>备货母单号: {{ scope.row.subPurchaseOrderSn }}</div>
|
||||||
|
<div>SKC: {{ scope.row.productSkcId }}</div>
|
||||||
|
<div>货号: {{ scope.row.productSn }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="purchaseTime" width="180px" label="下单时间" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ formatTime(scope.row.purchaseTime) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column slot="className" label="SKU信息" width="440px" show-overflow-tooltip align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="order-manage_skuInfo__FW-Nd" v-for="(item, index) in scope.row.skuQuantityDetailList" :key="index">
|
||||||
|
<div>
|
||||||
|
<div data-testid="beast-core-box" class="outerWrapper-1-3-1 outerWrapper-d18-1-3-20 index-module__image-preview___2fiZX">
|
||||||
|
<div class="index-module__img___p3B1N" :style="getStyle(item.thumbUrlList[0])"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="order-manage_contentInfo__1Cjd6">
|
||||||
|
<div>属性集:{{ item.extCode}}</div>
|
||||||
|
<div>待发货数:{{ item.purchaseQuantity }}</div>
|
||||||
|
<div>SKU ID: {{ item.productSkuId }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="options" label="操作" width="80px" v-if="!isBegin" show-overflow-tooltip align="center" fixed="right">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<div class="table-options">
|
||||||
|
<el-button type="text" @click="remove(row.subPurchaseOrderBasicVO.subPurchaseOrderSn)">移除</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
<AiDialog
|
||||||
|
title="添加备货单"
|
||||||
|
:visible.sync="isShow"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
customFooter
|
||||||
|
@confirm="onConfirm"
|
||||||
|
width="1290px">
|
||||||
|
<label style="width:90px">店铺:</label>
|
||||||
|
<el-select v-model="mallId" placeholder="请选择" @change="mallChange">
|
||||||
|
<el-option
|
||||||
|
v-for="item in mallList"
|
||||||
|
:key="item.mallId"
|
||||||
|
:label="item.mallName"
|
||||||
|
:value="item.mallId">
|
||||||
|
{{ item.mallName }}
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<ai-table
|
||||||
|
:tableData="tableData"
|
||||||
|
:col-configs="colConfigs"
|
||||||
|
:total="total"
|
||||||
|
:isShowPagination="false"
|
||||||
|
style="margin-top: 8px;"
|
||||||
|
v-loading="isDlgLoading"
|
||||||
|
@selection-change="onChooseChange">
|
||||||
|
<el-table-column slot="productName" width="480px" label="基本信息" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="product">
|
||||||
|
<img :src="scope.row.productSkcPicture">
|
||||||
|
<div class="right">
|
||||||
|
<div>备货母单号: {{ scope.row.subPurchaseOrderSn }}</div>
|
||||||
|
<div>SKC: {{ scope.row.productSkcId }}</div>
|
||||||
|
<div>货号: {{ scope.row.productSn }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column slot="purchaseTime" width="180px" label="下单时间" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ formatTime(scope.row.purchaseTime) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column slot="className" label="SKU信息" width="440px" show-overflow-tooltip align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="order-manage_skuInfo__FW-Nd" v-for="(item, index) in scope.row.skuQuantityDetailList" :key="index">
|
||||||
|
<div>
|
||||||
|
<div data-testid="beast-core-box" class="outerWrapper-1-3-1 outerWrapper-d18-1-3-20 index-module__image-preview___2fiZX">
|
||||||
|
<div class="index-module__img___p3B1N" :style="getStyle(item.thumbUrlList[0])"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="order-manage_contentInfo__1Cjd6">
|
||||||
|
<div>属性集:{{ item.color + ' ' + item.size}}</div>
|
||||||
|
<div>待发货数:{{ item.purchaseQuantity }}</div>
|
||||||
|
<div>SKU ID: {{ item.productSkuId }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="isShow = false">关 闭</el-button>
|
||||||
|
<el-button type="primary" @click="onConfirm">添加</el-button>
|
||||||
|
</span>
|
||||||
|
</AiDialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
import {sendChromeAPIMessage} from '@/api/chromeApi'
|
||||||
|
import { Message } from 'element-ui'
|
||||||
|
import {timestampToTime} from '@/utils/date'
|
||||||
|
export default {
|
||||||
|
name: 'ShippingDesk',
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
colConfigs: [
|
||||||
|
{ type: "selection", width: '70px', align: 'left' },
|
||||||
|
{ slot: 'productName' },
|
||||||
|
{ slot: 'subWarehouseName'},
|
||||||
|
{ prop: 'mallName', label: '店铺来源', align: 'center' },
|
||||||
|
{ slot: 'className'},
|
||||||
|
{ slot: 'purchaseTime'}
|
||||||
|
],
|
||||||
|
robColConfigs: [
|
||||||
|
{ slot: 'productName' },
|
||||||
|
{ slot: 'subWarehouseName'},
|
||||||
|
{ prop: 'mallName', label: '店铺来源', align: 'center' },
|
||||||
|
{ slot: 'className'},
|
||||||
|
{ slot: 'purchaseTime'}
|
||||||
|
],
|
||||||
|
mallId: '',
|
||||||
|
mallName: '',
|
||||||
|
tableData: [],
|
||||||
|
total: 0,
|
||||||
|
isBegin: false,
|
||||||
|
choosedList: [],
|
||||||
|
choosedSnMallList: [],
|
||||||
|
arr: [],
|
||||||
|
createTotal: 0,
|
||||||
|
pageSize: 100,
|
||||||
|
currentPage: 1,
|
||||||
|
|
||||||
|
loadMallIndex: 0,
|
||||||
|
loadMode: 0, // 加载模式,0表示单个店铺加载,1表示一键加载
|
||||||
|
|
||||||
|
// 加载数据
|
||||||
|
isLoading: false,
|
||||||
|
isDlgLoading: false,
|
||||||
|
|
||||||
|
addressList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapState(['mallList'])
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onChooseChange (e) {
|
||||||
|
this.arr = e
|
||||||
|
},
|
||||||
|
mallChange() {
|
||||||
|
this.$userCheck(this.mallId).then(() => {
|
||||||
|
let mallInfo = this.mallList.filter(item => {
|
||||||
|
return item.mallId == this.mallId
|
||||||
|
})
|
||||||
|
this.mallName = mallInfo[0].mallName
|
||||||
|
|
||||||
|
// 下载数据
|
||||||
|
this.loadMode = 0
|
||||||
|
this.tableData = []
|
||||||
|
this.currentPage = 1
|
||||||
|
this.isDlgLoading = true
|
||||||
|
this.getList(this.tableData, this.mallId, this.mallName, 1)
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onConfirm () {
|
||||||
|
if (this.arr.length == 0) {
|
||||||
|
Message.error("请选择待创建备货单")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
console.log(this.arr)
|
||||||
|
this.arr.map(item => {
|
||||||
|
let temp = this.choosedList.filter(i => {
|
||||||
|
return i.subPurchaseOrderSn == item.subPurchaseOrderSn
|
||||||
|
})
|
||||||
|
console.log(temp)
|
||||||
|
if (temp.length == 0) {
|
||||||
|
this.choosedList.push(item)
|
||||||
|
console.log(this.choosedList)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Message.success("添加成功,可继续添加")
|
||||||
|
},
|
||||||
|
loadAll() {
|
||||||
|
this.$userCheck().then(() => {
|
||||||
|
this.choosedList = []
|
||||||
|
this.currentPage = 1
|
||||||
|
this.isLoading = true
|
||||||
|
if (this.$store.state.userInfo.type == 3) {
|
||||||
|
this.loadMode = 0
|
||||||
|
this.getList(this.choosedList, this.$store.state.mallId, this.$store.state.mallName, 1)
|
||||||
|
} else {
|
||||||
|
this.loadMallIndex = 0
|
||||||
|
this.loadMode = 1
|
||||||
|
this.getList(this.choosedList, this.mallList[this.loadMallIndex].mallId, this.mallList[this.loadMallIndex].mallName, 1)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClick (e) {
|
||||||
|
if (e === 'byStore') {
|
||||||
|
this.isShow = true
|
||||||
|
} else if (e === 'loadAll') {
|
||||||
|
this.loadAll()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beginCreateConfirm() {
|
||||||
|
if (this.choosedList.length <= 0) {
|
||||||
|
Message.error('请先添加备货单');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.createDlgShow = true
|
||||||
|
},
|
||||||
|
beforeBegin() {
|
||||||
|
this.$refs.robForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.createDlgShow = false
|
||||||
|
this.beginCreate()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList (data, mallId, mallName, currentPage) {
|
||||||
|
sendChromeAPIMessage({
|
||||||
|
url: 'oms/bg/venom/api/supplier/purchase/manager/querySubOrderList',
|
||||||
|
needMallId: true,
|
||||||
|
anti: true,
|
||||||
|
mallId: mallId,
|
||||||
|
data: {
|
||||||
|
"pageNo": currentPage,
|
||||||
|
"pageSize": 100,
|
||||||
|
"urgencyType": 0,
|
||||||
|
"isCustomGoods": false,
|
||||||
|
"statusList": [
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"oneDimensionSort": {
|
||||||
|
"firstOrderByParam": "expectLatestDeliverTime",
|
||||||
|
"firstOrderByDesc": 0
|
||||||
|
}
|
||||||
|
}}).then((res) => {
|
||||||
|
if (res.errorCode == 1000000) {
|
||||||
|
res.result.subOrderForSupplierList.map((item) => {
|
||||||
|
data.push({...item, mallId: mallId, mallName: mallName})
|
||||||
|
})
|
||||||
|
|
||||||
|
if (this.pageSize == length) {
|
||||||
|
currentPage ++
|
||||||
|
this.getList(data, mallId, mallName, currentPage)
|
||||||
|
} else {
|
||||||
|
if (this.loadMode == 1) {
|
||||||
|
this.loadMallIndex ++
|
||||||
|
if (this.loadMallIndex < this.mallList.length) {
|
||||||
|
this.getList(data, this.mallList[this.loadMallIndex].mallId, this.mallList[this.loadMallIndex].mallName, 1)
|
||||||
|
} else {
|
||||||
|
this.isLoading = false
|
||||||
|
this.isDlgLoading = false
|
||||||
|
Message.success("所有店铺待创建备货单已加载完成")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.isLoading = false
|
||||||
|
this.isDlgLoading = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.getList(data, mallId, mallName, currentPage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
remove(sn) {
|
||||||
|
for (let i = 0; i < this.choosedList.length; i++) {
|
||||||
|
if (this.choosedList[i].subPurchaseOrderSn == sn) {
|
||||||
|
this.choosedList.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);";
|
||||||
|
},
|
||||||
|
beginCreate() {
|
||||||
|
if (this.isBegin) {
|
||||||
|
this.isBegin = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.createTotal = this.choosedList.length
|
||||||
|
this.isBegin = true;
|
||||||
|
|
||||||
|
this.choosedList.map((data, index) => {
|
||||||
|
let deliverOrderDetailInfos = data.orderDetailVOList.map(item => {
|
||||||
|
if (this.robForm.isModifyMaxNum) {
|
||||||
|
return {
|
||||||
|
productSkuId: item.productSkuId,
|
||||||
|
deliverSkuNum: item.skuDeliveryQuantityMaxLimit
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
productSkuId: item.productSkuId,
|
||||||
|
deliverSkuNum: item.productSkuPurchaseQuantity
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let packageInfos = []
|
||||||
|
data.orderDetailVOList.map(item => {
|
||||||
|
let packageDetailSaveInfos = []
|
||||||
|
if (this.robForm.isModifyMaxNum) {
|
||||||
|
packageDetailSaveInfos.push({
|
||||||
|
productSkuId: item.productSkuId,
|
||||||
|
skuNum: item.skuDeliveryQuantityMaxLimit
|
||||||
|
})
|
||||||
|
|
||||||
|
} else {
|
||||||
|
packageDetailSaveInfos.push({
|
||||||
|
productSkuId: item.productSkuId,
|
||||||
|
skuNum: item.productSkuPurchaseQuantity
|
||||||
|
})
|
||||||
|
}
|
||||||
|
packageInfos.push({packageDetailSaveInfos: packageDetailSaveInfos})
|
||||||
|
})
|
||||||
|
|
||||||
|
let addressInfo = this.addressList.filter(k => {
|
||||||
|
return k.mallId == data.mallId
|
||||||
|
})
|
||||||
|
|
||||||
|
let deliveryOrderCreateInfos = []
|
||||||
|
deliveryOrderCreateInfos.push({
|
||||||
|
deliverOrderDetailInfos: deliverOrderDetailInfos,
|
||||||
|
subPurchaseOrderSn: data.subPurchaseOrderSn,
|
||||||
|
deliveryAddressId: addressInfo[0].addressId,
|
||||||
|
packageInfos: packageInfos
|
||||||
|
})
|
||||||
|
|
||||||
|
let deliveryOrderCreateGroupList = []
|
||||||
|
deliveryOrderCreateGroupList.push({
|
||||||
|
deliveryOrderCreateInfos: deliveryOrderCreateInfos,
|
||||||
|
receiveAddressInfo: data.receiveAddressInfo,
|
||||||
|
subWarehouseId: data.subWarehouseId
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
let _this = this;
|
||||||
|
let tt = setInterval(function() {
|
||||||
|
if (_this.choosedList.length == 0) {
|
||||||
|
_this.isBegin = false;
|
||||||
|
clearInterval(tt);
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
},
|
||||||
|
formatTime(time) {
|
||||||
|
return timestampToTime(time)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.product {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
text-align: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 60px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
position: relative;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(243, 8, 8, .4);
|
||||||
|
|
||||||
|
@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(243, 8, 8, .6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-manage_productInfo__1pD83>img {
|
||||||
|
|
||||||
|
width: 60px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.order-manage_productInfo__1pD83 {
|
||||||
|
min-height: 60px;
|
||||||
|
padding-left: 70px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-manage_productInfo__1pD83>div:nth-child(2) {
|
||||||
|
color: rgba(0,0,0,.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.outerWrapper {
|
||||||
|
margin: 4px 4px 0px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot-module__dot___M-RuH .dot-module__circle___2l2UV {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot-module__dot___M-RuH {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.index-module__image-preview___2fiZX .index-module__img___p3B1N {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
margin-right: 10px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
font-size: 12px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: var(--bc-Table-emptyTextColor);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textoverflow {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-manage_skuInfo__FW-Nd {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-manage_contentInfo__1Cjd6 {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
text-align: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 240px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.order-manage_skuInfo__FW-Nd .order-manage_contentInfo__1Cjd6 .order-manage_title__1VTO5 {
|
||||||
|
-webkit-flex-wrap: wrap;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
color: rgba(0,0,0,.8);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user