南骏 池
2025-03-20 14b1756e21ba4401ce5916f035576804f4be5878
1.样式更新
已修改5个文件
239 ■■■■ 文件已修改
H5/Js/LLJ/Add.js 178 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/LLJ/Add.aspx 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/LLJ/List.aspx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Images/Style.css 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Mst.master 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/LLJ/Add.js
@@ -28,6 +28,8 @@
            tableData: [],//返回的检验项目
            jymxData: [],//展示的检验项目
            okNum:'',//合格数
            ngNum: '',//不合格数
            ttrre: false,
            show: false,
            tableMxData: [],
@@ -35,8 +37,8 @@
            inputValue: '',//特征值输入
            resultValue: '',//检验结果录入
            showButton: false,//右上角菜单触发
            okValue: '',
            ngValue: ''
            okValue: '',//OK-数量
            ngValue: ''//NG-数量
        }
    },
    mounted() {
@@ -51,6 +53,23 @@
        this.init();
    },
    methods: {
        // 输入过滤
        handleNumberInput1(value) {
            // 去除非数字并确保首位不为0(除非是单独的0)
            this.okValue = value.replace(/[^\d]/g, '') // 去除非数字字符
                .replace(/^0+(?!$)/, ''); // 去除开头的0,除非整个字符串是0
        },
        handleNumberInput2(value) {
            // 去除非数字并确保首位不为0(除非是单独的0)
            this.ngValue = value.replace(/[^\d]/g, '') // 去除非数字字符
                .replace(/^0+(?!$)/, ''); // 去除开头的0,除非整个字符串是0
        },
        handleNumberInput3(value) {
            this.inputValue = value.replace(/[^\d.]/g, '')  // 1. 去除非数字和小数点
                .replace(/(\..*)\./g, '$1')               // 2. 禁止多个小数点
                .replace(/^\./g, '');
        },
        togglePopup(index) {
            // 切换指定索引的 popup 状态
            var that = this;
@@ -66,6 +85,15 @@
            }, true, 1).then(function (res1) {
                if (res1.rtnCode == 1) {
                    that.tableMxData = res1.rtnData;
                    // 统计合格数和不合格数
                    const list = res1.rtnData?.list || []; // 确保 list 是数组,避免 undefined 错误
                    const okNum = list.filter(item => item.fstand === '√').length;
                    const ngNum = list.length - okNum;
                    // 将结果保存到指定变量(如 that 的成员属性)
                    that.okNum = okNum;
                    that.ngNum = ngNum;
                } else {
                    that.$toast.fail(res1.rtnMsg);
                }
@@ -77,11 +105,113 @@
        },
        handleTabClick() {
            console.log(this.tabActive)
            this.togglePopup(this.tabActive)
        getInputOK() {
            var that = this;
            var jys = that.tableData[that.tabActive].checkQyt;//检验项目的检验数
            if (jys < that.okValue) {
                that.$toast.fail("录入数量不能大于检验数!");
                that.okValue = null;
                //that.$refs.okValue.focus();
                return;
            }
            // 切换指定索引的 popup 状态
            var resultValue = "OK-" + this.okValue;
            this.getInput(resultValue);
            that.okValue = null;
        },
        getInputNG() {
            var that = this;
            var jys = that.tableData[that.tabActive].checkQyt;//检验项目的检验数
            if (jys < that.ngValue) {
                that.$toast.fail("录入数量不能大于检验数!");
                that.ngValue = null;
                //that.$refs.ngValue.focus();
                return;
            }
            // 切换指定索引的 popup 状态
            var resultValue = "NG-" + this.ngValue;
            this.getInput(resultValue);
            that.ngValue = null;
        },
        getInput(resultValue) {
            // 切换指定索引的 popup 状态
            var that = this;
            var guid1 = that.formData.guid;//主表id
            var mxguid = that.tableData[that.tabActive].guid;//检验项目的guid
            console.log(that.formData);
            var input = resultValue;//拼接检验值
            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EdtModel12', {
                inOrderGuid1: guid1,
                inOrderGuid5: mxguid,
                inP1: input,//或者0k-19,或者ng-19
            }, true, 1).then(function (res1) {
                if (res1.rtnCode == 1) {
                    that.$notify({
                        type: 'success', message: res1.rtnMsg
                    });
                    that.refreshJYItem();//刷新检验项目
                    //that.tableData = null;
                    //that.$refs.inputValue.focus();
                } else {
                    that.$toast.fail(res1.rtnMsg);
                }
            }).catch(function (error) {
                that.$toast.fail("网络错误,请重试!");
                console.log(error);
            });
        },
        getInputTZZ() {
            // 切换指定索引的 popup 状态
            var that = this;
            var mxguid = that.tableData[that.tabActive].guid;//检验项目的guid
            var input = that.inputValue;
            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/EditYangLi', {
                dt05Guid: mxguid,
                fSeq : "pda",
                fVal : input,
            }, true, 1).then(function (res1) {
                if (res1.rtnData.outSum == 1) {
                    that.$notify({
                        type: 'success', message: res1.rtnMsg
                    });
                    that.okValue = null;
                    that.refreshJYItem();//刷新检验项目
                    //that.handleTabClick();//刷新检验明细面板
                    //that.$refs.inputValue.focus();
                    that.inputValue = null;
                } else {
                    that.$toast.fail(res1.rtnMsg);
                    that.inputValue = null;
                }
            }).catch(function (error) {
                that.$toast.fail("网络错误,请重试!");
                that.inputValue = null;
            });
        },
        handleTabClick() {
            console.log(this.tabActive)
            this.togglePopup(this.tabActive);
        },
        //检验明细刷新
        refreshJYItem() {
            const that = this;
            return that.AxiosHttp("post", 'LLJ/getJYItem', {
                releaseNo: that.formData.releaseNo
            }, false).then(res1 => {
                const tableData = res1.data.tbBillList || [];
                that.tableData = tableData;
                that.handleTabClick();//刷新检验明细面板
            }).catch(error => {
                that.$toast.fail("网络错误,请重试!");
                console.error('Refresh error:', error);
            });
        },
        //主页面加载
        init() {
            
            //alert(this.Request("id"));
@@ -172,24 +302,32 @@
            });
        },
        removeXJ() {
            const that = this;
            var that = this;
            // 添加确认弹窗
            that.$dialog.confirm({
                title: '操作确认',
                message: '确认要重新加载检验项目吗?',
                confirmButtonText: '确认',
                cancelButtonText: '取消'
            }).then(() => {  // 确认回调
                that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', {
                    guid: that.formData.guid
                }, true, 1).then(res1 => {
                    if (res1.rtnCode == 1) {
                        that.$notify({ type: 'success', message: '重新加载成功' });
                        that.init();
                    } else {
                        that.$toast.fail(res1.rtnMsg);
                    }
                }).catch(error => {
                    that.$toast.fail("网络错误,请重试!");
                    console.error('Reload error:', error);
                });
            that.AxiosHttp("post", 'MesQaItemsDetect01Manager/ReloadModel5', {
                guid: that.formData.guid
            }, true, 1).then(function (res1) {
                if (res1.rtnCode == 1) {
                    that.$notify({ type: 'success', message: '重新加载成功' });
                    that.init();
                } else {
                    that.$toast.fail(res1.rtnMsg);
                }
            }).catch(function (error) {
                that.$toast.fail("网络错误,请重试!");
                console.log(error);
            }).catch(() => {  // 取消回调
                that.$toast('已取消操作');
            });
        },
        GetBack1() {
            window.history.back();
H5/LLJ/Add.aspx
@@ -30,7 +30,9 @@
            }
            .si-container {
                padding: 0.16rem;
/*                padding: 0.16rem;*/
                padding: 8px 12px;
                height: 0.6rem;
            }
            /* 状态显示组 */
