From 6b2633d1df4d4e84ee5c86aecf3522d22d01adf3 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期二, 27 五月 2025 08:21:18 +0800 Subject: [PATCH] 1.期初打印 --- H5/QcPrint.aspx.cs | 14 ++ H5/QcPrint.aspx | 107 +++++++++++++++++++++ H5/Js/QcPrint.js | 147 +++++++++++++++++++++++++++++ 3 files changed, 268 insertions(+), 0 deletions(-) diff --git a/H5/Js/QcPrint.js b/H5/Js/QcPrint.js new file mode 100644 index 0000000..8c05ddd --- /dev/null +++ b/H5/Js/QcPrint.js @@ -0,0 +1,147 @@ +锘縱ar vm = new Vue({ + el: '#app', + data: function () { + return { + isLoading: false, + userInfo: { + "loginGuid": '', + "loginAccount": '', + }, + num:"", + sectionCode:"", + selectKey: "", + barcode:"", + ItemBlDetail:[], + modeInfo: [], + active: 0, + show: false, + actions: [], + barInfo: [], + depotsInfo: "",//浠撳簱淇℃伅 + orgInfo: "",//缁勭粐淇℃伅 + orgID: "",//缁勭粐id + itemInfo: [],//鎬荤墿鏂欎俊鎭� + itemNo:"",//閫変腑鐗╂枡缂栫爜 + printItemInfo: [],//閫変腑鐗╂枡淇℃伅 + + } + }, + mounted() { + var that = this; + this.userInfo = { + loginGuid: this.GetLoginInfor().loginGuid, + loginAccount: this.GetLoginInfor().loginAccount, + }; + }, + methods: { + getInfo() { + this.show = true; + + var that = this; + + if (!that.sectionCode) { + this.$toast.fail("搴撲綅缂栫爜涓嶈兘涓虹┖"); + that.isLoading = false; + return; + } + + that.isLoading = true; + that.AxiosHttp("post", 'Inventory/GetItemsList', { + selectKey: that.selectKey, + orgId: that.orgID, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + + if (json.data.tbBillList.length <= 0) { + that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�"); + } else { + that.itemInfo = json.data.tbBillList; + that.actions = json.data.tbBillList.map(item => { + return { + name: item.wlInfo // 鎷兼帴瀛楁 + + }; + }); + } + } + else { + that.$toast.fail(json.message); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + }); + }, + onSelect(item) { + // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧� + // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧� + this.show = false; + + if (item.name.includes('---')) { + this.itemNo = item.name.split('---')[0]; + } else { + // 澶勭悊娌℃湁鍒嗛殧绗︾殑鎯呭喌锛屾瘮濡傝缃负绌烘垨鑰呭師瀛楃涓� + this.itemNo = item.name; // 鎴栬�� '' + } + this.GetMesItemByItemNo(); + //this.$toast(item.name); + + }, + GetMesItemByItemNo() { + var that = this; + // 鑾峰彇鍖归厤缁撴灉鏁扮粍 + const filtered = that.itemInfo.filter(item => + item.item_no === that.itemNo + ); + + if (filtered.length === 0) { + that.$toast.fail('娌℃湁鎵惧埌鍖归厤鐨勭墿鏂欎俊鎭�'); + that.printItemInfo = {}; // 娓呯┖鏁版嵁 + } else { + // 鍙栫涓�涓尮閰嶉」璧嬪�肩粰瀵硅薄 + that.printItemInfo = filtered[0]; + //console.log('灞曠ず鏁版嵁锛�', that.printItemInfo); + that.$refs.num.focus(); + } + }, + getSectionCode() { + var that = this; + + if (!that.sectionCode) { + this.$toast.fail("搴撲綅缂栫爜涓嶈兘涓虹┖"); + that.isLoading = false; + return; + } + // 妫�鏌ュ璞℃槸鍚﹀寘鍚湁鏁堟暟鎹� + if (!that.printItemInfo || !that.printItemInfo.item_no) { + that.$toast.fail("璇峰厛閫夋嫨鏈夋晥鐗╂枡淇℃伅"); + that.isLoading = false; + return; + } + + that.AxiosHttp("post", 'Inventory/GetDepoptsInfo', { + sectionCode: that.sectionCode + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + + } + else { + + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + }); + }, + } +}) \ No newline at end of file diff --git a/H5/QcPrint.aspx b/H5/QcPrint.aspx new file mode 100644 index 0000000..f8322b9 --- /dev/null +++ b/H5/QcPrint.aspx @@ -0,0 +1,107 @@ +锘�<%@ Page Title="" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" %> + +<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> + <style> + .bg-info { + background-color: #fff; + } + </style> +</asp:Content> +<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> + <van-nav-bar + title="鏈熷垵鎵撳嵃" + left-text="杩斿洖" + left-arrow + @click-left="GoBack()" + ></van-nav-bar> + <div> + <van-cell-group> + + <van-field + ref="sectionCode" + value="" + label="搴撲綅缂栫爜" + clearable + v-model="sectionCode" + @keyup.enter.native="getSectionCode" + <%--@change="getSectionCode"--%> + :right-icon-size="19" + placeholder="搴撲綅缂栫爜" +<%-- v-focus.noKeyboard--%> + ></van-field> + <van-field + ref="depotsInfo" + v-model="depotsInfo" + value="" + label="浠撳簱鍚嶇О" + clearable + placeholder="浠撳簱鍚嶇О" + :right-icon-size="19" + disabled + ></van-field> + <van-field + ref="orgInfo" + v-model="orgInfo" + value="" + label="搴撳瓨缁勭粐" + clearable + placeholder="搴撳瓨缁勭粐" + :right-icon-size="19" + disabled + ></van-field> + + <van-field + ref ="selectKey" + value="" + label="鐗╂枡鏌ヨ" + clearable + placeholder="璇疯緭鍏ョ紪鐮�/鍚嶇О杩涜鏌ヨ" + :right-icon-size="19" + v-model="selectKey" + @keyup.enter.native="GetMesItemBlDetailByBillNo" + ><template #button> + <van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button> + </template></van-field> + + <van-field + value="" + v-model="printItemInfo.item_no" + label="鐗╂枡缂栫爜" + placeholder="" + disabled + ></van-field> + <van-field + value="" + v-model="printItemInfo.item_name" + label="鐗╂枡鍚嶇О" + placeholder="" + disabled + ></van-field> + <van-field + value="" + v-model="printItemInfo.item_model" + label="鐗╂枡瑙勬牸" + placeholder="" + disabled + ></van-field> + <van-field + ref ="num" + value="" + v-model="num" + label="鏁伴噺" + placeholder="鏁伴噺" + ></van-field> +</van-cell-group> + </div> + + <van-button type="primary" @click="16718-00000B2025051690001" >纭鎵撳嵃</van-button> + <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet> + +</asp:Content> +<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"> + <comloading v-if="isLoading"></comloading> + <%--<comback ></comback>--%> +</asp:Content> +<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> + <script src="Js/QcPrint.js?<%=11111 %>"></script> +</asp:Content> diff --git a/H5/QcPrint.aspx.cs b/H5/QcPrint.aspx.cs new file mode 100644 index 0000000..0bbf74c --- /dev/null +++ b/H5/QcPrint.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_Scbl : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} \ No newline at end of file -- Gitblit v1.9.3