kyy
2025-10-15 d608ecbbbe77fd691fcd8883d83695e42225a0d7
pda周转箱调拨
已修改4个文件
已添加3个文件
534 ■■■■■ 文件已修改
H5/Js/UserLogin.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/Zzxdb.js 261 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Zzxdb.aspx 213 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Zzxdb.aspx.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Mst.master 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Scripts/config.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UserLogin.aspx 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/Js/UserLogin.js
@@ -5,6 +5,7 @@
            isLoading: false,
            phone: '',
            passwd: '',
            rememberPwd: false,
            show: false,
            show2: false,
        }
H5/Js/Zzxdb.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,261 @@
var vm = new Vue({
    el: '#app',
    data: function () {
        return {
            isLoading: false,
            load: false,
            userInfo: {
                "loginGuid": '',
                "loginAccount": '',
                "loginOrgid":'',
            },
            billNo: "",
            dckw: "", // è°ƒå‡ºåº“位
            drkw: "", // è°ƒå…¥åº“位
            remark: "", // å¤‡æ³¨
            barcode: "",
            ItemBlDetail: [],
            modeInfo: [],
            active: 0,
            show: false,
            actions: [],
            ItemDetail: {
                items: [] // ç¡®ä¿æœ‰è¿™ä¸ªç»“æž„
            },
            scanInfo: {
                barcodeNum: "",
                splitNum: "",
                barcode: "",
            },
            dbNum: "", // è°ƒæ‹¨æ•°é‡
            kcNum: "",  // å³æ—¶åº“å­˜
            printItemInfo: [],
            itemId:"",
            itemNo: "", // ç‰©æ–™ç¼–码
            item_name: "", // ç‰©æ–™åç§°
            item_model: "" // ç‰©æ–™è§„æ ¼
        }
    },
    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", 'Zzxdb/GetItemNoList', {
                //name: that.userInfo.loginAccount,
                itemNo: that.itemNo
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        if (json.data.tbBillList.length == 0) {
                            that.$toast.fail("没有找到可以选择的物料编号");
                        }
                        that.actions = json.data.tbBillList.map(item => {
                            return {
                                name: item.item_no,
                                itemId : item.item_id
                            }
                        });
                    }
                    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.itemNo = item.name;
            this.itemId = item.itemId;
            console.log("物料id", this.itemId)
            this.itemNo = item.name.split('/')[0];
            this.GetMesItemByItemNo();
            //this.$toast(item.name);
        },
        GetMesItemBlDetailByBillNo() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Zzxdb/GetKwByBillNo', {
                billNo: that.billNo
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        if (json.data.tbBillList.xcslItemList[0].rnum == 2) {
                            that.drkw = 'Z2';
                            that.dckw = 'A14-3-33';
                            that.billNo = json.data.tbBillList.xcslItemList[0].billno;
                        }
                        else {
                            that.drkw = 'A14-3-33';
                            that.dckw = 'Z2';
                            that.billNo = json.data.tbBillList.xcslItemList[0].billno;
                        }
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.billNo = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$refs.billNo.focus();
                    that.billNo = "";
                    that.ItemBlDetail = null;
                    //console.log(error);
                });
        },
        GetMesItemByItemNo() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Zzxdb/GetMesItemByItemNo', {
                itemNo: that.itemNo,
                userName: that.userInfo.loginAccount,
                dckw: that.dckw,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.itemNo = json.data.tbBillList.xcslItemList[0].item_no;
                        that.item_model = json.data.tbBillList.xcslItemList[0].item_model;
                        that.item_name = json.data.tbBillList.xcslItemList[0].item_name;
                        that.kcNum = json.data.tbBillList.xcslItemList[0].kcnum;
                        that.ItemDetail.items = json.data.tbBillList.itemDetail
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.itemNo = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$refs.billNo.focus();
                    that.billNo = "";
                    that.ItemBlDetail = null;
                    //console.log(error);
                });
        },
        saveDbsq() {
            var that = this;
            that.isLoading = true;
            if (that.dbNum <= 0) {
                that.$toast.fail("调拨数量不能为0");
                that.isLoading = false;  // æ·»åŠ è¿™è¡Œ
                return;  // æ·»åŠ è¿”å›ž
            }
            if (that.dbNum > that.kcNum) {
                that.$toast.fail("调拨数量不能大于即时库存");
                that.isLoading = false;  // æ·»åŠ è¿™è¡Œ
                return;  // æ·»åŠ è¿”å›ž
            }
            that.AxiosHttp("post", 'Zzxdb/saveDbsq', {
                id: that.itemId,
                dbNum: that.dbNum,
                userName: that.userInfo.loginAccount,
                remark: that.remark,
                drkw: that.drkw,
                dckw: that.dckw,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                       that.GetMesItemByItemNo();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.itemNo = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$refs.billNo.focus();
                    that.billNo = "";
                    that.ItemBlDetail = null;
                    //console.log(error);
                });
        },
        deleteDbsqMx(mxid) {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Zzxdb/deleteDbsqMx', {
                id: mxid,
                userName: that.userInfo.loginAccount,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.GetMesItemByItemNo();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.itemNo = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    //console.log(error);
                });
        },
        submitDbBillNo() {
            var that = this;
            that.isLoading = true;
            that.AxiosHttp("post", 'Zzxdb/submit', {
                id: that.ItemDetail.items[0].pid,
                userName: that.userInfo.loginAccount,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        that.GetMesItemByItemNo();
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.itemNo = "";
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    //console.log(error);
                });
        }
    }
})
H5/Zzxdb.aspx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,213 @@
<%@ Page Title="周转箱调拨" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style>
        .bg-info {
            background-color: #fff;
        }
        .container {
            padding: 10px;
        }
        .header {
            background-color: #f5f5f5;
            padding: 8px 0;
            font-weight: bold;
            border-bottom: 1px solid #ebedf0;
        }
        .data-rows {
            max-height: 400px;
            overflow-y: auto;
        }
        .data-row {
            padding: 8px 0;
            border-bottom: 1px solid #ebedf0;
        }
        .text-left {
            text-align: left;
        }
        .padding-left {
            padding-left: 8px;
        }
        .blue-text {
            color: #1989fa;
        }
        .empty-state {
            text-align: center;
            padding: 20px;
            color: #969799;
        }
        .mySolid.font {
            font-size: 14px;
        }
        .van-button {
            margin: 5px;
        }
        .van-cell-group {
            margin-bottom: 10px;
        }
    </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"
              v-model="billNo"
              label="单据编号"
              clearable
              placeholder="输入或扫描二维码"
              :right-icon-size="19"
              v-focus.noKeyboard
              @keyup.enter.native="GetMesItemBlDetailByBillNo()"
          ></van-field>
          <van-field
              ref="dckw"
              v-model="dckw"
              label="调出库位"
              clearable
              placeholder="输入或扫描二维码"
              :right-icon-size="19"
              v-focus.noKeyboard
          ></van-field>
          <van-field
              ref="drkw"
              v-model="drkw"
              label="调入库位"
              clearable
              placeholder="输入或扫描二维码"
              :right-icon-size="19"
              v-focus.noKeyboard
          ></van-field>
          <van-field
              v-model="itemNo"
              label="物料编码"
              clearable
              placeholder="物料编码"
              :right-icon-size="19"
               v-focus.noKeyboard
              @keyup.enter.native="GetMesItemByItemNo()"
          >
           <template #button>
              <van-button size="small" type="info" plain @click="getInfo">选择</van-button>
            </template>
          </van-field>
          <van-field
              ref="dbNum"
              v-model="dbNum"
              center
              clearable
              label="调拨数量"
              placeholder="输入调拨数量"
              v-focus.noKeyboard
          ></van-field>
              <van-field
                  v-model="item_name"
                  label="物料名称"
                  placeholder=""
                     clearable
                   :right-icon-size="19"
                  disabled
              ></van-field>
              <van-field
                  v-model="item_model"
                  label="物料规格"
                     clearable
                  placeholder=""
                   :right-icon-size="19"
                  disabled
              ></van-field>
              <van-field
                  v-model="remark"
                  label="备注"
                  clearable
                  placeholder="输入备注"
                  :right-icon-size="19"
              ></van-field>
              <van-field
                  v-model="kcNum"
                  label="即时库存"
                     clearable
                  placeholder="即时库存"
                   :right-icon-size="19"
                  disabled
              ></van-field>
          </van-cell-group>
      </div>
      <div style="padding: 10px;">
          <van-button type="primary" @click="saveDbsq" :loading="load" loading-text="发送中">保存</van-button>
          <van-button type="primary" @click="submitDbBillNo" :loading="load" loading-text="发送中">确认调拨</van-button>
      </div>
    <van-tabs color="#000" title-active-color="#0283EF">
      <van-tab title="待确认调拨单" class="mySolid font">
        <div class="container">
          <!-- è¡¨å¤´ -->
          <van-row class="header">
            <van-col span="3" class="text-left padding-left">调出库位</van-col>
            <van-col span="3" class="text-left padding-left">调入库位</van-col>
            <van-col span="5" class="text-left padding-left">物料编码</van-col>
            <van-col span="3">调拨数量</van-col>
            <van-col span="4" 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-row>
          <!-- æ•°æ®è¡Œ -->
          <div class="data-rows">
            <van-row v-for="(itm,index) in ItemDetail.items" :key="index" class="data-row">
               <van-col span="3" class="text-left padding-left">
                   <div>{{itm.dckw}}</div>
              </van-col>
              <van-col span="3" class="text-left padding-left">
                    <div>{{itm.drkw}}</div>
              </van-col>
              <van-col span="5" class="text-left padding-left">
                <div class="blue-text">{{itm.itemNo}}</div>
              </van-col>
              <van-col span="3" class="blue-text">{{itm.FQty}}</van-col>
              <van-col span="4" class="text-left padding-left">
                 <div>{{itm.itemName}}</div>
              </van-col>
              <van-col span="3">{{itm.itemModel}}</van-col>
              <van-col center span="3">
                <van-tag type="danger" @click="deleteDbsqMx(itm.id)" style="font-size:15px" >删除</van-tag>
              </van-col>
            </van-row>
            <!-- ç©ºçŠ¶æ€æç¤º -->
            <div v-if="!ItemDetail.items || ItemDetail.items.length === 0" class="empty-state">
              æš‚无数据
            </div>
          </div>
        </div>
      </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>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">
 <script src="Js/Zzxdb.js?<%=11117 %>"></script>
