Commit b3ff57e9 authored by wangdanlei's avatar wangdanlei

串件单查询

parent d1bf65c2
......@@ -7,6 +7,7 @@
:disabled="disabled"
placeholder="请输入"
:remote-method="remoteMethod"
value-key="id"
:loading="loading"
@change="changeEvent"
>
......@@ -91,7 +92,7 @@ export default {
}
if (data) {
await this.getModelNo(data.serialNumber)
this.selVal = JSON.stringify(data)
this.selVal = data
}
},
async getModelNo(query) {
......@@ -109,6 +110,9 @@ export default {
'openProps': [
{
'name': 'extUnit'
},
{
'name': 'objOrg'
}
]
}
......@@ -119,7 +123,7 @@ export default {
this.requestOp = res.items.content.map(item => {
return {
label: item.serialNumber,
value: JSON.stringify(item)
value: item
}
})
}
......
<template>
<div class="materialReferenceLink-table">
<dee-as-com
ref="searchForm"
:form="searchForm"
:lay-config="{ typeName: 'ReplaceMaterialDoc', layKey: 'defaultQuery' }"
@searchEvent="initData"
/>
<dee-up-table
ref="upTable"
:columns="tableColumns"
:data="tableData"
:index-row="{ title: '序号', width: '60', align: 'center', fixed: true }"
selection-row
:pagination="pagination"
@pagination-size-change="changePageSize"
@pagination-current-change="changePageNum"
@selection-change="selectionChange"
/>
<dee-drawer title="查看" :dialog-visible="visible" @handleClose="()=>{visible = false}">
<dee-as-com
v-if="btnType === 0"
:lay-config="layConfig"
:basic-data="basicData"
/>
<TaskDetailProcess v-if="btnType === 1" :basic-data="rowData" />
<ProcessTracking v-if="btnType === 2" :basic-data="rowData" />
</dee-drawer>
</div>
</template>
<script>
import { post } from '../../../utils/http'
import TaskDetailProcess from '../../../../../dee-task-center/src/privateComponents/components/TaskDetailProcess'
import ProcessTracking from '../../../../../dee-task-center/src/privateComponents/components/ProcessTracking'
export default {
name: 'SerialSingleReport', // name写在组件的最前方,自定义组件为必填
componentName: '串件单报表',
components: { ProcessTracking, TaskDetailProcess },
data() {
return {
visible: false,
rowData: null,
btnType: 0,
basicData: {},
tableColumns: [
{ title: '操作', key: 'operate', align: 'center', hideTip: true, component: {
show: true,
name: 'EditTableRow',
props: {
btns: [
{
operation: '查看',
handleClick: (row, index) => {
this.btnType = 0
this.visible = true
this.getData(row)
},
icon: '/icons/components/dashboard/preview.png'
},
{
operation: '下载PDF',
handleClick: (row, index) => {
this.download(row)
},
icon: '/icons/c-down.png'
},
{
operation: '审签历史记录',
handleClick: (row, index) => {
this.btnType = 1
this.rowData = row
this.visible = true
},
icon: '/icons/c-doclink.png'
},
{
operation: '流程跟踪',
handleClick: (row, index) => {
this.btnType = 2
this.rowData = row
this.visible = true
},
icon: '/icons/b-structure.png'
}
]
}
}, width: 200 },
{
title: '登记时间',
key: 'createTime',
width: 200
},
{
title: ' 串件单申请单编号',
key: 'reqNo',
width: 200
},
{
title: '产品件号/型号',
key: 'extMaterial.modelNo',
width: 200
},
{
title: '产品名称',
key: 'extMaterial.resName'
},
{
title: '串件数量',
key: 'amount'
},
{
title: '串件原因类型',
key: 'replaceReasonType'
},
{
title: '串件原因',
key: '串件原因'
},
{
title: '被替换件', children: [
{ title: '架次', key: 'sourceSorties', align: 'center' },
{ title: '系列号', key: 'sourceSerno', align: 'center', width: 200 },
{ title: '是否试验件', key: 'sourceIsExperiment', align: 'center' },
{ title: '适航批准标签', key: 'sourceApprovalCert', align: 'center', width: 200 },
{ title: '供应商图号/版本', key: 'sourceProductDrawver', align: 'center', width: 200 },
{ title: '软件件号/版本', key: 'sourceSoftConfPieceNo', align: 'center', width: 200 },
{ title: '制造偏离单号', key: 'sourceMfgDevDoc', align: 'center', width: 200 }
]
},
{
title: '拟装机件', children: [
{ title: '架次', key: 'targetSorties', align: 'center' },
{ title: '系列号', key: 'targetSerno', align: 'center', width: 200 },
{ title: '是否试验件', key: 'targetIsExperiment', align: 'center' },
{ title: '适航批准标签', key: 'targetApprovalCert', align: 'center', width: 200 },
{ title: '供应商图号/版本', key: 'targetProductDrawver', align: 'center', width: 200 },
{ title: '软件件号/版本', key: 'targetSoftConfPieceNo', align: 'center', width: 200 },
{ title: '制造偏离单号', key: 'targetMfgDevDoc', align: 'center', width: 200 }
]
},
{
title: '经办人',
key: 'creator.userName'
},
{
title: '临时计划号',
key: ''
},
{
title: '工艺员',
key: ''
},
{
title: '装机指令号',
key: ''
}
],
tableData: [],
pagination: {
currentPage: 1,
pageSize: 10,
total: 0,
pageSizes: [10, 20, 50]
},
selectionRow: [],
formButtons: [
{
'text': '查询',
'type': 'submit',
'component': {
'type': 'primary'
}
}
],
searchForm: {
rescodeA: '',
rescodeB: ''
},
searchFormData: [{
split: 3,
data: [
{
key: 'rescodeA',
title: '物料A编码',
component: {
name: 'el-input'
}
},
{
key: 'rescodeB',
title: '物料B编码',
component: {
name: 'el-input'
}
}
]
}]
}
},
computed: {
layConfig() {
return { typeName: 'ReplaceMaterialDoc', layKey: 'defaultView' }
}
},
created() {
// 初始化数据
this.initData()
},
methods: {
initData(searchForm) {
// 初始化数据
const params = {
'pageFrom': this.pagination.currentPage,
'pageSize': this.pagination.pageSize,
'searchItems': { },
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
if (searchForm) {
params.searchItems = searchForm
}
params.openProps = [
{
'name': 'extMaterial',
'pageFrom': 1,
'pageSize': 9999
},
{
'name': 'sourceInventory',
'pageFrom': 1,
'pageSize': 9999
}
]
post('ReplaceMaterialDoc/list/search', params).then(res => {
if (res.items && res.items.content) {
this.tableData = res.items.content.map(item => {
const replaceMaterialDocVO = item.replaceMaterialDocVO
let processInstanceId = null
let processTaskId = null
if (item.taskProcess) {
processInstanceId = item.taskProcess.procInstId
processTaskId = item.taskProcess.id
}
return {
...replaceMaterialDocVO,
processInstanceId,
processTaskId
}
})
this.pagination.total = res.items.totalElements
}
})
},
getData(data) {
const params = {
'searchItems': {
'items': [
{
'fieldName': 'id',
'operator': 'EQ',
'value': data.id
}
]
},
'openProps': [
{
'name': 'sourceAo'
},
{
'name': 'targetAo'
},
{
'name': 'extMaterial',
'openProps': [
{
'name': 'extUnit'
}
]
},
{
'name': 'creator',
'pageFrom': 1,
'pageSize': 9999
}
]
}
post('/ReplaceMaterialDoc/search', params).then(res => {
if (res.items && res.items.content) {
this.basicData = res.items.content[0]
}
})
},
download(data) {
this.$api.apiDownloadFile(`/ReplaceMaterialDoc/download/pdf?id=${data.id}`).then((res) => {
this.$utils.downLoadFile(res, '')
})
},
selectionChange(v) {
this.selectionRow = v
},
changePageSize(pageSize) {
this.pagination.pageSize = pageSize
this.pagination.currentPage = 1
this.initData()
},
changePageNum(pageNum) {
this.pagination.currentPage = pageNum
this.initData()
},
addCancel(pageNum) {
this.addDialogVisible = false
},
successFun() {
this.initData()
}
}
}
</script>
<style lang='scss'>
.materialReferenceLink-table {
.dee-up-table {
height: 500px;
}
}
</style>
......@@ -25,7 +25,7 @@ import { panZoom } from './moveAndZoom'
// 引入相关的依赖
import BpmnViewer from 'bpmn-js'
import customRender from './bpmn/custom-render'
import { getInsXml, getHistoryParticipantInfo, getCurrentParticipantInfo } from '@/api/workflow/userSettings.js'
import { getInsXml, getHistoryParticipantInfo, getCurrentParticipantInfo } from '../../../api/workflow/userSettings.js'
export default {
name: 'ProcessTracking',
components: { },
......
......@@ -42,7 +42,7 @@
<script>
import moment from 'moment'
import { getInstanceHistory } from '@/api/workflow/userSettings.js'
import { getInstanceHistory } from '../../../api/workflow/userSettings.js'
export default {
name: 'TaskDetailProcess',
components: {},
......
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