|
@@ -1,154 +1,183 @@
|
|
|
<template>
|
|
|
- <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
|
|
|
- <a-row :gutter="48" slot="extra">
|
|
|
- <a-col :md="48" :sm="48">
|
|
|
- <span class="table-page-search-submitButtons" style="float: right">
|
|
|
- <a-button v-if="$auth('repair-application-forms-assign') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status" type="primary" @click="handleAssign">派工</a-button>
|
|
|
- <a-popconfirm v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" title="是否要接收?" @confirm="receive">
|
|
|
- <a-button>接收</a-button>
|
|
|
- </a-popconfirm>
|
|
|
- <a-button v-if="$auth('repair-application-forms-dispatch') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" style="margin-left: 8px" type="primary" @click="handleDispatch">转派</a-button>
|
|
|
- <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleFinish()">维修完成</a-button>
|
|
|
- <!-- <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleSparePick">领用备件</a-button>-->
|
|
|
- <a-button style="margin-left: 8px" @click="handleCancel">返回</a-button>
|
|
|
- </span>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-layout>
|
|
|
- <a-layout-content style="background-color: rgb(255, 255, 255)">
|
|
|
- <a-divider orientation="left">报修详情</a-divider>
|
|
|
- <detail-list title="" :col="3">
|
|
|
- <detail-list-item term="报修单号">{{ model.no }}</detail-list-item>
|
|
|
- <detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
|
|
|
- <!--<detail-list-item term="部件名称">{{ model.partName }}</detail-list-item>-->
|
|
|
- <detail-list-item term="是否停机">{{ BaseTool.Object.getField(needStopMap,model.needStop) }}</detail-list-item>
|
|
|
- <detail-list-item term="报修人">{{ model.userName }}</detail-list-item>
|
|
|
- <detail-list-item term="报修来源">{{ BaseTool.Object.getField(this.sourceMap, model.source) }}</detail-list-item>
|
|
|
- <detail-list-item term="紧急等级"><badge :text="BaseTool.Object.getField(levelMap,model.level)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[model.applicationLevel]"/></detail-list-item>
|
|
|
- <detail-list-item term="报修时间">{{ model.applyTime }}</detail-list-item>
|
|
|
- <detail-list-item term="报修状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]"/></detail-list-item>
|
|
|
- </detail-list>
|
|
|
- <detail-list title="" :col="1">
|
|
|
- <!--<detail-list-item term="故障描述">{{ BaseTool.Object.getField(this.descripitionMap, model.content) }}</detail-list-item>-->
|
|
|
- <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
|
|
|
- </detail-list>
|
|
|
- <detail-list title="报修图片:" :col="6">
|
|
|
- <upload-image-detail :images-list="model.applicationFileList"/>
|
|
|
- </detail-list>
|
|
|
- <a-divider orientation="left">维修详情</a-divider>
|
|
|
- <detail-list title="" :col="3">
|
|
|
- <detail-list-item term="故障类别">{{ model.repairErrorTypeName }}</detail-list-item>
|
|
|
- <detail-list-item term="维修开始时间">{{ model.repairStartTime }}</detail-list-item>
|
|
|
- <detail-list-item term="维修结束时间">{{ model.repairEndTime }}</detail-list-item>
|
|
|
- <detail-list-item term="维修耗时">{{ model.repairMinutes }}</detail-list-item>
|
|
|
- <detail-list-item term="维修人员">{{ model.repairUserName }}</detail-list-item>
|
|
|
+ <div>
|
|
|
+ <a-card :bordered="false" v-show="visible" class="card" :title="modalTitle">
|
|
|
+ <a-row :gutter="48" slot="extra">
|
|
|
+ <a-col :md="48" :sm="48">
|
|
|
+ <span class="table-page-search-submitButtons" style="float: right">
|
|
|
+ <a-button v-if="$auth('repair-application-forms-assign') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status" type="primary" @click="handleAssign">派工</a-button>
|
|
|
+ <a-popconfirm v-if="$auth('repair-application-forms-deal') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" title="是否要接收?" @confirm="receive">
|
|
|
+ <a-button>接收</a-button>
|
|
|
+ </a-popconfirm>
|
|
|
+ <a-button v-if="$auth('repair-application-forms-out') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING >= model.status) && model.type != 2" style="margin-left: 8px" type="primary" @click="handleOut">委外</a-button>
|
|
|
+ <a-button v-if="$auth('repair-application-forms-dispatch') && (DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.ALLOCATED === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" style="margin-left: 8px" type="primary" @click="handleDispatch">转派</a-button>
|
|
|
+ <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleFinish()">维修完成</a-button>
|
|
|
+ <!-- <a-button v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status" style="margin-left: 8px" type="primary" @click="handleSparePick">领用备件</a-button>-->
|
|
|
+ <a-button style="margin-left: 8px" @click="handleCancel">返回</a-button>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-layout>
|
|
|
+ <a-layout-content style="background-color: rgb(255, 255, 255)">
|
|
|
+ <a-divider orientation="left">报修详情</a-divider>
|
|
|
+ <detail-list title="" :col="3">
|
|
|
+ <detail-list-item term="报修单号">{{ model.no }}</detail-list-item>
|
|
|
+ <detail-list-item term="设备名称">{{ model.sbName }}</detail-list-item>
|
|
|
+ <!--<detail-list-item term="部件名称">{{ model.partName }}</detail-list-item>-->
|
|
|
+ <detail-list-item term="是否停机">{{ BaseTool.Object.getField(needStopMap,model.needStop) }}</detail-list-item>
|
|
|
+ <detail-list-item term="报修人">{{ model.userName }}</detail-list-item>
|
|
|
+ <detail-list-item term="报修来源">{{ BaseTool.Object.getField(this.sourceMap, model.source) }}</detail-list-item>
|
|
|
+ <detail-list-item term="紧急等级"><badge :text="BaseTool.Object.getField(levelMap,model.level)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_LEVEL[model.applicationLevel]"/></detail-list-item>
|
|
|
+ <detail-list-item term="报修时间">{{ model.applyTime }}</detail-list-item>
|
|
|
+ <detail-list-item term="报修状态"><badge :text="BaseTool.Object.getField(statusMap,model.status)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[model.status]"/></detail-list-item>
|
|
|
+ </detail-list>
|
|
|
+ <detail-list title="" :col="1">
|
|
|
+ <!--<detail-list-item term="故障描述">{{ BaseTool.Object.getField(this.descripitionMap, model.content) }}</detail-list-item>-->
|
|
|
+ <detail-list-item term="故障描述">{{ model.content }}</detail-list-item>
|
|
|
+ </detail-list>
|
|
|
+ <detail-list title="维修图片:" :col="6">
|
|
|
+ <upload-image-detail :images-list="model.repairFileList"/>
|
|
|
+ </detail-list>
|
|
|
+ <a-divider orientation="left">维修详情</a-divider>
|
|
|
+ <detail-list title="" :col="3">
|
|
|
+ <detail-list-item term="故障类别">{{ model.repairErrorTypeName }}</detail-list-item>
|
|
|
+ <detail-list-item term="维修开始时间">{{ model.repairStartTime }}</detail-list-item>
|
|
|
+ <detail-list-item term="维修结束时间">{{ model.repairEndTime }}</detail-list-item>
|
|
|
+ <detail-list-item term="维修耗时">{{ model.repairMinutes }}</detail-list-item>
|
|
|
+ <detail-list-item term="维修人员">{{ model.repairUserName }}</detail-list-item>
|
|
|
<!--<detail-list-item term="维修次数">{{ model.repairTimes }}</detail-list-item>-->
|
|
|
- </detail-list>
|
|
|
- <detail-list title="" :col="1">
|
|
|
- <detail-list-item term="维修描述">{{ model.repairContent }}</detail-list-item>
|
|
|
- </detail-list>
|
|
|
- <detail-list title="维修图片:" :col="6">
|
|
|
- <upload-image-detail :images-list="model.repairFileList"/>
|
|
|
- </detail-list>
|
|
|
- <a-divider v-if="dispatchList != null" orientation="left">转派详情</a-divider>
|
|
|
- <detail-list v-for="item in dispatchList" title="" :col="3">
|
|
|
- <detail-list-item term="转派人">{{ item.username }}</detail-list-item>
|
|
|
- <detail-list-item term="转派时间">{{ item.time }}</detail-list-item>
|
|
|
- <detail-list-item term="转派备注">{{ item.remark }}</detail-list-item>
|
|
|
- </detail-list>
|
|
|
- <a-divider orientation="left">验收详情</a-divider>
|
|
|
- <detail-list title="" :col="3">
|
|
|
- <detail-list-item term="验收开始时间">{{ model.checkStartTime }}</detail-list-item>
|
|
|
- <detail-list-item term="验收结束时间">{{ model.checkEndTime }}</detail-list-item>
|
|
|
- <detail-list-item term="验收人员">{{ model.checkUserName }}</detail-list-item>
|
|
|
- <detail-list-item term="验收描述">{{ model.checkContent }}</detail-list-item>
|
|
|
- </detail-list>
|
|
|
- <detail-list title="验收图片:" :col="6">
|
|
|
- <upload-image-detail :images-list="model.checkFileList"/>
|
|
|
- </detail-list>
|
|
|
- </a-layout-content>
|
|
|
- <a-layout-sider style="background-color: rgb(255, 255, 255)">
|
|
|
- <div style="margin-top: 30px;margin-left: 30px;">
|
|
|
- <a-steps progress-dot :current="6" direction="vertical" >
|
|
|
- <a-step title="报修时间:" :description="''+model.applyTime?model.applyTime:''" />
|
|
|
- <a-step title="维修开始时间:" :description="''+model.repairStartTime?model.repairStartTime:''" />
|
|
|
- <a-step title="维修结束时间:" :description="''+model.repairEndTime?model.repairEndTime:''" />
|
|
|
- <a-step title="验收开始时间:" :description="''+model.checkStartTime?model.checkStartTime:''" />
|
|
|
- <a-step title="验收结束时间:" :description="''+model.checkEndTime?model.checkEndTime:''" />
|
|
|
- </a-steps>
|
|
|
- </div>
|
|
|
- </a-layout-sider>
|
|
|
- </a-layout>
|
|
|
- <title-divider title="维修项目" width="90px"></title-divider>
|
|
|
- <div class="table-operator" v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status">
|
|
|
- <a-button type="primary" @click="handleRepairProjectSelect">
|
|
|
- <a-icon type="plus"/>
|
|
|
- 添加
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
- <a-table
|
|
|
- :data-source="data"
|
|
|
- :columns="columns"
|
|
|
- tableLayout="auto"
|
|
|
- rowKey="id">
|
|
|
- <span slot="action" slot-scope="record">
|
|
|
- <template>
|
|
|
- <a-popconfirm v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" title="是否要删除该条数据?" @confirm="batchDelete(record.relationId)">
|
|
|
- <a>删除</a>
|
|
|
- </a-popconfirm>
|
|
|
- </template>
|
|
|
- </span>
|
|
|
- </a-table>
|
|
|
- <title-divider title="备件清单" width="90px"></title-divider>
|
|
|
- <div class="table-operator" v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status">
|
|
|
- <a-button type="primary" @click="handleSpareStoreSelect">
|
|
|
- <a-icon type="plus"/>
|
|
|
- 添加
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
- <a-table
|
|
|
- :data-source="dataSpare"
|
|
|
- :columns="columnsSpare"
|
|
|
- :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
|
- tableLayout="auto"
|
|
|
- rowKey="id">
|
|
|
- <span slot="actionSpare" slot-scope="record">
|
|
|
- <template>
|
|
|
- <a v-if="$auth('repair-application-forms-finish') &&( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" @click="handleEditSpare(record)">修改</a>
|
|
|
- <a-divider type="vertical" />
|
|
|
- <a-popconfirm v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" title="是否要删除该条数据?" @confirm="batchDeleteSpare(record.id)">
|
|
|
- <a>删除</a>
|
|
|
- </a-popconfirm>
|
|
|
- </template>
|
|
|
- </span>
|
|
|
- </a-table>
|
|
|
- <title-divider title="费用清单" width="90px"></title-divider>
|
|
|
- <div class="table-operator" v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)">
|
|
|
- <a-button type="primary" @click="handleAddFee">
|
|
|
- <a-icon type="plus"/>
|
|
|
- 添加
|
|
|
- </a-button>
|
|
|
- </div>
|
|
|
- <a-table
|
|
|
- :data-source="dataFee"
|
|
|
- :columns="columnsFee"
|
|
|
- tableLayout="auto"
|
|
|
- rowKey="id">
|
|
|
- <span slot="action" slot-scope="record">
|
|
|
- <template>
|
|
|
- <a @click="handleViewFee(record)">查看</a>
|
|
|
- <operation-button
|
|
|
- v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"
|
|
|
- @click="handleEditFee(record)" >修改</operation-button>
|
|
|
+ </detail-list>
|
|
|
+ <detail-list title="" :col="1">
|
|
|
+ <detail-list-item term="维修描述">{{ model.repairContent }}</detail-list-item>
|
|
|
+ </detail-list>
|
|
|
+ <detail-list title="维修图片:" :col="6">
|
|
|
+ <upload-image-detail :images-list="model.repairFileList"/>
|
|
|
+ </detail-list>
|
|
|
+ <a-divider v-if="dispatchList != null" orientation="left">转派详情</a-divider>
|
|
|
+ <detail-list v-for="item in dispatchList" title="" :col="3">
|
|
|
+ <detail-list-item term="转派人">{{ item.username }}</detail-list-item>
|
|
|
+ <detail-list-item term="转派时间">{{ item.time }}</detail-list-item>
|
|
|
+ <detail-list-item term="转派备注">{{ item.remark }}</detail-list-item>
|
|
|
+ </detail-list>
|
|
|
+ <a-divider orientation="left">验收详情</a-divider>
|
|
|
+ <detail-list title="" :col="3">
|
|
|
+ <detail-list-item term="验收开始时间">{{ model.checkStartTime }}</detail-list-item>
|
|
|
+ <detail-list-item term="验收结束时间">{{ model.checkEndTime }}</detail-list-item>
|
|
|
+ <detail-list-item term="验收人员">{{ model.checkUserName }}</detail-list-item>
|
|
|
+ <detail-list-item term="验收描述">{{ model.checkContent }}</detail-list-item>
|
|
|
+ </detail-list>
|
|
|
+ <detail-list title="验收图片:" :col="6">
|
|
|
+ <upload-image-detail :images-list="model.checkFileList"/>
|
|
|
+ </detail-list>
|
|
|
+ </a-layout-content>
|
|
|
+ <a-layout-sider style="background-color: rgb(255, 255, 255)">
|
|
|
+ <div style="margin-top: 30px;margin-left: 30px;">
|
|
|
+ <a-steps progress-dot :current="6" direction="vertical" >
|
|
|
+ <a-step title="报修时间:" :description="''+model.applyTime?model.applyTime:''" />
|
|
|
+ <a-step title="维修开始时间:" :description="''+model.repairStartTime?model.repairStartTime:''" />
|
|
|
+ <a-step title="维修结束时间:" :description="''+model.repairEndTime?model.repairEndTime:''" />
|
|
|
+ <a-step title="验收开始时间:" :description="''+model.checkStartTime?model.checkStartTime:''" />
|
|
|
+ <a-step title="验收结束时间:" :description="''+model.checkEndTime?model.checkEndTime:''" />
|
|
|
+ </a-steps>
|
|
|
+ </div>
|
|
|
+ </a-layout-sider>
|
|
|
+ </a-layout>
|
|
|
+ <!-- <title-divider title="维修项目" width="90px"></title-divider>-->
|
|
|
+ <!-- <div class="table-operator" v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status">-->
|
|
|
+ <!-- <a-button type="primary" @click="handleRepairProjectSelect">-->
|
|
|
+ <!-- <a-icon type="plus"/>-->
|
|
|
+ <!-- 添加-->
|
|
|
+ <!-- </a-button>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- <a-table-->
|
|
|
+ <!-- :data-source="data"-->
|
|
|
+ <!-- :columns="columns"-->
|
|
|
+ <!-- tableLayout="auto"-->
|
|
|
+ <!-- rowKey="id">-->
|
|
|
+ <!-- <span slot="action" slot-scope="record">-->
|
|
|
+ <!-- <template>-->
|
|
|
+ <!-- <a-popconfirm v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" title="是否要删除该条数据?" @confirm="batchDelete(record.relationId)">-->
|
|
|
+ <!-- <a>删除</a>-->
|
|
|
+ <!-- </a-popconfirm>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </span>-->
|
|
|
+ <!-- </a-table>-->
|
|
|
+ <title-divider title="备件清单" width="90px"></title-divider>
|
|
|
+ <div class="table-operator" v-if="$auth('repair-application-forms-finish') && DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status">
|
|
|
+ <a-button type="primary" @click="handleSpareStoreSelect">
|
|
|
+ <a-icon type="plus"/>
|
|
|
+ 添加
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ <a-table
|
|
|
+ :data-source="dataSpare"
|
|
|
+ :columns="columnsSpare"
|
|
|
+ :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
|
|
+ tableLayout="auto"
|
|
|
+ rowKey="id">
|
|
|
+ <span slot="actionSpare" slot-scope="record">
|
|
|
+ <template>
|
|
|
+ <a v-if="$auth('repair-application-forms-finish') &&( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" @click="handleEditSpare(record)">修改</a>
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a-popconfirm v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)" title="是否要删除该条数据?" @confirm="batchDeleteSpare(record.id)">
|
|
|
+ <a>删除</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ <title-divider title="费用清单" width="90px"></title-divider>
|
|
|
+ <div class="table-operator" v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)">
|
|
|
+ <a-button type="primary" @click="handleAddFee">
|
|
|
+ <a-icon type="plus"/>
|
|
|
+ 添加
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ <a-table
|
|
|
+ :data-source="dataFee"
|
|
|
+ :columns="columnsFee"
|
|
|
+ tableLayout="auto"
|
|
|
+ rowKey="id">
|
|
|
+ <span slot="action" slot-scope="record">
|
|
|
+ <template>
|
|
|
+ <a @click="handleViewFee(record)">查看</a>
|
|
|
+ <operation-button
|
|
|
+ v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"
|
|
|
+ @click="handleEditFee(record)" >修改</operation-button>
|
|
|
|
|
|
- <operation-button
|
|
|
- v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"
|
|
|
- :type="2"
|
|
|
- title="确认删除该笔费用?"
|
|
|
- @confirm="batchDeleteFee(record.id)" >删除</operation-button>
|
|
|
- </template>
|
|
|
- </span>
|
|
|
- </a-table>
|
|
|
+ <operation-button
|
|
|
+ v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"
|
|
|
+ :type="2"
|
|
|
+ title="确认删除该笔费用?"
|
|
|
+ @confirm="batchDeleteFee(record.id)" >删除</operation-button>
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ <title-divider title="原因分析" width="90px"></title-divider>
|
|
|
+ <div class="table-operator" v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)">
|
|
|
+ <a-button type="primary" @click="handleAddReason">
|
|
|
+ <a-icon type="plus"/>
|
|
|
+ 添加
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ <a-table
|
|
|
+ :data-source="dataReason"
|
|
|
+ :columns="columnsReason"
|
|
|
+ tableLayout="fixed"
|
|
|
+ rowKey="id">
|
|
|
+ <span slot="action" slot-scope="record">
|
|
|
+ <template>
|
|
|
+ <a @click="handleViewReason(record)">查看</a>
|
|
|
+ <operation-button
|
|
|
+ v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"
|
|
|
+ @click="handleEditReason(record)" >修改</operation-button>
|
|
|
+
|
|
|
+ <operation-button
|
|
|
+ v-if="$auth('repair-application-forms-finish') && ( DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING === model.status || DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK === model.status)"
|
|
|
+ :type="2"
|
|
|
+ title="确认删除该记录?"
|
|
|
+ @confirm="batchDeleteReason(record.id)" >删除</operation-button>
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
<!-- <q-tabs :activeKey="activeKey" @change="changeTab">
|
|
|
<q-tab-pane key="a" tab="配件更换">
|
|
|
<spare-part-used-select-table :type="2" :table-params="{sbId: model.sbId, modelId: model.modelId, repairId: model.id}" ref="sparePartUsedSelectTable"/>
|
|
@@ -157,7 +186,10 @@
|
|
|
<spare-pick-form-select-table :type="2" :table-params="{repairId: model.id, repairNo: model.no}" ref="sparePickFormSelectTable"/>
|
|
|
</q-tab-pane>
|
|
|
</q-tabs>-->
|
|
|
+
|
|
|
+ </a-card>
|
|
|
<check-form ref="checkForm" @ok="handleOk" />
|
|
|
+ <base-out-form ref="outForm" @ok="handleOk" />
|
|
|
<finish-form ref="finishForm" @ok="handleOk" />
|
|
|
<dispatch-form ref="dispatchForm" @ok="handleCancel" />
|
|
|
<assign-form ref="assignForm" @ok="handleCancel" />
|
|
@@ -168,13 +200,16 @@
|
|
|
<spare-store-select-modal ref="spareStoreSelectModal" @selected="handleSpareStoreSelected"/>
|
|
|
<fee-base-form ref="feeForm" @ok="handleOk" />
|
|
|
<fee-detail ref="feeDetail" @ok="handleOk" />
|
|
|
- </a-card>
|
|
|
+ <reason-base-form ref="reasonForm" @ok="handleOk" />
|
|
|
+ <reason-detail ref="reasonDetail" @ok="handleOk" />
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import DetailList from '@/components/tools/DetailList'
|
|
|
import { fetchRepairApplicationForm, approve, receive } from '@/api/repair/application-form'
|
|
|
import CheckForm from './CheckForm'
|
|
|
+import BaseOutForm from './BaseOutForm'
|
|
|
import FinishForm from './FinishForm'
|
|
|
import DispatchForm from './DispatchForm'
|
|
|
import AssignForm from './AssignForm'
|
|
@@ -191,6 +226,9 @@ import BaseTool from '@/utils/tool'
|
|
|
import FeeBaseForm from '@/views/repair/fee/modules/BaseForm'
|
|
|
import FeeDetail from '@/views/repair/fee/modules/Detail'
|
|
|
import { deleteRepairFees, fetchRepairFee, queryRepairFee } from '@/api/repair/fee'
|
|
|
+import ReasonBaseForm from '@/views/repair/repair-reason/modules/BaseForm'
|
|
|
+import ReasonDetail from '@/views/repair/repair-reason/modules/Detail'
|
|
|
+import { deleteRepairReasons, fetchRepairReason, queryRepairReason } from '@/api/repair/repair-reason'
|
|
|
|
|
|
const DetailListItem = DetailList.Item
|
|
|
|
|
@@ -199,8 +237,11 @@ export default {
|
|
|
components: {
|
|
|
CheckForm,
|
|
|
DetailList,
|
|
|
+ ReasonBaseForm,
|
|
|
+ ReasonDetail,
|
|
|
DetailListItem,
|
|
|
FinishForm,
|
|
|
+ BaseOutForm,
|
|
|
DispatchForm,
|
|
|
FeeDetail,
|
|
|
AssignForm,
|
|
@@ -234,6 +275,7 @@ export default {
|
|
|
data: [],
|
|
|
dataSpare: [],
|
|
|
dataFee: [],
|
|
|
+ dataReason: [],
|
|
|
// 表头
|
|
|
columns: [
|
|
|
{
|
|
@@ -366,6 +408,46 @@ export default {
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
}
|
|
|
],
|
|
|
+ columnsReason: [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'index',
|
|
|
+ width: '70',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ return `${index + 1}`
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '分析时间',
|
|
|
+ dataIndex: 'analyzeTime',
|
|
|
+ width: '200px'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '问题描述',
|
|
|
+ dataIndex: 'problemDesc',
|
|
|
+ ellipsis: true,
|
|
|
+ width: '200px'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '原因分析',
|
|
|
+ dataIndex: 'reasonAnalysis',
|
|
|
+ ellipsis: true,
|
|
|
+ width: '200px'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '改进措施',
|
|
|
+ dataIndex: 'improveMeasure',
|
|
|
+ ellipsis: true,
|
|
|
+ width: '200px'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ key: 'action',
|
|
|
+ width: '200px',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'action' }
|
|
|
+ }
|
|
|
+ ],
|
|
|
model: {
|
|
|
'id': null,
|
|
|
'sbId': null,
|
|
@@ -411,15 +493,21 @@ export default {
|
|
|
this.model = record
|
|
|
this.activeKey = 'a'
|
|
|
this.dispatchList = JSON.parse(record.repairDispatchList)
|
|
|
- selectRepairProjectListByRepairId({ id: record.id }).then(res => {
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
+ init () {
|
|
|
+ selectRepairProjectListByRepairId({ id: this.model.id }).then(res => {
|
|
|
this.data = res.data
|
|
|
})
|
|
|
- selectSparePartUsedListByRepairId({ id: record.id }).then(res => {
|
|
|
+ selectSparePartUsedListByRepairId({ id: this.model.id }).then(res => {
|
|
|
this.dataSpare = res.data
|
|
|
})
|
|
|
- queryRepairFee({ repairId: record.id }).then(res => {
|
|
|
+ queryRepairFee({ repairId: this.model.id }).then(res => {
|
|
|
this.dataFee = res.data
|
|
|
})
|
|
|
+ queryRepairReason({ repairId: this.model.id }).then(res => {
|
|
|
+ this.dataReason = res.data
|
|
|
+ })
|
|
|
},
|
|
|
handleCancel () {
|
|
|
this.visible = false
|
|
@@ -450,6 +538,10 @@ export default {
|
|
|
this.handleOk()
|
|
|
})
|
|
|
},
|
|
|
+ handleOut () {
|
|
|
+ const modal = this.$refs.outForm
|
|
|
+ modal.base(null, this.model)
|
|
|
+ },
|
|
|
handleAddFee () {
|
|
|
const modal = this.$refs.feeForm
|
|
|
modal.base(null, this.model)
|
|
@@ -468,6 +560,42 @@ export default {
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
+ batchDeleteReason (id) {
|
|
|
+ let ids = []
|
|
|
+ if (this.BaseTool.String.isBlank(id)) {
|
|
|
+ const length = this.selectedRows.length
|
|
|
+ if (length === 0) {
|
|
|
+ this.$message.info('请选择要删除的记录')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ids = this.selectedRows.map(item => item.id)
|
|
|
+ } else {
|
|
|
+ ids = [id]
|
|
|
+ }
|
|
|
+ deleteRepairReasons(ids).then(res => {
|
|
|
+ this.$message.info('删除成功')
|
|
|
+ this.handleOk()
|
|
|
+ this.$refs.table.clearSelected()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleAddReason () {
|
|
|
+ const modal = this.$refs.reasonForm
|
|
|
+ this.visible = false
|
|
|
+ modal.base(null, this.model)
|
|
|
+ },
|
|
|
+ handleEditReason (record) {
|
|
|
+ fetchRepairReason({ id: record.id }).then(res => {
|
|
|
+ const modal = this.$refs.reasonForm
|
|
|
+ this.visible = false
|
|
|
+ modal.base(res.data, this.model)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleViewReason (record) {
|
|
|
+ fetchRepairReason({ id: record.id }).then(res => {
|
|
|
+ const modal = this.$refs.reasonDetail
|
|
|
+ modal.base(res.data)
|
|
|
+ })
|
|
|
+ },
|
|
|
handleApprove () {
|
|
|
approve(this.model).then(() => {
|
|
|
this.$message.info('操作成功')
|
|
@@ -479,19 +607,14 @@ export default {
|
|
|
modal.base(this.model)
|
|
|
},
|
|
|
handleOk () {
|
|
|
+ this.loading = true
|
|
|
fetchRepairApplicationForm({ id: this.model.id }).then(res => {
|
|
|
+ this.loading = false
|
|
|
this.model = res.data
|
|
|
+ this.visible = true
|
|
|
this.dispatchList = JSON.parse(this.model.repairDispatchList)
|
|
|
})
|
|
|
- selectRepairProjectListByRepairId({ id: this.model.id }).then(res => {
|
|
|
- this.data = res.data
|
|
|
- })
|
|
|
- selectSparePartUsedListByRepairId({ id: this.model.id }).then(res => {
|
|
|
- this.dataSpare = res.data
|
|
|
- })
|
|
|
- queryRepairFee({ repairId: this.model.id }).then(res => {
|
|
|
- this.dataFee = res.data
|
|
|
- })
|
|
|
+ this.init()
|
|
|
},
|
|
|
handleFinish () {
|
|
|
const modal = this.$refs.finishForm
|