工单,数据中心用户查看数据的权限,合同考核每日,以及导出每日和按月
| | |
| | | } |
| | | |
| | | // 通过id获取核算报告 |
| | | export const getCalculateReportById = (contractId,whichYear) => { |
| | | export const getCalculateReportById = (contractId,whichYear,whichMoth) => { |
| | | return axios({ |
| | | url: "/calculate-report/" + contractId+"/"+whichYear, |
| | | url: "/calculate-report/" + contractId+"/"+whichYear+"/"+whichMoth, |
| | | method: "GET" |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export function ywConditionList(data){ |
| | | return request({ |
| | | url: '/work-order/yw-condition-list', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 获取工单运维情况 |
| | | export function getYwCondition(data) { |
| | | return request({ |
| | |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | > |
| | | <el-card class="box-card" > |
| | | <div slot="header" class="clearfix"> |
| | | <span>{{ item.unitName +item.whichYear+"年核算报告" }}</span> |
| | | <span>{{ item.unitName +item.whichYear+"年"+item.whichMonth+"月核算报告" }}</span> |
| | | <el-button style="float: right; padding: 3px 0" type="text" @click="handleDetail(item)">核算</el-button> |
| | | </div> |
| | | <div class="text item">合同<span class="time">{{ item.contractName }}</span></div> |
| | | <div class="text item">最近扣减金额<span class="time">{{ item.latestDeductMoney ? item.latestDeductMoney:0 }}</span></div> |
| | | <div class="text item">累计扣减金额<span class="time">{{ item.deductMoney ? item.deductMoney:0}}</span></div> |
| | | <div class="text item">最近核算月份 |
| | | <span v-if="item.latestMonth" class="time">{{ item.whichYear }}年{{ item.latestMonth }}月</span> |
| | | <span v-if="item.latestMonth" class="time">{{ item.whichYear }}年{{ item.latestMonth }}月{{item.latestDay}}日</span> |
| | | <span v-else class="time">暂无</span> |
| | | </div> |
| | | <el-button size="small" type="primary" round style="float: right;margin-left: 18px;" @click="handleExport(item.whichYear,null,item.contractId,item.contractName)" v-hasPermi="['system:calculate:report:export']">导出</el-button> |
| | | <el-button size="small" type="primary" round style="float: right;margin-left: 18px;" @click="handleExport(item.whichYear,item.whichMonth,null,item.contractId,item.contractName)" v-hasPermi="['system:calculate:report:export']">导出</el-button> |
| | | <el-button size="small" round style="float: right;margin-bottom: 18px;" @click="handlePublish(item)" v-hasPermi="['system:calculate:report:status']">确认发布</el-button> |
| | | </el-card> |
| | | </el-col> |
| | |
| | | label="核算月份" |
| | | width="180"> |
| | | <template slot-scope="scope"> |
| | | <span> {{ scope.row.whichYear +'年'+ scope.row.whichMonth+ '月'}}</span> |
| | | <span> {{ scope.row.whichYear +'年'+ scope.row.whichMonth+ '月' + scope.row.whichDay+ '日'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | <el-button |
| | | size="small" |
| | | type="text" |
| | | @click="handleExport(scope.row.whichYear,scope.row.whichMonth,detail.contractId,detail.contractName)" |
| | | @click="handleExport(scope.row.whichYear,scope.row.whichMonth,scope.row.whichDay,detail.contractId,detail.contractName)" |
| | | > |
| | | 导出 |
| | | </el-button> |
| | |
| | | // }) |
| | | }, |
| | | handleDetail(row) { |
| | | getCalculateReportById(row.contractId,row.whichYear).then(res => { |
| | | getCalculateReportById(row.contractId,row.whichYear,row.whichMonth).then(res => { |
| | | this.detail = res.data |
| | | this.detailTitle = row.unitName + '考核结果' |
| | | this.detailOpen = true |
| | |
| | | |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport(whichYear,whichMonth,contractId,contractName) { |
| | | const name = contractName+whichYear+'年'+(whichMonth==null? '': whichMonth+'月')+'运维核算.xlsx' |
| | | handleExport(whichYear,whichMonth,whichDay,contractId,contractName) { |
| | | |
| | | const name = contractName+whichYear+'年'+(whichMonth==null? '': whichMonth+'月')+(whichDay==null? '': whichDay+'日')+'运维核算.xlsx' |
| | | this.download('calculate-report/export', { |
| | | ...{ 'whichYear': whichYear,'whichMonth': whichMonth, 'contractId': contractId}, |
| | | ...{ 'whichYear': whichYear,'whichMonth': whichMonth,'whichDay':whichDay, 'contractId': contractId}, |
| | | }, `${name}`) |
| | | }, |
| | | /** 合计行 */ |
| | |
| | | <el-menu-item index="0" @click="changeUnit(null, '全部')"> |
| | | 全部单位({{ totalWorkOrders }}) |
| | | </el-menu-item> |
| | | <el-menu-item :index="index + 1" v-for="(item, index) in unitList" :key="index" @click="changeUnit(item.id, item.value)"> |
| | | <el-menu-item :index="index + 1 +''" v-for="(item, index) in unitList" :key="index" @click="changeUnit(item.id, item.value)"> |
| | | {{ item.unitName }}({{ item.workOrderCount }}) |
| | | </el-menu-item> |
| | | </el-menu> |
| | |
| | | v-hasPermi="['work:order:delete']" |
| | | >删除 |
| | | </el-button> |
| | | <el-button size="mini" plain type="info" @click="selectedDistribute" class="op">批量上报</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | |
| | | <el-row style="display: flex;"> |
| | | <el-checkbox v-if="$store.state.user.roles.includes('admin')" |
| | | v-model="isItemSelected[item.workOrderNo]" |
| | | @change="toggleSelection(item.workOrderNo)" |
| | | @change="toggleSelection(item)" |
| | | style="margin-right: 10px; "></el-checkbox> |
| | | <el-tooltip |
| | | effect="dark" |
| | |
| | | |
| | | <el-dialog title="运维情况记录" :visible.sync="ywConditionOpen" width="500px" append-to-body> |
| | | <el-form ref="ywConditionForm" :model="form" :rules="ywConditionRules" label-width="80px"> |
| | | <el-form-item label="工单号" prop="workOrderNo"> |
| | | <el-form-item label="工单号" prop="workOrderNo" v-if="!isConditionList"> |
| | | <el-input v-model="ywConditionForm.workOrderNo" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="运维单位" prop="unitName"> |
| | | <el-form-item label="运维单位" prop="unitName" v-if="!isConditionList"> |
| | | <el-input v-model="ywConditionForm.unitName" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="现场情况" prop="ywCondition"> |
| | |
| | | </style> |
| | | <script> |
| | | import { |
| | | ywConditionList, |
| | | listWorkOrder, |
| | | getWorkOrder, |
| | | delWorkOrder, |
| | |
| | | components: {WorkOrderAuditing}, |
| | | data() { |
| | | return { |
| | | isConditionList:false, |
| | | isSelectAll: false, // 全选按钮 |
| | | activeIndex: '0', |
| | | drawer: false, |
| | |
| | | ywData: { |
| | | content: '', |
| | | fileList: 'process.env.VUE_APP_BASE_API' |
| | | } |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.getList() |
| | | }, |
| | | methods: { |
| | | selectedDistribute(){ |
| | | this.form = {} |
| | | if (this.workOrderNumbers.length < 1) { |
| | | this.$message.warning("请先选择要下发的工单") |
| | | return |
| | | } |
| | | this.form.workOrderNumbers = this.workOrderNumbers; |
| | | this.ywConditionOpen = true |
| | | this.isConditionList = true |
| | | }, |
| | | |
| | | //全选按钮 |
| | | toggleSelectAll() { |
| | | this.isSelectAll = !this.isSelectAll; |
| | |
| | | this.form = {} |
| | | this.ywConditionForm = row |
| | | this.ywConditionOpen = true |
| | | this.isConditionList = false |
| | | this.form.id = row.id |
| | | }, |
| | | // 运维结果按钮 |
| | |
| | | submitYwCondition() { |
| | | this.$refs['ywConditionForm'].validate(valid => { |
| | | if (valid) { |
| | | ywCondition(this.form).then(res => { |
| | | this.ywConditionOpen = false |
| | | this.$modal.msgSuccess('操作成功') |
| | | this.getList() |
| | | }) |
| | | if(this.isConditionList){ |
| | | ywConditionList(this.form).then(res => { |
| | | this.ywConditionOpen = false |
| | | this.$modal.msgSuccess('操作成功') |
| | | this.getList() |
| | | }) |
| | | }else { |
| | | ywCondition(this.form).then(res => { |
| | | this.ywConditionOpen = false |
| | | this.$modal.msgSuccess('操作成功') |
| | | this.getList() |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | cancelYwCondition() { |
| | | this.ywConditionForm = {} |
| | | this.ywConditionOpen = false |
| | | this.isConditionList = false |
| | | }, |
| | | // 提交运维结果 |
| | | submitYwResult() { |
| | |
| | | this.multiple = !selection.length |
| | | }, |
| | | // 多选框选中数据 |
| | | toggleSelection(workOrderNo) { |
| | | const index = this.workOrderNumbers.indexOf(workOrderNo); |
| | | toggleSelection(item) { |
| | | console.log(item.workOrderNo) |
| | | console.log(this.workOrderNumbers) |
| | | const index = this.workOrderNumbers.indexOf(item.workOrderNo); |
| | | if (index > -1) { |
| | | this.workOrderNumbers.splice(index, 1); // 移除选中项 |
| | | } else { |
| | | this.workOrderNumbers.push(workOrderNo); // 添加选中项 |
| | | this.workOrderNumbers.push(item.workOrderNo); // 添加选中项 |
| | | } |
| | | }, |
| | | /** 新增按钮操作 */ |