From 41e334380166d820c41b7033df441d43e5654a23 Mon Sep 17 00:00:00 2001
From: 南骏 池 <chiffly@163.com>
Date: 星期一, 21 四月 2025 08:52:40 +0800
Subject: [PATCH] 1.生产退库功能实现
---
H5/Sctk.aspx | 111 ++++++++++++++++++
H5/Sctk.aspx.cs | 14 ++
H5/Js/Sctk.js | 209 ++++++++++++++++++++++++++++++++++
3 files changed, 334 insertions(+), 0 deletions(-)
diff --git a/H5/Js/Sctk.js b/H5/Js/Sctk.js
new file mode 100644
index 0000000..290b112
--- /dev/null
+++ b/H5/Js/Sctk.js
@@ -0,0 +1,209 @@
+锘縱ar vm = new Vue({
+ el: '#app',
+ data: function () {
+ return {
+ isLoading: false,
+ userInfo: {
+ "loginGuid": '',
+ "loginAccount": '',
+ },
+ scanFormData: {
+ itemOutNo: "",
+ barcode: "",
+ itemNo: "",
+ quantity:0
+ },
+ formData: {},
+ ItemDetail: [],
+ codeTableData: [],
+ itemOutNoList: [],
+ itemOutNoStr: [],
+ invItemOutId: '',
+
+ barMessage: "",
+
+ Message: "",
+ messageCenter: {},
+ messageId: 0,
+
+ show: false,
+ }
+ },
+ mounted() {
+ var that = this;
+ this.userInfo = {
+ loginGuid: this.GetLoginInfor().loginGuid,
+ loginAccount: this.GetLoginInfor().loginAccount,
+ };
+ that.beginload();
+ //that.show = false;
+ },
+ methods: {
+ getItemOutNo() {
+ var that = this;
+
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesSctk/GetMesSctkSq', {
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.itemOutNoList = json.data.tbBillList;
+ that.itemOutNoStr = that.itemOutNoList.map(s => {
+ return { name: s.billNo }
+ });
+ that.show = true;
+ }
+ else {
+ that.$toast.fail(json.message);
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.log(error);
+ });
+
+ },
+ beginload() {
+ var that = this;
+
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesSctk/GetMesSctkSq', {
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.itemOutNoList = json.data.tbBillList;
+ }
+ else {
+ that.$toast.fail(json.message);
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ console.log(error);
+ });
+
+ },
+ onSelect(item) {
+ // 榛樿鎯呭喌涓嬬偣鍑婚�夐」鏃朵笉浼氳嚜鍔ㄦ敹璧�
+ // 鍙互閫氳繃 close-on-click-action 灞炴�у紑鍚嚜鍔ㄦ敹璧�
+ this.show = false;
+
+ //let staf = this.stafList.filter(it => it.staffName === item.name);
+
+ this.scanFormData.itemOutNo = item.name;
+
+ let itemOut = this.itemOutNoList.filter(it => it.billNo == item.name);
+
+ this.invItemOutId = itemOut[0].id;
+
+ 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;
+ that.isLoading = true;
+
+ let itemOut = this.itemOutNoList.filter(it => it.billNo == that.scanFormData.itemOutNo);
+
+ this.invItemOutId = itemOut[0].id;
+
+ that.AxiosHttp("post", 'MesSctk/GetSumItem', {
+ id: that.invItemOutId,
+ billNo: that.scanFormData.itemOutNo,
+ barcode: that.scanFormData.barcode,
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ that.ItemDetail = json.data.tbBillList;
+ that.$refs.barcode.focus();
+ }
+ else {
+ that.$toast.fail(json.message);
+ that.ItemDetail = [];
+ }
+ that.isLoading = false;
+ })
+ .catch(function (error) {
+ that.isLoading = false;
+ that.$toast.fail("缃戠粶閿欒锛岃閲嶈瘯锛�");
+ that.ItemDetail = [];
+ });
+ },
+
+ SaveBarCodes() {
+
+ //if (!this.scanFormData.barcode) {
+
+ //}
+ var that = this;
+
+ that.isLoading = true;
+ that.AxiosHttp("post", 'MesSctk/ScanCode', {
+ billNo: that.scanFormData.itemOutNo,
+ userName: that.userInfo.loginAccount,
+ barcode: that.scanFormData.barcode,
+ }, false)
+ .then(function (res) {
+ var json = res;
+ if (json.status == 0) {
+ //if (json.data.tbBillList) {
+ // //this.ToErp();
+ //} else {
+
+ //}
+ that.scanFormData.quantity = json.data.tbBillList.barcodeNum
+ that.getItem();
+ that.$refs.barcode.focus();
+ that.scanFormData.barcode = null;
+ }
+ else {
+ that.$toast.fail(json.message);
+ that.$refs.barcode.focus();
+ that.scanFormData.barcode = null;
+ }
+ that.$notify({ type: 'success', message: json.message });
+ 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/Sctk.aspx b/H5/Sctk.aspx
new file mode 100644
index 0000000..2ec632c
--- /dev/null
+++ b/H5/Sctk.aspx
@@ -0,0 +1,111 @@
+锘�<%@ Page Title="鐢熶骇閫�搴�" Language="C#" MasterPageFile="~/Mst.master" AutoEventWireup="true" CodeFile="Sctk.aspx.cs" Inherits="H5_Scll" %>
+<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">
+ <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
+ value=""
+ label="閫�搴撶敵璇�"
+ clearable
+ placeholder="閫夋嫨閫�搴撶敵璇�"
+ :right-icon-size="19"
+ v-model="scanFormData.itemOutNo"
+ @keyup.enter.native="getItem"
+ v-focus.noKeyboard
+ ><template #button>
+ <van-button size="small" type="info" plain @click="getItemOutNo" >閫夋嫨</van-button>
+ </template></van-field>
+ <van-field
+ ref="barcode"
+ v-model="scanFormData.barcode"
+ label="鐗╂枡鏉$爜"
+ clearable
+ placeholder="璇锋壂鎻忕墿鏂欐潯鐮�"
+ :right-icon-size="19"
+ v-focus.noKeyboard
+ @keyup.enter.native="SaveBarCodes"
+ <%--@change="SaveBarCodes"--%>
+></van-field>
+ <van-field
+ v-model="scanFormData.itemNo"
+ label="鐗╂枡缂栫爜"
+ placeholder="鐗╂枡缂栫爜"
+ disabled
+></van-field>
+ <van-field
+ v-model="scanFormData.quantity"
+ label="鏁伴噺"
+ placeholder="鏁伴噺"
+ disabled
+></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="3">寰呮壂</van-col>
+ <van-col span="5">鎺ㄨ崘搴撲綅</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="3" class="blue-text">{{itm.dsQty}}</van-col>
+ <van-col span="5">{{itm.recoKw}}</van-col>
+ </van-row>
+ </van-tab>
+
+ <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="3">闇�棰嗘暟</van-col>
+ <van-col span="5">宸查鏁�</van-col>
+ </van-row>
+ <van-row v-for="(itm,index) in ItemDetail.ysitems" :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="3">{{itm.fQty}}</van-col>
+ <van-col span="5" class="blue-text">{{itm.sQty}}</van-col>
+ </van-row>
+ </van-tab>
+</van-tabs>
+
+<%-- <van-button type="primary" @click="SaveBarCodes" >纭</van-button>--%>
+ <van-action-sheet v-model="show" :actions="itemOutNoStr" @select="onSelect" ></van-action-sheet>
+ </div>
+</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/Sctk.js?<%=11 %>"></script>
+</asp:Content>
diff --git a/H5/Sctk.aspx.cs b/H5/Sctk.aspx.cs
new file mode 100644
index 0000000..f11cc1f
--- /dev/null
+++ b/H5/Sctk.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_Scll : System.Web.UI.Page
+{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+}
\ No newline at end of file
--
Gitblit v1.9.3