From 798fa392bf543858979a9f3943190ea2c0fe72e4 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期五, 19 九月 2025 23:14:58 +0800 Subject: [PATCH] 1.其他出库优化 2.销售出库优化 3.委外领料申请(未完成) 4.采购退货优化 5.物料分区 --- H5/Wwck.aspx | 187 ++++++++++++++++++++ H5/Js/Xsck.js | 5 H5/Scll.aspx | 20 + H5/Js/Qtck.js | 4 H5/PurchaseReturn.aspx | 2 H5/Js/Wwck.js | 273 ++++++++++++++++++++++++++++++ H5/Qtck.aspx | 2 H5/Xsck.aspx | 2 H5/Wwck.aspx.cs | 14 + 9 files changed, 498 insertions(+), 11 deletions(-) diff --git a/H5/Js/Qtck.js b/H5/Js/Qtck.js index 0c92e46..efd7180 100644 --- a/H5/Js/Qtck.js +++ b/H5/Js/Qtck.js @@ -147,6 +147,10 @@ //that.ItemBlDetail = json.data.tbBillList; that.$refs.barcode.focus(); that.barcode = ""; + + // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵�� + that.currentIndex = -1; + that.ItemBarKw = []; } else { that.$toast.fail(json.message); diff --git a/H5/Js/Wwck.js b/H5/Js/Wwck.js new file mode 100644 index 0000000..dc630b0 --- /dev/null +++ b/H5/Js/Wwck.js @@ -0,0 +1,273 @@ +锘縱ar vm = new Vue({ + el: '#app', + data: function () { + return { + isLoading: false, + userInfo: { + "loginGuid": '', + "loginAccount": '', + }, + modeInfo: { daa001: "", planNo: "" }, + scanInfo: { barcodeNum: "", splitNum: "", barcode: "" }, + ItemDetail: [], + ip: "", + port: "", + oldBarInfo: [], + cfBarInfo: [], + selectKey: "",//鏌ヨ鍏抽敭瀛� + actions: [],//鍒楄〃鐨勫�� + show: false,//鍒楄〃灞曠ず + // 褰撳墠閫変腑琛岀殑绱㈠紩 + currentIndex: -1, + // 瀛樺偍閫変腑琛屾暟鎹璞� + selItem: {}, + ItemBarKw: [],//褰撳ぉ琛岀浉鍏虫潯鐮佸簱浣嶄俊鎭� + DaaInfo: {}, + } + }, + mounted() { + var that = this; + this.userInfo = { + loginGuid: this.GetLoginInfor().loginGuid, + loginAccount: this.GetLoginInfor().loginAccount, + }; + }, + methods: { + /** + * 澶勭悊琛岀偣鍑讳簨浠讹紙鍗曢�夐�昏緫锛� + * @param {Object} item 褰撳墠琛屾暟鎹� + * @param {Number} index 褰撳墠琛岀储寮� + */ + 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() { + //Womdaa + //WwGd + 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 = []; + }); + }, + + getModel() { + var that = this; + that.isLoading = true; + that.AxiosHttp("post", 'WwGd/GetItemsByDaa001', { + daa001: that.modeInfo.daa001, + userName: that.userInfo.loginAccount + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.ItemDetail = json.data.tbBillList; + that.DaaInfo = json.data.tbBillList.daaInfo; + that.modeInfo.planNo = json.data.tbBillList.planNo; + that.modeInfo.startTime = json.data.tbBillList.startTime; + that.$refs.barcode.focus(); + } + else { + that.$toast.fail(json.message); + that.$playSound('error'); + that.$refs.daa001.focus(); + that.modeInfo.daa001 = ""; + that.modeInfo.planNo = ""; + that.modeInfo.startTime = ""; + that.ItemDetail = []; + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + that.$refs.daa001.focus(); + that.modeInfo.daa001 = ""; + }); + }, + //鎵爜 + getScan() { + var that = this; + if (that.modeInfo.daa001.length <= 0) { + that.$toast.fail("濮斿宸ュ崟涓嶈兘涓虹┖锛�"); + return; + } + that.isLoading = true; + that.AxiosHttp("post", 'WwGd/ScanCode', { + daa001: that.modeInfo.daa001, + userName: that.userInfo.loginAccount, + barcode: that.scanInfo.barcode, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + // that.scanInfo = json.data.tbBillList; + that.$notify({ type: 'success', message: json.message }); + that.getModel(); + that.$refs.barcode.focus(); + that.scanInfo.barcode = null; + } + else if (json.status == 2) { + that.$refs.splitNum.focus(); + that.scanInfo.splitNum = json.data.tbBillList.splitNum; + that.scanInfo.barcodeNum = json.data.tbBillList.barcodeNum; + } + else { + that.$toast.fail(json.message); + that.$refs.barcode.focus(); + } + //that.$notify({ type: 'success', message: json.message }); + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + that.$refs.barcode.focus(); + }); + }, + //鎷嗗垎 + getChaiFen() { + var that = this; + if (that.modeInfo.daa001.length <= 0) { + that.$toast.fail("濮斿宸ュ崟鍙蜂笉鑳戒负绌猴紒"); + return; + } + if (that.scanInfo.splitNum * 1 <= 0) { + that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�"); + return; + } + if (that.scanInfo.barcode.length * 1 <= 0) { + that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�"); + return; + } + that.isLoading = true; + that.AxiosHttp("post", 'WwGd/ScanCodeCF', { + daa001: that.modeInfo.daa001, + userName: that.userInfo.loginAccount, + barcode: that.scanInfo.barcode, + Num: that.scanInfo.splitNum, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + // that.modeInfo = json.data.tbBillList; + that.$notify({ type: 'success', message: json.message }); + that.getModel(); + that.$refs.barcode.focus(); + that.scanInfo.barcode = null; + that.scanInfo.barcodeNum = ""; + that.scanInfo.splitNum = ""; + } + else { + that.$toast.fail(json.message); + that.$refs.splitNum.focus(); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + that.$refs.splitNum.focus(); + }); + }, + //鑾峰彇宸ュ崟淇℃伅 + getInfo() { + this.show = true; + var that = this; + that.actions = []; + that.isLoading = true; + that.AxiosHttp("post", 'WwGd/GetWWCKsq', {//WwGd/GetXcslDaa + type: '濮斿棰嗘枡', + selectKey: that.selectKey, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + + if (json.data.tbBillList.length <= 0) { + that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�"); + that.$playSound('error'); + } else { + that.itemInfo = json.data.tbBillList; + that.actions = json.data.tbBillList.map(item => { + return { + name: item.daaInfo, // 鎷兼帴瀛楁 + subname: item.startTime + }; + }); + } + } + else { + that.$toast.fail(json.message); + that.$playSound('error'); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + that.$playSound('error'); + console.log(error); + }); + }, + onSelect(item) { + // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧� + // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧� + this.show = false; + console.log(item); + // 姝e垯鍖归厤绗竴涓柟鎷彿鍐呭 + const regex = /\[([^\]]+)\]/; + const matchResult = item.name.match(regex); + + if (matchResult && matchResult[1]) { + this.modeInfo.daa001 = matchResult[1]; // PPBOM00000088-1 + console.log('鎻愬彇鐨凞AA001:', this.modeInfo.daa001); + } else { + this.$toast.fail('宸ュ崟鍙锋牸寮忓紓甯�'); + this.modeInfo.daa001 = ''; + } + this.getModel(); + //this.$toast(item.name); + }, + } +}) \ No newline at end of file diff --git a/H5/Js/Xsck.js b/H5/Js/Xsck.js index 2f6ba4c..746bf53 100644 --- a/H5/Js/Xsck.js +++ b/H5/Js/Xsck.js @@ -150,6 +150,9 @@ that.zdy = json.data.tbBillList.allList[0].createNmae; //that.daa001 = json.data.tbBillList.item1; that.$refs.barcode.focus(); + // 閲嶇疆鎵�鏈夎鐨勯�変腑鐘舵�� + that.currentIndex = -1; + that.ItemBarKw = []; } else { that.$toast.fail(json.message); @@ -303,6 +306,8 @@ if (json.status == 0) { that.ItemBlDetail = json.data.pendingList; that.$notify({ type: 'success', message: '鎵弿鎴愬姛' }); + that.$playSound('success'); + that.sendPrintMessage(json.data.tbBillList); that.$refs.barcode.focus(); that.barcode = ""; that.num = ""; diff --git a/H5/PurchaseReturn.aspx b/H5/PurchaseReturn.aspx index 92dbe7d..6864642 100644 --- a/H5/PurchaseReturn.aspx +++ b/H5/PurchaseReturn.aspx @@ -153,5 +153,5 @@ <%--<comback ></comback>--%> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> - <script src="Js/PurchaseReturn.js?<%=1281111233 %>"></script> + <script src="Js/PurchaseReturn.js?<%=1281111234 %>"></script> </asp:Content> diff --git a/H5/Qtck.aspx b/H5/Qtck.aspx index b450565..22285e0 100644 --- a/H5/Qtck.aspx +++ b/H5/Qtck.aspx @@ -165,5 +165,5 @@ <%--<comback ></comback>--%> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> - <script src="Js/Qtck.js?<%=111307 %>"></script> + <script src="Js/Qtck.js?<%=111309 %>"></script> </asp:Content> diff --git a/H5/Scll.aspx b/H5/Scll.aspx index 92ce845..deec20f 100644 --- a/H5/Scll.aspx +++ b/H5/Scll.aspx @@ -121,8 +121,9 @@ <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="6" class="text-left padding-left">鐗╂枡</van-col> + <van-col span="6" class="text-left padding-left">瑙勬牸</van-col> + <van-col span="4">鍒嗗尯</van-col> <van-col span="3">寰呮壂</van-col> <van-col span="5">鎺ㄨ崘搴撲綅</van-col> </van-row> @@ -131,13 +132,14 @@ :key="index" :style="{ background: currentIndex === index ? '#87CEEB' : '' }" @click.native="handleRowClick(itm, index)"> - <van-col span="8" class="text-left padding-left"> + <van-col span="6" 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"> + <van-col span="6" class="text-left padding-left"> <div>{{itm.itemModel}}</div> </van-col> + <van-col span="4">{{itm.wlfq}}</van-col> <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col> <van-col span="5">{{itm.recoKw}}</van-col> </van-col> @@ -165,19 +167,21 @@ <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="6" class="text-left padding-left">鐗╂枡</van-col> + <van-col span="6" class="text-left padding-left">瑙勬牸</van-col> + <van-col span="4">鍒嗗尯</van-col> <van-col span="3">闇�棰嗘暟</van-col> <van-col span="5">宸查鏁�</van-col> </van-row> <van-row v-for="(itm,index) in ItemDetail.ysitems" :key="index"> - <van-col span="8" class="text-left padding-left"> + <van-col span="6" 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"> + <van-col span="6" class="text-left padding-left"> <div>{{itm.itemModel}}</div> </van-col> + <van-col span="4">{{itm.wlfq}}</van-col> <van-col span="3">{{itm.fQty}}</van-col> <van-col span="5" class="blue-text">{{itm.sQty}}</van-col> </van-row> diff --git a/H5/Wwck.aspx b/H5/Wwck.aspx new file mode 100644 index 0000000..de103c3 --- /dev/null +++ b/H5/Wwck.aspx @@ -0,0 +1,187 @@ +锘�<%@ Page Title="濮斿鍑哄簱" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" %> +<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> + <style> + .bg-info { + background-color:#fff; + } + .org-info { + height: 0.5rem; + line-height: 0.5rem; + padding: 0 0.16rem; + } +</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="杩斿洖" + left-arrow + @click-left="GoBack()" +></van-nav-bar> + + <div class="mySolid"> + <van-cell-group> + + <van-field + ref ="selectKey" + value="" + label="鐢宠鍗曞彿" + clearable + placeholder="璇烽�夋嫨鐢宠鍗曞彿" + :right-icon-size="19" + v-model="selectKey" + ><template #button> + <van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button> + </template></van-field> + + <van-field + ref="daa001" + v-model="modeInfo.daa001" + label="濮斿宸ュ崟" + clearable + placeholder="璇锋壂鐮�" + :right-icon-size="19" + v-focus.noKeyboard + @keyup.enter.native="getModel" + autofocus="true" + ></van-field> + <van-field + v-model="modeInfo.planNo" + label="浠诲姟鍗曞彿" + clearable + :right-icon-size="19" + placeholder="浠诲姟鍗曞彿" + disabled +></van-field> + +<%-- <van-field + v-model="DaaInfo.startTime" + label="寮�宸ユ椂闂�" + clearable + :right-icon-size="19" + placeholder="寮�宸ユ椂闂�" + disabled> + </van-field> + + <van-field + v-model="DaaInfo.lineName" + label="绾夸綋鍚嶇О" + clearable + :right-icon-size="19" + placeholder="绾夸綋鍚嶇О" + disabled> + </van-field>--%> + + <van-field + ref="barcode" + v-model="scanInfo.barcode" + label="鐗╂枡鏉$爜" + clearable + placeholder="璇锋壂鐮�" + :right-icon-size="19" + v-focus.noKeyboard + @keyup.enter.native="getScan" +></van-field> + <van-field + v-model="scanInfo.barcodeNum" + label="鏉$爜鏁伴噺" + placeholder="鏉$爜鏁伴噺" + disabled +></van-field> + <van-field + ref="splitNum" + v-model="scanInfo.splitNum" + center + clearable + label="鍙戞枡鏁伴噺" + placeholder="鍙戞枡鏁伴噺" + > + <van-button slot="button" type="info" size="small" plain @click="getChaiFen">鏉$爜鎷嗗垎</van-button> + </van-field> +</van-cell-group> + </div> + + <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet> + + <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="3">寰呮壂</van-col> + <van-col span="5">鎺ㄨ崘搴撲綅</van-col> + </van-row> + <!-- 澧炲姞琛岀偣鍑讳笌閫変腑楂樹寒 --> + <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> + </van-col> + <van-col span="8" class="text-left padding-left"> + <div>{{itm.itemModel}}</div> + </van-col> + <van-col span="3" class="blue-text">{{itm.dsQty}}</van-col> + <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> + <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="3">闇�棰嗘暟</van-col> + <van-col span="5">宸查鏁�</van-col> + </van-row> + <van-row v-for="(itm,index) in ItemDetail.ysitems" :key="index"><%--ItemBlDetail.ysitems--%> + <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="3">{{itm.fQty}}</van-col> + <van-col span="5" class="blue-text">{{itm.sQty}}</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/Wwck.js?<%=101 %>"></script> +</asp:Content> diff --git a/H5/Wwck.aspx.cs b/H5/Wwck.aspx.cs new file mode 100644 index 0000000..f11cc1f --- /dev/null +++ b/H5/Wwck.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_Scll : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} \ No newline at end of file diff --git a/H5/Xsck.aspx b/H5/Xsck.aspx index 5a7f560..94a5444 100644 --- a/H5/Xsck.aspx +++ b/H5/Xsck.aspx @@ -151,5 +151,5 @@ <%--<comback ></comback>--%> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> - <script src="Js/Xsck.js?<%=12711114 %>"></script> + <script src="Js/Xsck.js?<%=12711115 %>"></script> </asp:Content> -- Gitblit v1.9.3