From b50ca3ca2cb9f0add65268b324cddd502744f6b2 Mon Sep 17 00:00:00 2001 From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU> Date: 星期三, 03 九月 2025 13:05:51 +0800 Subject: [PATCH] Merge branch 'master' of http://git.gs-mes.com:8080/r/~tjx/QXPDA --- H5/Js/Scbl.js | 107 ++++++++++++++++++++++++++ H5/BarCf.aspx | 7 + H5/BarCfBefore.aspx | 5 + H5/Js/BarCfBefore.js | 4 H5/Kwcx.aspx | 5 + H5/AgvCz.aspx | 5 + H5/Js/BarCf.js | 8 + H5/Scbl.aspx | 57 +++++++++++++ 8 files changed, 190 insertions(+), 8 deletions(-) diff --git a/H5/AgvCz.aspx b/H5/AgvCz.aspx index 3f561b9..6810401 100644 --- a/H5/AgvCz.aspx +++ b/H5/AgvCz.aspx @@ -61,6 +61,11 @@ </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <van-notice-bar + :scrollable="false" + :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')" + class="org-info" +/></van-notice-bar> <div class="content-wrapper"> <van-nav-bar title="AGV鎿嶄綔" diff --git a/H5/BarCf.aspx b/H5/BarCf.aspx index 130c8d0..5293dae 100644 --- a/H5/BarCf.aspx +++ b/H5/BarCf.aspx @@ -8,6 +8,11 @@ </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <van-notice-bar + :scrollable="false" + :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')" + class="org-info" +/></van-notice-bar> <van-nav-bar title="鍦ㄥ簱鍒嗘枡" left-text="杩斿洖" @@ -73,5 +78,5 @@ <%--<comback ></comback>--%> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> - <script src="Js/BarCf.js?<%=121111 %>"></script> + <script src="Js/BarCf.js?<%=1211111 %>"></script> </asp:Content> diff --git a/H5/BarCfBefore.aspx b/H5/BarCfBefore.aspx index 2b5368b..4affc2e 100644 --- a/H5/BarCfBefore.aspx +++ b/H5/BarCfBefore.aspx @@ -8,6 +8,11 @@ </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <van-notice-bar + :scrollable="false" + :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')" + class="org-info" +/></van-notice-bar> <van-nav-bar title="鍏ュ簱鍓嶆媶鏂�" left-text="杩斿洖" diff --git a/H5/Js/BarCf.js b/H5/Js/BarCf.js index 449abc5..bdc9891 100644 --- a/H5/Js/BarCf.js +++ b/H5/Js/BarCf.js @@ -115,10 +115,16 @@ that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�"); return; } - if (that.formData.cfNum > that.formData.sumQuantity) { + //if (that.formData.cfNum > that.formData.sumQuantity) { + // that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�"); + // return; + //} + + if (parseFloat(that.formData.cfNum) > parseFloat(that.formData.sumQuantity)) { that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�"); return; } + if (that.formData.barcode.length * 1 <= 0) { that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); return; diff --git a/H5/Js/BarCfBefore.js b/H5/Js/BarCfBefore.js index 5709a88..ced1062 100644 --- a/H5/Js/BarCfBefore.js +++ b/H5/Js/BarCfBefore.js @@ -115,12 +115,12 @@ that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�"); return; } - // ... existing code ... + if (parseFloat(that.formData.cfNum) > parseFloat(that.formData.sumQuantity)) { that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�"); return; } - // ... existing code ... + if (that.formData.barcode.length * 1 <= 0) { that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); return; diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js index b4d5fa7..0f63308 100644 --- a/H5/Js/Scbl.js +++ b/H5/Js/Scbl.js @@ -16,10 +16,20 @@ barcode: "", ItemBlDetail:[], modeInfo: [], + queryInfo: { dateTime: "", lineNo: "", lineName: "" }, active: 0, show: false, + show1:false, actions: [], + actions1: [], ItemDetail: [], + minDate: new Date(new Date().getFullYear() - 1, 0, 1), // 杩囧幓涓�骞� + maxDate: new Date(new Date().getFullYear() + 1, 11, 31), // 鏈潵涓�骞� + showScDatePicker: false, + tempDate: new Date(), + showDatePicker: false, + ItemBarKw: [], + currentIndex: -1, } }, mounted() { @@ -32,16 +42,72 @@ selectType = this.type == "bl" ? selectType = "鐢熶骇琛ユ枡" : selectType = "鐢熶骇瓒呴"; }, methods: { + handleRowClick(item, index) { + if (this.isLoading) { + return; + } + + // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵�� + this.currentIndex = -1; + + // 璁剧疆褰撳墠閫変腑琛� + this.currentIndex = index; + this.selItem = { + itemid: item.itemId, + index: index + }; + + console.log('褰撳墠閫変腑椤�:', this.selItem); // 璋冭瘯鐢� + + this.GetBarKwByItem(); + }, + GetBarKwByItem() { + + var that = this; + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/GetBarKwByItem', { + itemId: that.selItem.itemid, + userName: that.userInfo.loginAccount + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.ItemBarKw = json.data.tbBillList; + } + else { + that.$toast.fail(json.message); + that.$playSound('error'); + that.ItemBarKw = []; + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); + console.log(error); + that.ItemBarKw = []; + }); + }, + formatDate(date) { + const d = new Date(date); + console.log(d); + return `${d.getFullYear()}-${(d.getMonth() + 1).toString().padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`; + }, + onDateConfirm(date) { + this.queryInfo.dateTime = this.formatDate(date); + this.showDatePicker = false; + }, getInfo() { this.show = true; var that = this; that.isLoading = true; - - that.AxiosHttp("post", 'MesItemBl/GetSCBLBillNo', { type: selectType, + dateTime: that.queryInfo.dateTime, + lineNo: that.queryInfo.lineNo }, false) .then(function (res) { var json = res; @@ -75,6 +141,11 @@ //this.$toast(item.name); }, + onSelect1(actions1) { + this.queryInfo.lineNo = actions1.lineNo; + this.show1 = false; + this.queryInfo.lineName = actions1.name; + }, GetMesItemBlDetailByBillNo() { var that = this; that.isLoading = true; @@ -87,7 +158,11 @@ if (json.status == 0) { that.ItemDetail = json.data.tbBillList; that.daa001 = json.data.tbBillList.daa001; + console.log(json.data.tbBillList.daa001); + console.log(json.data.tbBillList.items); that.$refs.barcode.focus(); + that.currentIndex = -1; + that.ItemBarKw = []; } else { that.$toast.fail(json.message); @@ -108,6 +183,34 @@ that.ItemBlDetail = []; }); }, + getLineInfo() { + var that = this; + that.show1 = true; + that.actions = []; + that.isLoading = true; + that.AxiosHttp("post", 'MesItemBl/GetLineInfo', { + selectLine: that.selectLine + }, false) + .then(function (res) { + var json = res; + console.log(json); + if (json.status == 0 && json.data.tbLineInfo.length > 0) { + that.actions1 = json.data.tbLineInfo.map(item => ({ + name: item.lineName, + lineNo: item.lineNo + })); + } else { + that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�"); + that.$playSound('error'); + } + that.isLoading = false; + }) + .catch(function () { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); + }); + }, getBarcode() { // 娣诲姞闃叉姈鍒ゆ柇 if (this.isLoading) { diff --git a/H5/Kwcx.aspx b/H5/Kwcx.aspx index fcf6628..7fc7ddf 100644 --- a/H5/Kwcx.aspx +++ b/H5/Kwcx.aspx @@ -3,6 +3,11 @@ </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <van-notice-bar + :scrollable="false" + :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')" + class="org-info" + /></van-notice-bar> <div class="content-wrapper"> <van-nav-bar title="搴撲綅鏌ヨ" diff --git a/H5/Scbl.aspx b/H5/Scbl.aspx index 198c377..7587138 100644 --- a/H5/Scbl.aspx +++ b/H5/Scbl.aspx @@ -8,6 +8,11 @@ </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <van-notice-bar + :scrollable="false" + :text="'褰撳墠缁勭粐锛�' + (Cookies.get('orgName') || '鏆傛棤缁勭粐淇℃伅')" + class="org-info" + /></van-notice-bar> <van-nav-bar :title="type=='cl'?'鐢熶骇瓒呴':'鐢熶骇琛ユ枡'" left-text="杩斿洖" @@ -16,6 +21,32 @@ ></van-nav-bar> <div class="content-wrapper"> <van-cell-group> + <van-field + v-model="queryInfo.dateTime" + label="鍗曟嵁鏃ユ湡" + clearable + placeholder="璇烽�夋嫨鏃ユ湡" + readonly + @click="showDatePicker = true"> + </van-field> + <van-popup v-model="showDatePicker" position="bottom"> + <van-datetime-picker + type="date" + v-model="tempDate" + :min-date="minDate" + :max-date="maxDate" + @confirm="onDateConfirm" + @cancel="showDatePicker = false" /> + </van-popup> + <van-field + v-model="queryInfo.lineName" + label="鐢熶骇绾垮埆" + clearable + placeholder="璇烽�夋嫨鐢熶骇绾垮埆"> + <template #button> + <van-button size="small" type="info" plain @click="getLineInfo">閫夋嫨</van-button> + </template> + </van-field> <van-field ref="billNo" value="" @@ -78,7 +109,9 @@ <van-col span="3">寰呮壂</van-col> <van-col span="5">鎺ㄨ崘搴撲綅</van-col> </van-row> - <van-row v-for="(itm,index) in ItemDetail.items" :key="index"> + <van-row v-for="(itm,index) in ItemDetail.items" :key="index" + :style="{ background: currentIndex === index ? '#87CEEB' : '' }" + @click.native="handleRowClick(itm, index)"> <van-col span="8" class="text-left padding-left"> <div class="blue-text">{{itm.itemNo}}</div> <div>{{itm.itemName}}</div> @@ -90,6 +123,25 @@ <van-col span="5">{{itm.recoKw}}</van-col> </van-row> </van-tab> + + <van-tab title="搴撲綅鍒楄〃" class="mySolid font"> + <van-row> + <van-col span="10" class="text-left padding-left">鏉$爜缂栧彿</van-col> + <van-col span="5" class="text-left padding-left">搴撲綅</van-col> + <van-col span="4">鏁伴噺</van-col> + <van-col span="5">浠撳簱</van-col> + </van-row> + <van-row v-for="(itm,index) in ItemBarKw" :key="index"> + <van-col span="10" class="text-left padding-left"> + <div class="blue-text">{{itm.iteM_BARCODE}}</div> + </van-col> + <van-col span="5" class="text-left padding-left"> + <div>{{itm.depoT_SECTIONS_CODE}}</div> + </van-col> + <van-col span="4" class="blue-text">{{itm.quantity}}</van-col> + <van-col span="5" >{{itm.depot_name}}</van-col> + </van-row> + </van-tab> <van-tab title="宸叉壂鐗╂枡" class="mySolid font"> <van-row> @@ -113,6 +165,7 @@ </van-tabs> <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet> + <van-action-sheet v-model="show1" :actions="actions1" @select="onSelect1"></van-action-sheet> </div> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"> @@ -120,5 +173,5 @@ <%--<comback ></comback>--%> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> - <script src="Js/Scbl.js?<%=1231811111 %>"></script> + <script src="Js/Scbl.js?<%=1231887111 %>"></script> </asp:Content> -- Gitblit v1.9.3