xwt
3 天以前 b76e716ff4656191d73eba398e9eb39ee975e13b
pages/QC/SJ/Add.vue
@@ -1,108 +1,118 @@
<template>
   <view class="inspection-sheet">
      <!-- 头部信息 -->
      <view class="sheet-header">
         <h1>首检检验单</h1>
         <view class="inspection-number">检验单号:{{formData.billNo}}</view>
   <view>
      <view class="form-container">
         <form :modelValue="formData">
            <view class="form-group">
               <label class="form-label">首检单号:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.billNo" />
            </view>
            <view class="form-group">
               <label class="form-label">创建时间:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.createTime" />
            </view>
            <view class="form-group">
               <label class="form-label">检验类型:</label>
               <picker v-if="isUpdate" class="form-input" :range="SJ_MJList" :value="SJ_MJIndex" @change="onSJ_MJChange">
                  <view>{{ SJ_MJList[SJ_MJIndex] }}</view>
               </picker>
               <input v-else class="form-input" disabled="true" type="text" v-model="formData.SJ_MJ" />
            </view>
            <view class="uni-form-item uni-column form-item edit">
               <text class="form-label">生产线别:</text>
               <superwei-combox v-if="isUpdate" :candidates="DAA020List" placeholder="请选择或输入"
                  v-model="formData.line" @select="onDaa020Change" class="picker form-input"
                  style="border: none;"></superwei-combox>
               <input v-else class="form-input" disabled="true" type="text" v-model="formData.line" />
            </view>
            <view class="uni-form-item uni-column form-item edit">
               <text class="form-label">物料编码:</text>
               <superwei-combox v-if="isUpdate" :candidates="boardItems" placeholder="请选择或输入"
                  v-model="formData.itemNo" :isJSON="true" keyName="itemName" @select="onItemChange"
                  class="picker form-input" style="border: none;"></superwei-combox>
               <input v-else class="form-input" disabled="true" type="text" v-model="formData.itemNo" />
            </view>
            <view class="uni-form-item uni-column form-item edit">
               <text class="form-label">计划编号:</text>
               <picker v-if="isUpdate" class="picker form-input" name="selector" :range="DAA001List"
                  @change="onDaa001Change">
                  <text>{{ DAA001List[DAA001Index] }}</text>
               </picker>
               <input v-else class="form-input" disabled="true" type="text" v-model="formData.daa001" />
            </view>
            <view class="form-group">
               <label class="form-label">销售订单号:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.caa015" />
            </view>
            <view class="form-group">
               <label class="form-label">客户:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.cust" />
            </view>
            <view class="form-group">
               <label class="form-label">产品名称:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.daa003" />
            </view>
            <view class="form-group">
               <label class="form-label">规格型号:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.daa004" />
            </view>
            <view class="form-group">
               <label class="form-label">工单数量:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.daa008" />
            </view>
            <view class="form-group">
               <label class="form-label">不合格描述:</label>
               <input class="form-input" disabled="true" type="text" v-model="formData.remarks" />
            </view>
         </form>
      </view>
      <!-- 基本信息区 -->
      <view class="basic-info">
         <view class="info-row">
            <span class="info-label">创建人:</span>
            <span class="info-value">{{formData.fName}}</span>
         </view>
         <view class="info-row">
            <span class="info-label">创建时间:</span>
            <span class="info-value">{{formData.createTime}}</span>
            <!--        <span class="info-label">&nbsp;负责人:</span>
        <span class="info-value">{{formData.statusUser}}</span> -->
         </view>
      <view class="list-container">
         <uni-table ref="table" border emptyText="暂无更多数据">
            <uni-tr>
               <uni-th align="center" class="th" style="color: #FFFFFF;">检验项目</uni-th>
               <uni-th align="center" class="th" style="color: #FFFFFF">是否合格</uni-th>
               <uni-th align="center" class="th" style="color: #FFFFFF">记录(点击)</uni-th>
            </uni-tr>
            <uni-tr v-for="(item, index) in tableData" :key="index">
               <uni-td align="center">
                  <input class="form-input" disabled="true" type="text" v-model="item.projName" />
               </uni-td>
               <uni-td align="center">
                  <input class="form-input" disabled="true" type="text" v-model="item.result" />
               </uni-td>
               <uni-td>
                  <view class="uni-group">
                     <button v-if="item.isCheck >=item.levelNum" type="default" @click="toDetail(item)">
                        {{ item.levelNum + '/' + item.isCheck }}
                     </button>
                     <button v-else type="warn" @click="toDetail(item)">
                        {{ item.levelNum + '/' + item.isCheck }}</button>
                  </view>
               </uni-td>
            </uni-tr>
         </uni-table>
      </view>
      <!-- 物料信息区 -->
      <view class="material-info">
         <view class="info-block">
            <view class="info-label">物料编码:</view>
            <view class="info-value">{{formData.itemNo}}</view>
         </view>
         <view class="info-block">
            <view class="info-label">产品名称:</view>
            <view class="info-value">{{formData.daa003}}</view>
         </view>
         <view class="info-block">
            <view class="info-label">规格型号:</view>
            <view class="info-value">{{formData.daa004}}</view>
         </view>
         <view class="info-block">
            <view class="info-label">生产线别:</view>
            <view class="info-value">{{formData.line}}</view>
         </view>
         <view class="info-block">
            <view class="info-label" v-if="formData.extendNo1!=null">技改状态:</view>
            <view class="info-value" v-if="formData.extendNo1!=null">{{formData.extendNo1}}</view>
            <!-- <view class="info-label">项目:</view>
      <view class="info-value">{{formData.projectCodes}}</view> -->
            <view class="info-label">数量:</view>
            <view class="info-value highlight">{{formData.daa008}}</view>
         </view>
         <view class="info-block" v-if="formData.fngDesc!=null">
            <view class="info-label">不良描述:</view>
            <view class="info-value">{{formData.fngDesc}}</view>
         </view>
         <view class="info-block" v-if="formData.newFngDesc!=null">
            <view class="info-label">上次不良:</view>
            <view class="info-value">{{formData.newFngDesc}}</view>
         </view>
      <view class="plus-button">
         <button type="warn" v-if="isUpdate && !isShowTable" @click="save">创建检验单并生成部分默认值</button>
      </view>
      <!-- 操作按钮区 -->
      <!--    <view class="action-buttons" v-if="this.current" >
      <button class="secondary-btn" @click="getInspectionItems">获取检验项目</button>
    </view> -->
      <!-- 检验项目表格 -->
      <view class="inspection-table">
         <table>
            <thead>
               <tr>
                  <th width="15%" style="text-align: center;">检验项目</th>
                  <th width="50%" style="text-align: center;">质量要求</th>
                  <th width="20%" style="text-align: center;">记录(点击)</th>
               </tr>
            </thead>
            <tbody>
               <tr v-for="(item, index) in tableData" :key="index">
                  <td>{{ item.projName }}</td>
                  <td>
                     <view v-if="item.result=='合格'" class="watermark approved">{{ getStatusText(item.result) }}
                     </view>
                     <view v-if="item.result=='不合格'" class="watermark rejected">{{ getStatusText(item.result) }}
                     </view>
                     <view v-if="item.result=='未完成'" class="watermark pending">{{ getStatusText(item.result) }}
                     </view>
                     <view class="description-text">{{ item.itemMod }}</view>
                  </td>
                  <td>
                     <button v-if="item.current" class="record-btn" @click="fillRecord(item,index)">填写</button>
                     <button v-if="!item.current" class="record-btn" @click="fillRecord(item,index)">查看</button>
                  </td>
               </tr>
            </tbody>
         </table>
      <view class="plus-button">
         <button type="warn" v-if="!isUpdate && !isShowTable" @click="toImage">上传/查看图片</button>
      </view>
      <!-- 操作按钮区 -->
      <view class="action-buttons">
         <button class="secondary-btn" @click="uploadImages">上传/查看图片</button>
         <button class="secondary-btn" @click="addDefectDescription" v-if="this.current">添加不良描述</button>
         <!-- 首检这边会填完检验项目自动提交,不用写提交逻辑 -->
         <!-- <button class="primary-btn" @click="submitInspection" v-if="this.current">检验提交</button> -->
      <view class="plus-button">
         <button type="warn" v-if="!isUpdate && !isShowTable && formData.xjGenFlag == 0"
            @click="saveXJ">生成巡检</button>
      </view>
      <view class="plus-button">
         <button type="warn" v-if="!isUpdate && formData.result == '未完成' && !isShowTable" @click="removeXJ">删除单据
         </button>
      </view>
      <view class="plus-button">
         <button type="warn" v-if="!isUpdate &&  !isShowTable" @click="saveRemarks">添加不合格描述</button>
      </view>
      <view class="plus-button">
         <button type="warn" v-if="isShowTable" @click="getTable">获取检验项目</button>
      </view>
      <view class="plus-button">
         <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable">生成检验项目</button>
      </view>
      <view v-if="remarksPopup" class="overlay">
         <view class="popup">
