From b3654a68f9461cc48ed6cd1019d7115b60f0aeb9 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期六, 08 三月 2025 10:22:18 +0800
Subject: [PATCH] 1.受托退料功能完成

---
 H5/Js/Sttl.js   |  262 +++++++++++++++++++++++++++++++++++++
 H5/Sttl.aspx    |   99 ++++++++++++++
 H5/Sttl.aspx.cs |   14 ++
 3 files changed, 375 insertions(+), 0 deletions(-)

diff --git a/H5/Js/Sttl.js b/H5/Js/Sttl.js
new file mode 100644
index 0000000..c8117c2
--- /dev/null
+++ b/H5/Js/Sttl.js
@@ -0,0 +1,262 @@
+锘縱ar vm = new Vue({
+    el: '#app',
+    data: function () {
+        return {
+            isLoading: false,
+            userInfo: {
+                "loginGuid": '',
+                "loginAccount": '',
+            },
+            splitNum: "",
+            num: "",
+            //type: "",
+            billNo: "",
+            selectType: "",
+            daa001: "",
+            barcode: "",
+            ItemBlDetail:[],
+            modeInfo: [],
+            active: 0,
+            show: false,
+            actions: [],
+        }
+    },
+    mounted() {
+        var that = this;
+        this.userInfo = {
+            loginGuid: this.GetLoginInfor().loginGuid,
+            loginAccount: this.GetLoginInfor().loginAccount,
+        };
+    },
+    methods: {
+        getInfo() {
+            
+            this.show = true;
+            var that = this;
+            that.isLoading = true
+            that.AxiosHttp("post", 'MesSttl/GetSttlBillNo', {
+               // type: "selectType",
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        if (json.data.tbBillList.length <= 0) {
+                            that.$toast.fail("娌℃湁鍙敤鐨勬暟鎹�");
+                            that.show = false;
+                        } else {
+                            that.actions = json.data.tbBillList.map(item => {
+                                return { name: item }
+                            });
+                            
+                        }
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    console.log(error);
+                    that.show = false;
+                });
+        },
+        //onClick(index, title) {
+        //    this.$toast(`${index} ${title}`);
+        //    this.$notify({ type: 'success', message: '鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛鏌愭煇鐗╂枡鎵爜鎴愬姛' });
+
+        //},
+        onSelect(item) {
+            // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
+            // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
+            this.show = false;
+
+            this.billNo = item.name;
+            this.GetMesItemDetailByBillNo();
+            //this.$toast(item.name);
+
+        },
+        GetMesItemDetailByBillNo() {
+            var that = this;
+            that.isLoading = true;
+            that.AxiosHttp("post", 'MesSttl/GetMesItemDetailByBillNo', {
+                billNo: that.billNo,
+                //type: selectType
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+                        that.ItemBlDetail = json.data.tbBillList;
+                        //that.daa001 = json.data.tbBillList.item1;
+                        that.$refs.barcode.focus();
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$refs.billNo.focus();
+                        that.billNo = "";
+                        that.daa001 = "";
+                        that.ItemBlDetail = [];
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    //console.log(error);
+                    tthat.$refs.billNo.focus();
+                    that.billNo = "";
+                    that.daa001 = "";
+                    that.ItemBlDetail = [];
+                });
+        },
+        getBarcode() {
+
+            //this.barcode = value;
+
+            var that = this;
+            that.isLoading = true;
+
+            if (!that.userInfo.loginAccount) {
+                this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�");
+                that.isLoading = false;
+                return;
+            }
+
+            if (!that.barcode) {
+                this.$toast.fail("鏉$爜涓嶈兘涓虹┖");
+                that.isLoading = false;
+                return;
+            }
+
+            if (!that.billNo) {
+                this.$toast.fail("鍙戣揣閫氱煡鍗曞彿涓嶈兘涓虹┖");
+                that.isLoading = false;
+                return;
+            }
+
+            //if (!that.daa001) {
+            //    this.$toast.fail("宸ュ崟鍙蜂笉鑳戒负绌�");
+            //    that.isLoading = false;
+            //    return;
+            //}
+
+
+            that.AxiosHttp("post", 'MesSttl/SttlScanBarcode', {
+                userName: that.userInfo.loginAccount,
+                barcode: that.barcode,
+                daa001: that.billNo,
+                //type: selectType
+            }, false)
+                .then(function (res) {
+                    var json = res;
+                    if (json.status == 0) {
+
+                        that.barcode = null;
+                        that.sms = null;
+                        that.num = null;
+                        //that.ItemBlDetail = json.data.tbBillList.item2
+                        that.$notify({ type: 'success', message: '鎵弿鎴愬姛' });
+                        that.GetMesItemDetailByBillNo();
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
+                        that.num = "";
+                        that.splitNum = "";
+                        
+
+                    } else if (json.status == 2) {
+                        that.$refs.splitNum.focus();
+                        that.splitNum = json.data.cfNum;
+                        that.num = json.data.num;
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                        that.barcode = "";
+                        that.num = "";
+                        that.splitNum = "";
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    //console.log(error);
+                    that.$refs.barcode.focus();
+                    that.barcode = "";
+                    that.num = "";
+                    that.splitNum = "";
+                });
+        },
+        tmcf() {
+            //this.show = true;
+
+            var that = this;
+            that.isLoading = true;
+
+            if (!that.userInfo.loginAccount) {
+                this.$toast.fail("璇烽噸鏂版鏌ョ櫥褰曠姸鎬�");
+                that.isLoading = false;
+                return;
+            }
+
+            if (!that.barcode) {
+                this.$toast.fail("鏉$爜涓嶈兘涓虹┖");
+                that.isLoading = false;
+                return;
+            }
+
+            if (!that.billNo) {
+                this.$toast.fail("琛ユ枡鍗曞彿涓嶈兘涓虹┖");
+                that.isLoading = false;
+                return;
+            }
+
+            if (!that.daa001) {
+                this.$toast.fail("宸ュ崟鍙蜂笉鑳戒负绌�");
+                that.isLoading = false;
+                return;
+            }
+
+            if (!that.splitNum) {
+                this.$toast.fail("鍙戣揣鏁伴噺涓嶈兘涓虹┖");
+                that.isLoading = false;
+                return;
+            }
+
+            that.AxiosHttp("post", 'MesSttl/SplitBarcode', {
+                userName: that.userInfo.loginAccount,
+                barcode: that.barcode,
+                daa001: that.billNo,
+                num: that.splitNum,
+                //type: selectType
+            }, false)
+                .then(function (res) {
+                    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.GetMesItemDetailByBillNo();
+                    }
+                    else {
+                        that.$toast.fail(json.message);
+                        that.$refs.barcode.focus();
+                    }
+                    that.isLoading = false;
+                })
+                .catch(function (error) {
+                    that.isLoading = false;
+                    that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+                    //console.log(error);
+                    that.$refs.barcode.focus();
+                    that.barcode = "";
+                    that.num = "";
+                    that.splitNum = "";
+                });
+        }
+    }
+})
\ No newline at end of file
diff --git a/H5/Sttl.aspx b/H5/Sttl.aspx
new file mode 100644
index 0000000..0d1bcbe
--- /dev/null
+++ b/H5/Sttl.aspx
@@ -0,0 +1,99 @@
+锘�<%@ Page Title="" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Sttl.aspx.cs" Inherits="H5_Scbl" %>
+
+<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>
+        <van-cell-group>
+  <van-field
+      ref="billNo"
+    value=""
+    label="鐢宠鍗曞彿"
+    clearable 
+     placeholder="鎵爜/閫夋嫨/鎵嬪綍"
+    :right-icon-size="19"
+      @keyup.enter.native ="GetMesItemDetailByBillNo"
+      v-model="billNo"
+     v-focus.noKeyboard
+  ><template #button>
+    <van-button size="small" type="info" plain @click="getInfo" >閫夋嫨</van-button>
+  </template></van-field>
+ <van-field
+     ref="barcode"
+  value=""
+  label="鐗╂枡鏉$爜"
+   clearable 
+ placeholder="璇锋壂鐮�"
+<%--     @input="getBarcode"--%>
+     @keyup.enter.native ="getBarcode"
+  :right-icon-size="19"
+     v-model="barcode"
+  v-focus.noKeyboard
+></van-field>
+   <van-field
+  value=""
+       v-model="num"
+  label="鏉$爜鏁伴噺"
+  placeholder="鏉$爜鏁伴噺"
+  disabled
+></van-field>
+  <van-field
+      ref ="splitNum"
+    center
+    clearable
+    v-model="splitNum"
+    label="鍙戣揣鏁伴噺"
+    placeholder="鍙戣揣鏁伴噺"
+<%--disabled--%>
+ ><template #button>
+    <van-button size="small" type="info" plain @click="tmcf" >鏉$爜鎷嗗垎</van-button>
+  </template></van-field>
+</van-cell-group>
+    </div>
+
+    <div  class="van-tab-left">
+              <van-tabs <%--@click="onClick"--%> color="#000" title-active-color="#0283EF" >
+  <van-tab title="寰呭彂鐗╂枡" class="mySolid font">
+<%--    <van-row v-for="value in ItemBlDetail" class="font">
+          <van-col span="12">鐗╂枡:{{value.itemNo}}</van-col>
+          <van-col span="6">鐢宠鏁皗{value.bld007}}</van-col>
+          <van-col span="6">宸查鏁皗{value.bld008}}</van-col>
+    </van-row>--%>
+        <van-row>
+        <van-col span="12" class="text-left padding-left">鐗╂枡</van-col>
+         <van-col span="6">闇�棰�</van-col>
+        <van-col span="6">宸叉壂</van-col>
+</van-row>
+<van-row  v-for="value in ItemBlDetail" class="font">
+      <van-col span="12"  class="text-left padding-left">
+           <div>{{value.itemNo}}</div>
+           <div>{{value.itemName}}</div>
+      </van-col>
+      <van-col span="6">{{value.fQty}}</van-col>
+     <van-col span="6">{{value.sQty ?? 0}}</van-col>
+</van-row>
+  </van-tab>
+</van-tabs>
+    </div>
+
+    <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
+
+</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/Sttl.js?<%=127 %>"></script>
+</asp:Content>
diff --git a/H5/Sttl.aspx.cs b/H5/Sttl.aspx.cs
new file mode 100644
index 0000000..0bbf74c
--- /dev/null
+++ b/H5/Sttl.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_Scbl : System.Web.UI.Page
+{
+    protected void Page_Load(object sender, EventArgs e)
+    {
+
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3