qushaowei
2024-03-13 24404f195670ab3eb96fa2656113ed403238c5b0
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue
@@ -64,13 +64,25 @@
            </a-form-item>
          </a-col>
          <a-col :span="8">
            <a-form-item
            <!-- <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-form-item
              label="保养日期"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-date
                v-model="model.maintenanceDate"
                placeholder="请选择保养日期"
                :showTime="true"
                dateFormat="YYYY-MM-DD"
              />
            </a-form-item>
          </a-col>
        </a-row>
@@ -84,9 +96,17 @@
      :columns="columns"
      :dataSource="dataSource"
      :pagination="false"
    >
    />
    <a-table
      ref="table"
      bordered
      size="middle"
      rowKey='id'
      :columns="columns"
      :dataSource="dataSourceOperation"
      :pagination="false"
    />
    </a-table>
    <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
      <div class="ant-descriptions-title">问题及相应处理措施描述:</div>
      <a-textarea
@@ -210,8 +230,15 @@
  data() {
    return {
      columns: [
        {
          title: '#',
          title: '类型',
          align: 'center',
          width: 260,
          dataIndex: 'maintenanceRole'
        },
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
@@ -220,11 +247,6 @@
          },
          width: 50,
        },
        {
          title: '类型',
          align: 'center',
          dataIndex: 'maintenanceRole'
        },
        // {
        //   title: '部位',
@@ -232,7 +254,7 @@
        //   dataIndex: 'location'
        // },
        {
          title: '保养项目',
          title: '保养内容',
          align: 'center',
          dataIndex: 'maintenanceProjectName'
        },
@@ -244,12 +266,14 @@
        {
          title: '执行情况',
          align: 'center',
          dataIndex: 'maintenanceOrderDetailUda2'
          dataIndex: 'maintenanceOrderDetailUda2',
          width: 150,
        },
        {
          title: '执行人',
          align: 'center',
          dataIndex: 'maintenanceOrderDetailUda1',
          width: 150,
        },
      ],
@@ -258,6 +282,7 @@
      disableSubmit: false,
      codeDisable: true,
      dataSource: [],
      dataSourceOperation: [],
      model: {},
      // departs: [],
      labelCol: {
@@ -297,18 +322,26 @@
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.visible = true;
      if (record.dailyMaintenanceDetails != undefined) {
        const temp = [...record.dailyMaintenanceDetails];
      // if (record.dailyMaintenanceDetails != undefined) {
      //   const temp = [...record.dailyMaintenanceDetails];
      //   that.dataSource = temp;
      // }
      if (record.operationUserDetails != undefined) {
        const temp = [...record.operationUserDetails];
        that.dataSourceOperation = temp;
      }
      if (record.repairUserDetails != undefined) {
        const temp = [...record.repairUserDetails];
        that.dataSource = temp;
      }
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model, 'num', 'teamId', 'remark'));
      });
      if (record.id) {
        this.codeDisable = true;
      } else {
        this.codeDisable = false;
      }
      // that.$nextTick(() => {
      //   that.form.setFieldsValue(pick(that.model, 'num', 'teamId', 'remark'));
      // });
      // if (record.id) {
      //   this.codeDisable = true;
      // } else {
      //   this.codeDisable = false;
      // }
    },
@@ -339,7 +372,7 @@
          } else if (this.model.confirmStatus == '4') {
            formData.confirmStatus = '2'
          }
          requestPut(this.url.edit, formData, { id: this.model.id }).then((res) => {
          requestPut(this.url.edit, formData, { id: this.model.id, maintenanceDate: this.model.maintenanceDate }).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
@@ -376,7 +409,7 @@
          } else if (this.model.confirmStatus == '5') {
            formData.confirmStatus = '7'
          }
          requestPut(this.url.edit, formData, { id: this.model.id }).then((res) => {
          requestPut(this.url.edit, formData, { id: this.model.id, maintenanceDate: this.model.maintenanceDate }).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');