</asp:Content>
H5/Zzxdb.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_Scbl : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
Mst.master
@@ -11,7 +11,7 @@
    <script src="/Scripts/vue.min.js"></script>
    <script src="/Scripts/js.cookie.min.js"></script>
    <script src="/scripts/axios0.25.0.js"></script>
    <script src="/scripts/config.js?<%=123611130 %>"></script>
    <script src="/scripts/config.js?<%=123611131 %>"></script>
   <!-- <script src="/scripts/config.js?<%=DateTime.Now.Ticks %>"></script>-->
    <link href="/scripts/vant/vant.css" rel="stylesheet" />
    <script src="/scripts/vant/vant.js"></script>
Scripts/config.js
@@ -86,6 +86,8 @@
        url = (APIURL_PC + url);
    }
    let headers = { 'Content-Type': 'application/json', }
    var orgId = Cookies.get('orgId')
    headers['OrgId'] = orgId;
    if (isToken) {
        var timestamp = (new Date()).getTime();
        var token = Cookies.get('loginGuid')
UserLogin.aspx
@@ -4,6 +4,35 @@
        .bg-info {
            background-color:#fff;
        }
       .remember-pwd {
            display: flex;
            align-items: center;
            padding: 8px 16px;
            margin: 10px 0;
        }
        .remember-label {
            font-size: 14px;
            color: #323233;
            display: flex;
            align-items: center;
        }
        .custom-checkbox {
            transform: scale(0.9); /* ç¼©å°å¤é€‰æ¡† */
            margin-right: 6px; /* è°ƒæ•´ä¸Žæ–‡å­—的间距 */
        }
        .forgot-pwd {
            font-size: 14px;
            color: #1989fa;
            text-decoration: none;
        }
        /* å¦‚果需要更精确的控制,可以覆盖Vant样式 */
        .van-checkbox__icon .van-icon {
            font-size: 18px; /* è°ƒæ•´å›¾æ ‡å¤§å° */
        }
        .van-checkbox__label {
            margin-left: 5px; /* è°ƒæ•´æ ‡ç­¾å·¦è¾¹è· */
            font-size: 14px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
@@ -37,6 +66,16 @@
                  placeholder="请输入密码" 
                  :rules="[{ required: true, message: '请输入密码' }]"
                ></van-field>
               <!-- è®°ä½å¯†ç å¤é€‰æ¡† - è°ƒæ•´ä½ç½®åˆ°è¡¨å•项外面 -->
                <div class="remember-pwd">
                    <van-checkbox
                        v-model="rememberPwd"
                        shape="square"
                        icon-size="16px"
                        class="remember-label">
                        è®°ä½å¯†ç 
                    </van-checkbox>
                </div>
             </van-cell-group>
                <div  class="margin padding margin-lg-bottom">
                    <van-button round block type="info" native-type="submit" :loading="isLoading">
@@ -54,5 +93,5 @@
  <comloading  v-if="isLoading"></comloading>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder4" runat="Server">
    <script src="/H5/Js/UserLogin.js?<%=1236 %>"></script>
    <script src="/H5/Js/UserLogin.js?<%=1237 %>"></script>
</asp:Content>