qushaowei
2025-05-15 2bd54f454ea035ebc10e4d5bf4e50169c3929c5c
src/views/eam/modules/daily3MaintenanceOrder/EquipmentPrecisionCheckOrderModal.vue
@@ -7,14 +7,20 @@
    cancelText="关闭"
    @cancel="handleCancel"
    :confirmLoading="confirmLoading"
    title="附录6"
  >
    <!-- :title="title" -->
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <span
          class="ant-descriptions-title"
          style="font-size: large;font-size: 15px;float: right;"
        >{{this.model.receiptsNum2}}</span>
        <a-divider
          orientation="center"
          style="font-size: large;font-style: normal;font-size: 30px;color: #66aeed;"
        > 生产设备精度检验单 </a-divider>
        > {{this.model.receiptsName2}} </a-divider>
        <!-- 生产设备精度检验单 -->
        <a-row :gutter="24">
          <a-col :span="8">
            <a-form-item
@@ -64,7 +70,7 @@
              :wrapperCol="wrapperCol"
              label="保养单位"
            >
              <span v-if="this.model != null">{{ this.model.actualEndTime }}</span>
              <span v-if="this.model != null">{{ this.model.manageName }}</span>
              <span v-else>-</span>
            </a-form-item>
          </a-col>
@@ -174,19 +180,29 @@
        </a-col>
      </a-row>
    </div>
    <div :style="{height: '115px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '50px 20px',background: '#fff',}">
    <div :style="{height: '175px',float: 'left',width: '10%',border: '1px solid #e9e9e9',padding: '50px 20px',background: '#fff',}">
      <span
        class="ant-descriptions-title"
        style="font-size: large;font-style: normal;font-size: 15px;"
      >零件状态</span>
    </div>
    <div :style="{height: '115px',float: 'right',width: '90%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}">
    <div :style="{height: '175px',float: 'right',width: '90%',border: '1px solid #e9e9e9',padding: '10px 10px',background: '#fff',}">
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item
            :labelCol="{ span: 8 }"
            :wrapperCol="{ span: 4 }"
            :wrapperCol="{ span: 12 }"
            label="检测调试后试加工零件号:"
          >
            <a-input v-model="model.sparePart" />
          </a-form-item>
        </a-col>
        <a-col :span="12">
          <a-form-item
            :labelCol="{ span: 8 }"
            :wrapperCol="{ span: 4 }"
            label="零件加工:"
          >
            <a-switch
              checked-children="合格"
@@ -196,7 +212,10 @@
            />
          </a-form-item>
        </a-col>
        <a-col :span="12">
      </a-row>
      <a-row :gutter="24">
        <!-- <a-col :span="12">
          <a-form-item
            :labelCol="{ span: 8 }"
            :wrapperCol="{ span: 4 }"
@@ -208,6 +227,35 @@
              @change="handle5Switch(model.meetProcessRequire)"
              :checked="model.meetProcessRequire == '1'"
            />
          </a-form-item>
        </a-col> -->
        <a-col :span="12">
          <a-form-item
            style="font-size: large;font-style: normal;font-size: 15px;"
            :labelCol="{ span: 8 }"
            :wrapperCol="{ span: 12 }"
            label="能否满足加工工艺要求"
          >
            <j-dict-select-tag
              style="font-size: large;font-style: normal;font-size: 15px;width: 100%"
              allow-clear
              :triggerChange="true"
              dictCode="meet_process_require"
              v-model="model.meetProcessRequire"
            />
          </a-form-item>
        </a-col>
        <a-col
          v-if="model.meetProcessRequire =='3'"
          :span="12"
        >
          <a-form-item
            :labelCol="{ span: 8 }"
            :wrapperCol="{ span: 12 }"
            label="自定义说明:"
          >
            <a-input v-model="model.meetProcessRequireRemark" />
          </a-form-item>
        </a-col>
      </a-row>
@@ -295,8 +343,15 @@
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
        :disabled="disableSubmit || confirmLoading"
        :disabled="this.model.precisionInspectionStatus == '5' || this.model.statusFlag !== this.model.precisionInspectionStatus"
      >确定</a-button>
      <!-- <a-button
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
        :disabled="this.model.precisionInspectionStatus == '5'"
      >确定</a-button> -->
    </template>
  </a-modal>
@@ -359,6 +414,7 @@
      dataSource: [],
      model: {},
      departs: [],
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
@@ -380,6 +436,7 @@
        add: "/eam/precisionInspection/precisionInspection",
        getPrecisionInspection: "/eam/precisionInspection/getPrecisionInspectionList",
        list: "/eam/dailyMaintenanceOrder/getMaintenanceCycleByStandardId",
        getSysFileName: "/eam/sysFileName/getSysFileName",
      },
    }
@@ -387,9 +444,11 @@
  methods: {
    edit(record) {
    edit(record, statusFlag) {
      let that = this;
      if (record.receipts2 == "" || record.receipts2 == null) {
        this.getSysFileName()
      }
      this.form.resetFields();
      // record.eachTolerance = '0'
      // record.partTolerance = '0'
@@ -397,6 +456,9 @@
      // record.meetProcessRequire = '0'
      // record.judgmentResult = ""
      this.model = Object.assign({}, record);
      // alert("1" + statusFlag)
      // alert("2" + record.precisionInspectionStatus)
      this.model.statusFlag = statusFlag;
      this.getPrecisionInspection()
      // this.getEquipmentPrecision()
      this.visible = true;
@@ -417,9 +479,19 @@
    },
    handleOk() {
      // if (this.model.precisionInspectionStatus === '2') {
      //   if ((this.model.eachTolerance === "0" || this.model.eachTolerance === 0) && (this.model.partTolerance === "0" || this.model.partTolerance === 0)) {
      //     this.$message.warning("请对精度状态结果勾选!");
      //     return
      //   }
      // }
      // if (this.model.precisionInspectionStatus === '3') {
      //   if ((this.model.processPass === "0" || this.model.processPass === 0) && (this.model.meetProcessRequire === "0" || this.model.meetProcessRequire === 0)) {
      //     this.$message.warning("请对零件状态结果勾选!");
      //     return
      //   }
      // }
      const that = this;
      // 触发表单验证
      that.form.validateFields((err, values) => {
        if (!err) {
          this.$confirm({
@@ -456,8 +528,8 @@
      getAction(this.url.getPrecisionInspection, { maintenanceOrderId: this.model.id }).then((res) => {
        if (res.success) {
          this.dataSource = res.result[0].precisionInspectionDetails
          this.model = Object.assign({}, res.result[0]);
          debugger
          this.model = Object.assign(this.model, res.result[0]);
          this.model = Object.assign({}, this.model);
        }
      })
    },
@@ -500,6 +572,7 @@
    onChangeJudgmentResult(e) {
      this.model.judgmentResult = e.target.value
      this.model = Object.assign({}, this.model);
    },
    handleChange(value, key, column, index) {
@@ -515,6 +588,14 @@
      }
    },
    getSysFileName() {
      getAction(this.url.getSysFileName, { name: '16' }).then((res) => {
        if (res.success) {
          this.model = Object.assign(this.model, res.result[0]);
        }
      })
    },
  },
}
</script>