qushaowei
2024-07-25 52190152691bc217844d4f87b700274c297b104e
src/views/eam/modules/daily3MaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
@@ -17,21 +17,21 @@
                @click="handleSW"
                :disabled=SWbuttonDistable
                type="primary"
                v-has="'dailyMaintenanceOrder:SW'"
                v-has="'daily3MaintenanceOrder:SW'"
              >开工</a-button>
              <a-button
                :style="{marginRight: '8px'}"
                @click="handleReport"
                :disabled="buttonDistable"
                type="primary"
                v-has="'dailyMaintenanceOrder:report'"
                v-has="'daily3MaintenanceOrder:report'"
              >报工</a-button>
              <a-button
                :style="{marginRight: '8px'}"
                @click="handleReset"
                :disabled="revocationDistable"
                type="primary"
                v-has="'dailyMaintenanceOrder:reset'"
                v-has="'daily3MaintenanceOrder:reset'"
              >撤销</a-button>
            </a-row>
          </div>
@@ -97,7 +97,7 @@
                >
                  <span
                    v-if="this.model != null"
                    class="hight"
                    class="hightColor"
                  >{{ this.model.teamName }}</span>
                  <span
                    v-else
@@ -107,9 +107,9 @@
              </a-col>
            </a-row>
            <a-row :gutter="24">
              <a-col :span="24">
              <a-col :span="17">
                <a-form-item
                  label="问题及处理措施描述"
                  label="问题/处理措施"
                  :labelCol="{span:3}"
                  :wrapperCol="{span:18}"
                  class="hightColor"
@@ -117,8 +117,23 @@
                  <a-textarea
                    allowClear
                    :disabled="this.model.status!='4'"
                    :placeholder="'请输入问题及处理措施描述'"
                    :placeholder="'请维修人员签字填写!'"
                    v-model="model.description"
                  />
                </a-form-item>
              </a-col>
              <a-col :span="7">
                <a-form-item
                  label="保养人"
                  :labelCol="{span:4}"
                  :wrapperCol="{span:17}"
                  class="hightColor"
                >
                  <a-input
                    :disabled="this.model.status!='4'"
                    allow-clear
                    placeholder="请输入保养人"
                    v-model="model.maintenanceUserId"
                  />
                </a-form-item>
              </a-col>
@@ -155,18 +170,18 @@
                    slot-scope='text, record, index'
                  >
                    <div :key="col.dataIndex">
                      <span
                        v-if=" col.dataIndex == 'photo' && !text"
                      <!-- <span
                        v-show=" col.dataIndex == 'photo' && !text"
                        style="font-size: 12px;font-style: italic;"
                      >无图片</span>
                      <img
                        v-if="col.dataIndex == 'photo'  && text"
                        v-show="col.dataIndex == 'photo'  && text"
                        :src="getImgView(text)"
                        :preview="record.maintenanceStandardDetailId"
                        height="25px"
                        alt=""
                        style="max-width:80px;font-size: 12px;font-style: italic;"
                      />
                      /> -->
                      <!-- 示意图 开始 -->
                      <!-- <Tooltip
                        placement="top"
@@ -194,10 +209,11 @@
                      <a-input
                        :value="text"
                        v-if="col.dataIndex == 'maintenanceOrderDetailUda1'"
                        v-show="col.dataIndex == 'maintenanceOrderDetailUda1'"
                        @change="(e)=>handleChange(e, record.key, col, index)"
                        :disabled="record.disabled"
                        :disabled="true"
                      />
                      <!-- :disabled="record.disabled" -->
                    </div>
                  </template>
                </a-table>
@@ -222,7 +238,7 @@
              </div>
            </a-tab-pane>
            <a-tab-pane
            <!-- <a-tab-pane
              tab='计划用料'
              key="2"
            >
@@ -233,7 +249,7 @@
                <maintenance-standard-planning-material :maintenanceStandardId='maintenanceStandardId' />
              </div>
            </a-tab-pane>
            <a-tab-pane
           <a-tab-pane
              tab='危险防控'
              key="3"
            >
@@ -254,7 +270,7 @@
              >
                <maintenance-standard-work-instruction :maintenanceStandardId='maintenanceStandardId' />
              </div>
            </a-tab-pane>
            </a-tab-pane>-->
            <a-tab-pane
              tab='实际用料'
              key="5"
@@ -284,6 +300,17 @@
                  :equipmentId="this.model.equipmentId"
                  :teamId="this.model.teamId"
                ></actual-work-hours-edit-table>
              </div>
            </a-tab-pane>
            <a-tab-pane
              tab='炉类报告'
              key="7"
            >
              <div
                class="table-operator"
                style="margin:-16px"
              >
                <stove-category-report-list :maintenanceStandardId='this.model.id' />
              </div>
            </a-tab-pane>
          </a-tabs>
