From 7aa6a75b68bbb2111984ef097501144cc872e5cf Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期五, 07 三月 2025 09:52:51 +0800
Subject: [PATCH] 1.受托入库
---
H5/Js/Strk.js | 186 +++++++++++++++++++++++++++++++
H5/Strk.aspx | 101 ++++++++++++++++
H5/Strk.aspx.cs | 14 ++
3 files changed, 301 insertions(+), 0 deletions(-)
diff --git a/H5/Js/Strk.js b/H5/Js/Strk.js
new file mode 100644
index 0000000..bc01d1b
--- /dev/null
+++ b/H5/Js/Strk.js
@@ -0,0 +1,186 @@
+锘縱ar 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();
+ });
+ },
+ }
+})
\ No newline at end of file
diff --git a/H5/Strk.aspx b/H5/Strk.aspx
new file mode 100644
index 0000000..fdae29f
--- /dev/null
+++ b/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>
+
diff --git a/H5/Strk.aspx.cs b/H5/Strk.aspx.cs
new file mode 100644
index 0000000..85ea66b
--- /dev/null
+++ b/H5/Strk.aspx.cs
@@ -0,0 +1,14 @@
+锘縰sing 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)
+ {
+
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.3