多账号抢仓
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<el-button type="primary" @click="isShow = true">选择商品</el-button>
|
<el-button type="primary" :disabled="isBegin" @click="isShow = true">选择商品</el-button>
|
||||||
<el-button type="primary" :loading="isBegin" @click="beginRob">{{ isBegin ? '结束抢仓': '开始抢仓' }}</el-button>
|
<el-button type="primary" :loading="isBegin" @click="beginRob">{{ isBegin ? '结束抢仓': '开始抢仓' }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="choosedList"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total"
|
||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
@@ -74,8 +74,9 @@
|
|||||||
title="选择商品"
|
title="选择商品"
|
||||||
:visible.sync="isShow"
|
:visible.sync="isShow"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
@confirm="onConfirm"
|
||||||
width="1290px">
|
width="1290px">
|
||||||
<el-select v-model="mallId" placeholder="请选择" @click="getList">
|
<el-select v-model="mallId" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in mallList"
|
v-for="item in mallList"
|
||||||
:key="item.mallId"
|
:key="item.mallId"
|
||||||
@@ -90,8 +91,8 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
style="margin-top: 8px;"
|
style="margin-top: 8px;"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="onChooseChange"
|
||||||
@getList="getList">center
|
@getList="getList">
|
||||||
<el-table-column slot="productName" width="400px" label="商品信息" show-overflow-tooltip align="center">
|
<el-table-column slot="productName" width="400px" label="商品信息" show-overflow-tooltip align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="order-manage_productInfo__1pD83">
|
<div class="order-manage_productInfo__1pD83">
|
||||||
@@ -106,13 +107,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column slot="robInfo" label="抢仓信息" show-overflow-tooltip align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<div data-testid="beast-core-box" style="margin-right: 2px;">
|
|
||||||
已抢仓 <div style="color: red; display: inline;">{{ scope.row.robTotal }}</div> 次
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column slot="className" label="SKU信息" width="400px" show-overflow-tooltip align="center">
|
<el-table-column slot="className" label="SKU信息" width="400px" show-overflow-tooltip align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div class="order-manage_skuInfo__FW-Nd" v-for="(item, index) in scope.row.detailList" :key="index">
|
<div class="order-manage_skuInfo__FW-Nd" v-for="(item, index) in scope.row.detailList" :key="index">
|
||||||
@@ -148,7 +142,7 @@
|
|||||||
isShow: false,
|
isShow: false,
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ type: "selection", width: '70px', align: 'left' },
|
{ type: "selection", width: '70px', align: 'left' },
|
||||||
{ prop: 'subPurchaseOrderSn', label: '备货单号', width: '180px', align: 'left' },
|
{ prop: 'subPurchaseOrderSn', label: '备货单号', align: 'left' },
|
||||||
{ slot: 'productName' },
|
{ slot: 'productName' },
|
||||||
{ slot: 'className'},
|
{ slot: 'className'},
|
||||||
{ slot: 'robInfo'},
|
{ slot: 'robInfo'},
|
||||||
@@ -159,13 +153,20 @@
|
|||||||
total: 0,
|
total: 0,
|
||||||
ids: [],
|
ids: [],
|
||||||
isBegin: false,
|
isBegin: false,
|
||||||
timer: null
|
timer: null,
|
||||||
|
choosedList: [],
|
||||||
|
arr: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
...mapState(['mallName', 'mallList']),
|
computed: {
|
||||||
|
...mapState(['mallName', 'mallList'])
|
||||||
|
},
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.isShow = true
|
||||||
|
}, 600)
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -174,6 +175,28 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
onChooseChange (e) {
|
||||||
|
// this.choosedList = this.removeDuplicate([...this.choosedList, ...e])
|
||||||
|
this.arr = e
|
||||||
|
console.log(this.choosedList)
|
||||||
|
},
|
||||||
|
|
||||||
|
onConfirm () {
|
||||||
|
this.choosedList = this.arr
|
||||||
|
this.isShow = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 数组去重
|
||||||
|
removeDuplicate (arr) {
|
||||||
|
let map = {}
|
||||||
|
arr.forEach(item => {
|
||||||
|
if (!map[item.subPurchaseOrderSn]) {
|
||||||
|
map[item.subPurchaseOrderSn]=item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return Object.values(map)
|
||||||
|
},
|
||||||
|
|
||||||
getList () {
|
getList () {
|
||||||
sendChromeAPIMessage({
|
sendChromeAPIMessage({
|
||||||
url: 'oms/bg/venom/api/supplier/purchase/manager/querySubOrderList',
|
url: 'oms/bg/venom/api/supplier/purchase/manager/querySubOrderList',
|
||||||
@@ -209,12 +232,11 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.ids = [];
|
handleSelectionChange(e) {
|
||||||
val.forEach(e => {
|
this.ids = e.map(v => v.subPurchaseOrderSn)
|
||||||
this.ids.push(e.subPurchaseOrderSn);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getStyle(url) {
|
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);";
|
return "background-image: url(" + url + "); width: 72px; height: 72px; cursor: pointer; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.14);";
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user