fcx
5 天以前 dbfb045ad92072e880104e13fddb4dc7574499a1
pages/QC/XJ/detail.vue
@@ -165,9 +165,9 @@
              <view v-if="isNumber && !isNaN(parseFloat(item.fcheckResu))" class="simple-number-result">
                <view class="result-value">{{ item.fcheckResu }}</view>
                <view v-if="formData.unitName" class="result-unit">{{ formData.unitName }}</view>
                <view :class="{'pass': isInRange(item.fcheckResu), 'fail': !isInRange(item.fcheckResu)}"
                <view :class="{'pass': item.fstand === '√' || item.isPass === 1, 'fail': item.fstand === '×' || item.isPass === 0}"
                      class="result-status">
                  {{ isInRange(item.fcheckResu) ? '合格' : '不合格' }}
                  {{ (item.fstand === '√' || item.isPass === 1) ? '合格' : '不合格' }}
                </view>
              </view>
@@ -179,12 +179,13 @@
              </view>
            </view>
            <view class="simple-data-cell simple-action">
              <button v-if="!isNumber" class="simple-btn" @click="numberEdit(item)">
              <button v-if="!isNumber && current" class="simple-btn" @click="numberEdit(item)">
                {{ editResult(item.fcheckResu) }}
              </button>
              <button v-if="isNumber" class="simple-btn" @click="toDetail(item)">
              <button v-if="isNumber && current" class="simple-btn" @click="toDetail(item)">
                修改
              </button>
              <view v-if="!current" class="simple-disabled">已提交</view>
            </view>
          </view>
        </view>
@@ -245,7 +246,8 @@
      remarks: "",
      remarksPopup: false,
      currentTab: 0,
      tabs: []
      tabs: [],
      current: true, // 添加current状态,A=true(未提交),B=false(已提交)
    }
  },
  methods: {
@@ -301,7 +303,7 @@
      let fstand = "√";
      //有最大值和最小值就根据是否符合标准值更新判定结果,没有最大值和最小值就根据是否通过检验判定结果
      if (this.formData.maxValue && this.formData.minValue) {
      if (this.formData.maxValue != null && this.formData.minValue != null) {
        if (!this.formData.fcheckResu) {
          this.$showMessage("请输入检验值");
@@ -377,7 +379,7 @@
          this.base64Image = 'data:image/jpeg;base64,' + this.formData.imageData;
        }
        if (this.formData.maxValue && this.formData.minValue && this.formData.standardValue) {
        if (this.formData.maxValue != null && this.formData.minValue != null && this.formData.standardValue != null) {
          this.isNumber = true;
        }
      })
@@ -399,7 +401,7 @@
      let fstand = "√";
      if (this.formData.maxValue && this.formData.minValue) {
      if (this.formData.maxValue != null && this.formData.minValue != null) {
        if (!this.editData.fcheckResu) {
          this.$showMessage("请输入检验值");
@@ -490,7 +492,8 @@
      this.remarks = this.formData.remarks;
    },
    editRemarks() {
      if (this.remarks) {
      // 允许保存空字符串或空格,只检查是否为null或undefined
      if (this.remarks !== null && this.remarks !== undefined) {
        //saveRemarksGid
        this.$post({
          url: "/XJ/saveRemarksPid",
@@ -532,6 +535,13 @@
    this.billNo = params["billNo"];
    this.gid = params["gid"];
    this.currentTab = parseInt(params["index"] || 0);
    // 读取current参数,判断是否已提交
    if (params["current"] === 'A') {
      this.current = true;  // 未提交,可以修改
    } else if (params["current"] === 'B') {
      this.current = false; // 已提交,禁止修改
    }
    this.refreshResult();
    this.loadTabItems();