From 65e595c85e7ff31252c651f05949b711209f45ec Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 22 十二月 2025 09:49:31 +0800
Subject: [PATCH] 称重逻辑调整
---
H5/Js/Cpbdsj.js | 19 ++++++
H5/Cpdbsj.aspx | 2
H5/Js/Cz.js | 70 +++++++++++++++++++++++
H5/Cz.aspx.cs | 14 ++++
H5/Cz.aspx | 47 +++++++++++++++
5 files changed, 150 insertions(+), 2 deletions(-)
diff --git a/H5/Cpdbsj.aspx b/H5/Cpdbsj.aspx
index ef17f70..9a24876 100644
--- a/H5/Cpdbsj.aspx
+++ b/H5/Cpdbsj.aspx
@@ -266,5 +266,5 @@
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
- <script src="Js/Cpbdsj.js?<%=121114211526 %>"></script>
+ <script src="Js/Cpbdsj.js?<%=12152156 %>"></script>
</asp:Content>
\ No newline at end of file
diff --git a/H5/Cz.aspx b/H5/Cz.aspx
new file mode 100644
index 0000000..e64faf7
--- /dev/null
+++ b/H5/Cz.aspx
@@ -0,0 +1,47 @@
+锘�<%@ Page Title="绉伴噸" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Cpdbsj.aspx.cs" Inherits="H5_Cpdbsj" %>
+<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
+ <style>
+ .content-wrapper { padding-bottom: 0.6rem; }
+ </style>
+</asp:Content>
+
+<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
+ <div class="content-wrapper">
+ <van-nav-bar
+ title="绉伴噸"
+ left-text="杩斿洖"
+ left-arrow
+ @click-left="GoBack()">
+ </van-nav-bar>
+
+ <div class="mySolid">
+ <van-cell-group>
+ <van-field
+ ref="XBar"
+ v-model="XBar"
+ label="鏉$爜"
+ placeholder="璇锋壂鐮佹垨鍥炶溅"
+ clearable
+ @keyup.enter.native="getWeight"
+ autofocus="true">
+ </van-field>
+
+ <van-field
+ ref="Weight"
+ v-model="Weight"
+ label="閲嶉噺"
+ readonly>
+ </van-field>
+ </van-cell-group>
+ </div>
+
+ </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/Cz.js?<%=12114211526 %>"></script>
+</asp:Content>
\ No newline at end of file
diff --git a/H5/Cz.aspx.cs b/H5/Cz.aspx.cs
new file mode 100644
index 0000000..52e1504
--- /dev/null
+++ b/H5/Cz.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_Cpbd : System.Web.UI.Page
+{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/H5/Js/Cpbdsj.js b/H5/Js/Cpbdsj.js
index 938f14f..12758c9 100644
--- a/H5/Js/Cpbdsj.js
+++ b/H5/Js/Cpbdsj.js
@@ -28,6 +28,7 @@
//}
],
DAA001: [],
+ DAA015: "",
show: false,//鍒楄〃灞曠ず
actions: [],//鍒楄〃鐨勫��
xtName: "",//绾夸綋鍚嶇О
@@ -71,6 +72,8 @@
console.log(json.data.tbBillList.kbBarInfo[0].agvPostion);
that.KbBarInfo = json.data.tbBillList.kbBarInfo[0];
that.DAA001 = that.KbBarInfo.daA001;
+ that.DAA015 = that.KbBarInfo.daA015;
+ console.log(that.KbBarInfo)
that.KbBarMxInfo = json.data.tbBillList.kbBarMxInfo;
that.$refs.XBar.focus();
that.XbarInfo = [];
@@ -202,7 +205,6 @@
if (that.XbarInfo.length >= that.Xvalue) {
that.$refs.LsBar.focus();
}
-
}
else {
that.$playSound('error');
@@ -313,6 +315,21 @@
if (matchedItem.is_hedui === "1") {
that.$toast("宸叉牳瀵�");
} else {
+ console.log(that.DAA015);
+ if ((that.DAA015) === "462") {
+ that.$set(matchedItem, 'is_hedui', "1");
+ // 鍙牴鎹渶瑕佽缃� weight锛岃繖閲屼繚鎸佷负绌�/涓嶅彉
+ that.$playSound('success');
+ that.$notify({ type: 'success', message: "鏍稿鎴愬姛" });
+ that.LsBar = "";
+ // 妫�鏌ユ槸鍚︽墍鏈夎閮藉凡鏍稿
+ const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
+ if (allChecked && that.XbarInfo.length > 0 && that.XbarInfo.length === that.Xvalue) {
+ that.submitAllChecked();
+ }
+ // 鐩存帴杩斿洖锛屼笉璋冪敤 GetWeightByXt
+ return;
+ }
that.AxiosHttp("post", 'Womdaa/GetWeightByXt', {
LsBar: that.LsBar,
diff --git a/H5/Js/Cz.js b/H5/Js/Cz.js
new file mode 100644
index 0000000..163c1d0
--- /dev/null
+++ b/H5/Js/Cz.js
@@ -0,0 +1,70 @@
+锘縱ar vm = new Vue({
+ el: '#app',
+ data: function () {
+ return {
+ isLoading: false,
+ XBar: '', // 鎵埌鐨勬潯鐮�
+ Weight: '', // 鏄剧ず鐨勯噸閲�
+ userInfo: { loginGuid: '', loginAccount: '' } // 濡傞渶浼� userName
+ }
+ },
+ mounted() {
+ try {
+ var info = this.GetLoginInfor();
+ if (info) {
+ this.userInfo.loginGuid = info.loginGuid || '';
+ this.userInfo.loginAccount = info.loginAccount || '';
+ }
+ // 鍒濆灏嗙劍鐐规斁鍒版潯鐮佽緭鍏�
+ this.$nextTick(() => this.$refs.XBar && this.$refs.XBar.focus());
+ } catch (e) {
+ // ignore
+ }
+ },
+ methods: {
+ // 鎵爜鍚庤皟鐢ㄥ悗绔幏鍙栭噸閲�
+ getWeight() {
+ var that = this;
+ if (!that.XBar || that.XBar.toString().trim().length === 0) {
+ that.$playSound && that.$playSound('error');
+ that.$toast && that.$toast.fail("鏉$爜涓嶈兘涓虹┖");
+ that.$refs.XBar && that.$refs.XBar.focus();
+ return;
+ }
+
+ that.isLoading = true;
+
+ that.AxiosHttp("post", 'Womdaa/GetWeightByXt_new', {
+ LsBar: that.XBar,
+ userName: that.userInfo.loginAccount || ''
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json && json.status == 0) {
+ // 鍚庣杩斿洖鐨勯噸閲忓瓧娈碉紙娌跨敤鐜版湁浠g爜涔犳儻锛�
+ var weight = (json.data && json.data.tbBillList && json.data.tbBillList.weight) || '';
+ that.Weight = weight;
+ that.$playSound && that.$playSound('success');
+ that.$notify && that.$notify({ type: 'success', message: "绉伴噸鎴愬姛" });
+ } else {
+ that.Weight = '';
+ that.$playSound && that.$playSound('error');
+ var msg = (json && json.message) ? json.message : "绉伴噸澶辫触";
+ that.$dialog && that.$dialog.alert({ message: msg, theme: 'round-button' });
+ }
+ that.isLoading = false;
+ // 娓呯┖骞惰仛鐒﹀噯澶囦笅涓�涓壂鐮�
+ that.XBar = '';
+ that.$nextTick(() => that.$refs.XBar && that.$refs.XBar.focus());
+ })
+ .catch(function () {
+ that.isLoading = false;
+ that.Weight = '';
+ that.$playSound && that.$playSound('error');
+ that.$dialog && that.$dialog.alert({ message: "缃戠粶閿欒锛岃閲嶈瘯锛�", theme: 'round-button' });
+ that.XBar = '';
+ that.$nextTick(() => that.$refs.XBar && that.$refs.XBar.focus());
+ });
+ }
+ }
+});
\ No newline at end of file
--
Gitblit v1.9.3