Commit 90003798 authored by xioln's avatar xioln

入库流程

parent 4fe426a9
/**
* @Description: 理化检验流程
* @author xioln
* @date 2023-07-20
* @FilePath: applications/dee-mes/src/privateComponents/components/ChemicalTestProcess/index.vue
*/
<template>
<div class="Chemical-test-process">
<dee-as-com
refs="outerCasing"
:lay-config="{
typeName: 'InStorageRequestItem',
layKey: '1c4983a2-6f51-49e4-95ee-2f5506b8e217'
}"
:basic-data="basicData.businessObject"
/>
</div>
</template>
<script>
export default {
componentName: '理化检验流程',
name: 'ChemicalTestProcess',
components: {}, // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
}
},
computed: {},
created() {
// 初始化数据
console.log('basicData', this.basicData)
},
methods: {
}
}
</script>
<style lang='scss'>
</style>
<template> <template>
<div class="upload-files"> <div class="upload-files">
<dee-form label-position="top" :form="form" :form-data="formData1" /> <dee-form app-name="tf-mom" label-position="top" :form="form" :form-data="formData1" />
</div> </div>
</template> </template>
<script> <script>
......
...@@ -6,10 +6,7 @@ ...@@ -6,10 +6,7 @@
*/ */
<template> <template>
<div class="equipmen-checkNo"> <div class="equipmen-checkNo">
<div class="dee-form-header-box"> <dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;margin-bottom: 12px;" />
<dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;" />
</div>
<div class="sub-title" style="padding-bottom: 8px; font-size: 16px;"> 物料检验详情 </div>
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
...@@ -32,7 +29,7 @@ ...@@ -32,7 +29,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="保质期/贮存期"> <el-form-item label-width="120px" label="保质期/贮存期">
<el-date-picker <el-date-picker
v-model="form.qualityPeriod" v-model="form.qualityPeriod"
clearable clearable
...@@ -154,12 +151,12 @@ ...@@ -154,12 +151,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="120px" label="不合格品审理单号"> <el-form-item label-width="130px" label="不合格品审理单号">
<el-input v-model="form.noPassReviewNo" clearable placeholder="请输入不合格品审理单号" /> <el-input v-model="form.noPassReviewNo" clearable placeholder="请输入不合格品审理单号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="入场验收问题描述" label-width="120px"> <el-form-item label="入场验收问题描述" label-width="130px">
<el-input <el-input
v-model="form.acceptanceProblem" v-model="form.acceptanceProblem"
type="textarea" type="textarea"
...@@ -171,7 +168,7 @@ ...@@ -171,7 +168,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="相关单位意见" label-width="120px"> <el-form-item label="相关单位意见" label-width="130px">
<el-input <el-input
v-model="form.relevantOpinions" v-model="form.relevantOpinions"
type="textarea" type="textarea"
...@@ -183,7 +180,7 @@ ...@@ -183,7 +180,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label-width="100px" label="检验备注" style="margin-bottom:10px"> <el-form-item label-width="130px" label="检验备注" style="margin-bottom:10px">
<el-input <el-input
v-model="form.checkRemark" v-model="form.checkRemark"
type="textarea" type="textarea"
...@@ -194,9 +191,9 @@ ...@@ -194,9 +191,9 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="24">
<el-form-item label-width="100px"> <el-form-item>
<upload-files v-if="uploadVisble" v-model="form.objFileLinks" /> <upload-files v-model="form.objFileLinks" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -318,16 +315,27 @@ export default { ...@@ -318,16 +315,27 @@ export default {
created() { created() {
// 初始化数据 // 初始化数据
this.form = this.basicData this.form = this.basicData
this.form.operator = 'MODIFY'
}, },
methods: { methods: {
onSubmit() { onSubmit() {
const params = { const params = {
...this.form, ...this.form,
operator: 'MODIFY' 'jobTestCheckItems': this.jobTestCheckItems
} }
this.$api.recursion('JobResponseInTest', params).then(res => { params.operator = 'MODIFY'
this.$utils.showMessageSuccess('保存成功') return new Promise((resolve, reject) => {
this.$refs.form.validate((isok) => {
if (isok) {
this.$api.recursion('JobResponseInTest', params).then(res => {
resolve(true)
}).catch(() => {
resolve(false)
})
} else {
this.$utils.showMessageWarning('请填写必填项')
resolve(false)
}
})
}) })
}, },
savePDF() {} savePDF() {}
...@@ -335,4 +343,9 @@ export default { ...@@ -335,4 +343,9 @@ export default {
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
.equipmen-checkNo{
.el-select{
width: 100%;
}
}
</style> </style>
...@@ -6,10 +6,7 @@ ...@@ -6,10 +6,7 @@
*/ */
<template> <template>
<div class="check-no"> <div class="check-no">
<div class="dee-form-header-box"> <dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;margin-bottom: 12px;" />
<dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;" />
</div>
<div class="sub-title" style="padding-bottom: 8px; font-size: 16px;"> 物料检验详情 </div>
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
...@@ -900,26 +897,43 @@ export default { ...@@ -900,26 +897,43 @@ export default {
} }
}, },
methods: { methods: {
// onSubmit() {
// console.log('this', this)
// const params = {
// ...this.form,
// 'jobTestCheckItems': this.jobTestCheckItems
// }
// params.operator = 'MODIFY'
// this.$api.recursion('JobResponseInTest', params).then(res => {
// this.$utils.showMessageSuccess('保存成功')
// })
// },
savePDF() {
console.log('this', this.$store.state.globalUploader.openUploader)
console.log('this', this.$store.state.globalUploader.activeLoad)
},
viewDialog() {},
onSubmit() { onSubmit() {
console.log('this', this)
const params = { const params = {
...this.form, ...this.form,
'jobTestCheckItems': this.jobTestCheckItems 'jobTestCheckItems': this.jobTestCheckItems
} }
params.operator = 'MODIFY' params.operator = 'MODIFY'
if (this.$store.state.globalUploader.openUploader.list) { return new Promise((resolve, reject) => {
console.log('2131231', this.$store.state.globalUploader.openUploader.list.map(item => ({ target: { ...item, operator: 'ADD' }, operator: 'ADD' }))) this.$refs.form.validate((isok) => {
params.objFileLinks = this.$store.state.globalUploader.openUploader.list.map(item => ({ target: { ...item, operator: 'ADD' }, operator: 'ADD' })) if (isok) {
} this.$api.recursion('JobResponseInTest', params).then(res => {
this.$api.recursion('JobResponseInTest', params).then(res => { resolve(true)
this.$utils.showMessageSuccess('保存成功') }).catch(() => {
resolve(false)
})
} else {
this.$utils.showMessageWarning('请填写必填项')
resolve(false)
}
})
}) })
}, }
savePDF() {
console.log('this', this.$store.state.globalUploader.openUploader)
console.log('this', this.$store.state.globalUploader.activeLoad)
},
viewDialog() {}
} }
} }
</script> </script>
......
...@@ -6,10 +6,7 @@ ...@@ -6,10 +6,7 @@
*/ */
<template> <template>
<div class="outSource-checkNo"> <div class="outSource-checkNo">
<div class="dee-form-header-box"> <dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;margin-bottom: 12px;" />
<dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;" />
</div>
<div class="sub-title" style="padding-bottom: 8px; font-size: 16px;"> 物料检验详情 </div>
<el-form ref="form" :model="form" class="checkNo-container" :rules="formRules"> <el-form ref="form" :model="form" class="checkNo-container" :rules="formRules">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="验收单号" label-width="100px" prop="testNo"> <el-form-item label="验收单号" label-width="100px" prop="testNo">
...@@ -166,7 +163,7 @@ ...@@ -166,7 +163,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<upload-files v-if="uploadVisble" v-model="form.objFileLinks" /> <upload-files v-model="form.objFileLinks" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -292,10 +289,22 @@ export default { ...@@ -292,10 +289,22 @@ export default {
onSubmit() { onSubmit() {
const params = { const params = {
...this.form, ...this.form,
operator: 'MODIFY' 'jobTestCheckItems': this.jobTestCheckItems
} }
this.$api.recursion('JobResponseInTest', params).then(res => { params.operator = 'MODIFY'
this.$utils.showMessageSuccess('保存成功') return new Promise((resolve, reject) => {
this.$refs.form.validate((isok) => {
if (isok) {
this.$api.recursion('JobResponseInTest', params).then(res => {
resolve(true)
}).catch(() => {
resolve(false)
})
} else {
this.$utils.showMessageWarning('请填写必填项')
resolve(false)
}
})
}) })
}, },
savePDF() {} savePDF() {}
......
...@@ -6,9 +6,12 @@ ...@@ -6,9 +6,12 @@
*/ */
<template> <template>
<div class="jobResponseInTest-process"> <div class="jobResponseInTest-process">
<equipmen-check-no v-if="type==='AirEquipment'" :basic-data="basicData" :job-response-in-test-data="data" /> <div class="sub-title" style="padding-bottom: 12px;">
<outSource-check-no v-if="type==='OutSource'" :basic-data="basicData" :job-response-in-test-data="data" /> 物料检验详情
<material-check-no v-if="type==='Material'" :basic-data="basicData" :job-response-in-test-data="data" /> </div>
<equipmen-check-no v-if="type==='AirEquipment'" ref="AirEquipment" :basic-data="basicData" :job-response-in-test-data="data" />
<outSource-check-no v-if="type==='OutSource'" ref="OutSource" :basic-data="basicData" :job-response-in-test-data="data" />
<material-check-no v-if="type==='Material'" ref="Material" :basic-data="basicData" :job-response-in-test-data="data" />
</div> </div>
</template> </template>
<script> <script>
...@@ -20,7 +23,6 @@ import { get, post } from '@/utils/http' ...@@ -20,7 +23,6 @@ import { get, post } from '@/utils/http'
export default { export default {
componentName: '检验响应流程', componentName: '检验响应流程',
name: 'JobResponseInTestProcess', // name写在组件的最前方,自定义组件为必填 name: 'JobResponseInTestProcess', // name写在组件的最前方,自定义组件为必填
// components: { EquipmenCheckNo, OutSourceCheckNo },
components: { EquipmenCheckNo, OutSourceCheckNo, MaterialCheckNo }, components: { EquipmenCheckNo, OutSourceCheckNo, MaterialCheckNo },
props: { props: {
basicData: { basicData: {
...@@ -31,7 +33,9 @@ export default { ...@@ -31,7 +33,9 @@ export default {
data() { data() {
return { return {
type: '', type: '',
data: null data: null,
basicDataId: null,
inventoryReqId: null
} }
}, },
computed: {}, computed: {},
...@@ -41,25 +45,21 @@ export default { ...@@ -41,25 +45,21 @@ export default {
// deep: true, // deep: true,
// handler: function(val) { // handler: function(val) {
// if (val.inventoryReqId) { // if (val.inventoryReqId) {
// console.log('val', val) // this.basicDataId = val.id
// // this.getInventoryRequest(val.inventoryReqId) // this.inventoryReqId = val.inventoryReqId
// this.getInventoryRequest(val.inventoryReqId)
// } // }
// } // }
// }, // }
'basicData.inventoryReqId': {
immediate: true,
deep: true,
handler: function(val) {
console.log('inventoryReqId', val)
this.getInventoryRequest(val)
}
}
}, },
created() { created() {
// 初始化数据 // 初始化数据
}, },
mounted() { mounted() {
console.log('basicData', this) console.log('this.basicData', this.basicData)
this.basicDataId = this.basicData.id
this.inventoryReqId = this.basicData.inventoryReqId
this.getInventoryRequest(this.basicData.inventoryReqId)
}, },
methods: { methods: {
getInventoryRequest(id) { getInventoryRequest(id) {
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
{ {
'fieldName': 'jobOrderId', 'fieldName': 'jobOrderId',
'operator': 'EQ', 'operator': 'EQ',
'value': this.basicData.id 'value': this.basicDataId
} }
], ],
'operator': 'AND' 'operator': 'AND'
...@@ -124,12 +124,16 @@ export default { ...@@ -124,12 +124,16 @@ export default {
} }
post('JobResponseInTest/search', param).then(res => { post('JobResponseInTest/search', param).then(res => {
const data = res.items.content[0] const data = res.items.content[0]
console.log('JobResponseInTest', { ...data })
this.data = data this.data = data
this.type = type this.type = type
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
},
// 完成任务同时校验保存
validate() {
console.log('this.$refs[this.type]', this.$refs[this.type])
return this.$refs[this.type].onSubmit()
} }
} }
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<template> <template>
<div class="purchasingwarehousing-process"> <div class="purchasingwarehousing-process">
<dee-table <dee-table
v-if="basicData.id"
ref="treeTable" ref="treeTable"
:data="tableData" :data="tableData"
:columns="columns" :columns="columns"
...@@ -97,22 +98,32 @@ export default { ...@@ -97,22 +98,32 @@ export default {
optionsTree: { optionsTree: {
rowKey: 'id', rowKey: 'id',
'tree-props': { children: 'children' } 'tree-props': { children: 'children' }
} },
timerId: null
} }
}, },
computed: {}, computed: {},
watch: { watch: {
'basicData.businessObject.id': { // 'basicData.id': {
immediate: true, // immediate: true,
deep: true, // deep: true,
handler: function(val) { // handler: function(val) {
this.searchInStorageRequestItem(val) // this.searchInStorageRequestItem(val)
} // }
} // }
}, },
created() { created() {
// 初始化数据 // 初始化数据
// this.searchInStorageRequestItem(this.basicData.businessObject.id) },
mounted() {
console.log('this.basicData', this.basicData)
this.timerId = setInterval(() => {
if (this.basicData.id) {
clearInterval(this.timerId)
this.timerId = null
this.searchInStorageRequestItem(this.basicData.id)
}
}, 200)
}, },
methods: { methods: {
// 编辑采购入库明细查询InStorageRequestItem/search // 编辑采购入库明细查询InStorageRequestItem/search
......
/**
* @Description: 库位选择组件
* @author xioln
* @date 2023-07-21
* @FilePath: applications/dee-mes/src/privateComponents/components/WarehouseSelect/index.vue
*/
<template>
<div class="warehouse-select">
<el-select
v-if="basicData"
v-model="selectVal"
:loading="tableColumnSelect"
size="small"
placeholder="请选择库位"
filterable
remote
loading-text="数据正在加载中..."
:remote-method="(query) => remoteMethod(query, storageZoneId)"
@focus="locationList = []"
@change="save"
>
<el-option v-for="item in locationList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</template>
<script>
export default {
name: 'WarehouseSelect', // name写在组件的最前方,自定义组件为必填
componentName: '库位选择组件',
components: {},
props: {
basicData: {
type: Object,
default: () => null
},
backVal: {
type: Object,
default: () => null
}
},
data() {
return {
storageZoneId: '',
selectVal: '',
tableColumnSelect: false,
locationList: [],
// 库位搜索节流
remoteFlag: true
}
},
computed: {},
watch: {
basicData: {
immediate: true,
deep: true,
handler: function(val) {
this.storageZoneId = val.storageZoneId
}
}
},
created() {
// 初始化数据
this.selectVal = this.backVal
},
methods: {
// 搜索库位
remoteMethod(query) {
if (!this.storageZoneId) return
if (query.length < 3) return
if (this.remoteFlag) {
this.remoteFlag = false
this.tableColumnSelect = true
const params = {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'extCenterId', 'operator': 'EQ', 'value': this.storageZoneId
},
{
'fieldName': 'extcode', 'operator': 'LIKE', 'value': query
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': []
}
this.$api.searchApi('ExtDxProductWorkUnit', params).then(res => {
if (res.items && res.items.content.length) {
this.locationList = res.items.content.map((item) => {
return {
label: item.extcode,
value: item.id
}
})
} else {
this.locationList = []
}
})
.catch((err) => console.log(err))
.finally(() => {
this.loading = false
this.remoteFlag = true
this.tableColumnSelect = false
})
} else {
this.$utils.showMessageWarning('上一步请求正在查询中,请稍后')
}
},
save(v) {
if (!this.selectVal) this.$utils.showMessageWarning('请选择库位')
console.log('selectVal', v)
this.$emit('save', this.selectVal)
}
}
}
</script>
<style lang='scss'></style>
/**
* @Description: 验收入库确认签审对象
* @author xioln
* @date 2023-07-21
* @FilePath: applications/dee-mes/src/privateComponents/components/WarehousingConfirmationConfirm/index.vue
*/
<template>
<div class="warehousing-confirmation-confirm">
<dee-table v-if="basicData.id" ref="treeTable" :data="tableData" :columns="columns" :options="optionsTree" />
</div>
</template>
<script>
import { post } from '@/utils/http'
import WarehouseSelect from '/Users/xioln/project/tf-mom-web/applications/dee-mes/src/privateComponents/components/WarehouseSelect/index.vue'
export default {
componentName: '验收入库申请流程详情',
name: 'PurchasingWarehousingProcess', // name写在组件的最前方,自定义组件为必填
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
tableData: [],
columns: [
{ title: '序号', key: 'parentIndex', align: 'center', headerAlign: 'center' },
{ title: '单据编号', key: 'inventoryReq.reqNo', width: '120', align: 'center', headerAlign: 'center' },
{
title: '库位',
key: 'storageZoneId',
width: '150',
component: {
name: WarehouseSelect,
show: true,
props: {
basicData: this.basicData,
backVal: '2'
},
handler: {
save: (extWorkUnitId) => {
const params = {
id: this.inventoryJobResponses.id,
operator: 'MODIFY',
extWorkUnitId: extWorkUnitId,
extWorkUnitIdType: 'ExtDxProductWorkUnit'
}
this.$api.recursion('JobResponseInStorage', params).then(res => {
this.$utils.showMessageSuccess('保存成功')
})
}
}
}
},
{ title: '所属设备', key: 'subEquipment', headerAlign: 'center', align: 'center' },
{
title: '物料类型', key: 'typeName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.extMaterial ? row.extMaterial.resType2.typeName : row.materialTypeName
return value
}
},
{
title: '编码', key: 'typeCode', align: 'center', headerAlign: 'center', width: '100', formatter: (row, column, cellValue, index) => {
const value = row.resCode ? row.resCode : row.extMaterial ? row.extMaterial.resCode : ''
return value
}
},
{ title: '机型', key: 'airModel', align: 'center', headerAlign: 'center' },
{ title: '架次', key: 'sorties', align: 'center', headerAlign: 'center' },
{
title: '计量单位', key: 'unitName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.reqUnit ? row.reqUnit : row.extMaterial ? row.extMaterial.extUnit.unitName : ''
return value
}
},
{ title: '入库数量', key: 'reqAmount', align: 'center', headerAlign: 'center' },
{
title: '供应商', key: 'supplierFullName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.extDxSipplier ? row.extDxSipplier.supplierFullName : row.supplier
return value
}
},
// { title: '是否合格供应商', key: 'extDxSipplier.isValid', headerAlign: 'center' },
{ title: '制造商', key: 'manufacturer', align: 'center', headerAlign: 'center' },
{
title: '到货日期', key: 'arrivalDate', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate.split(' ')[0]
}
},
{
title: '生产日期', key: 'producedTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate.split(' ')[0]
}
},
{
title: '随产品资料', key: 'withProductMaterial', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return Array.isArray(row.withProductMaterial) ? row.withProductMaterial.join(';') : row.withProductMaterial
}
},
{ title: '紧急程度', key: 'urgency', align: 'center', headerAlign: 'center' },
{ title: '入库单价', key: 'stockUnitPrice', align: 'center', headerAlign: 'center' },
{ title: '入库金额', key: 'stockPrice', align: 'center', headerAlign: 'center' },
{ title: '含税单价', key: 'taxUnitPrice', align: 'center', headerAlign: 'center' },
{ title: '含税金额', key: 'taxPrice', align: 'center', headerAlign: 'center' },
{ title: '税率', key: 'taxRate', align: 'center', headerAlign: 'center' },
{ title: '报检人', key: 'applyUserName', align: 'center', headerAlign: 'center' },
{
title: '接受仓库', key: 'extname', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.storageZone ? row.storageZone.extname : row.storageZoneName
return value
}
},
{ title: '合同号', key: 'contractNo', align: 'center', headerAlign: 'center' },
{ title: '备注', key: 'remark', align: 'center', headerAlign: 'center' },
{ title: '状态', key: 'state', align: 'center', headerAlign: 'center' },
{
title: '创建时间', key: 'createTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate.split(' ')[0]
}
}
],
optionsTree: {
rowKey: 'id',
'tree-props': { children: 'children' }
},
inventoryJobResponses: null
}
},
computed: {
},
watch: {
'basicData.id': {
immediate: true,
deep: true,
handler: function(val) {
this.searchInStorageRequestItem(val)
}
}
},
created() {
// 初始化数据
// this.searchInStorageRequestItem(this.basicData.businessObject.id)
},
methods: {
// 编辑采购入库明细查询InStorageRequestItem/search
searchInStorageRequestItem(id) {
const param = {
'rootCondition': {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'id',
'operator': 'EQ',
'value': 1626783143996
},
{
'fieldName': 'parentId',
'operator': 'ISNULL'
}
],
'operator': 'AND'
}
],
'items': []
},
'openProps': [
{
'name': 'extMaterial',
'openProps': [
{
'name': 'resType2'
},
{
'name': 'extUnit'
}
]
},
{
'name': 'extDxSipplier'
},
{
'name': 'storageZone'
},
{
'name': 'inventoryReq'
},
{
'name': 'inventoryJobResponses',
'searchItems': {
'items': [
{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': 'JobResponseInEntry'
}
]
},
'openProps': [
{
'name': 'extWorkUnit'
}
]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
},
'childCondition': {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': []
},
'openProps': [
{
'name': 'extMaterial',
'openProps': [
{
'name': 'resType2'
},
{
'name': 'extUnit'
}
]
},
{
'name': 'extDxSipplier'
},
{
'name': 'storageZone'
},
{
'name': 'inventoryReq'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
}
post('InStorageRequestItem/treeSearch', param).then(res => {
const data = res.items
this.treeTableNoArrange(data)
this.inventoryJobResponses = data[0].inventoryJobResponses[0]
}).catch((err) => {
console.log(err)
})
},
treeTableNoArrange(tableData) {
tableData.forEach((item, i) => {
item.parentIndex = i + 1
if (item.children) {
item.children.forEach((child, j) => {
child.parentIndex = item.parentIndex + '.' + (j + 1)
})
}
})
this.tableData = tableData
}
}
}
</script>
<style lang='scss'></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