11
啊鑫
2025-06-05 61a07fff05fbaf6ea85e48af0eed43f379011a45
pages/QC/LLJ/detail.vue
@@ -61,14 +61,17 @@
         <!-- 规格要求 -->
         <view class="section">
            <view class="section-header">规格要求</view>
            <view class="section-header">规格要求 <!-- 造梦者特殊功能 -->
            <a class="doc-link" @click="toFileUrlByU9List(1,itemNo)">图纸规格书</a>
            </view>
            <view class="section-body">
               <text class="spec-text">{{ formData.fspecRequ }}</text>
            </view>
         </view>
         <!-- 规格要求 -->
         <view class="section">
            <view class="section-header">检验描述</view>
            <view class="section-header">检验描述 <a class="doc-link" @click="toFileUrlByU9List(2,itemNo)">进料检验文件</a></view>
            <view class="section-body">
               <text class="spec-text">{{ formData.fcheckItemDesc }}</text>
            </view>
@@ -97,9 +100,9 @@
                  <view class="info-value">{{formData.result}}</view>
               </view>
               <view v-if="formData.remarks!=null" class="result-ng">
               <view v-if="formData.funit!=null" class="result-ng">
                  <view class="info-label">不良描述</view>
                  <view class="info-value danger">{{formData.remarks}}</view>
                  <view class="info-value danger">{{formData.funit}}</view>
               </view>
            </view>
         </view>
@@ -108,7 +111,7 @@
         <view class="section">
            <view class="section-header">检验结果录入</view>
            <view class="section-body">
               <view class="input-group">
               <view class="input-group input1">
                  <view class="input-wrapper">
                     <button class="btn upload-btn" @tap="chooseImage">
@@ -119,6 +122,29 @@
                        <uni-icons type="compose" size="16" color="#fff"></uni-icons>
                        不良描述
                     </button>
                     <input v-if="(tableData.length < formData.checkQyt)" @input="search($event)"
                        v-model="inputTxt" type="text" class="result-input" placeholder="请输入检验结果..."
                        placeholder-class="placeholder" />
                     <button v-if="(tableData.length < formData.checkQyt)"
                        style="margin: 0px;background-color: #3498db;color:#ffffff ;" class="btn primary-btn"
                        @tap="saveResult">保存结果</button>
                  </view>
               </view>
               <view class="input-group input2">
                  <view class="input-wrapper">
                     <button class="btn upload-btn" @tap="chooseImage">
                        <uni-icons type="upload" size="16" color="#fff"></uni-icons>
                        上传/查看图片
                     </button>
                     <button v-if="this.current" class="btn upload-btn" @tap="upRemarks">
                        <uni-icons type="compose" size="16" color="#fff"></uni-icons>
                        不良描述
                     </button>
                  </view>
                  <view class="input-wrapper" style="margin-top: 15px;">
                     <input v-if="(tableData.length < formData.checkQyt)" @input="search($event)"
                        v-model="inputTxt" type="text" class="result-input" placeholder="请输入检验结果..."
                        placeholder-class="placeholder" />
@@ -161,7 +187,12 @@
               <form>
                  <view class="form-group">
                     <label class="form-label">不合格描述:</label>
                     <input class="form-input" type="text" v-model="remarks" />
                     <!-- <input class="form-input" type="text" v-model="remarks" /> -->
                     <picker @change="onRemarksChange" :value="RemarksIndex" :range="Remarks">
                        <view class="picker" style="height: 40px;">{{this.remarks}}</view>
                     </picker>
                  </view>
                  <button class="updateBut" type="warn" @click="editRemarks">修改</button>
                  <button @click="remarksPopup = !remarksPopup">取消</button>