@@ -112,245 +122,346 @@
                  <label class="form-label">不合格描述:</label>
                  <input class="form-input" type="text" v-model="remarks" />
               </view>
               <button type="warn" @click="editRemarks">修改</button>
               <button @click="remarksPopup = !remarksPopup">取消</button>
            </form>
            <button class="updateBut" @click="editRemarks">修改</button>
            <button @click="remarksPopup = !remarksPopup">取消</button>
         </view>
      </view>
   </view>
</template>
<script>
   export default {
      data() {
         return {
            formData: {
               createTime: "",
               id: "",
               releaseNo: "",
               createBy: "",
               createDate: "",
               lotNo: "",
               itemNo: "",
               billNo: "",
               fcovertQty: "",
               detailMem: "",
               taskNo: "",
               fcheckResu: "",
               boardModel: "",
               planQty: "",
               mocode: "",
               boardStyle: ""
               itemNo: "",
               itemName: "",
               workshopCode: "",
               workshopName: "",
               line: "",
               lineName: "",
               comments: "",
               statusUser: "",
               SJ_MJ: '首检',
            },
            DAA020List: [],
            DAA001List: [],
            schemeResult: [],
            DAA001Index: -1,
            ItemList: [],
            boardItems: [],
            womdaaList: [],
            tableData: [],
            isSubmit: true,
            isUpdate: true,
            isShowTable: false,
            remarks: "",
            remarksPopup: false,
            current: true
         }
            SJ_MJList: ['首检', '末检'],
            SJ_MJIndex: 0,
         };
      },
      onLoad(options) {
         //options中包含了url附带的参数
         let params = options;
         if (params["id"]) {
            this.isUpdate = false;
            this.formData.id = params["id"];
            this.formData.releaseNo = params["releaseNo"];
            this.formData.lotNo = params["lotNo"];
            this.msgId = params["msgId"];
            if (params["current"] === 'A') {
               this.current = true;
            } else if (params["current"] === 'B') {
               this.current = false;
            }
            if (this.msgId > 0) {
               this.msgRead();
            }
            this.formData.billNo = params["billNo"];
            this.init();
         } else {
            //初始化检验单号
            this.$post({
               url: "/LLJ/getMaxReleaseNo"
               url: "/SJ/GetMaxBillNo"
            }).then(res => {
               this.formData.releaseNo = res.data.tbBillList;
               this.formData.createBy = this.$loginInfo.account;
               this.formData.createDate = this.$getDate("yyyy-mm-dd");
               this.formData.billNo = res.data.tbBillList;
               this.formData.createTime = this.$getDate("yyyy-mm-dd");
            });
            //产品编码下拉框的初始化
            this.$post({
               url: "/XJ/getLineAll"
            }).then(res => {
               this.lineList = res.data.tbBillList;
               this.DAA020List = res.data.tbBillList.map(item => item.lineName);
               this.formData.itemNo = "";
               this.formData.itemName = "";
               this.formData.workshopCode = "";
               this.formData.workshopName = "";
               this.formData.line = "";
               this.formData.lineName = "";
               this.formData.pbaid = null;
            })
         }
      },
      methods: {
         getStatusText(status) {
            const statusMap = {
               approved: '合格',
               rejected: '不合格',
               pending: '待确认'
            }
            if (status == '未完成') {
               return statusMap['pending'] || ''
            } else if (status == '合格') {
               return statusMap['approved'] || ''
            } else {
               return statusMap['rejected'] || ''
            }
         },
         getInspectionItems() {
            // 获取检验项目的逻辑
            this.$post({
               url: "/LLJ/setJYItem",
               data: {
                  itemNo: this.formData.itemNo,
                  quantity: this.formData.fcovertQty,
                  releaseNo: this.formData.releaseNo
               }
            }).then(res => {
               if (res.status == 0) {
                  uni.showToast({
                     title: res.message.toString(),
                     //将值设置为 success 或者直接不用写icon这个参数
                     icon: 'success',
                     //显示持续时间为 2秒
                     duration: 2000
                  })
                  // 如果有页面跳转,需要用定时器延迟
                  setTimeout(() => {
                     this.init();
                  }, 2000);
               } else {
                  uni.showToast({
                     title: res.message.toString(),
                     //将值设置为 success 或者直接不用写icon这个参数
                     icon: 'error',
                     //显示持续时间为 2秒
                     duration: 2000
                  })
               }
            });
         },
         fillRecord(item, index) {
            // 填写记录的逻辑
            uni.navigateTo({
               url: 'detail?mainId=' + item.id + '&formID=' + this.formData.id + '&releaseNo=' + this.formData
                  .billNo + '&index=' + index + '&current=' + this.current
            });
         },
         uploadImages() {
            // 上传/查看图片的逻辑
            uni.navigateTo({
               url: 'ImageItem?id=' + this.formData.id
            });
         },
         addDefectDescription() {
            // 添加不良描述的逻辑
            this.remarksPopup = !this.remarksPopup;
            this.remarks = this.formData.remarks;
         },
         submitInspection() {
            // 检验提交的逻辑
            this.$post({
               url: "/LLJ/IqcQaSubmit",
               data: {
                  userNo: this.$loginInfo.account,
                  releaseNo: this.formData.releaseNo
               }
            }).then(res => {
               if (res.status == 0) {
                  uni.showToast({
                     title: res.message.toString(),
                     icon: 'success',
                     duration: 2000
                  })
                  // 如果有页面跳转,需要用定时器延迟
                  setTimeout(() => {
                     uni.navigateTo({
                        url: 'List'
                     });
                  }, 2000); // 保持与 duration 相同的时长
               } else {
                  uni.showModal({
                     title: "提示",
                     content: res.message.toString(),
                     confirmText: "确定",
                     showCancel: false,
                     success: (res) => {
                     }
                  })
               }
            })
         },
         onShow() {
            //每次进入页面都会执行的方法
         removeXJ() {
            if (this.formData.id) {
               this.init();
               this.$post({
                  url: "/SJ/removeSJ",
                  data: {
                     id: this.formData.id
                  }
               }).then(res => {
                  if (res.data.tbBillList > 0) {
                     this.$showMessage("删除成功");
                     //关闭当前页面,返回上一页面或多级页面
                     uni.navigateBack();
                  } else {
                     this.$showMessage("删除失败");
                  }
               });
            } else {
               this.$showMessage("请先选择检验单号");
            }
         },
         saveXJ() {
            //qaSubmit
            if (this.formData.id) {
               this.$post({
                  url: "/SJ/qaSubmit",
                  data: {
                     id: this.formData.id,
                     userNo: this.$loginInfo.account
                  }
               }).then(res => {
                  if (res.data.tbBillList) {
                     this.$showMessage("巡检生成成功");
                     this.init();
                  }
               });
            }
         },
         init() {
            let userName = this.$loginInfo.account;
            if (this.formData.id) {
               this.$post({
                  url: "/SJ/GetPage",
                  data: {
                     pageIndex: 1,
                     limit: 1,
                     id: this.formData.id
                  }
               }).then(res => {
                  let tbBillListElement = res.data.tbBillList[0];
                  if (tbBillListElement) {
                     this.formData = tbBillListElement;
                     this.$post({
                        url: "/SJ/getQSItems",
                        data: {
                           pid: this.formData.id
                        }
                     }).then(res => {
                        this.tableData = res.data.tbBillList;
                        this.tableData.sort((a, b) => {
                           if (a.result === '未完成' && b.result === '合格') {
                              return -1;
                           } else if (a.result === '合格' && b.result === '未完成') {
                              return 1;
                           } else {
                              return 0;
                           }
                        });
                        if (this.tableData.length <= 0) {
                           this.isShowTable = true;
                        }
                     })
                  }
               })
            }
         },
         onDaa020Change(event) {
            //获取生产线别的下标地址
            //this.formData.line = event;
            this.lineNo = this.lineList[this.DAA020List.indexOf(event)].lineNo;
            this.formData.line = this.lineNo;
            this.formData.itemNo = '';
            this.formData.daa001 = '';
            this.$post({
               url: "/SJ/GetPage",
               url: "/XJ/getBoardItem",
               data: {
                  pageIndex: 1,
                  limit: 1,
                  id: this.formData.id
                  lineNo: this.lineNo
               }
            }).then(res => {
               //填充工单号的数据源
               this.boardItems = res.data.tbBillList;
               this.ItemList = this.boardItems.map(item => item.itemName);
            })
         },
         onItemChange(event) {
            this.formData.itemNo = event.itemNo;
            this.$post({
               url: "/XJ/getDaa001",
               data: {
                  daa020: this.lineNo,
                  item: this.formData.itemNo
               }
            }).then(res => {
               //填充工单号的数据源
               this.schemeResult = res.data.tbBillList;
               this.DAA001List = this.schemeResult.map(s => s.daa001);
               //变为默认空值的状态
               this.DAA001Index = -1;
               this.formData.daa001 = "";
            })
         },
         //选取工单填充物料号和其他信息
         onDaa001Change(event) {
            this.DAA001Index = event.mp.detail.value;
            this.formData.daa001 = this.schemeResult[this.DAA001Index].daa001;
            //表单中的部分字段赋值
            this.$post({
               url: "/XJ/getItem",
               data: {
                  daa001: this.formData.daa001
               }
            }).then(res => {
               let data = res.data.tbBillList[0];
               if (data) {
                  this.formData = data;
                  this.$post({
                     url: "/SJ/getQSItems",
                     data: {
                        pid: this.formData.id
                     }
                  }).then(res1 => {
                     let tableData = res1.data.tbBillList
                     //当已检验个数都不为空时按照检测结构排序
                     tableData.sort((a, b) => {
                        if (a.result === '未完成' && b.result === '合格') {
                           return -1;
                        } else if (a.result === '合格' && b.result === '未完成') {
                           return 1;
                        } else {
                           return 0;
                        }
                     });
                     this.tableData = tableData;
                     if (this.tableData.length === 0) {
                        this.isShowTable = true;
                     }
                     this.tableData.forEach((item, index) => {
                        this.$set(item, 'current', this.current);
                     });
                  })
               //当返回的结果集为空时置空原有的值
               if (!data) {
                  this.formData.billNo = "";
                  this.formData.taskNo = "";
                  this.formData.itemNo = "";
                  this.tableData = [];
                  return;
               }
               //不为空时赋值
               this.formData.daa001 = data.daa001;
               this.formData.daa003 = data.daa003;
               this.formData.daa004 = data.daa004;
               this.formData.daa008 = data.daa008;
               this.formData.pbaid = data.id;
               this.$post({
                  url: "/SJ/SetQSItems",
                  data: {
                     itemNo: this.formData.itemNo,
                     lineNo: this.lineNo
                  }
               }).then(res => {
                  if (res.data.tbBillList.length > 0) {
                     this.tableData = res.data.tbBillList; // 在箭头函数中,this 指向外层作用域的 this
                     this.isSubmit = false;
                  } else {
                     this.$showMessage("此物料没有启用的检验项目,请维护!");
                     this.isSubmit = true;
                     this.tableData = [];
                  }
               });
            });
         },
         msgRead() {
            msgRead(this.msgId, this.$loginInfo.account);
         },
         //去文件列表页面(文件类型,物料编号)
         toFileUrlByU9List(type, u9No) {
            if (type === 1) {
               uni.navigateTo({
                  url: 'FileUrlByU9List?type=' + type + '&itemID=' + u9No
         toDetail(item) {
            if (this.isUpdate) {
               uni.showToast({
                  icon: "none",
                  title: "请先生成检验项目",
                  duration: 2000,
               });
            } else {
               uni.navigateTo({
                  url: 'FileUrlByU9List2?type=' + type + '&itemID=' + u9No
                  url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData
                     .id
               });
            }
         },
         getTable() {
            this.$post({
               url: "/SJ/SetQSItems",
               data: {
                  itemNo: this.formData.itemNo,
                  lineNo: this.formData.line
               }
            }).then(res => {
               if (res.data.tbBillList.length > 0) {
                  this.tableData = res.data.tbBillList; // 在箭头函数中,this 指向外层作用域的 this
                  this.isShowTable = true;
                  this.isUpdate = true;
               } else {
                  this.$showMessage("此物料没有启用的检验项目,请维护!");
                  this.isShowTable = true;
                  this.isUpdate = false;
                  this.tableData = [];
               }
            });
         },
         saveTable() {
            if (this.tableData.length === 0) {
               return;
            }
            this.$post({
               url: "/SJ/SaveItem",
               data: {
                  gid: this.formData.id,
                  items: this.tableData,
                  statusUser: this.$loginInfo.account
               }
            }).then(res => {
               this.tableData = res.data.tbBillList.items;
               this.isShowTable = false;
               this.isUpdate = false;
            })
         },
         save() {
            if (this.tableData.length === 0) {
               this.$showMessage(this.formData.itemNo + "物料没有检验项目");
               return;
            }
            if (!this.formData.daa001) {
               this.$showMessage("请选择计划编号");
               return;
            }
            this.formData.statusUser = this.$loginInfo.account;
            this.$post({
               url: "/SJ/Save",
               data: {
                  from: this.formData,
                  items: this.tableData
               }
            }).then(res => {
               this.formData = res.data.tbBillList.result;
               this.tableData = res.data.tbBillList.items;
               this.isUpdate = false;
            })
         },
         saveRemarks() {
            this.remarksPopup = !this.remarksPopup;
            this.remarks = this.formData.remarks;
         },
         editRemarks() {
            if (this.remarks) {
               //saveRemarksGid
@@ -367,251 +478,96 @@
                     this.$showMessage("保存成功");
                  }
               })
            } else {
               this.$post({
                  url: "/SJ/saveRemarksGid",
                  data: {
                     gid: this.formData.id,
                     remarks: ''
                  }
               }).then(res => {
                  if (res.data.tbBillList > 0) {
                     this.formData.remarks = this.remarks;
                     this.remarksPopup = !this.remarksPopup;
                     this.$showMessage("保存成功");
                  }
               })
            }
         },
         toImage() {
            uni.navigateTo({
               url: 'ImageItem?id=' + this.formData.id
            });
         },
         onSJ_MJChange(e) {
            this.SJ_MJIndex = e.mp.detail.value;
            this.formData.SJ_MJ = this.SJ_MJList[this.SJ_MJIndex];
         },
      },
      onShow() {
         //每次进入页面都会执行的方法
         this.init();
      }
   }
   };
</script>
<style>
   /* 基础样式 */
   .inspection-sheet {
      font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
      max-width: 1000px;
      margin: 0 auto;
      padding: 20px;
      background-color: #fff;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
   }
   /* 头部样式 */
   .sheet-header {
      text-align: center;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 2px solid #e0e0e0;
   }
   .sheet-header h1 {
      color: #2c3e50;
      font-size: 24px;
      margin-bottom: 5px;
   }
   .inspection-number {
      font-size: 16px;
      font-weight: bold;
      color: #3498db;
   }
   /* 基本信息区样式 */
   .basic-info,
   .material-info {
      margin-bottom: 20px;
   }
   .info-row {
      display: flex;
      margin-bottom: 10px;
      flex-wrap: wrap;
   }
   .info-label {
      font-weight: bold;
      color: #34495e;
      min-width: 80px;
      margin-right: 5px;
   }
   .info-value {
      color: #2c3e50;
      margin-right: 20px;
   }
   .highlight {
      font-weight: bold;
      color: #e74c3c;
   }
   /* 物料信息区样式 */
   .material-info {
      border: 1px solid #eee;
      padding: 15px;
      border-radius: 5px;
   }
   .info-block {
   .form-group {
      display: flex;
      align-items: center;
      margin-bottom: 10px;
      flex-wrap: wrap;
      border-bottom: 1px solid #c9c9c9;
   }
   .doc-links {
      margin-left: auto;
   .form-label {
      margin-bottom: 0;
      padding: 5px;
   }
   .doc-link {
      color: #3498db;
      text-decoration: none;
      margin-left: 15px;
      padding: 3px 8px;
      border: 1px solid #3498db;
      border-radius: 3px;
   .form-input {
      flex: 1;
      margin-bottom: 0;
      padding: 5px;
   }
   .picker {
      flex: 1;
      margin-bottom: 0;
      padding: 5px;
      font-size: 12px;
   }
   .sysLike {
      color: #3498db;
      text-decoration: none;
      margin-left: 15px;
      padding: 3px 8px;
      border-radius: 3px;
      font-size: 12px;
   }
   .doc-link:hover {
      background-color: #f0f8ff;
   }
   /* 表格样式 */
   .inspection-table {
      margin: 25px 0;
   }
   .inspection-table table {
      width: 100%;
      border-collapse: collapse;
   }
   .inspection-table th,
   .inspection-table td {
      padding: 12px 15px;
      border: 1px solid #ddd;
      text-align: left;
   }
   .inspection-table th {
      background-color: #f8f9fa;
      font-weight: bold;
      color: #34495e;
   }
   .inspection-table tr:nth-child(even) {
      background-color: #f9f9f9;
   }
   .inspection-table tr:hover {
      background-color: #f1f5f9;
   }
   /* 按钮样式 */
   .action-buttons {
   .uni-form-item {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      margin-top: 20px;
      border-bottom: 1px solid #c9c9c9;
   }
   .primary-btn,
   .secondary-btn {
      padding: 10px 20px;
      border: none;
      border-radius: 4px;
      font-size: 14px;
   .edit {
      background-color: white;
   }
   /* 默认样式 */
   .list-container {
      height: 60vh;
      /* 设置列表容器的高度为剩余空间,并减去表单容器的高度 */
      overflow-y: auto;
      /* 允许列表容器垂直滚动 */
      padding: 10px;
      /* 可选:添加一些内边距,使列表内容更美观 */
   }
   /* 在小屏幕设备上,重置高度为适应屏幕 */
   @media (max-width: 768px) {
      .list-container {
         height: calc(100vh - 376px);
         /* 适当调整高度 */
      }
   }
   .form-container {
      padding: 10px;
      /* 可选:添加一些内边距,使表单内容更美观 */
   }
   .th {
      background-color: lightskyblue;
      color: #FFFFFF;
   }
   .plus-button {
      line-height: 59px;
      font-size: 24px;
      cursor: pointer;
      transition: all 0.3s;
   }
   .primary-btn {
      background-color: #3498db;
      color: white;
   }
   .primary-btn:hover {
      background-color: #2980b9;
   }
   .secondary-btn {
      background-color: #ecf0f1;
      color: #7f8c8d;
   }
   .secondary-btn:hover {
      background-color: #d5dbdb;
   }
   .record-btn {
      padding: 6px 12px;
      background-color: #f8f9fa;
      border: 1px solid #ddd;
      /* border-radius: 3px; */
      cursor: pointer;
      transition: all 0.2s;
   }
   .record-btn:hover {
      background-color: #e9ecef;
   }
   /* 水印样式 */
   .watermark {
      position: absolute;
      font-size: 40px;
      font-weight: bold;
      opacity: 1;
      z-index: 1;
      pointer-events: none;
      transform: rotate(-15deg);
      width: 100%;
      text-align: center;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) rotate(-15deg);
   }
   .watermark.approved {
      color: #2ecc71;
      /* 绿色 */
   }
   .watermark.rejected {
      color: #e74c3c;
      /* 红色 */
   }
   .watermark.pending {
      color: #f39c12;
      /* 橙色 */
   }
   /* 描述文本容器 */
   .description-text {
      position: relative;
      z-index: 2;
      padding: 25px;
      background-color: rgba(255, 255, 255, 0.7);
   }
   /* 调整表格单元格 */
   .inspection-table td:nth-child(2) {
      position: relative;
      overflow: hidden;
      padding: 0;
      z-index: 1000;
      margin-bottom: 10px;
   }
   .overlay {
@@ -624,7 +580,6 @@
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 10;
   }
   .popup {
@@ -636,40 +591,5 @@
      /* 设置宽度为视口宽度的80% */
      height: 25vh;
      /* 设置高度为视口高度的80% */
   }
   .form-group {
      display: flex;
      align-items: center;
      border-bottom: 1px solid #c9c9c9;
   }
   .updateBut {
      background-color: #3498db;
      color: white;
   }
   /* 响应式设计 */
   @media (max-width: 500px) {
      .info-row,
      .info-block {
         flex-direction: column;
         align-items: flex-start;
      }
      .doc-links {
         margin-left: 0;
         margin-top: 10px;
      }
      .action-buttons {
         flex-direction: column;
      }
      .inspection-table table {
         display: block;
         overflow-x: auto;
      }
   }
</style>