|
@@ -1,74 +1,294 @@
|
|
|
<template>
|
|
|
- <el-dialog
|
|
|
- :title="!this.taskForm.taskId == '' ? $t('处理') : $t('详情')"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :visible.sync="visible"
|
|
|
- :append-to-body="true">
|
|
|
- <el-form :model="taskForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="" label-width="80px">
|
|
|
- <el-form-item :label="$t('申请开票')">
|
|
|
- <el-table :data="devList" :span-method="mergeMethod" border style="width: 100%;">
|
|
|
- <el-table-column label="作业单位" align="center" prop="workUnit" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="作业区域单元" align="center" prop="workArea" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="楼层位置" align="center" prop="floorLocation" :formatter="floorLocationFormat"/>
|
|
|
- <el-table-column label=" 作业开始时间" align="center" prop="workStartTime" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.workStartTime, '{y}-{m}-{d}') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="作业结束时间" align="center" prop="workEndTime" width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ parseTime(scope.row.workEndTime, '{y}-{m}-{d}') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="作业类型" align="center" prop="workType" :formatter="workTypeFormat" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="风险等级" align="center" prop="riskLevel" :formatter="riskLevelFormat"/>
|
|
|
- <el-table-column label="作业内容描述" align="center" prop="workDescription" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="作业人员数" align="center" prop="workPeopleNumber" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="预计作业时间" align="center" prop="estimateWorktime" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="联系人" align="center" prop="contact" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="联系方式" align="center" prop="phonenumber" :show-overflow-tooltip="true"/>
|
|
|
- <el-table-column label="状态" align="center" prop="status" width="100" :formatter="statusFormat"/>
|
|
|
- </el-table>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item :label="$t('申请时间')" prop="creattime">
|
|
|
- <el-input v-model="dataForm.creattime" disabled></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
|
|
|
- <input name="approveId" v-model="dataForm.id" hidden />
|
|
|
- <input name="processId" v-model="dataForm.processId" hidden />
|
|
|
- </form>
|
|
|
- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button v-if="this.taskForm.taskId == ''" @click="visible = false">{{$t('message.return')}}</el-button>
|
|
|
- <el-button v-if="!this.taskForm.taskId == ''" type="primary" @click="dataFormSubmit(1)" >{{$t('通过')}}</el-button>
|
|
|
-<!-- <el-button v-if="!this.taskForm.taskId == ''" type="danger" @click="dataFormSubmit(0)" :disabled="submitDisabled">{{$t('拒绝')}}</el-button>-->
|
|
|
+ <div>
|
|
|
+ <el-dialog
|
|
|
+ :title="!this.taskForm.taskId == '' ? $t('处理') : $t('详情')"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :visible.sync="visible"
|
|
|
+ :append-to-body="true">
|
|
|
+ <el-form :model="taskForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="" label-width="80px">
|
|
|
+ <el-form-item :label="$t('申请开票')">
|
|
|
+ <el-table :data="devList" :span-method="mergeMethod" border style="width: 100%;">
|
|
|
+ <el-table-column label="作业单位" align="center" prop="workUnit" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="作业区域单元" align="center" prop="workArea" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="楼层位置" align="center" prop="floorLocation" :formatter="floorLocationFormat"/>
|
|
|
+ <el-table-column label=" 作业开始时间" align="center" prop="workStartTime" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.workStartTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="作业结束时间" align="center" prop="workEndTime" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(scope.row.workEndTime, '{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="作业类型" align="center" prop="workType" :formatter="workTypeFormat"
|
|
|
+ :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="风险等级" align="center" prop="riskLevel" :formatter="riskLevelFormat"/>
|
|
|
+ <el-table-column label="作业内容描述" align="center" prop="workDescription" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="作业人员数" align="center" prop="workPeopleNumber" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="预计作业时间" align="center" prop="estimateWorktime" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="联系人" align="center" prop="contact" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="联系方式" align="center" prop="phonenumber" :show-overflow-tooltip="true"/>
|
|
|
+ <el-table-column label="状态" align="center" prop="status" width="100" :formatter="statusFormat"/>
|
|
|
+ </el-table>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="$t('申请时间')" prop="creattime">
|
|
|
+ <el-input v-model="dataForm.creattime" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
|
|
|
+ <input name="approveId" v-model="dataForm.id" hidden/>
|
|
|
+ <input name="processId" v-model="dataForm.processId" hidden/>
|
|
|
+ </form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button v-if="this.taskForm.taskId == ''" @click="visible = false">{{ $t('message.return') }}</el-button>
|
|
|
+ <el-button v-if="!this.taskForm.taskId == ''" type="primary"
|
|
|
+ @click="dataFormSubmit(1)">{{ $t('通过') }}</el-button>
|
|
|
+ <el-button v-if="!this.taskForm.taskId == ''&&isUserMag" type="success"
|
|
|
+ @click="updateDetail">{{ $t('修改并重新申请') }}</el-button>
|
|
|
+ <el-button v-if="!this.taskForm.taskId == ''&&isUserMag" type="danger" @click="dataFormSubmit(0)"
|
|
|
+ :disabled="submitDisabled">{{ $t('作废') }}</el-button>
|
|
|
</span>
|
|
|
- <div>
|
|
|
- <span>{{$t('流转详情')}}</span>
|
|
|
- <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">
|
|
|
- <el-table-column prop="taskName" header-align="center" align="center" :label="$t('流程进度')"></el-table-column>
|
|
|
- <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>
|
|
|
- <el-table-column prop="taskCreateTime" header-align="center" align="center" :label="$t('开始时间')"></el-table-column>
|
|
|
- <el-table-column prop="taskEndTime" header-align="center" align="center" :label="$t('结束时间')"></el-table-column>
|
|
|
- <el-table-column prop="comment" header-align="center" align="center" :label="$t('审批意见')"></el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- <record v-if="recordVisible" ref="recordDeal"></record>
|
|
|
- </el-dialog>
|
|
|
+ <div>
|
|
|
+ <span>{{ $t('流转详情') }}</span>
|
|
|
+ <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">
|
|
|
+ <el-table-column prop="taskName" header-align="center" align="center"
|
|
|
+ :label="$t('流程进度')"></el-table-column>
|
|
|
+ <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>
|
|
|
+ <el-table-column prop="taskCreateTime" header-align="center" align="center"
|
|
|
+ :label="$t('开始时间')"></el-table-column>
|
|
|
+ <el-table-column prop="taskEndTime" header-align="center" align="center"
|
|
|
+ :label="$t('结束时间')"></el-table-column>
|
|
|
+ <el-table-column prop="comment" header-align="center" align="center"
|
|
|
+ :label="$t('审批意见')"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <record v-if="recordVisible" ref="recordDeal"></record>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-bod :before-close="detailCancel">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="承包商" prop="workUnit">
|
|
|
+ <el-input v-model="form.workUnit" placeholder="请输入作业单位" :disabled="edit"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="作业区域" prop="workArea">
|
|
|
+ <el-select v-model="form.workArea" placeholder="请选择作业区域">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in workAreaOptions"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict"
|
|
|
+ :value="dict"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="归属部门" prop="deptId">
|
|
|
+ <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="楼层位置" prop="floorLocation">
|
|
|
+ <el-select v-model="form.floorLocation" multiple placeholder="请选择楼层位置">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in floorLocationOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label=" 作业开始" prop="workStartTime">
|
|
|
+ <el-date-picker clearable size="small" style="width: 190px"
|
|
|
+ v-model="form.workStartTime"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择 作业开始时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="作业结束" prop="workEndTime">
|
|
|
+ <el-date-picker clearable size="small" style="width: 190px"
|
|
|
+ v-model="form.workEndTime"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择作业结束时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="用户单位" prop="userUnit">
|
|
|
+ <el-select v-model="form.userUnit" placeholder="请选择用户单位"
|
|
|
+ @change="checkCategoryPromotion(form.userUnit)">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in userUnitOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="用户主管" prop="userMg">
|
|
|
+ <el-select v-model="form.userMg" placeholder="请先选择好用户单位">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in userMgOptions"
|
|
|
+ :key="dict.userId"
|
|
|
+ :label="dict.nickName"
|
|
|
+ :value="dict.userId"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <el-card v-for="(ruleForm, index) in ruleForm" :key="index" shadow="always">
|
|
|
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-form-item label="作业内容描述" prop="workDescription">
|
|
|
+ <el-input v-model="ruleForm.workDescription"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button type="success" plain @click.prevent="addDomain(ruleForm)" style="float: right;">拷贝
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3">
|
|
|
+ <el-button type="info" plain @click.prevent="removeDomain(ruleForm)" style="float: right;">删除
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="作业类型" prop="workType">
|
|
|
+ <el-select v-model="ruleForm.workType" placeholder="请选择作业类型" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in workTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="风险等级" prop="riskLevel">
|
|
|
+ <el-select v-model="ruleForm.riskLevel" placeholder="请选择风险等级" clearable size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in riskLevelOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="parseInt(dict.dictValue)"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="作业人数" prop="workPeopleNumber">
|
|
|
+ <el-input v-model="ruleForm.workPeopleNumber"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="预计作业时间" prop="estimateWorktime">
|
|
|
+ <el-input v-model="ruleForm.estimateWorktime"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-button @click="resetForm1()">重置</el-button>
|
|
|
+ <el-button @click="add">新增一条</el-button>
|
|
|
+ <el-button @click="reduce" :disabled="flag">移除一条</el-button>
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="confirmDetail">确 定</el-button>
|
|
|
+ <el-button @click="detailCancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {getToken} from "@/utils/auth";
|
|
|
- import {getHistorylist} from "@/api/ehs/approvedanger";
|
|
|
- import record from "./spec-itemDetail";
|
|
|
- import {getInvoice, listInvoice,handleApprove} from "@/api/invoice/invoice";
|
|
|
+import {getToken} from "@/utils/auth";
|
|
|
+import {getHistorylist} from "@/api/ehs/approvedanger";
|
|
|
+import record from "./spec-itemDetail";
|
|
|
+import {getInvoice, listInvoice, handleApprove, addInvoice} from "@/api/invoice/invoice";
|
|
|
+import Bookingworkticket from "@/views/invoice/bookingworkticket/index"
|
|
|
+import log from "@/views/monitor/job/log";
|
|
|
+import {getUserByUnit} from "@/api/invoice/unit";
|
|
|
+import {treeselect} from "@/api/system/dept";
|
|
|
+import {addBookingworkticket, getBookingworkticket, updateBookingworkticket} from "@/api/invoice/bookingworkticket";
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
|
export default {
|
|
|
name: "invoice-detail",
|
|
|
- components: {record},
|
|
|
+ components: {record, Bookingworkticket, Treeselect},
|
|
|
data() {
|
|
|
- return {
|
|
|
+ return {// 表单校验
|
|
|
+ ruleForm: [{}],
|
|
|
+ //禁用
|
|
|
+ edit: true,
|
|
|
+ flag: true,
|
|
|
+ rules: {
|
|
|
+ workArea: [
|
|
|
+ {required: true, message: "作业区域不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ floorLocation: [
|
|
|
+ {required: true, message: "楼层位置不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ workStartTime: [
|
|
|
+ {required: true, message: "作业开始时间不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ workEndTime: [
|
|
|
+ {required: true, message: "作业结束时间不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ userMg: [
|
|
|
+ {required: true, message: "用户主管不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ userUnit: [
|
|
|
+ {required: true, message: "用户单位不能为空", trigger: "blur"}
|
|
|
+ ],
|
|
|
+ workType: [
|
|
|
+ {required: true, message: "作业类型不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
+ workDescription: [
|
|
|
+ {required: true, message: "作业内容不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
+ riskLevel: [
|
|
|
+ {required: true, message: "风险等级不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
+ workPeopleNumber: [
|
|
|
+ {required: true, message: "作业人数不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
+ estimateWorktime: [
|
|
|
+ {required: true, message: "预计作业时间不能为空", trigger: "change"}
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ open: false,
|
|
|
+ form: [],
|
|
|
+ approveForm: {},
|
|
|
+ isUserMag: false,
|
|
|
loading: true,
|
|
|
+ bookingworkticketVisible: false,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
approvedangerList: [],
|
|
@@ -106,7 +326,7 @@ export default {
|
|
|
fileTips: '',
|
|
|
showDelay: false,
|
|
|
submitDisabled: false,
|
|
|
- dataListLoading:true,
|
|
|
+ dataListLoading: true,
|
|
|
taskName: '',
|
|
|
dataForm: {
|
|
|
id: 0,
|
|
@@ -153,7 +373,7 @@ export default {
|
|
|
// 报告附件上传位置编号
|
|
|
ids: 0,
|
|
|
// 设置上传的请求头部
|
|
|
- headers: { Authorization: "Bearer " + getToken() },
|
|
|
+ headers: {Authorization: "Bearer " + getToken()},
|
|
|
// 上传的地址
|
|
|
url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
|
|
|
commonfileList: null,
|
|
@@ -162,16 +382,17 @@ export default {
|
|
|
},
|
|
|
dataRule: {
|
|
|
approveType: [
|
|
|
- { required: true, message: this.$t('approveType') + this.$t('notEmpty'), trigger: 'blur' }
|
|
|
+ {required: true, message: this.$t('approveType') + this.$t('notEmpty'), trigger: 'blur'}
|
|
|
],
|
|
|
content: [
|
|
|
- { required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur' }
|
|
|
+ {required: true, message: this.$t('content') + this.$t('notEmpty'), trigger: 'blur'}
|
|
|
]
|
|
|
},
|
|
|
- downloadAction: process.env.VUE_APP_BASE_API +'/sems/approve/exportPDF',
|
|
|
+ downloadAction: process.env.VUE_APP_BASE_API + '/sems/approve/exportPDF',
|
|
|
approveOption: [],
|
|
|
belong: '',
|
|
|
fileList: [],
|
|
|
+ deptOptions: []
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -181,9 +402,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
+ this.getTreeselect();
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 查询部门下拉树结构 */
|
|
|
+ getTreeselect() {
|
|
|
+ treeselect().then(response => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //根据用户单位 查询对应选择的用户主管 根据用户单位 字段 查找对应的多个主管 返回 Sysuser的集合(id,name)
|
|
|
+ checkCategoryPromotion(oneId) {
|
|
|
+
|
|
|
+ getUserByUnit(oneId).then(response => {
|
|
|
+ // this.form.userMg=null;
|
|
|
+ this.userMgOptions = response.data;
|
|
|
+ // let arr= response.data.userIds.split(',');
|
|
|
+ });
|
|
|
+ },
|
|
|
// 状态字典翻译
|
|
|
statusFormat(row, column) {
|
|
|
return this.selectDictLabel(this.statusOptions, row.status);
|
|
@@ -202,12 +438,11 @@ export default {
|
|
|
},
|
|
|
// 字典翻译
|
|
|
floorLocationFormat(row, column) {
|
|
|
- console.log(row.floorLocation)
|
|
|
- let floor="";
|
|
|
- row.floorLocation.split(",").forEach(item=>{
|
|
|
- floor+= this.selectDictLabel(this.floorLocationOptions,item)+","
|
|
|
+ let floor = "";
|
|
|
+ row.floorLocation.split(",").forEach(item => {
|
|
|
+ floor += this.selectDictLabel(this.floorLocationOptions, item) + ","
|
|
|
})
|
|
|
- return floor.substring(0,floor.length-1);
|
|
|
+ return floor.substring(0, floor.length - 1);
|
|
|
},
|
|
|
// 字典翻译
|
|
|
userMgFormat(row, column) {
|
|
@@ -229,7 +464,7 @@ export default {
|
|
|
guardianUnitFormat(row, column) {
|
|
|
return this.selectDictLabel(this.guardianUnitOptions, row.guardianUnit);
|
|
|
},
|
|
|
- init (id, taskId, processId,taskName) {
|
|
|
+ init(id, taskId, processId, taskName) {
|
|
|
this.reset();
|
|
|
this.fileList = [];
|
|
|
this.getDicts("booking_work_status").then(response => {
|
|
@@ -269,7 +504,6 @@ export default {
|
|
|
this.visible = true
|
|
|
this.queryParams.processId = processId;
|
|
|
getHistorylist(this.queryParams).then(response => {
|
|
|
- console.log(response.rows)
|
|
|
this.historyList = response.rows;
|
|
|
this.historyLoading = false
|
|
|
});
|
|
@@ -291,6 +525,7 @@ export default {
|
|
|
this.dataForm.devno = response.data.devno
|
|
|
this.dataForm.files = response.data.files
|
|
|
this.devList = response.data.devList
|
|
|
+ this.isUserMag = this.devList[0].status == 0 ? true : false;
|
|
|
this.dataForm.delayDate = response.data.delayDate
|
|
|
this.dataForm.delayReason = response.data.delayReason
|
|
|
this.dataForm.delayMeasure = response.data.delayMeasure
|
|
@@ -312,8 +547,32 @@ export default {
|
|
|
this.visible = false;
|
|
|
this.reset();
|
|
|
},
|
|
|
+
|
|
|
+ detailCancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.detailReset();
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.ruleForm[0].resetFields();
|
|
|
+ if (this.$refs.ruleForm[1] != null) {
|
|
|
+ this.$refs.ruleForm[1].resetFields();
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleForm[2] != null) {
|
|
|
+ this.$refs.ruleForm[2].resetFields();
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleForm[3] != null) {
|
|
|
+ this.$refs.ruleForm[3].resetFields();
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleForm[4] != null) {
|
|
|
+ this.$refs.ruleForm[4].resetFields();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 表单重置
|
|
|
reset() {
|
|
|
+ this.historyList = [];
|
|
|
+ this.devList = [];
|
|
|
+ },
|
|
|
+ detailReset() {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
userId: null,
|
|
@@ -340,15 +599,12 @@ export default {
|
|
|
deptId: null
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
- this.historyList=[];
|
|
|
- this.devList=[];
|
|
|
},
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
// 表单提交
|
|
|
- dataFormSubmit (val) {
|
|
|
+ dataFormSubmit(val) {
|
|
|
this.submitDisabled = true
|
|
|
- console.log(this.taskForm.govFileList)
|
|
|
this.dataForm.files = []
|
|
|
if (this.taskForm.govFileList.length > 0) {
|
|
|
for (let i = 0; i < this.taskForm.govFileList.length; i++) {
|
|
@@ -370,14 +626,13 @@ export default {
|
|
|
this.comment = ''
|
|
|
})
|
|
|
},
|
|
|
- recordHandle(devList,dataForm){
|
|
|
+ recordHandle(devList, dataForm) {
|
|
|
this.recordVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.recordDeal.init(devList,dataForm);
|
|
|
+ this.$refs.recordDeal.init(devList, dataForm);
|
|
|
})
|
|
|
},//合并单元格
|
|
|
- mergeMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
- // console.log(row)
|
|
|
+ mergeMethod({row, column, rowIndex, columnIndex}) {
|
|
|
if (columnIndex === 0) {
|
|
|
const _row = this.setTable(this.devList).merge[rowIndex];
|
|
|
const _col = _row > 0 ? 1 : 0;
|
|
@@ -425,14 +680,16 @@ export default {
|
|
|
rowspan: _row,
|
|
|
colspan: _col
|
|
|
};
|
|
|
- }if (columnIndex === 11) {
|
|
|
+ }
|
|
|
+ if (columnIndex === 11) {
|
|
|
const _row = this.setTable(this.devList).merge[rowIndex];
|
|
|
const _col = _row > 0 ? 1 : 0;
|
|
|
return {
|
|
|
rowspan: _row,
|
|
|
colspan: _col
|
|
|
};
|
|
|
- }if (columnIndex === 12) {
|
|
|
+ }
|
|
|
+ if (columnIndex === 12) {
|
|
|
const _row = this.setTable(this.devList).merge[rowIndex];
|
|
|
const _col = _row > 0 ? 1 : 0;
|
|
|
return {
|
|
@@ -465,7 +722,158 @@ export default {
|
|
|
merge: spanArr
|
|
|
};
|
|
|
},
|
|
|
-}
|
|
|
+ updateDetail() {
|
|
|
+ this.detailReset();
|
|
|
+ const id = this.devList[0].bookingticketId
|
|
|
+ getBookingworkticket(id).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改预约作业票台账";
|
|
|
+ this.ruleForm = response.data.tInvoiceWorkcontentList
|
|
|
+ // 回显用户主管
|
|
|
+ this.checkCategoryPromotion(this.form.userUnit);
|
|
|
+ // console.log(row.floorLocation) 将后台的字符串数组重新转换为el-select要的数组格式
|
|
|
+ let arr = this.devList[0].floorLocation.split(",")
|
|
|
+ let st = []
|
|
|
+ // 将字符串数组的每一项转换成Number,生成一个新的数组
|
|
|
+ for (var arrInt in arr) {
|
|
|
+ st.push(parseInt(arr[arrInt]))
|
|
|
+ }
|
|
|
+ this.form.floorLocation = st
|
|
|
+
|
|
|
+ this.ruleForm.length = response.data.tInvoiceWorkcontentList.length
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //校验
|
|
|
+ getFormPromise(formDone) {
|
|
|
+ return new Promise(resolve => {
|
|
|
+ formDone.validate(res => {
|
|
|
+ resolve(res);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ confirmDetail() {
|
|
|
+
|
|
|
+ let arr = []
|
|
|
+ const basicForm = this.$refs.form;
|
|
|
+ arr.push(basicForm)
|
|
|
+ const genForm = this.$refs.ruleForm[0];
|
|
|
+ arr.push(genForm)
|
|
|
+ if (this.$refs.ruleForm[1] != null) {
|
|
|
+ const genForm1 = this.$refs.ruleForm[1];
|
|
|
+ arr.push(genForm1)
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleForm[2] != null) {
|
|
|
+ const genForm2 = this.$refs.ruleForm[2];
|
|
|
+ arr.push(genForm2)
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleForm[3] != null) {
|
|
|
+ const genForm3 = this.$refs.ruleForm[3];
|
|
|
+ arr.push(genForm3)
|
|
|
+ }
|
|
|
+ if (this.$refs.ruleForm[4] != null) {
|
|
|
+ const genForm4 = this.$refs.ruleForm[4];
|
|
|
+ arr.push(genForm4)
|
|
|
+ }
|
|
|
+ //多重校验
|
|
|
+ Promise.all([this.dataFormSubmit(0),arr.map(this.getFormPromise)]).then(res=> {
|
|
|
+ const validateResult = res[1] .every(item => !!item);
|
|
|
+ if (validateResult) {
|
|
|
+ if (this.form.id != null) {
|
|
|
+ this.form.tInvoiceWorkcontentList = this.ruleForm
|
|
|
+ this.form.floorLocation = this.form.floorLocation.join(',')
|
|
|
+ updateBookingworkticket(this.form).then(response => {
|
|
|
+ this.approveForm.invoiceId = this.form.id
|
|
|
+ var nowTime = this.getNowFormatDate()
|
|
|
+ //判断是否涉及 动火 和当日
|
|
|
+ if (this.form.workStartTime && this.form.workStartTime === nowTime) {
|
|
|
+ this.approveForm.isToday = 1;
|
|
|
+ } else {
|
|
|
+ this.approveForm.isToday = 0;
|
|
|
+ }
|
|
|
+ for (let i = 0; i < this.ruleForm.length; i++) {
|
|
|
+ if (this.ruleForm[i].workType === 1 || this.ruleForm[i].workType === 15) {
|
|
|
+ this.approveForm.isSpecial = 1
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ this.approveForm.isSpecial = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.approveForm.userSupId = this.form.userMg
|
|
|
+
|
|
|
+ addInvoice(this.approveForm).then(response => {
|
|
|
+ // this.msgSuccess(this.$t('预约成功'));
|
|
|
+ this.msgSuccess("已提交申请");
|
|
|
+ })
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.msgError("表单校验未通过,每项申请内容都必填");
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+//拷贝
|
|
|
+ addDomain(domain) {
|
|
|
+ let arr = {}
|
|
|
+ arr.workType = domain.workType;
|
|
|
+ arr.workDescription = domain.workDescription;
|
|
|
+ arr.riskLevel = domain.riskLevel;
|
|
|
+ arr.workPeopleNumber = domain.workPeopleNumber;
|
|
|
+ arr.estimateWorktime = domain.estimateWorktime;
|
|
|
+ this.ruleForm.push(
|
|
|
+ arr
|
|
|
+ );
|
|
|
+ this.flags()
|
|
|
+ },
|
|
|
+//删除自身
|
|
|
+ removeDomain(item) {
|
|
|
+ //如果子类大于1 可点击删除按钮
|
|
|
+ if (this.ruleForm.length > 1) {
|
|
|
+ var index = this.ruleForm.indexOf(item)
|
|
|
+ if (index !== -1) {
|
|
|
+ this.ruleForm.splice(index, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.flags()
|
|
|
+ },
|
|
|
+// 表单添加一行
|
|
|
+ add() {
|
|
|
+ var arr = {}
|
|
|
+ this.ruleForm.push(arr)
|
|
|
+ this.flags()
|
|
|
+ },
|
|
|
+// 表单减少一行
|
|
|
+ reduce() {
|
|
|
+
|
|
|
+ this.ruleForm.length = this.ruleForm.length - 1
|
|
|
+ this.flags()
|
|
|
+ },
|
|
|
+ // 重置方法
|
|
|
+ resetForm1() {
|
|
|
+ this.ruleForm = [{}]
|
|
|
+ },
|
|
|
+ //时间
|
|
|
+ getNowFormatDate() {
|
|
|
+ var date = new Date();
|
|
|
+ var seperator1 = "-";
|
|
|
+ var year = date.getFullYear();
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
+ var strDate = date.getDate();
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
+ month = "0" + month;
|
|
|
+ }
|
|
|
+ if (strDate >= 0 && strDate <= 9) {
|
|
|
+ strDate = "0" + strDate;
|
|
|
+ }
|
|
|
+ var currentdate = year + seperator1 + month + seperator1 + strDate;
|
|
|
+ return currentdate;
|
|
|
+ },
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|