qushaowei
2023-09-01 ee3df152bfd2b3dd4083f7856caaf7f02601e180
审批完成
已添加1个文件
已修改4个文件
518 ■■■■ 文件已修改
src/views/eam/DailyMaintenanceOrderList.vue 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue 369 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/specialtyMaintenanceOrder/MaintenanceOrderModal.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/DailyMaintenanceOrderList.vue
@@ -117,7 +117,7 @@
      <a-table
        ref="table"
        size="middle"
        :scroll="{ x: 'calc(2500px + 50%)', y: 900 }"
        :scroll="{ x: 'calc(2800px + 50%)', y: 900 }"
        bordered
        rowKey="id"
        :columns="columns"
@@ -129,94 +129,6 @@
        :rowSelection="rowSelection"
        :rowClassName="tableRowClass"
      >
        <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
        <!-- <span
          slot="action"
          slot-scope="text, record"
        >
          <a-popconfirm
            title="确定下发工单吗?"
            @confirm="() => handleOrderIssue(record)"
          >
            <a v-if="record.status === '1'">下发</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status === '1'"
            type="vertical"
          />
          <a-popconfirm
            title="确定撤回工单吗?"
            @confirm="() => handleOrderReset(record)"
          >
            <a v-if="record.status === '2'">撤回</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status === '2'"
            type="vertical"
          />
          <a-popconfirm
            title="确定恢复工单吗?"
            @confirm="() => handleOrderRecover(record)"
          >
            <a v-if="record.status === '7'">恢复</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status === '7'"
            type="vertical"
          />
          <a-popconfirm
            title="确定作废工单吗?"
            @confirm="() => handleOrderCancel(record)"
          >
            <a v-if="record.status === '2'">作废</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status === '2'"
            type="vertical"
          />
          <a-popconfirm
            title="确定领取工单吗?"
            @confirm="() => handleOrderGet(record)"
          >
            <a v-if="record.status === '2'">领取</a>
          </a-popconfirm>
          <a-divider
            v-if="record.status === '2'"
            type="vertical"
          />
          <a
            v-if="record.status === '3' || record.status === '4' ||record.status === '5'  ||record.status === '7' "
            @click="handleOrderExe(record)"
          >执行</a>
          <a-divider
            v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
            type="vertical"
          />
          <a
            v-if="record.status === '1'"
            @click="handleEdit(record)"
          >编辑</a>
          <a-divider
            v-if="record.status === '1'"
            type="vertical"
          />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                >
                  <a v-if="record.status === '1'">删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span> -->
        <span
          slot="action"
@@ -313,6 +225,14 @@
            v-if="record.status === '1'"
            type="vertical"
          />
          <a
            v-if="record.status === '5'"
            @click="handleFinish(record)"
          >确认</a>
          <a-divider
            v-if="record.status === '5'"
            type="vertical"
          />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
@@ -351,6 +271,10 @@
      ref="modalForm"
      @ok="modalFormOk"
    ></maintenance-order-modal>
    <finish-devolution-modal
      ref="FinishDevolutionModal"
      @ok="modalFormOk"
    ></finish-devolution-modal>
    <maintenance-order-assign-modal
      ref="MaintenanceOrderAssignModal"
      @ok="modalFormOk"
@@ -368,6 +292,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MaintenanceOrderModal from './modules/dailyMaintenanceOrder/MaintenanceOrderModal'
import FinishDevolutionModal from './modules/dailyMaintenanceOrder/FinishDevolutionModal'
import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal'
import DailyMaintenanceOrderExeDrawer from './modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer'
import { getAction, postAction, requestPut } from '@/api/manage'
@@ -377,6 +302,7 @@
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    MaintenanceOrderModal,
    FinishDevolutionModal,
    MaintenanceOrderAssignModal,
    DailyMaintenanceOrderExeDrawer
  },