@@ -207,7 +238,10 @@
            inputTxt: '',
            formID:'',
            releaseNo:'',
            current:false
            current:false,
            Remarks:[],
            RemarksIndex:0,
            itemNo:'',
         }
      },
      methods: {
@@ -219,6 +253,11 @@
         //检测输入框的输入,并给变量赋值
         search(event) {
            this.formData.fcheckResu = event.detail.value;
         },
         onRemarksChange(e) {
            this.RemarksIndex = e.detail.value
            this.remarks=this.Remarks[this.RemarksIndex];
         },
         toggleResult(item) {
            let fstand = "√";
@@ -240,7 +279,20 @@
                  updateBy: this.$loginInfo.account,
               }
            }).then(res => {
               this.$showMessage("修改成功");
               if (item.fcheckResu == 'OK') {
                  uni.showModal({
                     title: "提示",
                     content: "修改成功!判定不合格后需要填写不良描述并上传图片",
                     confirmText: "确定",
                     showCancel: false,
                     success: (res) => {
                     }
                  })
               }else{
                  this.$showMessage("修改成功");
               }
               this.refreshResult(); //刷新页面
            })
         },
@@ -310,11 +362,38 @@
               this.$showMessage("保存成功");
               this.refreshResult();
               this.inputTxt = '';
            })
            // debugger
            //console.log()
            //输入到最后一个值时,如果为不合格,则弹窗提示上传图片和不良描述
            //console.log(this.tableData.length+'=》'+this.formData.checkQyt+'=》'+this.formData.fngQty)
            if(!(this.tableData.length < this.formData.checkQyt-1)&&this.formData.fngQty>0){
               uni.showModal({
                  title: "提示",
                  content: "结果输入成功!判定不合格后需要填写不良描述并上传图片",
                  confirmText: "确定",
                  showCancel: false,
                  success: (res) => {
                  }
               })
            }
         },
         goBack() {
            uni.navigateBack()
         },
         //去文件列表页面(文件类型,物料编号)
         toFileUrlByU9List(type,u9No){
            if(type===1){
               uni.navigateTo({
                  url: 'FileUrlByU9List?type=' + type+'&itemID='+u9No
               });
            }else{
               uni.navigateTo({
                  url: 'FileUrlByU9List2?type=' + type+'&itemID='+u9No
               });
            }
         },
         //获取检验单详情
         refreshResult() {
@@ -325,7 +404,8 @@
               }
            }).then(res => {
               this.formData = res.data.tbBillList.itemXj01;
               this.remarks=this.formData.funit;
               this.tableData = res.data.tbBillList.itemXj02s;
               if (this.formData.imageData) {
@@ -363,7 +443,7 @@
                  }
               }).then(res => {
                  if (res.data.tbBillList > 0) {
                     this.formData.remarks = this.remarks;
                     this.formData.funit = this.remarks;
                     this.remarksPopup = !this.remarksPopup;
                     this.$showMessage("保存成功");
                  }
@@ -377,7 +457,7 @@
                  }
               }).then(res => {
                  if (res.data.tbBillList > 0) {
                     this.formData.remarks = this.remarks;
                     this.formData.funit = this.remarks;
                     this.remarksPopup = !this.remarksPopup;
                     this.$showMessage("保存成功");
                  }
@@ -456,6 +536,7 @@
         this.releaseNo= params["releaseNo"];
            this.currentTab=parseInt(params["index"]);
         this.current=params["current"] === 'true' ? true : false;
         this.itemNo=params["itemNo"];
         this.$post({
            url: "/LLJ/getJYItem",
            data: {
@@ -481,7 +562,14 @@
            this.tableData.forEach((item, index) => {
               this.set(item, 'current', this.current);
            });
            console.log(this.tableData);
         })
         this.$post({
            url: "/LLJ/getBlmsItem",
            data: {
            }
         }).then(res1 => {
            this.Remarks=res1.data;
         })
      }
   }
@@ -722,4 +810,34 @@
      background-color: #3498db;
      color: white;
   }
 .input1{
          display: block;
 }
 .input2{
          display: none;
 }
 // .doc-links {
 //   margin-left: auto;
 // }
 .doc-link {
   color: #3498db;
   text-decoration: none;
   margin-left: 15px;
   padding: 3px 8px;
   border: 1px solid #3498db;
   border-radius: 3px;
   font-size: 12px;
   margin-left: 70%;
 }
   /* 响应式设计 */
   @media (max-width: 500px) {
      .input1{
         display: none;
      }
      .input2{
         display: block;
      }
   }
</style>