Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -19,8 +19,11 @@
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="逻辑库位" prop="endTime">
|
||||
<warehouse-select v-model="queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
|
||||
style="width: 100%; display: inline-block; width: 200px;" clearable />
|
||||
<!-- <warehouse-select v-model="queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
|
||||
style="width: 100%; display: inline-block; width: 200px;" clearable /> -->
|
||||
<el-select v-model="warehouseIds" collapse-tags multiple placeholder="请选择逻辑库位" style="width: 200px;">
|
||||
<el-option v-for="item in warehouseOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.itemName" placeholder="请输入产品名称" clearable
|
||||
@@ -109,7 +112,7 @@ export default {
|
||||
},
|
||||
dicts: ['product_coil_status', 'coil_material', 'coil_itemname', 'coil_manufacturer'],
|
||||
data() {
|
||||
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
|
||||
// 工具函数:个位数补零,保证格式统一(比如 9 → 09,5 → 05)
|
||||
const addZero = (num) => num.toString().padStart(2, '0')
|
||||
|
||||
const now = new Date() // 当前本地北京时间
|
||||
@@ -148,6 +151,40 @@ export default {
|
||||
itemManufacturer: '',
|
||||
},
|
||||
loading: false,
|
||||
warehouseIds: [
|
||||
'1988150099140866050',
|
||||
'1988150263284953089',
|
||||
'1988150545175736322',
|
||||
'1988150150521090049',
|
||||
],
|
||||
warehouseOptions: [
|
||||
{ label: '酸连轧成品库', value: '1988150099140866050' },
|
||||
{ label: '镀锌原料库', value: '1988150263284953089' },
|
||||
{ label: '脱脂原料库', value: '1988150545175736322' },
|
||||
{ label: '酸连轧纵剪分条原料库', value: '1988150150521090049' },
|
||||
],
|
||||
warehouseQueryMap: {
|
||||
'1988150099140866050': {
|
||||
selectType: 'product',
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150099140866050'
|
||||
},
|
||||
'1988150263284953089': {
|
||||
selectType: 'raw_material',
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150263284953089'
|
||||
},
|
||||
'1988150545175736322': {
|
||||
selectType: 'raw_material',
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150545175736322'
|
||||
},
|
||||
'1988150150521090049': {
|
||||
selectType: 'raw_material',
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150150521090049'
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -166,49 +203,61 @@ export default {
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
Promise.all([
|
||||
// 酸连轧成品库
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150099140866050'
|
||||
}),
|
||||
// 镀锌原料库
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
selectType: 'raw_material',
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150263284953089'
|
||||
}),
|
||||
// 脱脂原料库
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
selectType: 'raw_material',
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150545175736322'
|
||||
}),
|
||||
// 酸连轧纵剪分条原料库1988150150521090049
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
selectType: 'raw_material',
|
||||
createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150150521090049'
|
||||
}),
|
||||
]).then(([res1, res2, res3, res4]) => {
|
||||
console.log(res1, res2, res3, res4)
|
||||
const list = [...res1.rows, ...res2.rows, ...res3.rows, ...res4.rows]
|
||||
Promise.all(
|
||||
this.warehouseIds.map(warehouseId => {
|
||||
const params = this.warehouseQueryMap[warehouseId]
|
||||
return listCoilWithIds({
|
||||
...this.queryParams,
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
...params
|
||||
})
|
||||
})
|
||||
// [
|
||||
// // 酸连轧成品库
|
||||
// listCoilWithIds({
|
||||
// ...this.queryParams,
|
||||
// pageSize: 9999,
|
||||
// pageNum: 1,
|
||||
// // dataType: 1,
|
||||
// createBy: 'suanzhakuguan',
|
||||
// warehouseId: '1988150099140866050'
|
||||
// }),
|
||||
// // 镀锌原料库
|
||||
// listCoilWithIds({
|
||||
// ...this.queryParams,
|
||||
// pageSize: 9999,
|
||||
// pageNum: 1,
|
||||
// // dataType: 1,
|
||||
// selectType: 'raw_material',
|
||||
// createBy: 'suanzhakuguan',
|
||||
// warehouseId: '1988150263284953089'
|
||||
// }),
|
||||
// // 脱脂原料库
|
||||
// listCoilWithIds({
|
||||
// ...this.queryParams,
|
||||
// pageSize: 9999,
|
||||
// pageNum: 1,
|
||||
// // dataType: 1,
|
||||
// selectType: 'raw_material',
|
||||
// createBy: 'suanzhakuguan',
|
||||
// warehouseId: '1988150545175736322'
|
||||
// }),
|
||||
// // 酸连轧纵剪分条原料库1988150150521090049
|
||||
// listCoilWithIds({
|
||||
// ...this.queryParams,
|
||||
// pageSize: 9999,
|
||||
// pageNum: 1,
|
||||
// // dataType: 1,
|
||||
// selectType: 'raw_material',
|
||||
// createBy: 'suanzhakuguan',
|
||||
// warehouseId: '1988150150521090049'
|
||||
// }),
|
||||
// ]
|
||||
).then((resList) => {
|
||||
console.log(resList)
|
||||
const list = resList.flatMap(res => res.rows)
|
||||
// 按照createTime 降序排序
|
||||
this.list = list.sort(
|
||||
(a, b) => new Date(b.createTime) - new Date(a.createTime)
|
||||
|
||||
@@ -19,8 +19,11 @@
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="逻辑库位" prop="endTime">
|
||||
<warehouse-select v-model="queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
|
||||
style="width: 100%; display: inline-block; width: 200px;" clearable />
|
||||
<!-- <warehouse-select v-model="queryParams.warehouseId" placeholder="请选择仓库/库区/库位"
|
||||
style="width: 100%; display: inline-block; width: 200px;" clearable /> -->
|
||||
<el-select v-model="warehouseIds" collapse-tags multiple placeholder="请选择逻辑库位" style="width: 200px;">
|
||||
<el-option v-for="item in warehouseOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称" prop="endTime">
|
||||
<el-input style="width: 200px;" v-model="queryParams.itemName" placeholder="请输入产品名称" clearable
|
||||
@@ -148,6 +151,26 @@ export default {
|
||||
itemManufacturer: '',
|
||||
},
|
||||
loading: false,
|
||||
warehouseIds: [
|
||||
'1988150323162836993',
|
||||
'1988150487185289217',
|
||||
],
|
||||
warehouseOptions: [
|
||||
{ value: '1988150323162836993', label: '镀锌成品库' },
|
||||
{ value: '1988150487185289217', label: '镀锌纵剪分条原料库' },
|
||||
],
|
||||
warehouseQueryMap: {
|
||||
'1988150323162836993': {
|
||||
selectType: 'product',
|
||||
// createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150323162836993'
|
||||
},
|
||||
'1988150487185289217': {
|
||||
selectType: 'raw_material',
|
||||
// createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150487185289217'
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -167,29 +190,36 @@ export default {
|
||||
getList() {
|
||||
this.loading = true
|
||||
Promise.all([
|
||||
// 镀锌成品库
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
selectType: 'product',
|
||||
// createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150323162836993'
|
||||
}),
|
||||
// 镀锌纵剪分条原料库
|
||||
listCoilWithIds({
|
||||
...this.queryParams,
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
selectType: 'raw_material',
|
||||
// createBy: 'suanzhakuguan',
|
||||
warehouseId: '1988150487185289217'
|
||||
}),
|
||||
]).then(([res1, res2]) => {
|
||||
console.log(res1, res2)
|
||||
const list = [...res1.rows, ...res2.rows]
|
||||
...this.warehouseIds.map(warehouseId => listCoilWithIds({
|
||||
...this.queryParams,
|
||||
...this.warehouseQueryMap[warehouseId],
|
||||
pageSize: 9999,
|
||||
pageNum: 1,
|
||||
// dataType: 1,
|
||||
}))
|
||||
// // 镀锌成品库
|
||||
// listCoilWithIds({
|
||||
// ...this.queryParams,
|
||||
// pageSize: 9999,
|
||||
// pageNum: 1,
|
||||
// // dataType: 1,
|
||||
// selectType: 'product',
|
||||
// // createBy: 'suanzhakuguan',
|
||||
// warehouseId: '1988150323162836993'
|
||||
// }),
|
||||
// // 镀锌纵剪分条原料库
|
||||
// listCoilWithIds({
|
||||
// ...this.queryParams,
|
||||
// pageSize: 9999,
|
||||
// pageNum: 1,
|
||||
// // dataType: 1,
|
||||
// selectType: 'raw_material',
|
||||
// // createBy: 'suanzhakuguan',
|
||||
// warehouseId: '1988150487185289217'
|
||||
// }),
|
||||
]).then((resList) => {
|
||||
console.log(resList)
|
||||
const list = resList.flatMap(res => res.rows)
|
||||
// 按照createTime 降序排序
|
||||
this.list = list.sort(
|
||||
(a, b) => new Date(b.createTime) - new Date(a.createTime)
|
||||
|
||||
Reference in New Issue
Block a user