From 7e0b9ec2f74fe482817fc5d77456398995535849 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期三, 21 五月 2025 13:28:36 +0800
Subject: [PATCH] 1.SRM送货单现场收料

---
 H5/Dhdsh.aspx    |  191 +++++++++++++++++++++++++++
 H5/Dhdsh.aspx.cs |   14 ++
 H5/Js/Dhdsh.js   |  186 ++++++++++++++++++++++++++
 3 files changed, 391 insertions(+), 0 deletions(-)

diff --git a/H5/Dhdsh.aspx b/H5/Dhdsh.aspx
new file mode 100644
index 0000000..3d1aede
--- /dev/null
+++ b/H5/Dhdsh.aspx
@@ -0,0 +1,191 @@
+锘�<%@ Page Title="鍒拌揣鍗曟敹璐�" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" %>
+<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
+  <style>
+    .si-status-box,
+    .si-status__left
+    {
+        background-color: transparent !important; /* 閫忔槑鑳屾櫙 */
+        border: 1px solid #000 !important; /* 榛戣壊澶栨 */
+        color: #000 !important; /* 鍏ㄥ眬鏂囧瓧棰滆壊 */
+        height: 0.5rem;
+    }
+
+    .si-status__left::after {
+        content: none !important;
+    }
+
+    .si-status__label,
+    .si-status__right {
+        font-size: 0.33rem !important; /* 缁熶竴瀛椾綋澶у皬 */
+        color: inherit !important; /* 缁ф壙鐖剁骇鏂囧瓧棰滆壊 */
+    }
+
+
+    /* 灞呬腑鏍稿績鏍峰紡 */
+.centered-stepper-field {
+  .stepper-container {
+    display: flex;
+    justify-content: center; /* 姘村钩灞呬腑 */
+    width: 100%;
+  }
+
+  /* 璋冩暣姝ヨ繘鍣ㄦ寜閽棿璺� */
+  .van-stepper__minus {
+    margin-right: 12px;
+  }
+  .van-stepper__plus {
+    margin-left: 12px;
+  }
+}
+
+      /* 鏂板鏍峰紡 */
+    .button-container {
+        display: flex;
+        width: 100%;
+        gap: 12px; /* 鎸夐挳闂磋窛 */
+        padding: 0 16px; /* 宸﹀彸鐣欑櫧 */
+        box-sizing: border-box;
+    }
+
+    .action-button {
+        flex: 1; /* 绛夊垎鍓╀綑绌洪棿 */
+        min-width: 0; /* 闃叉鍐呭婧㈠嚭 */
+    }
+</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()"
+            @click-right="showButton = true">
+            <template #right>
+                    <van-icon name="ellipsis" />
+                  </template>
+        </van-nav-bar>
+
+        <div class="mySolid">
+            <van-cell-group>
+                <van-field
+                    ref="shdh"
+                    v-model="shdh"
+                    label="閫佽揣鍗曞彿"
+                    placeholder="閫佽揣鍗曞彿"
+                    @keyup.enter.native="GetItemsShdh" 
+                    autofocus="true"
+                    >
+                </van-field>
+
+<%--                <van-field
+                    v-model="gys"
+                    label="渚涘簲鍟�"
+                    placeholder="渚涘簲鍟�"
+                    autofocus="true"
+                    readonly>
+                </van-field>--%>
+
+                <van-field
+                    ref="Bar"
+                    v-model="Bar"
+                    label="鐗╂枡鏉$爜"
+                    placeholder="璇锋壂鐗╂枡鏉$爜"
+                    @keyup.enter.native="Scandhdsh" 
+                    autofocus="true">
+                </van-field>
+
+            </van-cell-group>
+        </div>
+
+        <van-tabs color="#000" title-active-color="#0283EF">
+            <van-tab title="鏉愭枡鍒楄〃" class="mySolid font">
+                <van-row>
+                    <van-col span="5" class="text-left padding-left">鐗╂枡</van-col>
+                    <van-col span="3">鍒拌揣鏁�</van-col>
+                    <van-col span="3">宸叉敹鏁�</van-col>
+                    <van-col span="3">寰呮敹鏁�</van-col>
+                    <van-col span="6" >鐗╂枡瑙勬牸</van-col>
+                    <van-col span="4" >閲囪喘璁㈠崟</van-col>
+                </van-row>
+                <van-row v-for="(itm,index) in ItemList" :key="index">
+                    <van-col span="5" class="text-left padding-left">
+                        <div class="blue-text">{{itm.item_no}}</div>
+                        <div>{{itm.item_name}}</div>
+                    </van-col>
+                    <van-col span="3" >{{itm.shsl}}</van-col>
+                    <van-col span="3" class="blue-text">{{itm.ysl}}</van-col>
+                    <van-col span="3" class="blue-text">{{itm.dssl}}</van-col>
+                    <van-col span="6"><div>{{itm.item_model}}</div></van-col>
+                    <van-col span="4"><div>{{itm.po_erp_no}}</div></van-col>
+                </van-row>
+            </van-tab>
+            <van-tab title="鏉$爜鍒楄〃" class="mySolid font">
+                <van-row>
+                    <van-col span="7" class="text-left padding-left">鏉$爜</van-col>
+                    <van-col span="6" class="text-left padding-left">鐗╂枡</van-col>
+                    <van-col span="3" 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 BarList" 
+                    :key="index">
+                    <van-col span="7" class="text-left padding-left">{{itm.small_barcode}}</van-col>
+                    <van-col span="6" class="text-left padding-left">
+                        <div class="blue-text">{{itm.item_no}}</div>
+                        <div>{{itm.item_name}}</div>
+                    </van-col>
+                    <van-col span="3" class="text-left padding-left">
+                        <div>{{itm.include_qty}}</div>
+                    </van-col>
+                    <van-col span="3">
+                        <div class="blue-text">{{itm.ysl}}</div>
+                    </van-col>
+                    <van-col span="5">
+                        <div>{{itm.po_erp_no}}</div>
+                    </van-col>
+                </van-row>
+            </van-tab>
+        </van-tabs>
+
+
+          <!-- 寮瑰嚭鑿滃崟 -->
+            <van-popup 
+              v-model="showButton" 
+              position="bottom"
+              :style="{ width: '100%' }"
+              :close-on-click-overlay="!ttrre1 && !ttrre2"
+              lock-scroll
+            >
+            <div style="padding: 12px;">
+              <van-button 
+                block 
+                type="info" 
+                @click="submit"
+                :loading="ttrre1"
+                loading-text="鍔犺浇涓�..."
+              >鎻愪氦妫�楠�</van-button>
+            </div>
+            <div style="padding: 12px;">
+              <van-button 
+                block 
+                type="info" 
+                @click="Fsubmit"
+                :loading="ttrre2"
+                loading-text="鍔犺浇涓�..."
+              >鎾ゅ洖妫�楠�</van-button>
+            </div>
+          </van-popup>
+
+    </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/Dhdsh.js?<%=1111111111 %>"></script>
+</asp:Content>
\ No newline at end of file
diff --git a/H5/Dhdsh.aspx.cs b/H5/Dhdsh.aspx.cs
new file mode 100644
index 0000000..215a487
--- /dev/null
+++ b/H5/Dhdsh.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_Dhdsh : System.Web.UI.Page
+{
+    protected void Page_Load(object sender, EventArgs e)
+    {
+
+    }
+}
\ No newline at end of file
diff --git a/H5/Js/Dhdsh.js b/H5/Js/Dhdsh.js
new file mode 100644
index 0000000..aa9d5df
--- /dev/null
+++ b/H5/Js/Dhdsh.js
@@ -0,0 +1,186 @@
+锘縱ar vm = new Vue({
+    el: '#app',
+    data: function () {
+        return {
+            isLoading: false,
+            userInfo: {
+                "loginGuid": '',
+                "loginAccount": '',
+            },
+            UserName: Cookies.get('loginName'),//鐢ㄦ埛鍚嶇О
+            Bar: "",//鐗╂枡鏉$爜
+            XbarInfo: [],
+            shdh: "",//閫佽揣鍗曞彿
+            gys: [],//渚涘簲鍟�
+            ItemList: [], //鏉愭枡鍒楄〃
+            BarList: [],//鏉$爜鍒楄〃
+            showButton: false,//鍙充笂瑙掕彍鍗曡Е鍙�
+            ttrre1: false,
+            ttrre2: false,
+            //ttrre: "true",
+            dhdGuid:"",
+        }
+    },
+    mounted() {
+        var that = this;
+        this.userInfo = {
+            loginGuid: this.GetLoginInfor().loginGuid,
+            loginAccount: this.GetLoginInfor().loginAccount,
+        };
+    },
+    methods: {
+        GetItemsShdh() {
+            var that = this;
+
+            if (that.shdh.length <= 0) {
+                that.$toast.fail("閫佽揣鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$refs.shdh.focus();
+                return;
+            }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'MesXkyShd/GetShdhItems', {
+                shdh: that.shdh
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+
+                        that.ItemList = json.data.tbBillList;
+                        that.dhdGuid = json.data.tbBillList[0].ddhid;
+                        that.BarList = json.data.tbMesItems;
+                        that.$refs.Bar.focus();
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                });
+        },
+        Scandhdsh() {
+            // 娣诲姞闃叉姈鍒ゆ柇
+            if (this.isLoading) {
+                return;
+            }
+
+            var that = this;
+            if (that.Bar.length <= 0) {
+                that.$toast.fail("鐗╂枡鏉$爜涓嶈兘涓虹┖锛�");
+                that.$refs.Bar.focus();
+                return;
+            }
+
+
+            if (that.shdh.length <= 0) {
+                that.$toast.fail("閫佽揣鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$refs.shdh.focus();
+                return;
+            }
+
+            that.isLoading = true;
+            that.AxiosHttp("post", 'MesXkyShd/ScanBar', {
+                shdh: that.shdh,
+                barcode: that.Bar,
+                userName: that.userInfo.loginAccount,
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        // that.scanInfo = json.data.tbBillList;
+                        that.$notify({ type: 'success', message: json.message });
+                        that.GetItemsShdh();
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                    }
+                    that.isLoading = false;
+                    that.$refs.Bar.focus();
+                    that.Bar = "";
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                });
+        },
+        submit() {
+            // 娣诲姞闃叉姈鍒ゆ柇
+            if (this.ttrre1 || this.ttrre2) {
+                return;
+            }
+            var that = this;
+            if (!that.shdh ||that.shdh.length <= 0) {
+                that.$toast.fail("閫佽揣鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$refs.shdh.focus();
+                return;
+            }
+
+            if (!that.dhdGuid || that.dhdGuid.length <= 0) {  // 娣诲姞null妫�鏌�
+                that.$toast.fail("SRM閫佽揣鍗曡繕鏈敓鎴怣ES閫佽揣鍗曪紒");
+                that.$refs.shdh.focus();
+                return;
+            }
+
+            //that.ttrre = true;  // 鎻愪氦鐘舵�佽涓簍rue鏃讹紝鑷姩绂佺敤閬僵鐐瑰嚮
+            that.ttrre1 = true;  // 鎻愪氦鐘舵�佽涓簍rue鏃讹紝鑷姩绂佺敤閬僵鐐瑰嚮
+            console.log(that.dhdGuid);
+            that.AxiosHttp("post", 'MesInvItemArnManager/EditModelSubmit', {
+                guid: that.dhdGuid
+            }, true, 1).then(function (res1) {
+                if (res1.rtnData.outSum == 1) {
+                    that.$notify({ type: 'success', message: '鎻愪氦鎴愬姛' });
+                } else {
+                    that.$toast.fail(res1.rtnData.outMsg);
+                }
+                that.ttrre1 = false  // 瀹屾垚鍚庢仮澶嶅彲鍏抽棴鐘舵��
+                that.showButton = false; 
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.ttrre1 = false  // 寮傚父鏃朵篃鎭㈠鐘舵��
+                that.showButton = false; 
+            });
+        },
+        Fsubmit() {
+            // 娣诲姞闃叉姈鍒ゆ柇
+            if (this.ttrre1 || this.ttrre2) {
+                return;
+            }
+            var that = this;
+
+            if (that.shdh.length <= 0) {
+                that.$toast.fail("閫佽揣鍗曞彿涓嶈兘涓虹┖锛�");
+                that.$refs.shdh.focus();
+                return;
+            }
+
+            if (that.dhdGuid.length <= 0) {
+                that.$toast.fail("SRM閫佽揣鍗曡繕鏈敓鎴怣ES閫佽揣鍗曪紒");
+                that.$refs.shdh.focus();
+                return;
+            }
+
+            //that.ttrre = true;
+            that.ttrre2 = true;
+            console.log(that.dhdGuid);
+            that.AxiosHttp("post", 'MesInvItemArnManager/EditModelSubmitF', {
+                guid: that.dhdGuid
+            }, true, 1).then(function (res1) {
+                if (res1.rtnData.outSum == 1) {
+                    that.$notify({ type: 'success', message: '鎾ゅ洖鎴愬姛' });
+                } else {
+                    that.$toast.fail(res1.rtnData.outMsg);
+                }
+                that.ttrre2 = false;
+                that.showButton = false; // 瀹屾垚鍚庡叧闂脊绐�
+            }).catch(function (error) {
+                that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                that.ttrre2 = false
+                that.showButton = false; // 瀹屾垚鍚庡叧闂脊绐�
+                console.log(error);
+            });
+        },
+    }
+})
\ No newline at end of file

--
Gitblit v1.9.3