南骏 池
2025-05-21 7e0b9ec2f74fe482817fc5d77456398995535849
1.SRM送货单现场收料
已添加3个文件
391 ■■■■■ 文件已修改
H5/Dhdsh.aspx 191 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Dhdsh.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Dhdsh.js 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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>
H5/Dhdsh.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_Dhdsh : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
H5/Js/Dhdsh.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,186 @@
var 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送货单还未生成MES送货单!");
                that.$refs.shdh.focus();
                return;
            }
            //that.ttrre = true;  // æäº¤çŠ¶æ€è®¾ä¸ºtrue时,自动禁用遮罩点击
            that.ttrre1 = true;  // æäº¤çŠ¶æ€è®¾ä¸ºtrue时,自动禁用遮罩点击
            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送货单还未生成MES送货单!");
                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);
            });
        },
    }
})