“linengliang”
2023-11-24 5cbba170e270e6f1c99a91e27dbb7951a27d596a
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
@@ -78,6 +84,7 @@
      rowKey='id'
      :columns="columns"
      :dataSource="dataSource"
      :pagination="false"
    >
      <template
        v-for="col in columns"
@@ -173,19 +180,30 @@
        </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: 12 }"
            label="检测调试后试加工零件号:"
          >
            <a-input v-model="model.sparePart" />
          </a-form-item>
        </a-col>
      </a-row>
      <a-row :gutter="24">
        <a-col :span="12">
          <a-form-item
            :labelCol="{ span: 8 }"
            :wrapperCol="{ span: 4 }"
            label="检测调试后试加工零件号:"
            label="零件加工:"
          >
            <a-switch
              checked-children="合格"
@@ -294,8 +312,9 @@
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
        :disabled="disableSubmit || confirmLoading"
        :disabled="this.model.precisionInspectionStatus == '5'"
      >确定</a-button>
    </template>
  </a-modal>
@@ -379,6 +398,7 @@
        add: "/eam/precisionInspection/precisionInspection",
        getPrecisionInspection: "/eam/precisionInspection/getPrecisionInspectionList",
        list: "/eam/dailyMaintenanceOrder/getMaintenanceCycleByStandardId",
        getSysFileName: "/eam/sysFileName/getSysFileName",
      },
    }
@@ -388,7 +408,9 @@
    edit(record) {
      let that = this;
      if (record.receipts2 == "" || record.receipts2 == null) {
        this.getSysFileName()
      }
      this.form.resetFields();
      // record.eachTolerance = '0'
      // record.partTolerance = '0'
@@ -416,9 +438,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({
@@ -455,8 +487,7 @@
      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]);
        }
      })
    },
@@ -499,6 +530,7 @@
    onChangeJudgmentResult(e) {
      this.model.judgmentResult = e.target.value
      this.model = Object.assign({}, this.model);
    },
    handleChange(value, key, column, index) {
@@ -514,6 +546,14 @@
      }
    },
    getSysFileName() {
      getAction(this.url.getSysFileName, { name: '16' }).then((res) => {
        if (res.success) {
          this.model = Object.assign(this.model, res.result[0]);
        }
      })
    },
  },
}
</script>