H5/Js/Sctk.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
H5/Sctk.aspx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
H5/Sctk.aspx.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
H5/Js/Sctk.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,209 @@ var 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(); }); } } }) 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> H5/Sctk.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_Scll : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } }