南骏 池
2025-05-05 fbe0595485e2e7c0fde9c0d95f02e38b58e7b2d3
1.现场收料界面
2.界面优化
已添加3个文件
已修改5个文件
507 ■■■■■ 文件已修改
H5/Js/PurchaseReturn.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Xcsl.js 279 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/PurchaseReturn.aspx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scbl.aspx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Scll.aspx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Sctl.aspx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Xcsl.aspx 171 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Xcsl.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/PurchaseReturn.js
@@ -104,33 +104,6 @@
            this.getItem();
            //var that = this;
            //that.isLoading = true;
            //that.AxiosHttp("post", 'MesInvItemOuts/GetPage', {
            //    billNo: this.scanFormData.itemOutNo,
            //    pageIndex: 1,
            //    limit: 1,
            //}, false)
            //    .then(function (res) {
            //        var json = res;
            //        if (json.status == 0) {
            //            that.formData = json.data.tbBillList[0];
            //            that.formData.billTypeName = "出库单";
            //            that.getScanBarcode();
            //        }
            //        else {
            //            that.$toast.fail(json.message);
            //        }
            //        that.isLoading = false;
            //    })
            //    .catch(function (error) {
            //        that.isLoading = false;
            //        that.$toast.fail("网络错误,请重试!");
            //        console.log(error);
            //    });
        },
        getItem() {
            var that = this;
H5/Js/Xcsl.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,279 @@
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            userInfo: {
                "loginGuid": '',
                "loginAccount": '',
            },
            Bar: "",//箱条码
            UserName: Cookies.get('loginName'),//用户名称
            KbBarInfo: [],
            KbBarMxInfo: [],
            GX: "G007:核对送检",
            Xvalue:4,
            XbarInfo: [],
            DAA001: [],
            DAANum: "",
            ItemDetail: [],
        }
    },
    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) {
                        that.KbBarInfo = json.data.tbBillList.kbBarInfo[0];
                        that.DAA001 = that.KbBarInfo.daA001;
                        that.KbBarMxInfo = json.data.tbBillList.kbBarMxInfo;
                        that.$refs.XBar.focus();
                        that.XbarInfo = [];
                        that.XBar = "";
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.KbBar.focus();
                        that.KbBar = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$refs.KbBar.focus();
                    that.KbBar = "";
                });
        },
        getXBarInfo() {
            var that = this;
            if (that.KbBar.length <= 0) {
                that.$toast.fail("卡板条码不能为空!");
                that.$refs.KbBar.focus();
                that.XBar = "";
                return;
            }
            if (that.DAA001.length <= 0) {
                that.$toast.fail("指令工单不能为空!");
                that.$refs.KbBar.focus();
                that.XBar = "";
                return;
            }
            // æ£€æŸ¥æ˜¯å¦è¶…过装箱数
            if (that.XbarInfo.length >= that.Xvalue) {
                that.$toast.fail(`已达到装箱数限制(${that.Xvalue})`);
                that.XBar = "";
                return;
            }
            // æ£€æŸ¥æ¡ç æ˜¯å¦å·²å­˜åœ¨
            const isExist = that.XbarInfo.some(item => item.iteM_BARCODE === that.XBar);
            if (isExist) {
                that.$toast.fail("该箱条码已存在,请勿重复扫描");
                that.XBar = "";
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/getXBarInfo', {
                Kbbarcode: that.KbBar,
                DAA001: that.DAA001,
                Xbarcode: that.XBar
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.XbarInfo.push(json.data.tbBillList.xBarInfo[0]);
                        that.$refs.XBar.focus();
                        that.XBar = "";
                    }
                    else {
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                });
        },
        productBinding() {
            var that = this;
            if (that.ZsBar.length <= 0) {
                that.$toast.fail("追溯码不能为空!");
                return;
            }
            if (that.LsBar.length <= 0) {
                that.$toast.fail("后盖码不能为空!");
                return;
            }
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/ProductBinding', {
                ZsBar: that.ZsBar,
                LsBar: that.LsBar,
                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.$refs.ZsBar.focus();
                        that.ZsBar = null;
                        that.ZsBar = null;
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.ZsBar.focus();
                        that.ZsBar = null;
                        that.ZsBar = null;
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$refs.ZsBar.focus();
                    that.ZsBar = null;
                    that.ZsBar = null;
                });
        },
        //打印机注释
        //selectPrinter(printer) {
        //    this.selectedPrinter = printer.printerId; // æ›´æ–°é€‰ä¸­çš„æ‰“印机编号
        //},
        //confirmSelection() {
        //    if (this.selectedPrinter) {
        //        alert(`您选择了打印机:${this.selectedPrinter}`);
        //        // åœ¨è¿™é‡Œå¤„理选择结果,例如调用接口或更新状态
        //        this.isPrinterPopupVisible = false; // å…³é—­å¼¹çª—
        //    } else {
        //        alert('请选择一个打印机!');
        //    }
        //},
        //onPrinterSelected(value) {
        //    console.log('当前选中的打印机编号:', value);
        //},
        checkProductBarcode() {
            var that = this;
            if (!that.LsBar) {
                that.$toast.fail("请输入产品条码");
                return;
            }
            // åœ¨XbarInfo中查找匹配的条码
            const matchedItem = that.XbarInfo.find(item =>
                item.iteM_BARCODE === that.LsBar
            );
            if (matchedItem) {
                if (matchedItem.is_hedui === "1") {
                    that.$toast("已核对");
                } else {
                    that.$set(matchedItem, 'is_hedui', "1");
                    that.$notify({ type: 'success', message: "核对成功" });
                    that.LsBar = "";
                    // æ£€æŸ¥æ˜¯å¦æ‰€æœ‰è¡Œéƒ½å·²æ ¸å¯¹
                    const allChecked = that.XbarInfo.every(item => item.is_hedui === "1");
                    if (allChecked && that.XbarInfo.length > 0) {
                        that.submitAllChecked();
                    }
                }
            } else {
                that.$toast.fail("未找到匹配的箱条码");
            }
            that.LsBar = ""; // æ¸…空输入框
        },
        // æ–°å¢žæ–¹æ³•:提交所有已核对的数据
        submitAllChecked() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/submitAllChecked', {
                XbarInfo: that.XbarInfo,
                KbBar: that.KbBar,
                userName: that.userInfo.loginAccount
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.$notify({ type: 'success', message: json.message });
                        that.getKbBarInfo();
                    } else {
                        that.$toast.fail(json.message);
                        that.XbarInfo = [];
                        that.XBar = "";
                        that.LsBar = "";
                        that.$refs.XBar.focus();
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("绑定失败,请重试!");
                });
        },
        handleSubmit() {
            var that = this;
            if (!that.KbBar) {
                that.$toast.fail("请先扫描卡板条码");
                return;
            }
            // è®¡ç®—可装数和已装数
            const oldqty = +(that.KbBarInfo.oldqty || 0);
            const ySum = +(that.KbBarInfo.ySum || 0);
            if (oldqty !== ySum) {
                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.$notify({ type: 'success', message: json.tbBillList.message });
                        // æ¸…空数据
                        that.KbBar = "";
                        that.XbarInfo = [];
                        that.KbBarInfo = [];
                        that.$refs.KbBar.focus();
                    } else {
                        that.$toast.fail(json.message);
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("提交失败,请重试!");
                    that.$refs.KbBar.focus();
                });
        },
    }
})
H5/PurchaseReturn.aspx
@@ -55,7 +55,7 @@
</van-cell-group>
    </div>
  <van-tabs color="#000" title-active-color="#0283EF">
    <van-tab title="待发物料" class="mySolid font">
    <van-tab title="待扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
@@ -75,7 +75,7 @@
        </van-row>
    </van-tab>
    <van-tab title="已领物料" class="mySolid font">
    <van-tab title="已扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
H5/Scbl.aspx
@@ -71,7 +71,7 @@
</van-cell-group>
        
            <van-tabs color="#000" title-active-color="#0283EF">
    <van-tab title="待发物料" class="mySolid font">
    <van-tab title="待扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
@@ -91,7 +91,7 @@
        </van-row>
    </van-tab>
    <van-tab title="已领物料" class="mySolid font">
    <van-tab title="已扫物料" class="mySolid font">
        <van-row>
            <van-col span="8" class="text-left padding-left">物料</van-col>
            <van-col span="8" class="text-left padding-left">规格</van-col>
H5/Scll.aspx
@@ -77,7 +77,7 @@
        </div>
        <van-tabs color="#000" title-active-color="#0283EF">
            <van-tab title="待发物料" class="mySolid font">
            <van-tab title="待扫物料" class="mySolid font">
                <van-row>
                    <van-col span="8" class="text-left padding-left">物料</van-col>
                    <van-col span="8" class="text-left padding-left">规格</van-col>
@@ -97,7 +97,7 @@
                </van-row>
            </van-tab>
            <van-tab title="已领物料" class="mySolid font">
            <van-tab title="已扫物料" class="mySolid font">
                <van-row>
                    <van-col span="8" class="text-left padding-left">物料</van-col>
                    <van-col span="8" class="text-left padding-left">规格</van-col>
H5/Sctl.aspx
@@ -82,7 +82,7 @@
</van-tabs>--%>
      <van-tabs color="#000" title-active-color="#0283EF">
  <van-tab title="待入物料" class="mySolid font">
  <van-tab title="待扫物料" class="mySolid font">
    <van-row>
        <van-col span="8" class="text-left padding-left">物料</van-col>
@@ -102,7 +102,7 @@
        <%--<van-col span="4">{{itm.recoKw}}</van-col>--%>
    </van-row>
  </van-tab>
   <van-tab title="已入物料" class="mySolid font">
   <van-tab title="已扫物料" class="mySolid font">
         <van-row>
                    <van-col span="8" class="text-left padding-left">物料</van-col>
        <van-col span="8" class="text-left padding-left">规格</van-col>
H5/Xcsl.aspx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,171 @@
<%@ Page Title="现场收料" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Xcsl.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; /* é˜²æ­¢å†…容溢出 */
    }
</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="DAA001"
                    v-model="DAA001"
                    label="指令工单"
                    placeholder="指令工单"
                    autofocus="true"
                    readonly
                    >
                </van-field>
                <van-field
                    v-model="DAANum"
                    label="工单数量"
                    placeholder="工单数量"
                    autofocus="true"
                    readonly>
                </van-field>
                <van-field
                    ref="Bar"
                    v-model="Bar"
                    label="箱条码"
                    placeholder="请扫外箱码"
                    @keyup.enter.native="getXBarInfo"
                    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="8" class="text-left padding-left">物料</van-col>
                    <van-col span="8" class="text-left padding-left">规格</van-col>
                    <van-col span="4">备料数</van-col>
                    <van-col span="4">接收数</van-col>
                </van-row>
                <van-row v-for="(itm,index) in ItemDetail.items" :key="index">
                    <van-col span="8" class="text-left padding-left">
                        <div class="blue-text">{{itm.itemNo}}</div>
                        <div>{{itm.itemName}}</div>
                    </van-col>
                    <van-col span="8" class="text-left padding-left">
                        <div>{{itm.itemModel}}</div>
                    </van-col>
                    <van-col span="4" class="blue-text">{{itm.dsQty}}</van-col>
                    <van-col span="4" class="blue-text">{{itm.dsQty}}</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="7" class="text-left padding-left">物料</van-col>
                    <van-col span="7" class="text-left padding-left">规格</van-col>
                    <van-col span="3" >数量</van-col>
                </van-row>
                <van-row
                    v-for="(itm,index) in XbarInfo"
                    :key="index"
                    :style="{ background: itm.is_hedui === '1' ? '#e8f5e9 !important' : 'transparent' }">
                    <van-col span="7" class="text-left padding-left">{{itm.iteM_BARCODE}}</van-col>
                    <van-col span="7" class="text-left padding-left">
                        <div class="blue-text">{{itm.item_no}}</div>
                        <div>{{itm.item_name}}</div>
                    </van-col>
                    <van-col span="7" class="text-left padding-left">
                        <div>{{itm.item_model}}</div>
                    </van-col>
                    <van-col span="3" class="blue-text">{{itm.quantity}}</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="7" class="text-left padding-left">物料</van-col>
                    <van-col span="7" class="text-left padding-left">规格</van-col>
                    <van-col span="3" >数量</van-col>
                </van-row>
                <van-row v-for="(itm,index) in KbBarMxInfo" :key="index">
                    <van-col span="7" class="text-left padding-left" >{{itm.iteM_BARCODE}}</van-col>
                    <van-col span="7" class="text-left padding-left">
                        <div class="blue-text">{{itm.item_no}}</div>
                        <div>{{itm.item_name}}</div>
                    </van-col>
                    <van-col span="7" class="text-left padding-left">
                        <div>{{itm.item_model}}</div>
                    </van-col>
                    <van-col span="3" class="blue-text">{{itm.quantity}}</van-col>
                </van-row>
            </van-tab>
        </van-tabs>
    </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/Xcsl.js?<%=1 %>"></script>
</asp:Content>
H5/Xcsl.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)
    {
    }
}