xwt
16 小时以前 835e77ee474054a19747187bfaad722df3e32278
llj备注
已修改3个文件
105 ■■■■ 文件已修改
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/QC/LLJ/Add.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/QC/RKJ/Add.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -2,7 +2,7 @@
    "name" : "GS-MES-AP",
    "appid" : "__UNI__F08FAE3",
    "description" : "",
    "versionName" : "1.1.4.9",
    "versionName" : "1.1.5.0",
    "versionCode" : 1,
    "transformPx" : false,
    /* 5+App特有相关 */
pages/QC/LLJ/Add.vue
@@ -82,6 +82,7 @@
            <view class="info-label">备注:</view>
            <input type="text" id="lotNo1" v-model="formData.lotNo1" 
                               placeholder="请输入备注信息" 
                               @blur="saveLotNo1"
                               style="color: red; font-weight: bold; background-color: #fff !important; -webkit-user-select: text !important; -moz-user-select: text !important; -ms-user-select: text !important; user-select: text !important; pointer-events: auto !important; opacity: 1 !important; z-index: 1 !important;"/> 
        </view>
        <view class="info-block" style="margin-top: 10px;">   
@@ -794,6 +795,34 @@
                  console.error('保存失败:', err);
              });
            },
            // 保存备注到数据库
            saveLotNo1() {
                if (!this.formData.id || !this.formData.releaseNo) {
                    console.log('缺少必要参数,无法保存备注');
                    return;
                }
                const requestData = {
                    gid: this.formData.id,
                    releaseNo: this.formData.releaseNo,
                    lotNo1: this.formData.lotNo1 || ''
                };
                console.log('保存备注:', requestData);
                this.$post({
                    url: "/LLJ/saveLotNo1",
                    data: requestData
                }).then(res => {
                    if (res.status == 0) {
                        console.log('备注保存成功');
                    } else {
                        console.error('备注保存失败:', res.message);
                    }
                }).catch(err => {
                    console.error('保存备注失败:', err);
                });
            },
            submitInspection() {
                
                // 重置验证状态
pages/QC/RKJ/Add.vue
@@ -21,21 +21,43 @@
                <view class="section-title">选择信息</view>
                <view class="form-row">
                    <label class="form-label required">工作车间:</label>
                    <superwei-combox :candidates="departmentList" placeholder="请选择车间" v-model="formData.workShop"
                        @select="onDepartmentChange" class="form-select"></superwei-combox>
                    <superwei-combox
                        :candidates="departmentList"
                        placeholder="请输入或选择车间"
                        v-model="formData.workShop"
                        @select="onDepartmentChange"
                        :filter="true"
                        :filterKeys="['value']"
                        class="form-select">
                    </superwei-combox>
                </view>
                <view class="form-row">
                    <label class="form-label required">生产线别:</label>
                    <superwei-combox v-if="formData.workShop" :candidates="DAA020List" placeholder="请选择线体"
                        v-model="formData.lineName" @select="onDaa020Change" class="form-select"></superwei-combox>
                    <superwei-combox
                        v-if="formData.workShop"
                        :candidates="DAA020List"
                        placeholder="请输入或选择线体"
                        v-model="formData.lineName"
                        @select="onDaa020Change"
                        :filter="true"
                        :filterKeys="['value']"
                        class="form-select">
                    </superwei-combox>
                    <span v-else class="form-hint">请先选择工作车间</span>
                </view>
                <view class="form-row">
                    <label class="form-label required">生产工单:</label>
                    <superwei-combox v-if="formData.lineName" :candidates="DAA001List" placeholder="请选择工单"
                        v-model="formData.rBillNo" @select="onDaa001Change" class="form-select"></superwei-combox>
                    <superwei-combox
                        v-if="formData.lineName"
                        :candidates="filteredDAA001List"
                        placeholder="请输入或选择工单"
                        v-model="formData.rBillNo"
                        @select="onDaa001Change"
                        @input="filterDAA001List"
                        class="form-select">
                    </superwei-combox>
                    <span v-else class="form-hint">请先选择生产线别</span>
                </view>
@@ -487,6 +509,7 @@
                DAA020List: [],
                DAA001List: [],
                filteredDAA001List: [], // 过滤后的工单列表
                BillNoList: [],
@@ -566,7 +589,9 @@
                this.$post({
                    url: "/RKJ/GetDepartmentsWithLines"
                }).then(res => {
                    this.departmentList = res.data.tbBillList.map(item => item.departmentname);
                    // 确保车间列表是字符串数组格式
                    this.departmentList = res.data.tbBillList.map(item => String(item.departmentname));
                    console.log('车间列表:', this.departmentList); // 调试日志
                })
            }
        },
