企标稽查流程
This commit is contained in:
+183
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<p>
|
||||
{{ $t('workCenter.esInspectionProcess.enterpriseStandard') }}
|
||||
{{model.inspectNo}}
|
||||
{{model.inspectName}}
|
||||
</p>
|
||||
<div class="table-operator" v-if="!disabled">
|
||||
<!-- 新增 -->
|
||||
<a-button icon="plus" type="primary" @click="handleAdd" v-has="'enterpriseStandard:add'">{{ $t('newlyAdded') }}</a-button>
|
||||
</div>
|
||||
<j-table
|
||||
v-if="columns && columns.length > 0"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:row-selection="null"
|
||||
:pagination="ipagination"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
|
||||
<!-- 企标号、企标名称 -->
|
||||
<template v-slot:standard="{text, record}">
|
||||
<a-tooltip overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
|
||||
<a class="table-text can-click-table-text" @click="detailClick(record)" v-if="(text || text === 0) && record.detailFlag">{{ text }}</a>
|
||||
<div class="table-text" v-else-if="(text || text === 0) && !record.detailFlag">{{ text }}</div>
|
||||
<div class="table-text" v-else>{{ global.emptyLine }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 操作 -->
|
||||
<template slot="action" slot-scope="{text, record, index}">
|
||||
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
|
||||
</template>
|
||||
|
||||
</j-table>
|
||||
</a-spin>
|
||||
<!-- 新增、编辑稽查报告 -->
|
||||
<inspection-process-report-modal ref="modalForm" @ok="modalFormOk"/>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import InspectionProcessReportModal
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessReportModal'
|
||||
|
||||
export default {
|
||||
name: 'InspectionProcessReport',
|
||||
mixins: [JeroListMixin],
|
||||
components: { InspectionProcessReportModal, JTable },
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
const columns = [
|
||||
{
|
||||
title: this.$t('serialNumber'),
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{ // 依据条款
|
||||
title: this.$t('workCenter.esInspectionProcess.accordingToTerms'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 标准内容或要求
|
||||
title: this.$t('workCenter.esInspectionProcess.standardContentOrDemand'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionDirector',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 执行情况
|
||||
title: this.$t('workCenter.esInspectionProcess.implementation'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'implementation',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 附件
|
||||
title: this.$t('workCenter.esInspectionProcess.file'),
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'file',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 评分
|
||||
title: this.$t('workCenter.esInspectionProcess.score'),
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'score',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
// 操作
|
||||
fixed: 'right',
|
||||
title: this.$t('operation'),
|
||||
// dataIndex: 'action',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
return {
|
||||
disableMixinCreated: true,
|
||||
title: this.$t('workCenter.esInspectionProcess.inspectionReport'),
|
||||
drawerWidth: 1000,
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: ''
|
||||
},
|
||||
dataSource: [{}],
|
||||
columns: columns.slice(0, this.disabled ? 6 : 7)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
this.loadData()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
console.log(this.selectedRowKeys)
|
||||
this.close()
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 跳转详情
|
||||
detailClick (record) {
|
||||
this.$openPageNewSheet({
|
||||
path: '/enterpriseStandardLibrary/enterpriseStandardDetail',
|
||||
query: {
|
||||
id: record.id
|
||||
}
|
||||
})
|
||||
},
|
||||
tableOnChange (pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order === 'ascend' ? '1' : '2'
|
||||
this.orderByField = sorter.columnKey
|
||||
this.ipagination = pagination
|
||||
this.getTableList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user