多账号抢仓
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<template slot="content">
|
||||
<ai-search-bar>
|
||||
<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>
|
||||
</template>
|
||||
<template #right>
|
||||
@@ -18,7 +18,7 @@
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
:tableData="choosedList"
|
||||
:col-configs="colConfigs"
|
||||
:total="total"
|
||||
:isShowPagination="false"
|
||||
@@ -74,8 +74,9 @@
|
||||
title="选择商品"
|
||||
:visible.sync="isShow"
|
||||
:close-on-click-modal="false"
|
||||
@confirm="onConfirm"
|
||||
width="1290px">
|
||||
<el-select v-model="mallId" placeholder="请选择" @click="getList">
|
||||
<el-select v-model="mallId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in mallList"
|
||||
:key="item.mallId"
|
||||
@@ -90,8 +91,8 @@
|
||||
:total="total"
|
||||
:isShowPagination="false"
|
||||
style="margin-top: 8px;"
|
||||
@selection-change="handleSelectionChange"
|
||||
@getList="getList">center
|
||||
@selection-change="onChooseChange"
|
||||
@getList="getList">
|
||||
<el-table-column slot="productName" width="400px" label="商品信息" show-overflow-tooltip align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="order-manage_productInfo__1pD83">
|
||||
@@ -106,13 +107,6 @@
|
||||
</div>
|
||||
</template>
|
||||
</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">
|
||||
<template slot-scope="scope">
|
||||
<div class="order-manage_skuInfo__FW-Nd" v-for="(item, index) in scope.row.detailList" :key="index">
|
||||
@@ -148,7 +142,7 @@
|
||||
isShow: false,
|
||||
colConfigs: [
|
||||
{ type: "selection", width: '70px', align: 'left' },
|
||||
{ prop: 'subPurchaseOrderSn', label: '备货单号', width: '180px', align: 'left' },
|
||||
{ prop: 'subPurchaseOrderSn', label: '备货单号', align: 'left' },
|
||||
{ slot: 'productName' },
|
||||
{ slot: 'className'},
|
||||
{ slot: 'robInfo'},
|
||||
@@ -159,13 +153,20 @@
|
||||
total: 0,
|
||||
ids: [],
|
||||
isBegin: false,
|
||||
timer: null
|
||||
timer: null,
|
||||
choosedList: [],
|
||||
arr: []
|
||||
}
|
||||
},
|
||||
|
||||
...mapState(['mallName', 'mallList']),
|
||||
computed: {
|
||||
...mapState(['mallName', 'mallList'])
|
||||
},
|
||||
|
||||
created () {
|
||||
setTimeout(() => {
|
||||
this.isShow = true
|
||||
}, 600)
|
||||
this.getList()
|
||||
},
|
||||
|
||||
@@ -174,6 +175,28 @@
|
||||
},
|
||||
|
||||
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 () {
|
||||
sendChromeAPIMessage({
|
||||
url: 'oms/bg/venom/api/supplier/purchase/manager/querySubOrderList',
|
||||
@@ -209,12 +232,11 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.ids = [];
|
||||
val.forEach(e => {
|
||||
this.ids.push(e.subPurchaseOrderSn);
|
||||
});
|
||||
|
||||
handleSelectionChange(e) {
|
||||
this.ids = e.map(v => v.subPurchaseOrderSn)
|
||||
},
|
||||
|
||||
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);";
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user