@@ -753,8 +778,13 @@
                    }
                }).then(res => {
                    this.BillNoList = res.data.tbBillList;
                    // 工单号去重,只显示唯一
                    this.DAA001List = Array.from(new Set(res.data.tbBillList.map(s => s.daa001)));
                    // 工单号去重,只显示唯一值,并确保是字符串数组格式
                    const uniqueList = Array.from(new Set(res.data.tbBillList.map(s => s.daa001)));
                    // 转换为字符串数组,确保模糊搜索正常工作
                    this.DAA001List = uniqueList.map(item => String(item));
                    // 初始化过滤后的列表,显示所有工单
                    this.filteredDAA001List = [...this.DAA001List];
                    console.log('工单列表:', this.DAA001List); // 调试日志
                    this.formData.rBillNo = "";
                    // 不清空送检数量,保持用户已输入的值
                    this.formData.itemName = "";
@@ -765,6 +795,20 @@
                    this.formData.rbillNo = ""; // 清空送检批次号
                    this.tableData = [];
                })
            },
            // 工单号过滤方法(包含匹配)
            filterDAA001List(value) {
                if (!value || value.trim() === '') {
                    // 如果输入为空,显示所有工单
                    this.filteredDAA001List = [...this.DAA001List];
                } else {
                    // 包含匹配:过滤出包含输入关键字的工单号
                    const keyword = value.toLowerCase();
                    this.filteredDAA001List = this.DAA001List.filter(item =>
                        String(item).toLowerCase().includes(keyword)
                    );
                }
                console.log('过滤关键字:', value, '过滤后的工单:', this.filteredDAA001List);
            },
            // 车间选择事件
            onDepartmentChange(event) {
@@ -787,13 +831,18 @@
                        }).then(lineRes => {
                            console.log("线体数据:", lineRes.data.tbBillList); // 添加调试日志
                            this.lineList = lineRes.data.tbBillList;
                            this.DAA020List = lineRes.data.tbBillList.map(item => item.linename);
                            // 确保线体列表是字符串数组格式
                            this.DAA020List = lineRes.data.tbBillList.map(item => String(item.linename));
                            console.log('线体列表:', this.DAA020List); // 调试日志
                            // 清空相关数据
                            this.formData.lineName = "";
                            this.formData.lineNo = ""; // 清空生产线编号
                            this.formData.rBillNo = "";
                            this.formData.billNo = ""; // 清空工单号
                            // 清空工单列表
                            this.DAA001List = [];
                            this.filteredDAA001List = [];
                            // 不清空送检数量,保持用户已输入的值
                            this.formData.itemName = "";
                            this.formData.itemNo = "";
@@ -985,7 +1034,10 @@
                        }
                    }).then(workOrderRes => {
                        this.BillNoList = workOrderRes.data.tbBillList;
                        this.DAA001List = Array.from(new Set(workOrderRes.data.tbBillList.map(s => s.daa001)));
                        const uniqueList = Array.from(new Set(workOrderRes.data.tbBillList.map(s => s.daa001)));
                        this.DAA001List = uniqueList.map(item => String(item));
                        // 初始化过滤后的列表
                        this.filteredDAA001List = [...this.DAA001List];
                    });
                }
            },