南骏 池
2025-03-07 7aa6a75b68bbb2111984ef097501144cc872e5cf
1.受托入库
已添加3个文件
301 ■■■■■ 文件已修改
H5/Js/Strk.js 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Strk.aspx 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Strk.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Strk.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,186 @@
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            userInfo: {
                "loginGuid": '',
                "loginAccount": '',
            },
            sms: "",
            billNo: "",
            depotSectionCode: "",
            barcode: "",
            itemNo:"",
            modeInfo: [],
            active: 0,
            depot: {},
            show: false,
            actions: [],
            ItemTblDetail:[]
        }
    },
    mounted() {
        var that = this;
        this.userInfo = {
            loginGuid: this.GetLoginInfor().loginGuid,
            loginAccount: this.GetLoginInfor().loginAccount,
        };
        this.$refs.billNo.focus();
        //that.getInfo();
    },
    methods: {
        getInfo() {
            this.show = true;
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesStrk/GetStrkBillNo', {
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        if (json.data.tbBillList.length <= 0) {
                            that.$toast.fail("没有可用的数据");
                        } 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);
                });
        },
        //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", 'MesStrk/GetMesItemDetailByBillNo', {
                billNo: that.billNo
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.ItemTblDetail = json.data.tbBillList;
                        that.$refs.sectionCode.focus();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.billNo.focus();
                        that.billNo = null;
                        that.ItemTblDetail = [];
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    console.log(error);
                    that.$refs.billNo.focus();
                    that.billNo = null;
                    that.ItemTblDetail = [];
                });
        },
        getDepot() {
            //if (!value) {
            //    return;
            //}
            //this.depotSectionCode = value;
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'MesItemTbl/SctlScanDepots', {
                depotCode: that.depotSectionCode
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.depot = json.data.tbBillList;
                        that.$refs.barcode.focus();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$refs.sectionCode.focus();
                        that.depotSectionCode = null;
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    console.log(error);
                    that.$refs.sectionCode.focus();
                    that.depotSectionCode = null;
                });
        },
        getBarcode() {
            //this.barcode = value;
            var that = this;
            that.isLoading = true;
            if (that.depotSectionCode.length * 1 <= 0) {
                that.$toast.fail("库位编码不能为空!");
                that.isLoading = false;
                return;
            }
            if (that.barcode.length * 1 <= 0) {
                that.$toast.fail("物料条码不能为空!");
                that.isLoading = false;
                return;
            }
            that.AxiosHttp("post", 'MesStrk/XsthScanBarcode', {
                userName: that.userInfo.loginAccount,
                barcode: that.barcode,
                sectionCode: that.depotSectionCode,
                billNo: that.billNo
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.itemNo = json.data.tbBillList.itemNo;
                        that.sms = json.data.tbBillList.num;
                        that.$notify({ type: 'success', message: '扫描成功' });
                        that.$refs.barcode.focus();
                        that.barcode = null;
                        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();
                });
        },
    }
})
H5/Strk.aspx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,101 @@
<%@ Page Title="受托入库" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Strk.aspx.cs" Inherits="H5_Sctl" %>
<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"
     v-model="billNo"
      @keyup.enter.native="getMesItemDetailByBillNo"
     v-focus.noKeyboard
  ><template #button>
    <van-button size="small" type="info" plain @click="getInfo" >选择</van-button>
  </template></van-field>
  <van-field
      ref="sectionCode"
   value=""
   label="库位编号"
   v-model="depotSectionCode"
   clearable
   :right-icon-size="19"
      @keyup.enter.native="getDepot"
   placeholder="请扫码库位编号"
></van-field>
 <van-field
     ref="barcode"
  value=""
  label="物料条码"
   clearable
 placeholder="请扫码"
     v-model="barcode"
  :right-icon-size="19"
     @keyup.enter.native="getBarcode"
  v-focus.noKeyboard
></van-field>
   <van-field
  value=""
  label="物料编码"
  v-model="itemNo"
  placeholder="条码数量"
  disabled
></van-field>
  <van-field
    center
    clearable
    v-model="sms"
    label="数量"
    placeholder="数量"
disabled
  ></van-field>
</van-cell-group>
    </div>
      <van-tabs <%--@click="onClick"--%> color="#000" title-active-color="#0283EF" >
              <van-tab title="待退明细" class="mySolid font">
  <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 ItemTblDetail" 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-tab title="已退明细"></van-tab>
</van-tabs>
    <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/Strk.js?<%=17 %>"></script>
</asp:Content>
H5/Strk.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_Sctl : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}