|
|
@ -51,7 +51,7 @@ |
|
|
|
<el-table-column prop="stockRegion" label="目标位置" :show-overflow-tooltip="true" /> |
|
|
|
<el-table-column prop="stockGridNum" label="目标数量"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.stockGridNum + ' / 层位' }}</div> |
|
|
|
<div>{{ scope.row.stockGridNum + ' / '+ (scope.row.totalGridNum?scope.row.totalGridNum:'0') +' 层位' }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="stockRemarks" label="备注"> |
|
|
@ -141,7 +141,7 @@ |
|
|
|
<li v-if="detailInfo.stockType===6"><span>盘点类型:</span>层位盘点</li> |
|
|
|
|
|
|
|
<li><span>目标位置:</span>{{ detailInfo.stockRegion }}</li> |
|
|
|
<li><span>目标数量:</span>{{ detailInfo.stockGridNum }} / 层位</li> |
|
|
|
<li><span>目标数量:</span>{{ detailInfo.stockGridNum }} / {{ detailInfo.totalGridNum }} 层位</li> |
|
|
|
|
|
|
|
<li v-if="detailInfo.stockRemarks !== null" class="row-li"><span>备注:</span>{{ detailInfo.stockRemarks }}</li> |
|
|
|
<li v-else class="row-li"><span>备注:</span>-</li> |
|
|
@ -182,7 +182,7 @@ |
|
|
|
> |
|
|
|
<el-table-column prop="gridName" label="层位架" min-width="180" :show-overflow-tooltip="true" /> |
|
|
|
<el-table-column prop="floorName" label="楼层" /> |
|
|
|
<el-table-column prop="regionName" label="区域" /> |
|
|
|
<el-table-column prop="regionName" label="区域" min-width="120" /> |
|
|
|
<el-table-column prop="booksheflCount" label="盘点详情" min-width="280" :show-overflow-tooltip="true"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<ul class="detail-table-info"> |
|
|
@ -192,7 +192,11 @@ |
|
|
|
</ul> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="progress" label="进度" min-width="140" /> |
|
|
|
<el-table-column prop="progress" label="进度" min-width="140"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.progress !== null ? scope.row.progress : '-' }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="state" label="状态" width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.state === 0" class="row-state row-lending state-active">已终止</span> |
|
|
@ -238,7 +242,7 @@ import { mapGetters } from 'vuex' |
|
|
|
import { parseTime, saveAs, getBlob } from '@/utils/index' |
|
|
|
import qs from 'qs' |
|
|
|
|
|
|
|
const defaultForm = { stockTypeName: '全量盘点', stockType: 1, stockBill: null, stockRegion: '全部区域', stockGridNum: null, stockGridNumName: null, stockRemarks: null, regionId: null, shelfId: null, gridShelf: null, gridId: null } |
|
|
|
const defaultForm = { stockTypeName: '全量盘点', stockType: 1, stockBill: null, stockRegion: '全部区域', stockGridNum: null, stockGridNumName: null, totalGridNum: null, stockRemarks: null, regionId: null, shelfId: null, gridShelf: null, gridId: null } |
|
|
|
export default { |
|
|
|
name: 'CheckLog', |
|
|
|
components: { crudOperation, rrOperation, pagination, taskStockLogEcharts }, |
|
|
@ -315,17 +319,24 @@ export default { |
|
|
|
}, |
|
|
|
// 新增前 |
|
|
|
[CRUD.HOOK.beforeToAdd]() { |
|
|
|
let params |
|
|
|
if (this.crud.form.stockType === 1) { |
|
|
|
this.crud.form.stockTypeName = '全量盘点' |
|
|
|
params = { |
|
|
|
'gridShelf': null, |
|
|
|
'regionId': null, |
|
|
|
'shelfId': null |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Promise.all([ |
|
|
|
crudStockTaskLog.FetchNewBillNo(), |
|
|
|
crudStockTaskLog.FetchStockGirdNum() |
|
|
|
]).then(([newBillNoRes, stockGridNumRes]) => { |
|
|
|
crudStockTaskLog.FetchStockGirdNum(), |
|
|
|
crudStockTaskLog.FetchTotalGirdNum(params) |
|
|
|
]).then(([newBillNoRes, stockGridNumRes, totalGirdNumRes]) => { |
|
|
|
this.crud.form.stockBill = newBillNoRes |
|
|
|
this.crud.form.stockGridNumName = stockGridNumRes + ' / 层位' |
|
|
|
this.crud.form.stockGridNumName = stockGridNumRes + ' / ' + totalGirdNumRes + ' 层位' |
|
|
|
this.crud.form.stockGridNum = stockGridNumRes |
|
|
|
this.crud.form.totalGridNum = totalGirdNumRes |
|
|
|
}).catch(error => { |
|
|
|
console.error(error) |
|
|
|
}) |
|
|
@ -394,26 +405,33 @@ export default { |
|
|
|
} |
|
|
|
crudStockTaskLog.FetchInitStockTaskDetails(params).then(res => { |
|
|
|
if (res) { |
|
|
|
const progressPromises = res.content.map(item => { |
|
|
|
const paramsProgress = { |
|
|
|
'stockBill': this.dbRowData.stockBill, |
|
|
|
'gridCode': item.gridCode |
|
|
|
} |
|
|
|
return crudStockTaskLog.FetchProgressByStockBillAndGridCode(paramsProgress) |
|
|
|
}) |
|
|
|
if (this.dbRowData.state === 2) { |
|
|
|
const progressPromises = res.content.map(item => { |
|
|
|
const paramsProgress = { |
|
|
|
'stockBill': this.dbRowData.stockBill, |
|
|
|
'gridCode': item.gridCode |
|
|
|
} |
|
|
|
return crudStockTaskLog.FetchProgressByStockBillAndGridCode(paramsProgress) |
|
|
|
}) |
|
|
|
|
|
|
|
Promise.all(progressPromises).then(progressResults => { |
|
|
|
this.detailTable = res.content.map((item, index) => { |
|
|
|
item.progress = progressResults[index] |
|
|
|
return item |
|
|
|
}) |
|
|
|
|
|
|
|
Promise.all(progressPromises).then(progressResults => { |
|
|
|
this.gridTableLoading = false |
|
|
|
}).catch(error => { |
|
|
|
console.error(error) |
|
|
|
this.gridTableLoading = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.detailTable = res.content.map((item, index) => { |
|
|
|
item.progress = progressResults[index] |
|
|
|
item.progress = this.dbRowData.state === 0 ? '已终止' : (this.dbRowData.state === 1 ? '排队中' : '已完成') |
|
|
|
return item |
|
|
|
}) |
|
|
|
|
|
|
|
this.gridTableLoading = false |
|
|
|
}).catch(error => { |
|
|
|
console.error(error) |
|
|
|
this.gridTableLoading = false |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
this.detailPage.total = res.totalElements |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|