|
@ -34,7 +34,7 @@ |
|
|
> |
|
|
> |
|
|
<el-table-column prop="create_date" label="操作" width="80" align="center"> |
|
|
<el-table-column prop="create_date" label="操作" width="80" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button class="packing-handle-btn iconfont" @click="handleCartoning(scope.row)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button> |
|
|
|
|
|
|
|
|
<el-button :loading="btnLoading" class="packing-handle-btn iconfont" @click="handleCartoning(scope.row)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="caseCode" label="盒号" min-width="120" align="center" /> |
|
|
<el-table-column prop="caseCode" label="盒号" min-width="120" align="center" /> |
|
@ -162,7 +162,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="isPackingOrPartType" slot="footer" class="dialog-footer"> |
|
|
<div v-if="isPackingOrPartType" slot="footer" class="dialog-footer"> |
|
|
<el-button type="text">取消</el-button> |
|
|
<el-button type="text">取消</el-button> |
|
|
<el-button type="primary" @click="handleComfireCartoning">确定</el-button> |
|
|
|
|
|
|
|
|
<el-button :loading="btnLoading" type="primary" @click="handleComfireCartoning">确定</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
@ -200,6 +200,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
btnLoading: false, |
|
|
currentSelections: [], |
|
|
currentSelections: [], |
|
|
arrySort: null, |
|
|
arrySort: null, |
|
|
tableDisplayFields: [], |
|
|
tableDisplayFields: [], |
|
@ -240,23 +241,33 @@ export default { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
switch (this.inputSelect) { |
|
|
switch (this.inputSelect) { |
|
|
|
|
|
case 'caseName': |
|
|
|
|
|
this.caseName = this.caseQuery[this.inputSelect] |
|
|
|
|
|
this.caseCode = null |
|
|
|
|
|
this.tid = null |
|
|
|
|
|
this.barcode = null |
|
|
|
|
|
break |
|
|
case 'caseCode': |
|
|
case 'caseCode': |
|
|
|
|
|
this.caseName = null |
|
|
this.caseCode = this.caseQuery[this.inputSelect] |
|
|
this.caseCode = this.caseQuery[this.inputSelect] |
|
|
this.tid = null |
|
|
this.tid = null |
|
|
this.barcode = null |
|
|
this.barcode = null |
|
|
break |
|
|
break |
|
|
case 'tid': |
|
|
case 'tid': |
|
|
this.tid = this.caseQuery[this.inputSelect] |
|
|
this.tid = this.caseQuery[this.inputSelect] |
|
|
|
|
|
this.caseName = null |
|
|
this.caseCode = null |
|
|
this.caseCode = null |
|
|
this.barcode = null |
|
|
this.barcode = null |
|
|
break |
|
|
break |
|
|
case 'barcode': |
|
|
case 'barcode': |
|
|
this.barcode = this.caseQuery[this.inputSelect] |
|
|
this.barcode = this.caseQuery[this.inputSelect] |
|
|
|
|
|
this.caseName = null |
|
|
this.caseCode = null |
|
|
this.caseCode = null |
|
|
this.tid = null |
|
|
this.tid = null |
|
|
break |
|
|
break |
|
|
} |
|
|
} |
|
|
const params = { |
|
|
const params = { |
|
|
|
|
|
'caseName': this.caseName, |
|
|
'tid': this.tid, |
|
|
'tid': this.tid, |
|
|
'caseCode': this.caseCode, |
|
|
'caseCode': this.caseCode, |
|
|
'barcode': this.barcode, |
|
|
'barcode': this.barcode, |
|
@ -272,7 +283,7 @@ export default { |
|
|
this.tableData = res.content |
|
|
this.tableData = res.content |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
async getPackingFileList(id) { |
|
|
|
|
|
|
|
|
async getPackingFileList(id, baseCategory) { |
|
|
const parentsId = id |
|
|
const parentsId = id |
|
|
const params = { |
|
|
const params = { |
|
|
'categoryId': this.selectedCategory.id, |
|
|
'categoryId': this.selectedCategory.id, |
|
@ -298,8 +309,12 @@ export default { |
|
|
const data = await FetchInitContorlView(params) |
|
|
const data = await FetchInitContorlView(params) |
|
|
if (data) { |
|
|
if (data) { |
|
|
if (this.isPackingOrPartType === 1 && this.selectedCategory.arrangeType === 2) { |
|
|
if (this.isPackingOrPartType === 1 && this.selectedCategory.arrangeType === 2) { |
|
|
this.archivesTable = data.list.content |
|
|
|
|
|
this.packingData = data.list.content |
|
|
|
|
|
|
|
|
const newData = data.list.content.map(item => ({ |
|
|
|
|
|
...item, |
|
|
|
|
|
baseCategory |
|
|
|
|
|
})) |
|
|
|
|
|
this.archivesTable = newData |
|
|
|
|
|
this.packingData = newData |
|
|
} else { |
|
|
} else { |
|
|
data.list.content.forEach(item => { |
|
|
data.list.content.forEach(item => { |
|
|
item.archivesParentsId = id |
|
|
item.archivesParentsId = id |
|
@ -310,26 +325,33 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 装盒 api |
|
|
// 装盒 api |
|
|
async handleCartoning(row) { |
|
|
async handleCartoning(row) { |
|
|
let jnCategoryId |
|
|
|
|
|
|
|
|
// let jnCategoryId |
|
|
|
|
|
|
|
|
if (this.selectedCategory.arrangeType === 1) { |
|
|
if (this.selectedCategory.arrangeType === 1) { |
|
|
this.packingData = this.selections |
|
|
this.packingData = this.selections |
|
|
jnCategoryId = this.packFileCategory.id |
|
|
|
|
|
|
|
|
// jnCategoryId = this.packFileCategory.id |
|
|
} else { |
|
|
} else { |
|
|
const combinedData = [] |
|
|
const combinedData = [] |
|
|
const promises = [] |
|
|
const promises = [] |
|
|
this.selections.forEach(async(item) => { |
|
|
|
|
|
|
|
|
this.selections.forEach((item) => { |
|
|
const promise = this.getPackingFileList(item.id) |
|
|
const promise = this.getPackingFileList(item.id) |
|
|
.then(data => { |
|
|
.then(data => { |
|
|
combinedData.push(...data) |
|
|
|
|
|
|
|
|
const newData = data.map(subItem => { |
|
|
|
|
|
return { |
|
|
|
|
|
...subItem, |
|
|
|
|
|
baseCategory: item.baseCategory |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
combinedData.push(...newData) |
|
|
}) |
|
|
}) |
|
|
promises.push(promise) |
|
|
promises.push(promise) |
|
|
}) |
|
|
}) |
|
|
await Promise.all(promises) |
|
|
await Promise.all(promises) |
|
|
|
|
|
|
|
|
this.packingData = combinedData |
|
|
this.packingData = combinedData |
|
|
jnCategoryId = this.packFileCategory.id |
|
|
|
|
|
|
|
|
// jnCategoryId = this.packFileCategory.id |
|
|
} |
|
|
} |
|
|
|
|
|
this.btnLoading = true |
|
|
const arrParams = this.packingData.map((item) => { |
|
|
const arrParams = this.packingData.map((item) => { |
|
|
const json = {} |
|
|
const json = {} |
|
|
json.archivesId = item.id |
|
|
json.archivesId = item.id |
|
@ -340,7 +362,7 @@ export default { |
|
|
} |
|
|
} |
|
|
json.caseId = row.id |
|
|
json.caseId = row.id |
|
|
json.caseName = row.caseName |
|
|
json.caseName = row.caseName |
|
|
json.categoryId = jnCategoryId |
|
|
|
|
|
|
|
|
json.categoryId = item.baseCategory |
|
|
return json |
|
|
return json |
|
|
}) |
|
|
}) |
|
|
console.log('ddddd', arrParams) |
|
|
console.log('ddddd', arrParams) |
|
@ -353,6 +375,7 @@ export default { |
|
|
this.$emit('close-dialog') |
|
|
this.$emit('close-dialog') |
|
|
this.tableData = [] |
|
|
this.tableData = [] |
|
|
this.caseQuery[this.inputSelect] = '' |
|
|
this.caseQuery[this.inputSelect] = '' |
|
|
|
|
|
this.btnLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 分卷装盒 |
|
|
// 分卷装盒 |
|
@ -389,14 +412,15 @@ export default { |
|
|
this.$message({ message: '左侧档案待选列表全部装盒完成才可保存', type: 'error', offset: 8 }) |
|
|
this.$message({ message: '左侧档案待选列表全部装盒完成才可保存', type: 'error', offset: 8 }) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
const jnCategoryId = this.packFileCategory.id |
|
|
|
|
|
|
|
|
this.btnLoading = true |
|
|
|
|
|
// const jnCategoryId = this.packFileCategory.id |
|
|
const arrParams = this.selectArchivesTable.map(item => { |
|
|
const arrParams = this.selectArchivesTable.map(item => { |
|
|
const json = {} |
|
|
const json = {} |
|
|
json.archivesId = item.id |
|
|
json.archivesId = item.id |
|
|
json.archivesParentsId = this.selections[0].id |
|
|
json.archivesParentsId = this.selections[0].id |
|
|
json.caseId = item.caseId |
|
|
json.caseId = item.caseId |
|
|
json.caseName = item.caseName |
|
|
json.caseName = item.caseName |
|
|
json.categoryId = jnCategoryId |
|
|
|
|
|
|
|
|
json.categoryId = item.baseCategory |
|
|
return json |
|
|
return json |
|
|
}) |
|
|
}) |
|
|
console.log('arrParams', arrParams) |
|
|
console.log('arrParams', arrParams) |
|
@ -435,7 +459,7 @@ export default { |
|
|
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy) |
|
|
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.getPackingFileList(this.selections[0].id) |
|
|
|
|
|
|
|
|
this.getPackingFileList(this.selections[0].id, this.selections[0].baseCategory) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|