如洲 陈
2 天以前 900e4776223c2a42d8859fc8cd635c13ffcfb3b5
pages/QC/THJ/List.vue
@@ -99,10 +99,10 @@
                      <!-- 客户信息 -->
                      <view class="customer-info">
                        <view class="uni-title-sub uni-ellipsis-2">
                          <view class="form-group">
                            <label class="form-label">客户编号:</label>
                            <input class="form-input" disabled="true" type="text" v-model="item.customerNo"/>
                          </view>
                        <view class="form-group">
                          <label class="form-label">客户名称:</label>
                          <input class="form-input" disabled="true" type="text" :value="item.customerName || item.CUSTOMERNAME || ''"/>
                        </view>
                        </view>
                      </view>
  
@@ -214,10 +214,10 @@
                      <!-- 客户信息 -->
                      <view class="customer-info">
                        <view class="uni-title-sub uni-ellipsis-2">
                          <view class="form-group">
                            <label class="form-label">客户编号:</label>
                            <input class="form-input" disabled="true" type="text" v-model="item.customerNo"/>
                          </view>
                        <view class="form-group">
                          <label class="form-label">客户名称:</label>
                          <input class="form-input" disabled="true" type="text" :value="item.customerName || item.CUSTOMERNAME || ''"/>
                        </view>
                        </view>
                      </view>
  
@@ -262,15 +262,9 @@
    },
    methods: {
      init() {
        let result = "";
        if (this.current === 0) {
          // 未完成:没有检验结果
          result = "未完成";
        } else if (this.current === 1) {
          // 已完成:有检验结果
          result = "已完成";
        }
        // 是否完成的判断:以 QS_QA_ITEM_THJ.TJ 是否等于 1 为准
        const tj = this.current === 1 ? 1 : 0; // 0=未完成,1=已完成
        //页面加载时调用的事件
        this.$post({
          url: "/THJ/getPage",
@@ -278,10 +272,17 @@
            pageIndex: 1,
            limit: 20,
            statusUser: this.$loginInfo.account,
            result: result
            tj: tj
          }
        }).then(res => {
          this.data = res.data.tbBillList;
          const list = (res && res.data && res.data.tbBillList) ? res.data.tbBillList : [];
          const showDone = this.current === 1;
          this.data = list.filter(it => {
            const tjRaw = it && (it.tj !== undefined ? it.tj : it.TJ);
            const tjVal = tjRaw === undefined || tjRaw === null ? '' : String(tjRaw).trim();
            const isDone = tjVal === '1' || tjVal === 1;
            return showDone ? isDone : !isDone;
          });
        })
      },