Commit 6924ff1a authored by jingnan's avatar jingnan 👀

批量签审_验收入库确认代码修改(预案)

parent c63a77e8
......@@ -12,11 +12,14 @@
:lay-config="{ typeName: 'InStorageRequestItem', layKey: 'batchSign_warehouseConfirm'}"
@selectionChange="selectionChange"
/>
<!-- :result-data="resultData"
dis-business -->
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'WarehouseConfirm',
components: {},
......@@ -28,17 +31,20 @@ export default {
},
data() {
return {
selectionRows: []
selectionRows: [],
resultData: []
}
},
computed: {},
watch: {},
created() {
// this.searchInStorageRequestItem()
},
mounted() {
this.$bus.$on('refreshBatchSignDetails', () => {
this.$nextTick(() => {
this.$refs.applyTable && this.$refs.applyTable.$refs.asCom.getData()
// this.searchInStorageRequestItem()
})
})
},
......@@ -46,6 +52,165 @@ export default {
methods: {
selectionChange(val) {
this.selectionRows = val
},
searchInStorageRequestItem() {
console.log(this, 'this')
// const searchData = obtainedParams.searchFormData ? obtainedParams.searchFormData.items : []
// const extraItems = obtainedParams.extraBaseParams || []
const param = {
'rootCondition': {
'pageFrom': 1,
'pageSize': 999,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'parentId',
'operator': 'ISNULL'
}
// ...extraItems,
// ...searchData
],
'operator': 'AND'
}
],
'items': []
},
'parentFilter': true,
'openProps': [{
'name': 'inventoryReq',
'openProps': [
{
'name': 'materialType'
}
]
},
{
'name': 'extMaterial',
'openProps': [
{
'name': 'extUnit'
}
]
},
{
'name': 'extDxSipplier'
},
{
'name': 'storageZone'
},
{
'name': 'purchaseUnit'
},
{
'name': 'inventoryJobResponses',
'openProps': [
{
'name': 'extWorkUnit'
},
{ 'name': 'inventory'
}
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
},
'childCondition': {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': []
},
'openProps': [{
'name': 'inventoryReq',
'openProps': [
{
'name': 'materialType'
}
]
},
{
'name': 'extMaterial',
'openProps': [
{
'name': 'extUnit'
}
]
},
{
'name': 'extDxSipplier'
},
{
'name': 'storageZone'
},
{
'name': 'purchaseUnit'
},
{
'name': 'inventoryJobResponses',
'openProps': [
{
'name': 'extWorkUnit'
}
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
}
// this.resultData = []
const requestURL = 'InStorageRequestItem/search/wfcInventoryItem?taskDefinitionKey=' + this.selectData.taskKey
post(requestURL, param).then(res => {
const data = res.items.content
this.treeTableNoArrange(data)
// this.pagination.total = data.length
}).catch((err) => {
console.log(err)
})
},
treeTableNoArrange(tableData) {
this.resultData = tableData.map((item, i) => {
const resData = { ...item.pbo }
resData.parentIndex = i + 1
if (resData.children) {
resData.children.forEach((child, j) => {
child.parentIndex = resData.parentIndex + '.' + (j + 1)
child.state = ''
})
}
if (resData.inventoryJobResponses && resData.inventoryJobResponses.length) {
resData.inventoryJobResponses.forEach(el => {
if (el.subTypeName === 'JobResponseInTest') {
resData.testNo = el.testNo
resData.qualityPeriod = el.qualityPeriod
resData.longPeriod = el.longPeriod
}
if (el.subTypeName === 'JobResponseInEntry') {
resData.targetJobResponseId = el.id
resData.extWorkUnitCode = el.extWorkUnit ? el.extWorkUnit.extcode : ''
}
})
}
return {
...resData,
processInstanceId: item.processTask.processInstanceId,
processTaskId: item.processTask.id
}
})
// this.tableData = tableData
}
}
}
......@@ -56,7 +221,7 @@ export default {
width: 100%;
height: 100%;
box-sizing: border-box;
padding:0 4px;
padding:0 .25rem;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment