From 889633898125d8476af87bb5cc246250f02e697f Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期二, 11 二月 2025 09:03:07 +0800 Subject: [PATCH] 1.生产补料,超领优化 2.成品入库界面和初步功能 --- H5/Js/Scbl.js | 23 ++- H5/Js/cprk.js | 263 +++++++++++++++++++++++++++++++++++++ H5/Default.aspx | 4 H5/cprk.aspx | 65 +++++++++ H5/cprk.aspx.cs | 14 ++ H5/Scbl.aspx | 4 6 files changed, 362 insertions(+), 11 deletions(-) diff --git a/H5/Default.aspx b/H5/Default.aspx index b4a6b56..f2ef802 100644 --- a/H5/Default.aspx +++ b/H5/Default.aspx @@ -19,7 +19,7 @@ <template> <van-grid :column-num="3" :border="true"> <van-grid-item v-for="(item1,index1) in itm.child" :key="index1" icon="photo" text="鏍囬" > - <a class="font text-center" :href="item1.path+'?tabIdx='+index"> + <a class="font text-center" :href="item1.path+'&tabIdx='+index"> <img :src="item1.icoimg" alt="" class="img" style=" display:inline-block" /> <span style="display:inline-block"> {{item1.pageView}}</span> </a> @@ -36,5 +36,5 @@ <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" runat="Server"> <script src="/H5/Js/comLoading.js"></script> <script src="Js/comWebNav.js"></script> - <script src="Js/Default.js?<%=12 %>"></script> + <script src="Js/Default.js?<%=121 %>"></script> </asp:Content> diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js index bea1c7a..23ead55 100644 --- a/H5/Js/Scbl.js +++ b/H5/Js/Scbl.js @@ -8,10 +8,12 @@ "loginAccount": '', }, sms: "", - num:"", - billNo:"", + num: "", + type: "", + billNo: "", + selectType: "", daa001: "", - barcode:"", + barcode: "", ItemBlDetail:[], modeInfo: [], active: 0, @@ -25,6 +27,8 @@ loginGuid: this.GetLoginInfor().loginGuid, loginAccount: this.GetLoginInfor().loginAccount, }; + this.type = this.Request("type"); + selectType = this.type == "bl" ? selectType = "鐢熶骇琛ユ枡" : selectType = "鐢熶骇瓒呴"; }, methods: { getInfo() { @@ -32,8 +36,11 @@ var that = this; that.isLoading = true; + + + that.AxiosHttp("post", 'MesItemBl/GetSCBLBillNo', { - type: "鐢熶骇琛ユ枡", + type: selectType, }, false) .then(function (res) { var json = res; @@ -77,7 +84,7 @@ that.isLoading = true; that.AxiosHttp("post", 'MesItemBl/GetMesItemBlDetailByBillNo', { billNo: that.billNo, - type: "鐢熶骇琛ユ枡" + type: selectType }, false) .then(function (res) { var json = res; @@ -132,7 +139,8 @@ userName: that.userInfo.loginAccount, barcode: that.barcode, blNo: that.billNo, - billNo: that.daa001 + billNo: that.daa001, + type: selectType }, false) .then(function (res) { var json = res; @@ -201,7 +209,8 @@ barcode: that.barcode, blNo: that.billNo, billNo: that.daa001, - num: that.sms + num: that.sms, + type: selectType }, false) .then(function (res) { var json = res; diff --git a/H5/Js/cprk.js b/H5/Js/cprk.js new file mode 100644 index 0000000..ef4bcbd --- /dev/null +++ b/H5/Js/cprk.js @@ -0,0 +1,263 @@ +锘縱ar vm = new Vue({ + el: '#app', + data: function () { + return { + isLoading: false, + userInfo: { + "loginGuid": '', + "loginAccount": '', + }, + formData: { + sectionCode: "", + barcode: "", + itemNo: "", + sumQuantity:0 + }, + itemInsFormData: {}, + tableData: [], + itemTableData: [], + barMessage: "", + + Message: "", + messageCenter: {}, + messageId: 0, + + showClearIcon: false, + focus1: true, + focus2: false, + isActive: 0, + index: 0, + currentTab: 0, + contentScrollW: 0, // 瀵艰埅鍖哄搴� + scrollLeft: 0, // 妯悜婊氬姩鏉′綅缃� + fullHeight: "", + } + }, + mounted() { + var that = this; + this.userInfo = { + loginGuid: this.GetLoginInfor().loginGuid, + loginAccount: this.GetLoginInfor().loginAccount, + }; + }, + methods: { + getModel() { + var that = this; + that.isLoading = true; + that.AxiosHttp("post", 'MesDepotSections/GetSectionName', { + sectionCode: that.formData.sectionCode + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + //that.formData.sectionCode = json.data.tbBillList; + that.$refs.barcode.focus(); + } + else { + that.$toast.fail(json.message); + that.formData.sectionCode = null; + that.$refs.sectionCode.focus(); + } + that.isLoading = false; + + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + that.formData.sectionCode = null; + that.$refs.sectionCode.focus(); + }); + }, + getScan() { + var that = this; + + that.isLoading = true; + that.AxiosHttp("post", 'MesInvItemInCDetails/SaveBarCodes', { + sectionCode: that.formData.sectionCode, + userName: that.userInfo.loginAccount, + barcode: that.formData.barcode, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + that.formData.itemNo = json.data.tbBillList.itemNo; + that.formData.sumQuantity = json.data.tbBillList.sumQuantity; + + that.itemInsFormData = json.data.tbBillList.itemIns; + that.itemTableData = json.data.tbBillList.itemInDetails; + that.tableData = json.data.tbBillList.invItemInCDetails; + that.barMessage = json.data.tbBillList.message; + that.$refs.barcode.focus(); + that.formData.barcode = null; + } + else { + that.$toast.fail(json.message); + that.$refs.barcode.focus(); + that.formData.barcode = null; + } + 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", 'Womdaa/ScanCode', { + daa001: that.modeInfo.daa001, + userName: that.userInfo.loginAccount, + barcode: that.modeInfo.barcode, + }, false) + .then(function (res) { + var json = res; + if (json.status == 0) { + // that.modeInfo = json.data.tbBillList; + } + else { + that.$toast.fail(json.message); + } + that.isLoading = false; + }) + .catch(function (error) { + that.isLoading = false; + that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�"); + console.log(error); + }); + }, + cleraCode() { + this.formData.sectionCode = null; + }, + ToErp() { + this.Message = ""; + if (this.tableData.length == 0) { + this.Message = "鏉$爜涓虹┖锛屾棤娉曟帹閫丒RP"; + return; + } + let userName = this.$loginInfo.account; + this.Message = "姝e湪鎺ㄩ�侀噰璐叆搴撳崟[" + this.itemInsFormData.billNo + "]鍒癊RP.... 璇风◢鍚�"; + this.$post({ + url: '/MesInvItemInCDetails/SaveMessageCenter', + data: { + id: this.itemInsFormData.id, + userName: userName, + billNo: this.itemInsFormData.billNo, + type: "A" + } + }).then(res => { + this.messageCenter = res.data.tbBillList; + this.sendPostRequest(this.messageCenter); + }); + }, + + sendPostRequest(e) { + this.$sendPostRequest(e).then(res => { + + //璁板綍涓�涓婱ES鐨勫洖璋� + this.saveMessage("A", { + url: this.$store.state.serverInfo.serverAPI + '/MesInvItemInCDetails/Audit', + data: { billNo: this.itemInsFormData.billNo } + }); + + if (res.state == 200) { + this.Message += " 姝e湪鎵цMES鍥炶皟锛佽绋嶅悗" + //鎵цMES鍥炶皟 + this.audit(); + } else { + this.Message += " ERP杩斿洖淇℃伅锛�" + res.msg; + //鏇存柊鎺ュ彛璁板綍琛� + this.messageCenter.result = 0; + this.messageCenter.dealWith = 0; + this.messageCenter.status = 1; + this.messageCenter.resultData = res.msg; + this.updateMessage(this.messageCenter); + } + }); + }, + //瀹℃牳鐨凪ES鍥炶皟 + audit() { + this.$post({ + url: '/MesInvItemInCDetails/Audit', + data: { + id: this.itemInsFormData.id, + billNo: this.itemInsFormData.billNo + } + }).then(res => { + if (res.data.tbBillList) { + this.Message += " 瀹℃牳鎴愬姛锛�"; + } else { + this.Message += " 瀹℃牳澶辫触锛�"; + } + + let entity = { + id: this.messageId, + resultData: JSON.stringify(res.data), + dealWith: res.data.tbBillList ? 1 : 0, + result: res.data.tbBillList ? 1 : 0, + } + this.updateMessage(entity); + }); + }, + saveMessage(s, item) { + + let title = "閲囪喘鍏ュ簱鍗�" + this.itemInsFormData.billNo + "瀹℃牳"; + let tableName = "MES_INV_ITEM_INS_" + s; + + if (s == "B") { + title = "閲囪喘鍏ュ簱鍗�" + this.itemInsFormData.billNo + "鍙嶅鏍�"; + } + + let entity = { + data: JSON.stringify(item.data), + url: item.url, + pid: this.messageCenter.id, + dealWith: 0, + result: 0, + status: 1, + seq: this.messageCenter.seq + 1, + createBy: this.$loginInfo.account, + title: title, + route: this.itemInsFormData.billNo, + tableName: tableName, + contentType: "application/json", + } + + this.$post({ + url: "/MessageCenter/Insert", + data: entity + }).then(res => { + this.messageId = res.data.tbBillList; + }); + }, + //鏇存柊鎺ュ彛璁板綍琛� + updateMessage(messageCenter) { + this.$post({ + url: "/MessageCenter/ResetUpdate", + data: messageCenter + }).then(res => { + if (res.data.tbBillList > 0) { + this.Message += " [闂璁板綍鎴愬姛!]"; + } else { + this.Message += " [闂璁板綍澶辫触!!!]"; + } + }); + }, + } +}) \ No newline at end of file diff --git a/H5/Scbl.aspx b/H5/Scbl.aspx index 2487884..14f0b40 100644 --- a/H5/Scbl.aspx +++ b/H5/Scbl.aspx @@ -9,7 +9,7 @@ </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"> <van-nav-bar - title="鐢熶骇琛ユ枡" + :title="type=='cl'?'鐢熶骇瓒呴':'鐢熶骇琛ユ枡'" left-text="杩斿洖" left-arrow @click-left="GoBack()" @@ -99,5 +99,5 @@ <comback ></comback> </asp:Content> <asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server"> - <script src="Js/Scbl.js?<%=12313 %>"></script> + <script src="Js/Scbl.js?<%=12315 %>"></script> </asp:Content> diff --git a/H5/cprk.aspx b/H5/cprk.aspx new file mode 100644 index 0000000..6164087 --- /dev/null +++ b/H5/cprk.aspx @@ -0,0 +1,65 @@ +锘�<%@ Page Title="鐢熶骇鍏ュ簱" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="cprk.aspx.cs" Inherits="H5_Scll" %> +<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 class="mySolid"> + <van-cell-group> + <van-field + ref="sectionCode" + v-model="formData.sectionCode" + label="搴撲綅缂栫爜" + clearable + placeholder="璇锋壂鐮�" + :right-icon-size="19" + v-focus.noKeyboard + @change="getModel" autofocus="true" + ></van-field> + <van-field + ref="barcode" + v-model="formData.barcode" + label="鐗╂枡鏉$爜" + clearable + placeholder="璇锋壂鐮�" + :right-icon-size="19" + v-focus.noKeyboard + @change="getScan" +></van-field> + <van-field + v-model="formData.itemNo" + label="鐗╂枡缂栫爜" + placeholder="鐗╂枡缂栫爜" + disabled +></van-field> + <van-field + v-model="formData.sumQuantity" + label="褰撳墠鏉$爜鍏ュ簱鏁伴噺" + placeholder="褰撳墠鏉$爜鍏ュ簱鏁伴噺" + disabled +></van-field> +</van-cell-group> + </div> + + + <van-button type="primary" @click="getScan" >纭</van-button> + <%--<van-button type="primary" @click="ToErp" >瀹℃牳</van-button>--%> + <van-button type="primary" @click="cleraCode" >娓呴櫎搴撲綅缂栫爜</van-button> +</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/cprk.js?<%=1211 %>"></script> +</asp:Content> diff --git a/H5/cprk.aspx.cs b/H5/cprk.aspx.cs new file mode 100644 index 0000000..f11cc1f --- /dev/null +++ b/H5/cprk.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 -- Gitblit v1.9.3