2024-03-18 10:59:37 +08:00
|
|
|
|
<template>
|
2024-03-19 15:32:05 +08:00
|
|
|
|
<el-dialog :title="title" :visible.sync="visible" width="80%" append-to-body custom-class="custom-modal">
|
2024-03-18 10:59:37 +08:00
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<div class="filter-container">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="listQuery.keyWord"
|
|
|
|
|
|
placeholder="关键字"
|
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
:maxlength="30"
|
|
|
|
|
|
@keyup.enter.native="handleFilter"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
v-waves
|
|
|
|
|
|
style="margin-left: 40px"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
@click="handleFilter"
|
|
|
|
|
|
>
|
|
|
|
|
|
查询
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
:key="tableKey"
|
|
|
|
|
|
v-loading="listLoading"
|
|
|
|
|
|
:data="list"
|
|
|
|
|
|
border
|
|
|
|
|
|
fit
|
|
|
|
|
|
highlight-current-row
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
:max-height="tableHeight"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column label="序号" align="center" width="80" type="index">
|
|
|
|
|
|
<template scope="scope">
|
|
|
|
|
|
<span>{{ (listQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column :label="`${title}名称`" align="center" prop="gxName" />
|
|
|
|
|
|
<el-table-column label="计划开始时间" align="center" prop="planStartTime" />
|
|
|
|
|
|
<el-table-column label="计划结束时间" align="center" prop="planEndTime" />
|
|
|
|
|
|
<el-table-column label="实际开始时间" align="center" prop="startTime" />
|
|
|
|
|
|
<el-table-column label="实际结束时间" align="center" prop="endTime" />
|
|
|
|
|
|
<el-table-column label="进度占比" align="center" prop="gxWeight" />
|
|
|
|
|
|
<el-table-column label="延迟原因" align="center" prop="delaReason" />
|
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
|
|
|
|
|
|
<template slot-scope="{ row, $index }">
|
2024-03-19 15:32:05 +08:00
|
|
|
|
<el-button v-waves type="text" size="mini" @click="handleUpdateProcess(row, $index)">进度填报</el-button>
|
2024-03-18 10:59:37 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
:page.sync="listQuery.pageNum"
|
|
|
|
|
|
:limit.sync="listQuery.pageSize"
|
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2024-03-19 15:32:05 +08:00
|
|
|
|
<el-dialog :title="`${title}进度填报`" :visible.sync="processVisible" width="80%" append-to-body custom-class="custom-modal">
|
2024-03-18 10:59:37 +08:00
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<div class="filter-container">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="listQuery2.keyWord"
|
|
|
|
|
|
placeholder="关键字"
|
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
:maxlength="30"
|
|
|
|
|
|
@keyup.enter.native="handleFilter2"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
v-waves
|
|
|
|
|
|
style="margin-left: 40px"
|
|
|
|
|
|
class="filter-item"
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
@click="handleFilter2"
|
|
|
|
|
|
>
|
|
|
|
|
|
查询
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
2024-03-19 15:32:05 +08:00
|
|
|
|
<el-button v-waves class="filter-item" style="margin-left: 10px" type="primary" @click="handleCreateProcess">
|
2024-03-18 10:59:37 +08:00
|
|
|
|
新增
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
:key="tableKey2"
|
|
|
|
|
|
v-loading="listLoading"
|
|
|
|
|
|
:data="list2"
|
|
|
|
|
|
border
|
|
|
|
|
|
fit
|
|
|
|
|
|
highlight-current-row
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
:max-height="tableHeight"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column label="序号" align="center" width="80" type="index">
|
|
|
|
|
|
<template scope="scope">
|
|
|
|
|
|
<span>{{ (listQuery.pageNum - 1) * 10 + scope.$index + 1 }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column :label="`${title}名称`" align="center" prop="gxName" />
|
|
|
|
|
|
<el-table-column label="工序进度" align="center" prop="gxProgress" />
|
|
|
|
|
|
<el-table-column label="填报时间" align="center" prop="createTime" />
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
|
v-show="total2 > 0"
|
|
|
|
|
|
:total="total2"
|
|
|
|
|
|
:page.sync="listQuery2.pageNum"
|
|
|
|
|
|
:limit.sync="listQuery2.pageSize"
|
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-dialog append-to-body :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="630px" @closed="handleClosedModal">
|
|
|
|
|
|
<el-form
|
|
|
|
|
|
ref="dataForm"
|
|
|
|
|
|
:rules="rules"
|
|
|
|
|
|
:model="temp"
|
|
|
|
|
|
label-position="right"
|
|
|
|
|
|
label-width="120px"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form-item label="当前工序" prop="nowGxId">
|
|
|
|
|
|
<el-select v-model="temp.nowGxId" placeholder="当前工序" style="width: 100%">
|
|
|
|
|
|
<el-option v-for="item in typeList" :key="item.id" :value="item.id" :label="item.name" />
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="工序进度(%):" prop="gxProgress">
|
|
|
|
|
|
<el-input v-model="temp.gxProgress" placeholder="工序进度" :maxlength="50" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item v-if="showDelaReason" label="延迟原因:" prop="delaReason">
|
|
|
|
|
|
<el-input v-model="temp.delaReason" placeholder="延迟原因" :maxlength="50" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
2024-03-19 15:32:05 +08:00
|
|
|
|
<el-button v-waves @click="dialogFormVisible = false"> 关闭 </el-button>
|
|
|
|
|
|
<el-button v-waves type="primary" @click="createData">
|
2024-03-18 10:59:37 +08:00
|
|
|
|
提交
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import waves from '@/directive/waves'
|
|
|
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
|
|
|
import moment from 'moment'
|
|
|
|
|
|
|
|
|
|
|
|
import _ from 'lodash/fp'
|
|
|
|
|
|
import {
|
|
|
|
|
|
createProcessPlan,
|
|
|
|
|
|
getDictList,
|
|
|
|
|
|
getProgressProcessList,
|
|
|
|
|
|
getProgressProcessProgressList
|
|
|
|
|
|
} from '@/api/basic/progress'
|
|
|
|
|
|
|
|
|
|
|
|
const defaultTmp = {
|
|
|
|
|
|
nowGxId: '',
|
|
|
|
|
|
gxProgress: '',
|
|
|
|
|
|
delaReason: '',
|
|
|
|
|
|
proType: '',
|
|
|
|
|
|
planName: ''
|
|
|
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'ProcessTable2',
|
|
|
|
|
|
components: { Pagination },
|
|
|
|
|
|
directives: { waves },
|
|
|
|
|
|
props: ['bidCode', 'processType', 'componentVisible', 'currentFormData'],
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
tableKey: 0,
|
|
|
|
|
|
tableKey2: 1,
|
|
|
|
|
|
list: [],
|
|
|
|
|
|
list2: [],
|
|
|
|
|
|
temp2: [],
|
|
|
|
|
|
typeList: [],
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
total2: 0,
|
|
|
|
|
|
listLoading: false,
|
|
|
|
|
|
showDelaReason: false,
|
2024-03-19 15:32:05 +08:00
|
|
|
|
stateData: {
|
|
|
|
|
|
gxName: '',
|
|
|
|
|
|
planId: '',
|
|
|
|
|
|
gxId: '',
|
|
|
|
|
|
planEndTime: ''
|
|
|
|
|
|
},
|
2024-03-18 10:59:37 +08:00
|
|
|
|
listQuery: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
keyword: '',
|
|
|
|
|
|
bidCode: '',
|
|
|
|
|
|
proType: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
listQuery2: {
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
planId: '',
|
|
|
|
|
|
keyword: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
tableHeight: 650,
|
|
|
|
|
|
showReviewer: false,
|
|
|
|
|
|
temp: _.cloneDeep(defaultTmp),
|
|
|
|
|
|
dialogFormVisible: false,
|
|
|
|
|
|
dialogStatus: '',
|
|
|
|
|
|
processVisible: false,
|
|
|
|
|
|
textMap: {
|
|
|
|
|
|
update: '编辑',
|
|
|
|
|
|
create: '新增'
|
|
|
|
|
|
},
|
|
|
|
|
|
processModalVisible: false,
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
nowGxId: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
|
|
|
|
gxWeight: [{ required: true, message: '不能为空', trigger: 'blur' }],
|
|
|
|
|
|
delaReason: [{ required: true, message: '不能为空', trigger: 'blur' }]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
visible: {
|
|
|
|
|
|
get() {
|
|
|
|
|
|
return this.componentVisible
|
|
|
|
|
|
},
|
|
|
|
|
|
set(val) {
|
|
|
|
|
|
this.$emit('update:componentVisible', val)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
title() {
|
|
|
|
|
|
return this.processType === '线路' ? '杆塔' : '工序计划'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
visible(val) {
|
|
|
|
|
|
if (val) {
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
this.getDictList()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
isDelay(data) {
|
|
|
|
|
|
const currentTime = moment()
|
|
|
|
|
|
const targetDate = moment(data, 'YYYY-MM-DD')
|
|
|
|
|
|
return currentTime.isAfter(targetDate)
|
|
|
|
|
|
},
|
|
|
|
|
|
getDictList() {
|
|
|
|
|
|
getDictList({ param: this.processType === '线路' ? '500' : '400' }).then(res => {
|
|
|
|
|
|
this.typeList = res.data
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
getList() {
|
|
|
|
|
|
this.listLoading = true
|
|
|
|
|
|
this.listQuery.bidCode = this.bidCode
|
|
|
|
|
|
this.listQuery.proType = this.processType
|
|
|
|
|
|
getProgressProcessList(this.listQuery).then((response) => {
|
|
|
|
|
|
this.list = response.rows
|
|
|
|
|
|
this.total = response.total
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
this.listLoading = false
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
getList2() {
|
|
|
|
|
|
this.listLoading = true
|
|
|
|
|
|
getProgressProcessProgressList(this.listQuery2).then((response) => {
|
|
|
|
|
|
this.list2 = response.rows.map(item => {
|
2024-03-19 15:32:05 +08:00
|
|
|
|
item.gxName = this.stateData.gxName
|
2024-03-18 10:59:37 +08:00
|
|
|
|
return item
|
|
|
|
|
|
})
|
|
|
|
|
|
this.total2 = response.total
|
|
|
|
|
|
this.listLoading = false
|
2024-03-19 15:32:05 +08:00
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
// this.listLoading = false
|
2024-03-18 10:59:37 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 查询
|
|
|
|
|
|
handleFilter() {
|
|
|
|
|
|
this.listQuery.pageNum = 1
|
|
|
|
|
|
this.getList()
|
|
|
|
|
|
},
|
|
|
|
|
|
// 查询
|
|
|
|
|
|
handleFilter2() {
|
|
|
|
|
|
this.listQuery2.pageNum = 1
|
|
|
|
|
|
this.getList2()
|
|
|
|
|
|
},
|
|
|
|
|
|
// 新增
|
|
|
|
|
|
handleCreateProcess() {
|
|
|
|
|
|
this.dialogStatus = 'create'
|
|
|
|
|
|
this.dialogFormVisible = true
|
|
|
|
|
|
},
|
|
|
|
|
|
createData() {
|
|
|
|
|
|
this.temp.proType = this.processType
|
|
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
createProcessPlan(this.temp).then((response) => {
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
showClose: true,
|
|
|
|
|
|
message: response.msg,
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
duration: 2000
|
|
|
|
|
|
})
|
|
|
|
|
|
this.dialogFormVisible = false
|
|
|
|
|
|
this.getList2()
|
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
|
// this.dialogFormVisible = false
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
// 编辑
|
|
|
|
|
|
handleUpdateProcess(row) {
|
|
|
|
|
|
this.showDelaReason = this.isDelay(row.planEndTime)
|
|
|
|
|
|
this.processVisible = true
|
2024-03-19 15:32:05 +08:00
|
|
|
|
this.stateData.gxId = row.gxId
|
|
|
|
|
|
this.stateData.planId = row.planId
|
|
|
|
|
|
this.stateData.planEndTime = row.planEndTime
|
|
|
|
|
|
this.stateData.gxName = row.gxName
|
2024-03-18 10:59:37 +08:00
|
|
|
|
this.listQuery2.planId = row.planId
|
2024-03-19 15:32:05 +08:00
|
|
|
|
this.temp = Object.assign(this.temp, this.stateData)
|
2024-03-18 10:59:37 +08:00
|
|
|
|
this.getList2()
|
|
|
|
|
|
},
|
|
|
|
|
|
handleClosedModal() {
|
|
|
|
|
|
this.$refs['dataForm'].resetFields()
|
|
|
|
|
|
this.temp = _.cloneDeep(defaultTmp)
|
2024-03-19 15:32:05 +08:00
|
|
|
|
this.temp = Object.assign(this.temp, this.stateData)
|
2024-03-18 10:59:37 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|