@@ -487,6 +413,11 @@
          dataIndex: 'maintenanceUserName'
        },
        {
          title: '问题及相应处理措施描述',
          align: "center",
          dataIndex: 'description'
        },
        {
          title: '创建人',
          align: "center",
          dataIndex: 'createBy'
@@ -575,6 +506,12 @@
      }
    },
    handleFinish: function (record) {
      this.$refs.FinishDevolutionModal.edit(record);
      this.$refs.FinishDevolutionModal.title = "生产设备二级保养完工移交单";
      this.$refs.FinishDevolutionModal.disableSubmit = false;
    },
    handleOrderIssue(record) {
      const that = this;
      requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => {
src/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer.vue
@@ -106,6 +106,23 @@
                </a-form-item>
              </a-col>
            </a-row>
            <a-row :gutter="24">
              <a-col :span="24">
                <a-form-item
                  label="问题及处理措施描述"
                  :labelCol="{span:3}"
                  :wrapperCol="{span:18}"
                  class="hightColor"
                >
                  <a-textarea
                    allowClear
                    :disabled="this.model.status!='4'"
                    :placeholder="'请输入问题及处理措施描述'"
                    v-model="model.description"
                  />
                </a-form-item>
              </a-col>
            </a-row>
          </div>
          <a-tabs
@@ -129,8 +146,8 @@
                  :loading="loading"
                  @change="handleTableChange"
                  :pagination="ipagination"
                  :scroll="{ x: 'calc(1200px + 50%)', y: 900 }"
                >
                  <!-- :scroll="{ x: 'calc(1200px + 50%)', y: 900 }" -->
                  <!-- :scroll="{x:true}" -->
                  <template
                    v-for="col in columns"
@@ -330,6 +347,13 @@
        xs: { span: 24 },
        sm: { span: 18 },
      },
      validatorRules: {
        // description: {
        //   rules: [
        //     { required: true, message: '请输入描述!' },
        //   ]
        // }
      },
      columns: [
        {
          title: '#',
@@ -514,7 +538,7 @@
        okText: '确认',
        cancelText: '取消',
        onOk() {
          requestPut(that.url.report, { id: that.model.id, status: '5' }).then((res) => {
          requestPut(that.url.report, { id: that.model.id, status: '5', description: that.model.description }).then((res) => {
            if (res.success) {
              that.model.status = '5'
              that.$message.success(res.message)
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,369 @@
<template>
  <a-modal
    :width="1250"
    :visible="visible"
    :maskClosable="false"
    @ok="handleOk"
    cancelText="关闭"
    @cancel="handleCancel"
    :confirmLoading="confirmLoading"
  >
    <!-- :title="title" -->
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-divider
          orientation="center"
          style="font-size: large;font-style: italic;color: #66aeed;"
        > ç”Ÿäº§è®¾å¤‡äºŒçº§ä¿å…»å®Œå·¥ç§»äº¤å• </a-divider>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="设备名称"
            >
              <span v-if="this.model != null">{{ this.model.equipmentName }}</span>
              <span v-else>-</span>
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="设备型号"
            >
              <span v-if="this.model != null">{{ this.model.equipmentModel }}</span>
              <span v-else>-</span>
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="统一编码"
            >
              <span v-if="this.model != null">{{ this.model.equipmentNum }}</span>
              <span v-else>-</span>
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="使用单位"
            >
              <span v-if="this.model != null">{{ this.model.departName }}</span>
              <span v-else>-</span>
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              label="保养日期"
            >
              <span v-if="this.model != null">{{ this.model.actualEndTime }}</span>
              <span v-else>-</span>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
    <a-table
      ref="table"
      bordered
      size="middle"
      rowKey='id'
      :columns="columns"
      :dataSource="dataSource"
    >
    </a-table>
    <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
      <div class="ant-descriptions-title">问题及相应处理措施描述:</div>
      <a-textarea
        allowClear
        :disabled="true"
        :placeholder="'请输入问题及处理措施描述'"
        v-model="model.description"
      />
    </div>
    <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
      <div class="ant-descriptions-title">该设备经二级保养检查后,达到保养规范要求。</div>
      <a-row :gutter="24">
        <a-col :span="8">
          <a-form-item
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
            label="操作人员"
          >
            <span v-if="this.model != null">{{ this.model.operateUserName }}</span>
            <span v-else>-</span>
          </a-form-item>
        </a-col>
        <a-col :span="8">
          <a-form-item
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
            label="维修室主任"
          >
            <span v-if="this.model != null">{{ this.model.repairDirectorUserName }}</span>
            <span v-else>-</span>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="8">
          <a-form-item
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
            label="维修人员"
          >
            <span v-if="this.model != null">{{ this.model.repairUserName }}</span>
            <span v-else>-</span>
          </a-form-item>
        </a-col>
        <a-col :span="8">
          <a-form-item
            :labelCol="labelCol"
            :wrapperCol="wrapperCol"
            label="设备检验员"
          >
            <span v-if="this.model != null">{{ this.model.equipmentInspectorUserName }}</span>
            <span v-else>-</span>
          </a-form-item>
        </a-col>
      </a-row>
    </div>
    <template slot="footer">
      <a-button
        :style="{marginRight: '8px'}"
        @click="handleCancel()"
      >
        å…³é—­
      </a-button>
      <a-button
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
        :disabled="disableSubmit || confirmLoading"
      >确定</a-button>
    </template>
  </a-modal>
</template>
<script>
import { getAction, postAction, requestPut } from '@/api/manage'
import pick from 'lodash.pick'
import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
import Tooltip from 'ant-design-vue/es/tooltip'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getFileAccessHttpUrl } from '@/api/manage';
export default {
  name: "MaintenanceOrderModal",
  mixins: [JeecgListMixin],
  components: {
    JMultiSelectTag,
    Tooltip,
  },
  data() {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
          width: 50,
        },
        {
          title: '类型',
          align: 'center',
          dataIndex: 'maintenanceMethod1'
        },
        {
          title: '部位',
          align: 'center',
          dataIndex: 'location'
        },
        {
          title: '保养项目',
          align: 'center',
          dataIndex: 'maintenanceProjectNum'
        },
        {
          title: '保养标准',
          align: 'center',
          dataIndex: 'standard'
        },
        {
          title: '执行情况',
          align: 'center',
          dataIndex: 'maintenanceTool1'
        },
        {
          title: '执行人',
          align: 'center',
          dataIndex: 'photo1',
        },
      ],
      title: "操作",
      visible: false,
      disableSubmit: false,
      codeDisable: true,
      dataSource: [],
      model: {},
      departs: [],
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        num: {
          rules: [
            { required: true, message: '请输入保养工单编码!' },
          ]
        },
      },
      url: {
        add: "/eam/dailyMaintenanceOrder/add",
        edit: "/eam/dailyMaintenanceOrder/approve",
        getSysDeparts: "/eam/dailyMaintenanceOrder/getSysDeparts",
        list: "/eam/dailyMaintenanceOrder/getMaintenanceCycleByStandardId",
      },
    }
  },
  methods: {
    edit(record) {
      let that = this;
      this.getSysDeparts()
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.visible = true;
      if (record.dailyMaintenanceDetails != undefined) {
        const temp = [...record.dailyMaintenanceDetails];
        that.dataSource = temp;
      }
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model, 'num', 'teamId', 'remark'));
      });
      if (record.id) {
        this.codeDisable = true;
      } else {
        this.codeDisable = false;
      }
    },
    close() {
      this.$emit('close');
      this.visible = false;
    },
    handleCancel() {
      this.close();
    },
    handleOk() {
      const that = this;
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let formData = Object.assign(this.model, values);
          requestPut(this.url.edit, formData, { id: this.model.id }).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
    handleDelete(text, record, index) {
      this.dataSource.splice(index, 1);
    },
    getSysDeparts() {
      getAction(this.url.getSysDeparts).then((res) => {
        if (res.success) {
          this.departs = res.result
        }
      })
    },
  },
}
</script>
<style lang="less" scoped>
/deep/ .frozenRowClass {
  color: #c9c9c9;
}
.fontweight {
  font-weight: bold;
}
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
.hightColor {
  height: 10%;
  font-weight: bold;
  font-size: 20px;
  color: #1b1e1e;
}
.frozenRowClass {
  color: #c9c9c9;
}
.fontweight {
  font-weight: bold;
}
.hight {
  color: #f5222d;
}
/deep/ .red {
  color: red;
}
</style>
src/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal.vue
@@ -368,6 +368,7 @@
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
        :disabled="disableSubmit || confirmLoading"
      >确定</a-button>
    </template>
src/views/eam/modules/specialtyMaintenanceOrder/MaintenanceOrderModal.vue
@@ -50,7 +50,7 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
            <a-input-search
              <a-input-search
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择专业保养方案'"
                enter-button
@@ -179,6 +179,7 @@
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
        :disabled="disableSubmit || confirmLoading"
      >确定</a-button>
    </template>
    <specialty-maintenance-plan-list
@@ -274,7 +275,7 @@
      this.model = Object.assign({}, record);
      this.visible = true;
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model, 'num','specialtyMaintenancePlanNum','assignMode','assignModeName','teamId','teamName', 'specialtyMaintenancePlanId', 'planStartTime'));
        that.form.setFieldsValue(pick(that.model, 'num', 'specialtyMaintenancePlanNum', 'assignMode', 'assignModeName', 'teamId', 'teamName', 'specialtyMaintenancePlanId', 'planStartTime'));
      });
      if (record.id) {
        this.codeDisable = true;