@@ -321,7 +348,6 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { requestPut, getAction, downFile, postAction } from '@/api/manage'
import Tooltip from 'ant-design-vue/es/tooltip'
import { preview } from 'vue-photo-preview'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
@@ -333,6 +359,7 @@
import MaintenanceStandardWorkInstruction from '../dailyMaintenanceOrder/MaintenanceStandardWorkInstruction'
import ActualMaterialEditTable from '../dailyMaintenanceOrder/ActualMaterialEditTable.vue'
import ActualWorkHoursEditTable from '../dailyMaintenanceOrder/ActualWorkHoursEditTable.vue'
import StoveCategoryReportList from './StoveCategoryReportList.vue'
export default {
  name: 'DailyMaintenanceOrderExeDrawer',
@@ -345,7 +372,8 @@
    MaintenanceStandardSafetyRequirement,
    MaintenanceStandardWorkInstruction,
    ActualMaterialEditTable,
    ActualWorkHoursEditTable
    ActualWorkHoursEditTable,
    StoveCategoryReportList
  },
  data() {
    return {
@@ -359,6 +387,7 @@
      revocationDistable: false,
      currentNodeSelect: '',
      maintenanceStandardId: '-1',
      maintenanceOrderId: '-1',
      loading: false,
      dataSource: [],
      model: {},
@@ -370,6 +399,18 @@
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      /* 分页参数 */
      ipagination: {
        current: 1,
        pageSize: 99,
        pageSizeOptions: ['99'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " 共" + total + "条"
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      validatorRules: {
        // description: {
@@ -391,7 +432,7 @@
        },
        {
          title: '部位',
          title: '保养部位',
          align: 'center',
          dataIndex: 'location',
        },
@@ -404,12 +445,12 @@
        // },
        // class: "notshow"
        {
          title: '保养项目',
          title: '保养内容',
          align: 'center',
          dataIndex: 'maintenanceProjectNum',
        },
        {
          title: '保养标准',
          title: '验收标准',
          align: 'center',
          dataIndex: 'standard',
        },
@@ -433,11 +474,11 @@
        //   align: 'center',
        //   dataIndex: 'workingHourQuota',
        // },
        {
          title: '保养周期',
          align: 'center',
          dataIndex: 'maintenanceCycleName',
        },
        // {
        //   title: '保养周期',
        //   align: 'center',
        //   dataIndex: 'maintenanceCycleName',
        // },
        // {
        //   title: '维保专业',
        //   align: 'center',
@@ -452,7 +493,7 @@
        },
      ],
      url: {
        list: "/eam/dailyMaintenanceOrderDetail/getDailyMaintenanceOrderDetailList",
        list: "/eam/dailyMaintenanceOrderDetail/get3MaintenanceOrderDetailList",
        urlDownload: window._CONFIG['staticDomainURL'],
        download: '/sys/upload/downloadFile',
        editStatus: "/eam/dailyMaintenanceOrder/editStatus",
@@ -473,6 +514,7 @@
    handleShow(record) {
      this.model = Object.assign({}, record);
      this.maintenanceStandardId = record.maintenanceStandardId
      this.maintenanceOrderId = record.id
      this.dataSource = []
      this.visible = true;
      this.queryParam.dailyMaintenanceOrderId = record.id
@@ -498,11 +540,11 @@
          // }
          //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
          this.dataSource = res.result.records || res.result;
          if (res.result.total) {
            this.ipagination.total = res.result.total;
          } else {
            this.ipagination.total = 0;
          }
          // if (res.result.total) {
          //   this.ipagination.total = res.result.total;
          // } else {
          //   this.ipagination.total = 0;
          // }
          //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
        } else {
          this.$message.warning(res.message)
@@ -522,6 +564,7 @@
      return "background-color:rgba(127, 127, 127,0.08)";
    },
    handleCancel() {
      this.maintenanceOrderId = '-1'
      this.$emit('ok');
      this.alterFlag = new Date();
      this.close()
@@ -565,13 +608,26 @@
    handleReport() {
      const that = this;
      that.confirmLoading = true;
      // for (let i = 0; i < that.dataSource.length; i++) {
      //   let o = this.dataSource[i]
      //   if (o.maintenanceOrderDetailUda1 == null || o.maintenanceOrderDetailUda1 == '') {
      //     that.$message.warning("请填写第" + (i + 1) + "保养人!");
      //     that.confirmLoading = false;
      //     return
      //   }
      // }
      if (that.model.maintenanceUserId == null || that.model.maintenanceUserId == "") {
        that.$message.warning("请填写保养人!");
        that.confirmLoading = false;
        return
      }
      this.$confirm({
        title: '保养工单报工',
        content: '提示:报工后保养完工,请谨慎操作!',
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description, dailyMaintenanceOrderDetails: that.dataSource, maintenanceUserId: that.model.maintenanceUserId }).then((res) => {
            if (res.success) {
              that.model.status = '5'
              that.$message.success(res.message)