From fbe0595485e2e7c0fde9c0d95f02e38b58e7b2d3 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期一, 05 五月 2025 10:39:36 +0800 Subject: [PATCH] 1.现场收料界面 2.界面优化 --- H5/Xcsl.aspx | 171 +++++++++++++++++++ H5/Xcsl.aspx.cs | 14 + H5/Js/PurchaseReturn.js | 27 --- H5/Scll.aspx | 4 H5/Js/Xcsl.js | 279 +++++++++++++++++++++++++++++++ H5/PurchaseReturn.aspx | 4 H5/Sctl.aspx | 4 H5/Scbl.aspx | 4 8 files changed, 472 insertions(+), 35 deletions(-) diff --git a/H5/Js/PurchaseReturn.js b/H5/Js/PurchaseReturn.js index d836ded..c103af5 100644 --- a/H5/Js/PurchaseReturn.js +++ b/H5/Js/PurchaseReturn.js @@ -104,33 +104,6 @@ this.getItem(); - //var that = this; - - //that.isLoading = true; - //that.AxiosHttp("post", 'MesInvItemOuts/GetPage', { - // billNo: this.scanFormData.itemOutNo, - // pageIndex: 1, - // limit: 1, - //}, false) - // .then(function (res) { - // var json = res; - // if (json.status == 0) { - // that.formData = json.data.tbBillList[0]; - // that.formData.billTypeName = "鍑哄簱鍗�"; - - // that.getScanBarcode(); - // } - // else { - // that.$toast.fail(json.message); - // } - // that.isLoading = false; - // }) - // .catch(function (error) { - // that.isLoading = false; - // that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); - // console.log(error); - // }); - }, getItem() { var that = this; diff --git a/H5/Js/Xcsl.js b/H5/Js/Xcsl.js new file mode 100644 index 0000000..ac17cad --- /dev/null +++ b/H5/Js/Xcsl.js @@ -0,0 +1,279 @@ +锘縱ar vm = new Vue({ + el: '#app', + data: function () { + return { + isLoading: false, + userInfo: { + "loginGuid": '', + "loginAccount": '', + }, + Bar: "",//绠辨潯鐮� + UserName: Cookies.get('loginName'),//鐢ㄦ埛鍚嶇О + KbBarInfo: [], + KbBarMxInfo: [], + GX: "G007:鏍稿閫佹", + Xvalue:4, + XbarInfo: [], + DAA001: [], + DAANum: "", + ItemDetail: [], + } + }, + mounted() { + var that = this; + this.userInfo = { + loginGuid: this.GetLoginInfor().loginGuid, + loginAccount: this.GetLoginInfor().loginAccount, + }; + }, + methods: { + getKbBarInfo() { + var that = this; + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/getKbBarInfo', { + Xt: that.GX, + Kbbarcode: that.KbBar + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.KbBarInfo = json.data.tbBillList.kbBarInfo[0]; + that.DAA001 = that.KbBarInfo.daA001; + that.KbBarMxInfo = json.data.tbBillList.kbBarMxInfo; + that.$refs.XBar.focus(); + that.XbarInfo = []; + that.XBar = ""; + } + else { + that.$toast.fail(json.message); + that.$refs.KbBar.focus(); + that.KbBar = ""; + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$refs.KbBar.focus(); + that.KbBar = ""; + }); + }, + getXBarInfo() { + var that = this; + if (that.KbBar.length <= 0) { + that.$toast.fail("鍗℃澘鏉$爜涓嶈兘涓虹┖锛�"); + that.$refs.KbBar.focus(); + that.XBar = ""; + return; + } + + if (that.DAA001.length <= 0) { + that.$toast.fail("鎸囦护宸ュ崟涓嶈兘涓虹┖锛�"); + that.$refs.KbBar.focus(); + that.XBar = ""; + return; + } + + // 妫�鏌ユ槸鍚﹁秴杩囪绠辨暟 + if (that.XbarInfo.length >= that.Xvalue) { + that.$toast.fail(`宸茶揪鍒拌绠辨暟闄愬埗(${that.Xvalue})`); + that.XBar = ""; + return; + } + + // 妫�鏌ユ潯鐮佹槸鍚﹀凡瀛樺湪 + const isExist = that.XbarInfo.some(item => item.iteM_BARCODE === that.XBar); + if (isExist) { + that.$toast.fail("璇ョ鏉$爜宸插瓨鍦紝璇峰嬁閲嶅鎵弿"); + that.XBar = ""; + return; + } + + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/getXBarInfo', { + Kbbarcode: that.KbBar, + DAA001: that.DAA001, + Xbarcode: that.XBar + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.XbarInfo.push(json.data.tbBillList.xBarInfo[0]); + that.$refs.XBar.focus(); + that.XBar = ""; + } + else { + that.$toast.fail(json.message); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + }); + }, + + + productBinding() { + var that = this; + if (that.ZsBar.length <= 0) { + that.$toast.fail("杩芥函鐮佷笉鑳戒负绌猴紒"); + return; + } + if (that.LsBar.length <= 0) { + that.$toast.fail("鍚庣洊鐮佷笉鑳戒负绌猴紒"); + return; + } + + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/ProductBinding', { + ZsBar: that.ZsBar, + LsBar: that.LsBar, + userName: that.userInfo.loginAccount, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + // that.scanInfo = json.data.tbBillList; + that.$notify({ type: 'success', message: json.message }); + that.$refs.ZsBar.focus(); + that.ZsBar = null; + that.ZsBar = null; + } + else { + that.$toast.fail(json.message); + that.$refs.ZsBar.focus(); + that.ZsBar = null; + that.ZsBar = null; + } + + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$refs.ZsBar.focus(); + that.ZsBar = null; + that.ZsBar = null; + }); + }, + //鎵撳嵃鏈烘敞閲� + //selectPrinter(printer) { + // this.selectedPrinter = printer.printerId; // 鏇存柊閫変腑鐨勬墦鍗版満缂栧彿 + //}, + //confirmSelection() { + // if (this.selectedPrinter) { + // alert(`鎮ㄩ�夋嫨浜嗘墦鍗版満锛�${this.selectedPrinter}`); + // // 鍦ㄨ繖閲屽鐞嗛�夋嫨缁撴灉锛屼緥濡傝皟鐢ㄦ帴鍙f垨鏇存柊鐘舵�� + // this.isPrinterPopupVisible = false; // 鍏抽棴寮圭獥 + // } else { + // alert('璇烽�夋嫨涓�涓墦鍗版満锛�'); + // } + //}, + //onPrinterSelected(value) { + // console.log('褰撳墠閫変腑鐨勬墦鍗版満缂栧彿:', value); + //}, + checkProductBarcode() { + var that = this; + if (!that.LsBar) { + that.$toast.fail("璇疯緭鍏ヤ骇鍝佹潯鐮�"); + return; + } + + // 鍦╔barInfo涓煡鎵惧尮閰嶇殑鏉$爜 + const matchedItem = that.XbarInfo.find(item => + item.iteM_BARCODE === that.LsBar + ); + + if (matchedItem) { + if (matchedItem.is_hedui === "1") { + that.$toast("宸叉牳瀵�"); + } else { + that.$set(matchedItem, 'is_hedui', "1"); + that.$notify({ type: 'success', message: "鏍稿鎴愬姛" }); + that.LsBar = ""; + // 妫�鏌ユ槸鍚︽墍鏈夎閮藉凡鏍稿 + const allChecked = that.XbarInfo.every(item => item.is_hedui === "1"); + if (allChecked && that.XbarInfo.length > 0) { + that.submitAllChecked(); + } + } + } else { + that.$toast.fail("鏈壘鍒板尮閰嶇殑绠辨潯鐮�"); + } + + that.LsBar = ""; // 娓呯┖杈撳叆妗� + }, + + // 鏂板鏂规硶锛氭彁浜ゆ墍鏈夊凡鏍稿鐨勬暟鎹� + submitAllChecked() { + var that = this; + that.isLoading = true; + + that.AxiosHttp("post", 'Womdaa/submitAllChecked', { + XbarInfo: that.XbarInfo, + KbBar: that.KbBar, + userName: that.userInfo.loginAccount + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.$notify({ type: 'success', message: json.message }); + that.getKbBarInfo(); + } else { + that.$toast.fail(json.message); + that.XbarInfo = []; + that.XBar = ""; + that.LsBar = ""; + that.$refs.XBar.focus(); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缁戝畾澶辫触锛岃閲嶈瘯锛�"); + }); + }, + handleSubmit() { + var that = this; + if (!that.KbBar) { + that.$toast.fail("璇峰厛鎵弿鍗℃澘鏉$爜"); + return; + } + + // 璁$畻鍙鏁板拰宸茶鏁� + const oldqty = +(that.KbBarInfo.oldqty || 0); + const ySum = +(that.KbBarInfo.ySum || 0); + + if (oldqty !== ySum) { + that.$toast.fail(`瑁呮澘鏈畬鎴愶紝寰呰鏁帮細${oldqty - ySum}`); + return; + } + + that.isLoading = true; + that.AxiosHttp("post", 'Womdaa/submitInspection', { + KbBar: that.KbBar, + userAccount: that.userInfo.loginAccount + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.$notify({ type: 'success', message: json.tbBillList.message }); + // 娓呯┖鏁版嵁 + that.KbBar = ""; + that.XbarInfo = []; + that.KbBarInfo = []; + that.$refs.KbBar.focus(); + } else { + that.$toast.fail(json.message); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("鎻愪氦澶辫触锛岃閲嶈瘯锛�"); + that.$refs.KbBar.focus(); + }); + }, + } +}) \ No newline at end of file diff --git a/H5/PurchaseReturn.aspx b/H5/PurchaseReturn.aspx index 95949f8..85a8002 100644 --- a/H5/PurchaseReturn.aspx +++ b/H5/PurchaseReturn.aspx @@ -55,7 +55,7 @@ </van-cell-group> </div> <van-tabs color="#000" title-active-color="#0283EF"> - <van-tab title="寰呭彂鐗╂枡" class="mySolid font"> + <van-tab title="寰呮壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> @@ -75,7 +75,7 @@ </van-row> </van-tab> - <van-tab title="宸查鐗╂枡" class="mySolid font"> + <van-tab title="宸叉壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> diff --git a/H5/Scbl.aspx b/H5/Scbl.aspx index 3fdc10b..2c6bbbd 100644 --- a/H5/Scbl.aspx +++ b/H5/Scbl.aspx @@ -71,7 +71,7 @@ </van-cell-group> <van-tabs color="#000" title-active-color="#0283EF"> - <van-tab title="寰呭彂鐗╂枡" class="mySolid font"> + <van-tab title="寰呮壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> @@ -91,7 +91,7 @@ </van-row> </van-tab> - <van-tab title="宸查鐗╂枡" class="mySolid font"> + <van-tab title="宸叉壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> diff --git a/H5/Scll.aspx b/H5/Scll.aspx index 15f4ce2..8579263 100644 --- a/H5/Scll.aspx +++ b/H5/Scll.aspx @@ -77,7 +77,7 @@ </div> <van-tabs color="#000" title-active-color="#0283EF"> - <van-tab title="寰呭彂鐗╂枡" class="mySolid font"> + <van-tab title="寰呮壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> @@ -97,7 +97,7 @@ </van-row> </van-tab> - <van-tab title="宸查鐗╂枡" class="mySolid font"> + <van-tab title="宸叉壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> diff --git a/H5/Sctl.aspx b/H5/Sctl.aspx index d066c82..9dec108 100644 --- a/H5/Sctl.aspx +++ b/H5/Sctl.aspx @@ -82,7 +82,7 @@ </van-tabs>--%> <van-tabs color="#000" title-active-color="#0283EF"> - <van-tab title="寰呭叆鐗╂枡" class="mySolid font"> + <van-tab title="寰呮壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> @@ -102,7 +102,7 @@ <%--<van-col span="4">{{itm.recoKw}}</van-col>--%> </van-row> </van-tab> - <van-tab title="宸插叆鐗╂枡" class="mySolid font"> + <van-tab title="宸叉壂鐗╂枡" class="mySolid font"> <van-row> <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> diff --git a/H5/Xcsl.aspx b/H5/Xcsl.aspx new file mode 100644 index 0000000..1069911 --- /dev/null +++ b/H5/Xcsl.aspx @@ -0,0 +1,171 @@ +锘�<%@ Page Title="鐜板満鏀舵枡" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Xcsl.aspx.cs" Inherits="H5_Cpdbsj" %> +<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> + <style> + .si-status-box, + .si-status__left + { + background-color: transparent !important; /* 閫忔槑鑳屾櫙 */ + border: 1px solid #000 !important; /* 榛戣壊澶栨 */ + color: #000 !important; /* 鍏ㄥ眬鏂囧瓧棰滆壊 */ + height: 0.5rem; + } + + .si-status__left::after { + content: none !important; + } + + .si-status__label, + .si-status__right { + font-size: 0.33rem !important; /* 缁熶竴瀛椾綋澶у皬 */ + color: inherit !important; /* 缁ф壙鐖剁骇鏂囧瓧棰滆壊 */ + } + + + /* 灞呬腑鏍稿績鏍峰紡 */ +.centered-stepper-field { + .stepper-container { + display: flex; + justify-content: center; /* 姘村钩灞呬腑 */ + width: 100%; + } + + /* 璋冩暣姝ヨ繘鍣ㄦ寜閽棿璺� */ + .van-stepper__minus { + margin-right: 12px; + } + .van-stepper__plus { + margin-left: 12px; + } +} + + /* 鏂板鏍峰紡 */ + .button-container { + display: flex; + width: 100%; + gap: 12px; /* 鎸夐挳闂磋窛 */ + padding: 0 16px; /* 宸﹀彸鐣欑櫧 */ + box-sizing: border-box; + } + + .action-button { + flex: 1; /* 绛夊垎鍓╀綑绌洪棿 */ + min-width: 0; /* 闃叉鍐呭婧㈠嚭 */ + } +</style> +</asp:Content> + +<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <div class="content-wrapper"> + <van-nav-bar + title="鐜板満鏀舵枡" + left-text="杩斿洖" + left-arrow + @click-left="GoBack()"> + </van-nav-bar> + + <div class="mySolid"> + <van-cell-group> + <van-field + ref="DAA001" + v-model="DAA001" + label="鎸囦护宸ュ崟" + placeholder="鎸囦护宸ュ崟" + autofocus="true" + readonly + > + </van-field> + + <van-field + v-model="DAANum" + label="宸ュ崟鏁伴噺" + placeholder="宸ュ崟鏁伴噺" + autofocus="true" + readonly> + </van-field> + + <van-field + ref="Bar" + v-model="Bar" + label="绠辨潯鐮�" + placeholder="璇锋壂澶栫鐮�" + @keyup.enter.native="getXBarInfo" + autofocus="true"> + </van-field> + + </van-cell-group> + </div> + + <van-tabs color="#000" title-active-color="#0283EF"> + <van-tab title="鏉愭枡鍒楄〃" class="mySolid font"> + <van-row> + <van-col span="8" class="text-left padding-left">鐗╂枡</van-col> + <van-col span="8" class="text-left padding-left">瑙勬牸</van-col> + <van-col span="4">澶囨枡鏁�</van-col> + <van-col span="4">鎺ユ敹鏁�</van-col> + </van-row> + <van-row v-for="(itm,index) in ItemDetail.items" :key="index"> + <van-col span="8" class="text-left padding-left"> + <div class="blue-text">{{itm.itemNo}}</div> + <div>{{itm.itemName}}</div> + </van-col> + <van-col span="8" class="text-left padding-left"> + <div>{{itm.itemModel}}</div> + </van-col> + <van-col span="4" class="blue-text">{{itm.dsQty}}</van-col> + <van-col span="4" class="blue-text">{{itm.dsQty}}</van-col> + </van-row> + </van-tab> + <van-tab title="鏈帴鏀跺垪琛�" class="mySolid font"> + <van-row> + <van-col span="7" class="text-left padding-left">鏉$爜</van-col> + <van-col span="7" class="text-left padding-left">鐗╂枡</van-col> + <van-col span="7" class="text-left padding-left">瑙勬牸</van-col> + <van-col span="3" >鏁伴噺</van-col> + </van-row> + <van-row + v-for="(itm,index) in XbarInfo" + :key="index" + :style="{ background: itm.is_hedui === '1' ? '#e8f5e9 !important' : 'transparent' }"> + <van-col span="7" class="text-left padding-left">{{itm.iteM_BARCODE}}</van-col> + <van-col span="7" class="text-left padding-left"> + <div class="blue-text">{{itm.item_no}}</div> + <div>{{itm.item_name}}</div> + </van-col> + <van-col span="7" class="text-left padding-left"> + <div>{{itm.item_model}}</div> + </van-col> + <van-col span="3" class="blue-text">{{itm.quantity}}</van-col> + </van-row> + </van-tab> + + <van-tab title="宸叉帴鏀跺垪琛�" class="mySolid font"> + <van-row> + <van-col span="7" class="text-left padding-left">鏉$爜</van-col> + <van-col span="7" class="text-left padding-left">鐗╂枡</van-col> + <van-col span="7" class="text-left padding-left">瑙勬牸</van-col> + <van-col span="3" >鏁伴噺</van-col> + </van-row> + <van-row v-for="(itm,index) in KbBarMxInfo" :key="index"> + <van-col span="7" class="text-left padding-left" >{{itm.iteM_BARCODE}}</van-col> + <van-col span="7" class="text-left padding-left"> + <div class="blue-text">{{itm.item_no}}</div> + <div>{{itm.item_name}}</div> + </van-col> + <van-col span="7" class="text-left padding-left"> + <div>{{itm.item_model}}</div> + </van-col> + + <van-col span="3" class="blue-text">{{itm.quantity}}</van-col> + </van-row> + </van-tab> + </van-tabs> + </div> +</asp:Content> + +<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"> + <comloading v-if="isLoading"></comloading> +</asp:Content> + +<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> + <script src="Js/Xcsl.js?<%=1 %>"></script> +</asp:Content> \ No newline at end of file diff --git a/H5/Xcsl.aspx.cs b/H5/Xcsl.aspx.cs new file mode 100644 index 0000000..c84ddf3 --- /dev/null +++ b/H5/Xcsl.aspx.cs @@ -0,0 +1,14 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +public partial class H5_Cpdbsj : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} \ No newline at end of file -- Gitblit v1.9.3