You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

150 lines
4.0 KiB

<template>
<div>
<el-table v-loading="queryLoading" border :data="projectClose" style="width: 100%;margin-top: 5px" :height="height">
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
<el-table-column v-for="(item,index) in columns" :key="index" :sortable="item.columnSortable"
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align" :fixed="item.fixed === ''?false:item.fixed" :min-width="item.columnWidth"
:label="item.columnLabel">
</el-table-column>
<el-table-column label="操作" v-if="!authFlag && this.project.sstatus == '进行中'" align="center" width="120">
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.sstatus != '已确认'" @click="handleConfirm(scope.row)">确认</el-link>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
projectCloseUpdateStatus,
} from '../../../../api/machine/machineProjectIncome'
export default {
name: 'machineProjectPlanTable',
components: {},
props: {
project: {
type: Object,
required: true,
},
projectClose: {
type: Array,
required: true,
},
height: {
type: [Number, String],
default: 300,
},
authFlag: {
type: Boolean,
default: false,
},
},
data() {
return {
model: {},
saveQuoteDetail: {},
dataList: [],
saveLoading: false,
queryLoading: false,
saveVisible: false,
saveQuoteDetailRules: {},
columns: [
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2PartNo',
tableId: '5011Table2',
tableName: '项目结案表',
columnProp: 'userDisplay',
headerAlign: 'center',
align: 'center',
columnLabel: '确认人员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2PartDesc',
tableId: '5011Table2',
tableName: '项目结案表',
columnProp: 'startDate',
headerAlign: 'center',
align: 'center',
columnLabel: '要求确认日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2Qty',
tableId: '5011Table2',
tableName: '项目结案表',
columnProp: 'endDate',
headerAlign: 'center',
align: 'center',
columnLabel: '确认日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
formVisible: false,
}
},
methods: {
handleConfirm(row) {
this.$confirm('是否确认该信息?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
this.handleConfirmProjectClose(row)
})
.catch(() => {})
},
handleConfirmProjectClose(row) {
let params = {
id: row.id,
}
projectCloseUpdateStatus(params)
.then(({ data }) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.taskTableFinished()
} else {
this.$message.warning(data.msg)
}
})
.catch((error) => {
this.$message.error(error)
})
},
taskTableFinished() {
this.$emit('taskFinished')
},
},
watch: {},
}
</script>