From 5c6c67ff6a447f55ed82bf925fcbb6c1ed6ab542 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期四, 26 六月 2025 08:34:08 +0800
Subject: [PATCH] 1.生产补料优化 2.条码拆分优化 3.入库前拆分界面
---
H5/Js/Scbl.js | 8 +
H5/BarCfBefore.aspx | 77 +++++++++++++++
H5/Js/BarCfBefore.js | 166 +++++++++++++++++++++++++++++++++
H5/BarCfBefore.aspx.cs | 14 ++
H5/Js/BarCf.js | 4
H5/Scbl.aspx | 2
6 files changed, 268 insertions(+), 3 deletions(-)
diff --git a/H5/BarCfBefore.aspx b/H5/BarCfBefore.aspx
new file mode 100644
index 0000000..b062125
--- /dev/null
+++ b/H5/BarCfBefore.aspx
@@ -0,0 +1,77 @@
+锘�<%@ Page Title="鍏ュ簱鍓嶆媶鏂�" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="BarCfBefore.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="barcode"
+ v-model="formData.barcode"
+ label="鐗╂枡鏉$爜"
+ clearable
+ placeholder="璇锋壂鐮�"
+ :right-icon-size="19"
+ v-focus.noKeyboard
+ @keyup.enter.native="getScan"
+<%-- @change="getScan"--%>
+></van-field>
+ <van-field
+ v-model="formData.itemNo"
+ label="鐗╂枡缂栫爜"
+ placeholder=""
+ disabled
+></van-field>
+ <van-field
+ v-model="formData.itemName"
+ label="鐗╂枡鍚嶇О"
+ placeholder=""
+ disabled
+></van-field>
+ <van-field
+ v-model="formData.itemModel"
+ label="鐗╂枡瑙勬牸"
+ placeholder=""
+ disabled
+></van-field>
+ <van-field
+ v-model="formData.sumQuantity"
+ label="鏉$爜鏁伴噺"
+ placeholder="鏉$爜鏁伴噺"
+ disabled
+></van-field>
+ <van-field
+ ref="cfNum"
+ v-model="formData.cfNum"
+ label="鎷嗗垎鏁伴噺"
+ clearable
+ placeholder="璇疯緭鍏ユ媶鍒嗘暟閲�"
+ @input="handleNumberInput3"
+ :right-icon-size="19"
+ v-focus.noKeyboard
+></van-field>
+</van-cell-group>
+ </div>
+
+ <van-button type="primary" @click="getChaiFen" >纭鎷嗗垎</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/BarCfBefore.js?<%=0 %>"></script>
+</asp:Content>
diff --git a/H5/BarCfBefore.aspx.cs b/H5/BarCfBefore.aspx.cs
new file mode 100644
index 0000000..f11cc1f
--- /dev/null
+++ b/H5/BarCfBefore.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/Js/BarCf.js b/H5/Js/BarCf.js
index 9f2065a..449abc5 100644
--- a/H5/Js/BarCf.js
+++ b/H5/Js/BarCf.js
@@ -115,6 +115,10 @@
that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
return;
}
+ if (that.formData.cfNum > 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
new file mode 100644
index 0000000..449abc5
--- /dev/null
+++ b/H5/Js/BarCfBefore.js
@@ -0,0 +1,166 @@
+锘縱ar vm = new Vue({
+ el: '#app',
+ data: function () {
+ return {
+ isLoading: false,
+ userInfo: {
+ "loginGuid": '',
+ "loginAccount": '',
+ },
+ formData: {
+ 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.sectionName = json.data.tbBillList;
+ // }
+ // else {
+ // that.$toast.fail(json.message);
+ // that.formData.sectionName = "";
+ // }
+ // that.isLoading = false;
+ // })
+ // .catch(function (error) {
+ // that.isLoading = false;
+ // that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ // console.log(error);
+ // that.$refs.daa001.focus();
+ // });
+ //},
+ getScan() {
+ var that = this;
+
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesBarCF/GetBarInfo', {
+ barcode: that.formData.barcode,
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+
+ that.formData.sumQuantity = json.data.tbBillList.quantity;
+
+ that.formData.itemNo = json.data.tbMesItems.itemNo;
+ that.formData.itemName = json.data.tbMesItems.itemName;
+ that.formData.itemModel = json.data.tbMesItems.itemModel;
+
+ //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;
+ that.$refs.cfNum.focus();
+ }
+ 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() {
+ if (this.isLoading) {
+ return;
+ }
+
+ var that = this;
+
+ if (that.formData.cfNum * 1 <= 0) {
+ that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘涓虹┖锛�");
+ return;
+ }
+ if (that.formData.cfNum > that.formData.sumQuantity) {
+ that.$toast.fail("鎷嗗垎鏁伴噺涓嶈兘澶т簬鏉$爜鏁伴噺锛�");
+ return;
+ }
+ if (that.formData.barcode.length * 1 <= 0) {
+ that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+ return;
+ }
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesBarCF/BarCF', {
+ userName: that.userInfo.loginAccount,
+ barcode: that.formData.barcode,
+ CfNum: that.formData.cfNum,
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ // that.modeInfo = json.data.tbBillList;
+ // 鎷嗗垎鍏ㄥ眬璋冪敤鏂规硶
+ that.sendPrintMessage(json.data.tbBillList);
+ that.$refs.barcode.focus();
+ that.formData.barcode = null;
+ that.formData.cfNum = null;
+ that.$notify({ type: 'success', message: json.message });
+ }
+ else {
+ that.$toast.fail(json.message);
+ that.$refs.cfNum.focus();
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.log(error);
+ });
+ },
+ //cleraCode() {
+ // this.formData.sectionCode = null;
+ //},
+ handleNumberInput3(value) {
+ this.formData.cfNum = value.replace(/[^\d.]/g, '') // 1. 鍘婚櫎闈炴暟瀛楀拰灏忔暟鐐�
+ .replace(/(\..*)\./g, '$1') // 2. 绂佹澶氫釜灏忔暟鐐�
+ .replace(/^\./g, '');
+ },
+
+
+ }
+})
\ No newline at end of file
diff --git a/H5/Js/Scbl.js b/H5/Js/Scbl.js
index 9f00599..b4d5fa7 100644
--- a/H5/Js/Scbl.js
+++ b/H5/Js/Scbl.js
@@ -239,12 +239,16 @@
var json = res;
if (json.status == 0) {
that.ItemBlDetail = json.data.pendingList;
- that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
- that.$refs.barcode.focus();
that.barcode = "";
that.num = "";
that.splitNum = "";
+ that.$notify({ type: 'success', message: json.message });
+ that.$playSound('success');
that.GetMesItemBlDetailByBillNo();
+ //that.sendMessage(json.data.tbBillList);
+ that.sendPrintMessage(json.data.tbBillList);
+
+ that.$refs.barcode.focus();
}
else {
that.$toast.fail(json.message);
diff --git a/H5/Scbl.aspx b/H5/Scbl.aspx
index 0635f51..198c377 100644
--- a/H5/Scbl.aspx
+++ b/H5/Scbl.aspx
@@ -120,5 +120,5 @@
<%--<comback ></comback>--%>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Scbl.js?<%=123181111 %>"></script>
+ <script src="Js/Scbl.js?<%=1231811111 %>"></script>
</asp:Content>
--
Gitblit v1.9.3