南骏 池
10 天以前 a40798a6290b41c4aacab2e142a23b944743bda9
1.核对送检新增AGV送检和AGV呼叫
2.样式优化
已修改4个文件
已添加3个文件
522 ■■■■■ 文件已修改
H5/AgvCz.aspx 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/AgvCz.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Cpdbsj.aspx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/AgvCz.js 320 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Cpbdsj.js 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Images/Style.css 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Mst.master 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/AgvCz.aspx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,140 @@
<%@ Page Title="AGV操作" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="AgvCz.aspx.cs" Inherits="H5_Cpdbsj" %>
<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; /* é˜²æ­¢å†…容溢出 */
    }
    .van-checkbox__icon--checked .van-icon
    {
        color: #ffffff !important;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <div class="content-wrapper">
        <van-nav-bar
            title="AGV操作"
            left-text="返回"
            left-arrow
            @click-left="GoBack()">
        </van-nav-bar>
        <div class="mySolid">
            <van-cell-group>
                <van-field
                    ref="KbBar"
                    v-model="KbBar"
                    label="卡板条码"
                    clearable
                    placeholder="请扫码"
                    :right-icon-size="19"
                    v-focus.noKeyboard
                    @keyup.enter.native="getKbBarInfo"
                    autofocus="true">
                </van-field>
                <van-field
                    ref="jyz"
                    v-model="jyz"
                    label="检验状态"
                    placeholder="请选择检验状态"
                    autofocus="true"
                    @click.native="selectJyz">
                </van-field>
                <van-field
                    ref="lcName"
                    v-model="lcName"
                    label="楼层"
                    placeholder="请选择楼层"
                    autofocus="true"
                    @click.native="selectLc">
                </van-field>
                <div style="height: 10px"></div>
               <!-- ä¿®æ”¹åŽçš„æŒ‰é’®å®¹å™¨ -->
               <div class="button-container">
                <van-button
                  type="warning"
                  class="action-button reset-button"
                  @click.native="handleAgvSj"
                >AGV送检</van-button>
                <van-button
                  type="primary"
                  class="action-button"
                  @click.native="handleAgvJy"
                >AGV检验</van-button>
                 <!-- style="background-color: #27f83f;border-color: #27f83f;color: white" -->
                <van-button
                  type="info"
                  class="action-button submit-button"
                  @click.native="handleAgvRk"
                >入立库</van-button>
              </div>
            </van-cell-group>
        </div>
        <van-action-sheet v-model="show" :actions="actions" @select="onSelect" ></van-action-sheet>
        <van-action-sheet v-model="show2" :actions="actions2" @select="onSelect2" ></van-action-sheet>
    </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/AgvCz.js?<%=11 %>"></script>
</asp:Content>
H5/AgvCz.aspx.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class H5_Cpdbsj : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
H5/Cpdbsj.aspx
@@ -253,5 +253,5 @@
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
    <script src="Js/Cpbdsj.js?<%=12111111421511 %>"></script>
    <script src="Js/Cpbdsj.js?<%=12111111421512 %>"></script>
</asp:Content>
H5/Js/AgvCz.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,320 @@

var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            userInfo: {
                "loginGuid": '',
                "loginAccount": '',
            },
            KbBar: "",//卡板条码
            LsBar: "",//后盖流水条码
            XBar: "",//箱条码
            UserName: Cookies.get('loginName'),//用户名称
            KbBarInfo: [],
            KbBarMxInfo: [],
            show: false,//列表展示
            actions: [{
                name: "一楼",
                Postition: 1  // æ–°å¢ž
            }, {
                    name: "四楼",
                    Postition: 4  // æ–°å¢ž
                }],//列表的值
            show2: false,//列表展示
            actions2: [{
                name: "合格"
            },{
                    name: "不合格"
                }],//列表的值
            lcName: "",//楼层名称
            lcNum: "",//楼层编号
            jyz: "",//检验值
        }
    },
    mounted() {
        var that = this;
        this.userInfo = {
            loginGuid: this.GetLoginInfor().loginGuid,
            loginAccount: this.GetLoginInfor().loginAccount,
        };
    },
    methods: {
        getKbBarInfo() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/getKbBarInfo', {
                Xt: that.GX,
                Kbbarcode: that.KbBar
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                    }
                    else {
                        that.$playSound('error');
                        that.$toast.fail(json.message);
                        that.$refs.KbBar.focus();
                        that.KbBar = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("网络错误,请重试!");
                    that.$refs.KbBar.focus();
                    that.KbBar = "";
                });
        },
        handleClear() {
            this.KbBar = "";
            this.XBar = "";
            this.LsBar = "";
            this.DAA001 = [];
            this.XbarInfo = [];
        },
        handleSubmit() {
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (!that.KbBar) {
                that.$playSound('error');
                that.$toast.fail("请先扫描卡板条码");
                return;
            }
            // è®¡ç®—可装数和已装数
            const oldqty = +(that.KbBarInfo.quantity || 0);
            const ySum = +(that.KbBarInfo.ySum || 0);
            if (oldqty !== ySum) {
                that.$playSound('error');
                that.$toast.fail(`装板未完成,待装数:${oldqty - ySum}`);
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/submitInspection', {
                KbBar: that.KbBar,
                userAccount: that.userInfo.loginAccount
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.$playSound('success');
                        that.$notify({ type: 'success', message: json.message });
                        // æ¸…空数据
                        //that.KbBar = "";
                        //that.XbarInfo = [];
                        //that.KbBarInfo = [];
                        //that.$refs.KbBar.focus();
                    } else {
                        that.$playSound('error');
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("提交失败,请重试!");
                    that.$refs.KbBar.focus();
                });
        },
        onSelect(action) {
            this.lcNum = action.Postition;  // ç»‘定line_no到xtNum字段
            //console.log("选择的线体编号:", this.xtNum);
            this.lcName = action.name;  // ç»‘定name到xtName字段
            this.show = false;
        },
        onSelect2(action) {
            this.jyz = action.name;  // ç»‘定name到xtName字段
            this.show2 = false;
        },
        //获取可呼叫AGV的线体
        selectLc() {
            this.show = true;
            //var that = this;
            //that.actions = [];
            //that.isLoading = true;
            //that.AxiosHttp("post", 'Womdaa/GetAgvXt', {
            //    selectKey: that.selectKey,
            //}, false)
            //    .then(function (res) {
            //        var json = res;
            //        if (json.status == 0) {
            //            if (json.data.tbBillList.length <= 0) {
            //                that.$toast.fail("没有可用的数据");
            //                that.$playSound('error');
            //            } else {
            //                that.itemInfo = json.data.tbBillList;
            //                that.actions = json.data.tbBillList.map(item => {
            //                    return {
            //                        name: item.name,
            //                        lineNo: item.line_no  // æ–°å¢ž
            //                    };
            //                });
            //            }
            //        }
            //        else {
            //            that.$toast.fail(json.message);
            //            that.$playSound('error');
            //        }
            //        that.isLoading = false;
            //    })
            //    .catch(function (error) {
            //        that.isLoading = false;
            //        that.$toast.fail("网络错误,请重试!");
            //        that.$playSound('error');
            //        console.log(error);
            //    });
        },
        selectJyz() {
            this.show2 = true;
        },
        //AGV送检
        handleAgvSj() {
            //this.$toast.fail("功能开发测试中!");
            //return;
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (!that.KbBar) {
                that.$playSound('error');
                that.$toast.fail("请先扫描卡板条码");
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/handleAGVInspection', {
                KbBar: that.KbBar,
                userAccount: that.userInfo.loginAccount
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.$playSound('success');
                        that.$notify({ type: 'success', message: json.message });
                    } else {
                        that.$playSound('error');
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("AGV送检失败,请重试!");
                    that.$refs.KbBar.focus();
                });
        },
        //AGV检验
        handleAgvJy() {
            //this.$toast.fail("功能开发测试中!");
            //return;
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (!that.jyz) {
                that.$playSound('error');
                that.$toast.fail("请先选择检验值");
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/handleAgvJy', {
                jyz: that.jyz,
                KbBar: that.KbBar,
                userAccount: that.userInfo.loginAccount
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.$playSound('success');
                        that.$notify({ type: 'success', message: json.message });
                    } else {
                        that.$playSound('error');
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("AGV检验失败,请重试!");
                    that.$refs.KbBar.focus();
                });
        },
        handleAgvRk() {
            //this.$toast.fail("功能开发测试中!");
            //return;
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (!that.KbBar) {
                that.$playSound('error');
                that.$toast.fail("请先扫描卡板条码");
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/handleAgvRk', {
                KbBar: that.KbBar,
                userAccount: that.userInfo.loginAccount,
                Postition: that.lcNum
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.$playSound('success');
                        that.$notify({ type: 'success', message: json.message });
                    } else {
                        that.$playSound('error');
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("AGV入立库失败,请重试!");
                    that.$refs.KbBar.focus();
                });
        },
    }
})
H5/Js/Cpbdsj.js
@@ -412,14 +412,22 @@
        //AGV送检
        handleAGVInspection() {
            this.$toast.fail("功能开发测试中!");
            return;
            //this.$toast.fail("功能开发测试中!");
            //return;
            if (this.isLoading) {
                return;
            }
            var that = this;
            if (that.agvChecked === false)
            {
                that.$playSound('error');
                that.$toast.fail("AGV送检请先勾选 AGV");
                return;
            }
            if (!that.KbBar) {
                that.$playSound('error');
                that.$toast.fail("请先扫描卡板条码");
@@ -455,15 +463,15 @@
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("送检失败,请重试!");
                    that.$toast.fail("AGV送检失败,请重试!");
                    that.$refs.KbBar.focus();
                });
        },
        //AGV呼叫
        handleAGVCall() {
            this.$toast.fail("功能开发测试中!");
            return;
            //this.$toast.fail("功能开发测试中!");
            //return;
            if (this.isLoading) {
                return;
@@ -475,6 +483,29 @@
                that.$toast.fail("请先选择线体");
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/handleAGVCall', {
                XtNum: that.xtNum,
                userAccount: that.userInfo.loginAccount
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.$playSound('success');
                        that.$notify({ type: 'success', message: json.message });
                    } else {
                        that.$playSound('error');
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$playSound('error');
                    that.$toast.fail("AGV呼叫失败,请重试!");
                    that.$refs.KbBar.focus();
                });
        }
Images/Style.css
@@ -586,7 +586,8 @@
/*全局按钮缩小*/
.van-nav-bar__left, .van-nav-bar__right {
    font-size: .30rem;
    font-size: .40rem;
    padding: 0px .1rem;
}
/*调整搜索框字体的高度和大小*/
Mst.master
@@ -14,7 +14,7 @@
    <script src="/scripts/config.js?<%=123611118 %>"></script>
    <link href="/scripts/vant/vant.css" rel="stylesheet" />
    <script src="/scripts/vant/vant.js"></script>
    <link href="/Images/Style.css?<%=169951 %>" rel="stylesheet" />
    <link href="/Images/Style.css?<%=169952 %>" rel="stylesheet" />
    <script src="/Scripts/uni.webview.1.5.2.js"></script>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>