From 14b1756e21ba4401ce5916f035576804f4be5878 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期四, 20 三月 2025 17:25:34 +0800 Subject: [PATCH] 1.样式更新 --- Images/Style.css | 8 ++ H5/LLJ/List.aspx | 4 H5/Js/LLJ/Add.js | 178 +++++++++++++++++++++++++++++++++++++++----- Mst.master | 2 H5/LLJ/Add.aspx | 47 +++++++---- 5 files changed, 200 insertions(+), 39 deletions(-) diff --git a/H5/Js/LLJ/Add.js b/H5/Js/LLJ/Add.js index a6621c6..0e60a53 100644 --- a/H5/Js/LLJ/Add.js +++ b/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,鎴栬�卬g-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(); diff --git a/H5/LLJ/Add.aspx b/H5/LLJ/Add.aspx index e7f5e5a..cd791d6 100644 --- a/H5/LLJ/Add.aspx +++ b/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="璇疯緭鍏K-鏁板瓧鎴朜G-鏁板瓧"></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="璇疯緭鍏K鏁伴噺" :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="璇疯緭鍏G鏁伴噺" :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> diff --git a/H5/LLJ/List.aspx b/H5/LLJ/List.aspx index 55f4c37..d72242e 100644 --- a/H5/LLJ/List.aspx +++ b/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> diff --git a/Images/Style.css b/Images/Style.css index 45a49cd..45c6741 100644 --- a/Images/Style.css +++ b/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; +} diff --git a/Mst.master b/Mst.master index 9056a9f..a3bf683 100644 --- a/Mst.master +++ b/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> -- Gitblit v1.9.3