Commit 82bcbf54 authored by xioln's avatar xioln

检验流程

parent 0b39e9bd
<template>
<div class="upload-files">
<dee-form label-position="top" :form="form" :form-data="formData1" />
</div>
</template>
<script>
export default {
name: 'UploadFiles',
props: {
// 系统配置出来的表单
value: {
type: Array,
default: () => []
}
},
data() {
return {
form: {
objFileLinks: []
},
'formData': [
{
'title': '',
'split': 3,
'data': [
{
'name': '上传附件',
'key': 'objFileLinks',
'parentKey': 'objFileLinks',
'component': {
'name': 'DeeUploadTable',
'url': '/dfs/fileManager/feign/uploadFile'
},
'width': 3
}
],
'labelPosition': 'right'
}
],
formData1: [
{
'title': '',
'split': 3,
'appName': 'tf-mom',
'data': [
{
'name': '附件',
'title': '',
'key': 'objFileLinks',
'width': 3,
'hidden': false,
'component': {
'name': 'DeeUploadTable',
'appName': 'tf-mom',
'taleType': 'single',
'showFileList': true,
'filterKey': 'contentType',
'mlimit': 1,
'alimit': 1,
'limit': 5,
'mrequired': true,
'state': 'edit',
'masterTitle': '主内容',
'appendTitle': '附件',
'masterFilter': ['MASTER_FILE', 'PRIMARY'],
'appendFilter': ['ATTACH_FILE', 'SECONDARY', 'FLOW_FILE', 'PROCESS_CONTENTROLE_PDF'],
'url': '/dfs/fileManager/feign/uploadFile',
'masterUploadFilter': 'MASTER_FILE',
'appendUploadFilter': 'ATTACH_FILE'
},
'parentKey': 'objFileLinks',
'premMark': true
}
]
}
]
}
},
watch: {
'form.objFileLinks': function(newForm, oldForm) {
this.$emit('input', newForm)
}
},
mounted() {
const data = this.value
this.form.objFileLinks = data
},
methods: {
}
}
</script>
<style lang='scss'>
.upload-files {
.dee-form2 {
.el-row {
.form-item-container {
height: 100% !important;
width: 100% !important;
.el-form-item__content {
padding-left: 3.75rem;
}
}
}
}
}
</style>
/**
* @Description: 检验响应流程
* @author xioln
* @date 2023-07-14
* @FilePath: applications/dee-mes/src/privateComponents/components/JobResponseInTestProcess/index.vue
*/
<template>
<div class="jobResponseInTest-process">
<equipmen-check-no v-if="type==='AirEquipment'" :basic-data="basicData" :job-response-in-test-data="data" />
<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>
</template>
<script>
import EquipmenCheckNo from './component/equipmenCheckNo'
import OutSourceCheckNo from './component/outSourceCheckNo'
import MaterialCheckNo from './component/materialCheckNo'
import { get, post } from '@/utils/http'
export default {
componentName: '检验响应流程',
name: 'JobResponseInTestProcess', // name写在组件的最前方,自定义组件为必填
// components: { EquipmenCheckNo, OutSourceCheckNo },
components: { EquipmenCheckNo, OutSourceCheckNo, MaterialCheckNo },
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
type: '',
data: null
}
},
computed: {},
watch: {
// basicData: {
// immediate: true,
// deep: true,
// handler: function(val) {
// if (val.inventoryReqId) {
// console.log('val', val)
// // this.getInventoryRequest(val.inventoryReqId)
// }
// }
// },
'basicData.inventoryReqId': {
immediate: true,
deep: true,
handler: function(val) {
console.log('inventoryReqId', val)
this.getInventoryRequest(val)
}
}
},
created() {
// 初始化数据
},
mounted() {
console.log('basicData', this)
},
methods: {
getInventoryRequest(id) {
get(`InventoryRequest/${id}`).then(res => {
console.log('getInventoryRequest', res)
const type = res.items.billType
// switch (type) {
// case '器材':
// case 'Material':
// this.type = 'Material'
// break
// case '机载设备':
// case 'AirEquipment':
// this.initData('AirEquipment')
// break
// case '外包产品':
// case 'OutSource':
// this.initData('OutSource')
// break
// }
this.initData(type)
}).catch((err) => {
console.log(err)
})
},
initData(type) {
const param = {
'pageFrom': 1,
'pageSize': 10,
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'jobOrderId',
'operator': 'EQ',
'value': this.basicData.id
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [
{
'name': 'jobTestCheckItems',
'openProps': [{ 'name': 'jobTestCheckItemDetails' }]
},
{
'name': 'objFileLinks',
'openProps': [{ 'name': 'target' }]
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('JobResponseInTest/search', param).then(res => {
const data = res.items.content[0]
console.log('JobResponseInTest', { ...data })
this.data = data
this.type = type
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
<style lang='scss'>
</style>
...@@ -14,16 +14,13 @@ ...@@ -14,16 +14,13 @@
:form-data="formData" :form-data="formData"
:rules="rules" :rules="rules"
@on-submit="submit" @on-submit="submit"
@on-cancel="cancel"
/> />
<div class="sub-title"> 采购入库申请明细 </div> <div class="sub-title"> 采购入库申请明细 </div>
<dee-table <dee-table
ref="treeTable" ref="treeTable"
:key="symbolKey"
:data="tableData" :data="tableData"
:columns="columns" :columns="columns"
:options="optionsTree" :options="optionsTree"
:index-row="{ title: '序号', width: '70', align: 'center' }"
> >
<div slot="header" class="table-title-wrap"> <div slot="header" class="table-title-wrap">
<dee-tools :tools="tools" mode="normal" /> <dee-tools :tools="tools" mode="normal" />
...@@ -245,7 +242,10 @@ export default { ...@@ -245,7 +242,10 @@ export default {
rowKey: 'rowId', rowKey: 'rowId',
'tree-props': { children: 'children' } 'tree-props': { children: 'children' }
}, },
num: 1,
childNum: 1,
columns: [ columns: [
{ title: '序号', key: 'parentIndex', align: 'center', headerAlign: 'center' },
{ {
title: '操作', minWidth: 120, align: 'center', component: { title: '操作', minWidth: 120, align: 'center', component: {
name: 'EditTableRow', name: 'EditTableRow',
...@@ -381,8 +381,7 @@ export default { ...@@ -381,8 +381,7 @@ export default {
tableData: [], tableData: [],
tableParam: [], tableParam: [],
operator: null, operator: null,
addData: {}, addData: {}
symbolKey: ''
} }
}, },
computed: { computed: {
...@@ -661,7 +660,10 @@ export default { ...@@ -661,7 +660,10 @@ export default {
item.component.disabled = true item.component.disabled = true
}) })
} }
this.tableData = data this.treeTableNoArrange(data)
this.num = 1
this.childNum = 1
}).catch((err) => { }).catch((err) => {
console.log(err) console.log(err)
}) })
...@@ -708,12 +710,7 @@ export default { ...@@ -708,12 +710,7 @@ export default {
if (tableDataItem.operateType === 'NEW') { if (tableDataItem.operateType === 'NEW') {
tableData.push(tableDataItem) tableData.push(tableDataItem)
} }
console.log('tableData', tableData) this.treeTableNoArrange(tableData)
tableData.forEach(item => {
this.tableData.push(item)
})
this.symbolKey = Symbol(new Date().toString())
console.log('this.symbolKey', this.symbolKey)
}, },
submit() { submit() {
const tableData = this.tableData.slice() const tableData = this.tableData.slice()
...@@ -757,8 +754,16 @@ export default { ...@@ -757,8 +754,16 @@ export default {
console.log(err) console.log(err)
}) })
}, },
cancel() { 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
} }
} }
} }
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
:data="tableData" :data="tableData"
:columns="columns" :columns="columns"
:options="optionsTree" :options="optionsTree"
:index-row="{ title: '序号', width: '70' , align: 'center'}"
/> />
</div> </div>
</template> </template>
...@@ -32,65 +31,66 @@ export default { ...@@ -32,65 +31,66 @@ export default {
return { return {
tableData: [], tableData: [],
columns: [ columns: [
{ title: '单据编号', key: 'inventoryReq.reqNo', width: '120', headerAlign: 'center' }, { title: '序号', key: 'parentIndex', align: 'center', headerAlign: 'center' },
{ title: '所属设备', key: 'subEquipment', headerAlign: 'center' }, { title: '单据编号', key: 'inventoryReq.reqNo', width: '120', align: 'center', headerAlign: 'center' },
{ title: '所属设备', key: 'subEquipment', headerAlign: 'center', align: 'center' },
{ {
title: '物料类型', key: 'typeName', headerAlign: 'center', formatter: (row, column, cellValue, index) => { title: '物料类型', key: 'typeName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.extMaterial ? row.extMaterial.resType2.typeName : row.materialTypeName const value = row.extMaterial ? row.extMaterial.resType2.typeName : row.materialTypeName
return value return value
} }
}, },
{ {
title: '编码', key: 'typeCode', headerAlign: 'center', width: '100', formatter: (row, column, cellValue, index) => { 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 : '' const value = row.resCode ? row.resCode : row.extMaterial ? row.extMaterial.resCode : ''
return value return value
} }
}, },
{ title: '机型', key: 'airModel', headerAlign: 'center' }, { title: '机型', key: 'airModel', align: 'center', headerAlign: 'center' },
{ title: '架次', key: 'sorties', headerAlign: 'center' }, { title: '架次', key: 'sorties', align: 'center', headerAlign: 'center' },
{ {
title: '计量单位', key: 'unitName', headerAlign: 'center', formatter: (row, column, cellValue, index) => { title: '计量单位', key: 'unitName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.reqUnit ? row.reqUnit : row.extMaterial ? row.extMaterial.extUnit.unitName : '' const value = row.reqUnit ? row.reqUnit : row.extMaterial ? row.extMaterial.extUnit.unitName : ''
return value return value
} }
}, },
{ title: '入库数量', key: 'reqAmount', headerAlign: 'center' }, { title: '入库数量', key: 'reqAmount', align: 'center', headerAlign: 'center' },
{ {
title: '供应商', key: 'supplierFullName', headerAlign: 'center', formatter: (row, column, cellValue, index) => { title: '供应商', key: 'supplierFullName', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.extDxSipplier ? row.extDxSipplier.supplierFullName : row.supplier const value = row.extDxSipplier ? row.extDxSipplier.supplierFullName : row.supplier
return value return value
} }
}, },
// { title: '是否合格供应商', key: 'extDxSipplier.isValid', headerAlign: 'center' }, // { title: '是否合格供应商', key: 'extDxSipplier.isValid', headerAlign: 'center' },
{ title: '制造商', key: 'manufacturer', headerAlign: 'center' }, { title: '制造商', key: 'manufacturer', align: 'center', headerAlign: 'center' },
{ title: '到货日期', key: 'arrivalDate', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => { { title: '到货日期', key: 'arrivalDate', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate.split(' ')[0] return row.arrivalDate.split(' ')[0]
} }, } },
{ title: '生产日期', key: 'producedTime', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => { { title: '生产日期', key: 'producedTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate.split(' ')[0] return row.arrivalDate.split(' ')[0]
} }, } },
{ {
title: '随产品资料', key: 'withProductMaterial', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => { title: '随产品资料', key: 'withProductMaterial', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return Array.isArray(row.withProductMaterial) ? row.withProductMaterial.join(';') : row.withProductMaterial return Array.isArray(row.withProductMaterial) ? row.withProductMaterial.join(';') : row.withProductMaterial
} }
}, },
{ title: '紧急程度', key: 'urgency', headerAlign: 'center' }, { title: '紧急程度', key: 'urgency', align: 'center', headerAlign: 'center' },
{ title: '入库单价', key: 'stockUnitPrice', headerAlign: 'center' }, { title: '入库单价', key: 'stockUnitPrice', align: 'center', headerAlign: 'center' },
{ title: '入库金额', key: 'stockPrice', headerAlign: 'center' }, { title: '入库金额', key: 'stockPrice', align: 'center', headerAlign: 'center' },
{ title: '含税单价', key: 'taxUnitPrice', headerAlign: 'center' }, { title: '含税单价', key: 'taxUnitPrice', align: 'center', headerAlign: 'center' },
{ title: '含税金额', key: 'taxPrice', headerAlign: 'center' }, { title: '含税金额', key: 'taxPrice', align: 'center', headerAlign: 'center' },
{ title: '税率', key: 'taxRate', headerAlign: 'center' }, { title: '税率', key: 'taxRate', align: 'center', headerAlign: 'center' },
{ title: '报检人', key: 'applyUserName', headerAlign: 'center' }, { title: '报检人', key: 'applyUserName', align: 'center', headerAlign: 'center' },
{ {
title: '接受仓库', key: 'extname', headerAlign: 'center', formatter: (row, column, cellValue, index) => { title: '接受仓库', key: 'extname', align: 'center', headerAlign: 'center', formatter: (row, column, cellValue, index) => {
const value = row.storageZone ? row.storageZone.extname : row.storageZoneName const value = row.storageZone ? row.storageZone.extname : row.storageZoneName
return value return value
} }
}, },
{ title: '合同号', key: 'contractNo', headerAlign: 'center' }, { title: '合同号', key: 'contractNo', align: 'center', headerAlign: 'center' },
{ title: '备注', key: 'remark', headerAlign: 'center' }, { title: '备注', key: 'remark', align: 'center', headerAlign: 'center' },
{ title: '状态', key: 'state', headerAlign: 'center' }, { title: '状态', key: 'state', align: 'center', headerAlign: 'center' },
{ title: '创建时间', key: 'createTime', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => { { title: '创建时间', key: 'createTime', align: 'center', headerAlign: 'center', width: '120', formatter: (row, column, cellValue, index) => {
return row.arrivalDate.split(' ')[0] return row.arrivalDate.split(' ')[0]
} } } }
], ],
...@@ -102,20 +102,17 @@ export default { ...@@ -102,20 +102,17 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
basicData: { 'basicData.businessObject.id': {
immediate: true, immediate: true,
deep: true, deep: true,
handler: function(val) { handler: function(val) {
console.log('val', val) this.searchInStorageRequestItem(val)
if (val.businessObject.id) {
this.searchInStorageRequestItem(val.businessObject.id)
}
} }
} }
}, },
created() { created() {
// 初始化数据 // 初始化数据
console.log('this.ba', this.basicData) // this.searchInStorageRequestItem(this.basicData.businessObject.id)
}, },
methods: { methods: {
// 编辑采购入库明细查询InStorageRequestItem/search // 编辑采购入库明细查询InStorageRequestItem/search
...@@ -187,10 +184,21 @@ export default { ...@@ -187,10 +184,21 @@ export default {
post('InStorageRequestItem/treeSearch', param).then(res => { post('InStorageRequestItem/treeSearch', param).then(res => {
const data = res.items const data = res.items
this.tableData = data this.treeTableNoArrange(data)
}).catch((err) => { }).catch((err) => {
console.log(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
} }
} }
} }
......
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