From 5aa88c141e558a9151702d334b50d16dc1aa9636 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 07 二月 2025 08:12:58 +0800
Subject: [PATCH] 1.条码拆分
---
H5/BarCf.aspx | 75 ++++++++++++++++++
H5/BarCf.aspx.cs | 14 +++
H5/Js/BarCf.js | 149 +++++++++++++++++++++++++++++++++++++
3 files changed, 238 insertions(+), 0 deletions(-)
diff --git a/H5/BarCf.aspx b/H5/BarCf.aspx
new file mode 100644
index 0000000..9e29a10
--- /dev/null
+++ b/H5/BarCf.aspx
@@ -0,0 +1,75 @@
+锘�<%@ Page Title="鍦ㄥ簱鍒嗘枡" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="BarCf.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
+ @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="璇疯緭鍏ユ媶鍒嗘暟閲�"
+ :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/BarCf.js?<%=121 %>"></script>
+</asp:Content>
diff --git a/H5/BarCf.aspx.cs b/H5/BarCf.aspx.cs
new file mode 100644
index 0000000..f11cc1f
--- /dev/null
+++ b/H5/BarCf.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
new file mode 100644
index 0000000..be38d8a
--- /dev/null
+++ b/H5/Js/BarCf.js
@@ -0,0 +1,149 @@
+锘縱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() {
+ var that = this;
+
+ if (that.formData.cfNum * 1 <= 0) {
+ 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.$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;
+ //},
+ }
+})
\ No newline at end of file
--
Gitblit v1.9.3