@@ -74,7 +76,7 @@
                align-items: center;
                padding-left: 0.16rem;
                background: #fff;
                font-weight: bold;
                //font-weight: bold;
            }
            /* 状态类型修饰符 */
@@ -102,6 +104,7 @@
                overflow: hidden;
                background: #fff;
                box-shadow: 0 0.02rem 0.04rem rgba(0,0,0,0.05);
                padding: 8px 12px;
            }
            .si-input__left {
@@ -144,15 +147,16 @@
                justify-content: center; /* 新增居中 */
                background: #e3edf7;
                padding-right: 0.16rem;
                padding: 8px 12px;
            }
            /* Vant输入框深度定制 */
            :deep(.si-input-field .van-field__control) {
            /*:deep(.si-input-field .van-field__control) {
                height: 0.6rem !important;
                font-size: 0.20rem !important;
                line-height: 0.23rem !important;
                color: #333;
            }
            }*/
            .van-icon-popup {
                font-size: 0.5rem;
@@ -208,7 +212,7 @@
            .input-container {
                flex: 1;
                display: flex;
                gap: 20px; /* 控制两个输入组之间的间距 */
                gap: 2px; /* 控制两个输入组之间的间距 */
                align-items: center;
                 background: #e3edf7;
            }
@@ -218,6 +222,7 @@
                align-items: center;
                gap: 8px;
                flex: 1; /* 使两个输入组均分剩余空间 */
                padding: 8px 12px;
            }
            .si-input-field {
@@ -379,6 +384,14 @@
                              <van-field label="样本数" colon="true" v-model="jymxData.ybsl" readonly ></van-field>
                              <%--<van-field label="预览结果" colon="true" v-model="jymxData.result" readonly ></van-field>--%>
                              <%--<van-field label="结果录入" colon="true" v-model="resultValue"  placeholder="请输入OK-数字或NG-数字"></van-field>--%>
                              <van-field label="检测结果" colon="true" readonly >
                                   <template #input>
                                       <van-tag round plain v-if="jymxData.fcheckResu === '合格'" type="success">合格</van-tag>
                                       <van-tag round plain v-else-if="jymxData.fcheckResu === '不合格'" type="danger">不合格</van-tag>
                                       <van-tag round plain v-else type="warning">检验中</van-tag>
                                   </template>
                                </van-field>
                              <template>
                                  <div class="si-input-box">
                                    <!-- 左侧标题 -->
@@ -398,10 +411,13 @@
                                          class="input-tag"
                                        >OK</van-tag>
                                        <van-field
                                           :ref="'okValue_' + tabActive"
                                          v-model="okValue"
                                          class="si-input-field"
                                          placeholder="请输入OK数量"
                                          :border="false"
                                          @keyup.enter.native="getInputOK"
                                            @input="handleNumberInput1"
                                        />
                                      </div>
@@ -415,23 +431,19 @@
                                          class="input-tag"
                                        >NG</van-tag>
                                        <van-field
                                            :ref="'ngValue_' + tabActive"
                                          v-model="ngValue"
                                          class="si-input-field"
                                          placeholder="请输入NG数量"
                                          :border="false"
                                         @keyup.enter.native="getInputNG"
                                            @input="handleNumberInput2"
                                        />
                                      </div>
                                    </div>
                                  </div>
                                </template>
                              <van-field label="检测结果" colon="true" readonly >
                                   <template #input>
                                       <van-tag round plain v-if="jymxData.fcheckResu === '合格'" type="success">合格</van-tag>
                                       <van-tag round plain v-else-if="jymxData.fcheckResu === '不合格'" type="danger">不合格</van-tag>
                                       <van-tag round plain v-else type="warning">检验中</van-tag>
                                   </template>
                                </van-field>
                            </van-cell-group>
                    </template>
                   <!-- StatsInput.vue -->
@@ -443,16 +455,17 @@
                            <div class="si-status__left">
                              <span class="si-status__label">合格数</span>
                            </div>
                            <div  class="si-status__right">256</div>
                            <div  class="si-status__right">{{okNum}}</div>
                          </div>
                          <div class="si-status-box si-status--error">
                            <div class="si-status__left">
                              <span class="si-status__label">不合格数</span>
                            </div>
                            <div class="si-status__right">32</div>
                            <div class="si-status__right">{{ngNum}}</div>
                          </div>
                        </div>
                       </div>
                    </template>
                    <template>
                              <!-- 输入框 -->
@@ -462,14 +475,16 @@
                                </div>
                                <div class="si-status__right">
                                  <van-field
                                      :ref="'inputValue' + tabActive"
                                    v-model="inputValue"
                                    placeholder="请输入"
                                    :border="false"
                                    class="si-input-field"
                                    @input="handleNumberInput3"
                                      @keyup.enter.native="getInputTZZ"
                                  />
                                </div>
                              </div>
                            </div>
                    </template>
                            <van-row type="flex" justify="center">
                                 <van-col span="10" center class="text-left padding-left">检验项目</van-col>
@@ -538,5 +553,5 @@
  <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="../Js/LLJ/Add.js?<%=1192 %>"></script>
 <script src="../Js/LLJ/Add.js?<%=11993 %>"></script>
</asp:Content>
H5/LLJ/List.aspx
@@ -64,7 +64,7 @@
                               <van-field label="物料编码" colon="true" v-model="item.itemNo" readonly ></van-field>
                               <van-field label="物料名称" colon="true" v-model="item.itemName" readonly ></van-field>
                               <%--<van-field label="规格型号" colon="true" v-model="item.itemModel" readonly ></van-field>--%>
                               <%--<van-field label="数量" colon="true" v-model="item.fcovertQty" readonly ></van-field>--%>
                               <van-field label="数量" colon="true" v-model="item.fbatchQty" readonly ></van-field>
                               <van-field label="供应商" colon="true" v-model="item.suppName" readonly ></van-field>
                               <%--<van-field label="检验人" colon="true" v-model="item.fcheckBy" readonly ></van-field>--%>
                               
@@ -126,5 +126,5 @@
  <%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="../Js/LLJ/List.js?<%=115 %>"></script>
 <script src="../Js/LLJ/List.js?<%=116 %>"></script>
</asp:Content>
Images/Style.css
@@ -547,3 +547,11 @@
.van-nav-bar__left, .van-nav-bar__right {
    font-size: .25rem;
}
/*调整搜索框字体的高度和大小*/
.van-search__action {
    padding: 0 .2133rem;
    color: #323233;
    font-size: .25rem;
    line-height: .25rem;
}
Mst.master
@@ -14,7 +14,7 @@
    <script src="/scripts/config.js?<%=1234 %>"></script>
    <link href="/scripts/vant/vant.css" rel="stylesheet" />
    <script src="/scripts/vant/vant.js"></script>
    <link href="/Images/Style.css?<%=1698 %>" rel="stylesheet" />
    <link href="/Images/Style.css?<%=16991 %>" rel="stylesheet" />
    <script src="/Scripts/uni.webview.1.5.2.js"></script>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>