From 45af2754d00347ec86492707e15b3884557ee851 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 24 十二月 2024 09:02:54 +0800 Subject: [PATCH] PDA --- 代码管理/淮安PDA/pages/raworderboxing/raworderboxing.vue | 4 代码管理/淮安PDA/pages/index/index.vue | 44 + 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 19 代码管理/淮安PDA/pages/stash/printingink/index.vue | 169 +++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 26 + 代码管理/淮安PDA/pages/stash/QueryData.vue | 143 +++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 48 -- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs | 12 /dev/null | 52 -- 代码管理/淮安PDA/pages/stash/TakeStock.vue | 430 +++++++++++++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs | 1 代码管理/淮安PDA/pages.json | 43 + 代码管理/淮安PDA/pages/stash/pickingMat.vue | 237 +++++++++ 代码管理/淮安PDA/pages/stash/inboundorder.vue | 177 +++++++ 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs | 11 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 2 16 files changed, 1,285 insertions(+), 133 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockOutboundOrderDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockOutboundOrderDTO.cs" deleted file mode 100644 index e3ef4c8..0000000 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockOutboundOrderDTO.cs" +++ /dev/null @@ -1,52 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WIDESEA_DTO.Stock -{ - public class StockOutboundOrderDTO - { - /// <summary> - /// 鍗曟嵁缂栫爜 - /// </summary> - public string OrderNo { get; set; } - /// <summary> - /// 鎵樼洏鍙� - /// </summary> - public string PalletCode { get; set; } - /// <summary> - /// 鐗╂枡缂栫爜 - /// </summary> - public string MaterielCode { get; set; } - /// <summary> - /// 鐗╂枡鍚嶇О - /// </summary> - public string MaterielName { get; set; } - /// <summary> - /// 鎵规鍙� - /// </summary> - public string BatchNo { get; set; } - /// <summary> - /// 搴忓垪鍙� - /// </summary> - public string SerialNumber { get; set; } - /// <summary> - /// 搴撳瓨鏁伴噺 - /// </summary> - public float StockQuantity { get; set; } - /// <summary> - /// 鍑哄簱鏁伴噺 - /// </summary> - public float OutboundQuantity { get; set; } - /// <summary> - /// 宸ュ崟鎬绘暟 - /// </summary> - public float OrderQuantity { get; set; } - /// <summary> - /// 宸插嚭鏁伴噺 - /// </summary> - public float OverOutQuantity { get; set; } - } -} diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" index f8d11f6..c7c2cba 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" @@ -4,6 +4,7 @@ using System.Text; using System.Threading.Tasks; using WIDESEA_Common.StockEnum; +using WIDESEA_Core; using WIDESEA_Core.BaseServices; using WIDESEA_Core.Enums; using WIDESEA_IOutboundRepository; @@ -18,5 +19,6 @@ List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null); List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutLockStockStatusEnum outStockStatus); + List<Dt_OutStockLockInfo> GetStockOutboundOrder(SaveModel saveModel); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" index 0851e31..0428d59 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" @@ -20,6 +20,5 @@ List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity); List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId); - StockOutboundOrderDTO GetStockOutboundOrder(SaveModel saveModel); } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" index 86ee62b..c34d2ff 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" @@ -11,6 +11,7 @@ using WIDESEA_Common.CommonEnum; using WIDESEA_Common.OrderEnum; using WIDESEA_Common.StockEnum; +using WIDESEA_Common.WareHouseEnum; using WIDESEA_Core; using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; @@ -45,10 +46,11 @@ private readonly IStockRepository _stockRepository; private readonly IRecordService _recordService; private readonly IInvokeERPService _invokeERPService; + private readonly IWarehouseService _warehouseService; public IInboundOrderRepository Repository => BaseDal; - public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IInboundRepository inboundRepository, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService, IInvokeERPService invokeERPService) : base(BaseDal) + public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IInboundRepository inboundRepository, IBasicRepository basicRepository, IStockRepository stockRepository, IRecordService recordService, IInvokeERPService invokeERPService, IWarehouseService warehouseService) : base(BaseDal) { _mapper = mapper; _unitOfWorkManage = unitOfWorkManage; @@ -57,6 +59,7 @@ _stockRepository = stockRepository; _recordService = recordService; _invokeERPService = invokeERPService; + _warehouseService = warehouseService; } public WebResponseContent GetInboundOrders(SaveModel saveModel) { @@ -186,8 +189,15 @@ var orderNo = saveModel.MainData["orderNo"].ToString(); var palletCode = saveModel.MainData["palletCode"].ToString(); var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); + var Initiallife = saveModel.MainData["initiallife"].ObjToInt(); var serNums = saveModel.DelKeys.Select(x => x.ToString()).ToList(); - Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == orderNo && x.WarehouseId == warehouseId).Includes(x => x.Details).First(); + Dt_Warehouse warehouse = _warehouseService.Repository.QueryFirst(x => x.WarehouseId == warehouseId); + if (warehouse == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌浠撳簱淇℃伅"); + } + + Dt_InboundOrder inboundOrder = BaseDal.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == orderNo && x.WarehouseId == warehouse.WarehouseId).Includes(x => x.Details).First(); if (inboundOrder == null) { return WebResponseContent.Instance.Error($"鏈壘鍒板叆搴撳崟淇℃伅"); @@ -257,6 +267,11 @@ beforeQuantity = stockInfo.Details.Sum(x => x.StockQuantity); } + if (warehouse.WarehouseCode == WarehouseEnum.HA64.ToString()) + { + stockInfo.Remark = Initiallife.ToString(); + } + List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>(); List<int> detailKeys = new List<int>(); foreach (var model in models) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" index 4c9edb1..7a3b2e4 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" @@ -4,6 +4,7 @@ using System.Text; using System.Threading.Tasks; using WIDESEA_Common.StockEnum; +using WIDESEA_Core; using WIDESEA_Core.BaseServices; using WIDESEA_Core.Enums; using WIDESEA_Core.Helper; @@ -52,5 +53,30 @@ { return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && x.Status == outStockStatus.ObjToInt()); } + + public List<Dt_OutStockLockInfo> GetStockOutboundOrder(SaveModel saveModel) + { + try + { + var palletCode = saveModel.MainData["barcode"].ToString(); + var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); + Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId).Includes(x => x.Details).First(); + if (stockInfo == null) + { + throw new Exception($"鏈壘鍒板簱瀛樹俊鎭�"); + } + Dt_StockInfoDetail stockInfoDetail = stockInfo.Details.FirstOrDefault(); + if (stockInfoDetail == null) + { + throw new Exception($"鏈壘鍒板簱瀛樿鎯�"); + } + List<Dt_OutStockLockInfo> stockLockInfos = BaseDal.QueryData(x => x.StockId == stockInfo.Id); + return stockLockInfos; + } + catch (Exception ex) + { + return null; + } + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" index 13e2579..0a53824 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" @@ -71,54 +71,6 @@ } } - public StockOutboundOrderDTO GetStockOutboundOrder(SaveModel saveModel) - { - try - { - var palletCode = saveModel.MainData["barcode"].ToString(); - Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); - if (stockInfo == null) - { - throw new Exception($"鏈壘鍒板簱瀛樹俊鎭�"); - } - Dt_StockInfoDetail stockInfoDetail = stockInfo.Details.FirstOrDefault(); - if (stockInfoDetail == null) - { - throw new Exception($"鏈壘鍒板簱瀛樿鎯�"); - } - BaseDal.QueryTabs<Dt_OutboundOrder, Dt_OutboundOrderDetail, StockOutboundOrderDTO>((a, b) => a.Id == b.OrderId, (a, b) => new StockOutboundOrderDTO - { - OrderNo = a.OrderNo, - MaterielCode = b.MaterielCode, - MaterielName = b.MaterielName, - PalletCode = stockInfo.PalletCode, - BatchNo = b.BatchNo, - OrderQuantity = b.OrderQuantity, - OverOutQuantity = b.OverOutQuantity, - OutboundQuantity = stockInfoDetail.OutboundQuantity, - SerialNumber = stockInfoDetail.SerialNumber, - StockQuantity = stockInfoDetail.StockQuantity, - - }, a => true, b => b.BatchNo == stockInfoDetail.BatchNo && b.MaterielCode == stockInfoDetail.MaterielCode, x => true).Select(x => new StockOutboundOrderDTO - { - OrderNo = x.OrderNo, - MaterielCode = x.MaterielCode, - MaterielName = x.MaterielName, - PalletCode = x.PalletCode, - BatchNo = x.BatchNo, - OrderQuantity = x.OrderQuantity, - OverOutQuantity = x.OverOutQuantity, - OutboundQuantity = x.OutboundQuantity, - SerialNumber = x.SerialNumber, - StockQuantity = x.StockQuantity, - }).ToList(); - return new StockOutboundOrderDTO(); - } - catch (Exception ex) - { - return null; - } - } /// <summary> /// diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" index 804c583..22a25d5 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutStockLockInfoController.cs" @@ -1,5 +1,6 @@ 锘縰sing Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using WIDESEA_Core; using WIDESEA_Core.BaseController; using WIDESEA_IOutboundService; using WIDESEA_Model.Models; @@ -13,5 +14,16 @@ public OutStockLockInfoController(IOutStockLockInfoService service) : base(service) { } + + /// <summary> + /// 鎷i�� + /// </summary> + /// <param name="saveModel"></param> + /// <returns></returns> + [HttpPost, HttpGet, Route("GetStockOutboundOrder")] + public List<Dt_OutStockLockInfo> GetStockOutboundOrder([FromBody] SaveModel saveModel) + { + return Service.GetStockOutboundOrder(saveModel); + } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs" index 0626847..d35ce09 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs" @@ -24,16 +24,5 @@ { return Service.GetStockSelectViews(orderId, materielCode); } - - /// <summary> - /// 鎷i�� - /// </summary> - /// <param name="saveModel"></param> - /// <returns></returns> - [HttpPost, HttpGet, Route("GetStockOutboundOrder")] - public StockOutboundOrderDTO GetStockOutboundOrder([FromBody] SaveModel saveModel) - { - return Service.GetStockOutboundOrder(saveModel); - } } } diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" index 1d25e1c..3322c96 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages.json" @@ -21,6 +21,49 @@ "navigationBarTitleText": "鐧诲綍" } }, + + { + "path": "pages/stash/printingink/index", + "style": { + "navigationBarTitleText": "娌瑰ⅷ浠�", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/stash/inboundorder", + "style": { + "navigationBarTitleText": "缁勭洏", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/stash/pickingMat", + "style": { + "navigationBarTitleText": "鎷i��", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/stash/TakeStock", + "style": { + "navigationBarTitleText": "鐩樼偣", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/stash/QueryData", + "style": { + "navigationBarTitleText": "鏌ヨ", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/receiveorder/receiveorder", + "style": { + "navigationBarTitleText": "鏀惰揣", + "enablePullDownRefresh": false + } + }, // { // "path": "pages/materielGroup/inboundOrder", // "style": { diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" index b48b3ba..67f9ff8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/index/index.vue" @@ -2,12 +2,13 @@ <!-- <u-card :title="title" > --> <view class="" slot="body"> <!-- <view v-for="(item,index) in tree" :key="item.id"> --> - <u-grid :col="3"> - <u-grid-item @tap="clickCoupon(item.url)" v-for="(item) in tree" :key="item.id"> - <u-icon name="coupon" :size="50"></u-icon> - <view class="grid-text">{{item.name}}</view> - </u-grid-item> - </u-grid> + <u-grid :col="3"> + <u-grid-item @tap="clickCoupon(item.url,item.menuId,item.description)" v-for="(item) in tree" + :key="item.menuId"> + <u-icon name="home" :size="50"></u-icon> + <view class="grid-text">{{item.menuName}}</view> + </u-grid-item> + </u-grid> <!-- </view> --> <u-toast ref="uToast" /> </view> @@ -16,14 +17,16 @@ </template> <script> - import { config } from '../../common/config.js' + import { + config + } from '../../common/config.js' export default { data() { return { // title: '鎿嶄綔鍔熻兘' datas: [], tree: [], - version:"" + version: "" } }, onShow() { @@ -42,7 +45,7 @@ this.getCurrentTree(); }, mounted() { - + }, methods: { AndroidCheckUpdate: function() { @@ -53,14 +56,15 @@ data: {}, success: res => { if (res.data.data) { - + uni.showToast({ title: '鏈夋柊鐨勭増鏈彂甯冿紝妫�娴嬪埌鎮ㄧ洰鍓嶄负Wifi杩炴帴锛岀▼搴忓凡鍚姩鑷姩鏇存柊銆傛柊鐗堟湰涓嬭浇瀹屾垚鍚庡皢鑷姩寮瑰嚭瀹夎绋嬪簭銆�', mask: false, duration: 5000, icon: "none" }); - var dtask = plus.downloader.createDownload("http://10.1.211.101:9004/api/PDA/DownLoadApp", {}, + var dtask = plus.downloader.createDownload( + "http://10.1.211.101:9004/api/PDA/DownLoadApp", {}, function(d, status) { // 涓嬭浇瀹屾垚 if (status == 200) { @@ -89,9 +93,9 @@ complete: () => {} }); }, - getCurrentTree() { - this.$u.post('/api/Sys_Menu/getTreeMenu', {}).then(result => { - this.tree = result; + getCurrentTree(ParentId) { + this.$u.post('/api/Sys_Menu/GetTreeMenuPDAStash?ParentId=' + ParentId, {}).then(result => { + this.tree = result; }) }, getTree(id, data, isRootId) { @@ -111,10 +115,16 @@ // return true; return this.datas.find(x => x.text == text); }, - clickCoupon(url) { + clickCoupon(url, menuid, warehouseid) { // console.log("clickCoupon") if (this.hasLogin()) { - this.$u.route(url) + this.$u.route({ + url: url, + params: { + menuId: menuid, + warehouseId: warehouseid + } + }) } else { this.$t.message.loading('鐧诲綍澶辨晥璇烽噸鏂扮櫥褰�') uni.reLaunch({ @@ -153,4 +163,4 @@ margin-top: 4rpx; color: $u-type-info; } -</style> +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/raworderboxing/raworderboxing.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/raworderboxing/raworderboxing.vue" index 8af1910..69d5602 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/raworderboxing/raworderboxing.vue" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/raworderboxing/raworderboxing.vue" @@ -16,9 +16,9 @@ <uni-easyinput type="text" placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="focus" v-model="materSn" @input="snInput" /> </uni-forms-item> - <uni-forms-item> + <!-- <uni-forms-item> <checkbox checked="check">鏄惁婊$洏</checkbox> - </uni-forms-item> + </uni-forms-item> --> <uni-forms-item> <button @click="submit" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button> </uni-forms-item> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/QueryData.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/QueryData.vue" new file mode 100644 index 0000000..93ce629 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/QueryData.vue" @@ -0,0 +1,143 @@ +<template> + <view > + <!-- <uni-forms ref="formData" :modelValue="formData" label-width="120"> --> + <uni-forms class="customcss" label-width="120"> + <uni-forms-item label="鏉$爜淇℃伅"> + <uni-easyinput type="text" :focus="!barcodefocus" v-model="barcode" placeholder="璇锋壂鎻忔墭鐩樻潯鐮佹垨灏忕伀杞︽潯鐮�" ref='midInput' + @input="locationNoinputChange()" /> + </uni-forms-item> + </uni-forms> + <uni-list class="footer"> + <uni-list-item direction="column" v-for="(item,index) in infos" :key="index"> + <template v-slot:body> + <view class="uni-list-box"> + <view class="uni-content"> + <view class="uni-title-sub uni-ellipsis-2">鐗╂枡缂栧彿锛歿{item.matCode}}</view> + <view class="uni-title-sub uni-ellipsis-2">鐗╂枡鍚嶇О锛歿{item.matName}}</view> + <view class="uni-title-sub uni-ellipsis-2">鎵樼洏鍙凤細{{item.barcode}}</view> + <view class="uni-title-sub uni-ellipsis-2">鍑哄簱鏁伴噺锛歿{item.quantity}}</view> + <view class="uni-title-sub uni-ellipsis-2">閰嶉�佸湴鍧�锛歿{item.address}}</view> + <view class="uni-title-sub uni-ellipsis-2">褰撳墠浣嶇疆锛歿{item.currentAddress}}</view> + </view> + </view> + </template> + </uni-list-item> + </uni-list> + + <u-toast ref="uToast" /> + </view> +</template> + +<script> + export default { + data() { + return { + infos: [], + barcode: '', + barcodefocus: false, + } + }, + onLoad(res) { + }, + methods: { + locationNoinputChange() { + this.$nextTick(function(x) { + if (this.barcode != '') { + var postData = { + MainData: { + "barcode": this.barcode + } + }; + this.$u.post('/api/Carry/GetCarryInfo', postData).then(res => { + if (res.status) { + this.infos = res.data + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + this.barcode = ""; + }) + this.istrue = true; + } + }) + } + } + } +</script> + +<style lang="scss"> + @import '@/common/uni-ui.scss'; + + page { + display: flex; + flex-direction: column; + box-sizing: border-box; + background-color: #efeff4; + min-height: 100%; + height: auto; + } + + .tips { + color: #67c23a; + font-size: 14px; + line-height: 40px; + text-align: center; + background-color: #f0f9eb; + height: 0; + opacity: 0; + transform: translateY(-100%); + transition: all 0.3s; + } + + .tips-ani { + transform: translateY(0); + height: 40px; + opacity: 1; + } + + .content { + width: 100%; + display: flex; + } + + .list-picture { + width: 100%; + height: 145px; + } + + .thumb-image { + width: 100%; + height: 100%; + } + + .ellipsis { + display: flex; + overflow: hidden; + } + + .uni-ellipsis-1 { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .uni-ellipsis-2 { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + + .customcss { + background-color: #fff; + padding: 20rpx 40rpx; + width: 100%; + } + + .footer { + // padding-top: 20%; + } +</style> diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/TakeStock.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/TakeStock.vue" new file mode 100644 index 0000000..1704818 --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/TakeStock.vue" @@ -0,0 +1,430 @@ +<template> + <view> + <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem"> + </uni-segmented-control> + <view class="content"> + <view v-if="current === 0" class="headerstyle"> + <view class="itemstyle"> + <uni-forms label-width="120"> + <uni-forms-item label="鎵樼洏鏉$爜"> + <uni-easyinput type="text" :focus="!istrue" v-model="barcode" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" + ref='midInput' @input="inputChangebarcode()" /> + </uni-forms-item> + <uni-forms-item label="鍐呯鏍囩"> + <uni-easyinput type="text" @input="inputChange()" v-model="materialsns" + placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="istrue" /> + </uni-forms-item> + <uni-forms-item label="鍑哄簱鏁伴噺"> + <uni-easyinput type="number" v-model="num" placeholder="璇疯緭鍏ュ嚭搴撴暟閲�" ref='midInput' /> + </uni-forms-item> + <uni-forms-item> + <label style="margin-left: 0%;">鎬绘暟閲�:{{totalNum}}</label> + <label style="margin-left: 30%;">鍑哄簱鏁伴噺:{{pickNum}}</label> + </uni-forms-item> + <uni-forms-item> + <label style="margin-left: 0%;">宸ュ崟鎬绘暟閲�:{{orderTotalNum}}</label> + <label style="margin-left: 21%;">绱鍑哄簱鏁伴噺:{{orderPickNum}}</label> + </uni-forms-item> + <uni-forms-item> + <label style="margin-left: 0%;">宸ュ崟鍙�:{{orderNo}}</label> + </uni-forms-item> + <uni-forms-item> + <checkbox :checked="isPicking" @click="checkedClick">鏄惁鎷i��</checkbox> + </uni-forms-item> + <uni-forms-item> + <button @click="picking" type="primary" style="margin-left: 0px;">鎷i��</button> + </uni-forms-item> + </uni-forms> + <uni-list> + <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode"> + <template v-slot:body> + <view class="uni-list-box"> + <view class="uni-content"> + <view class="uni-title-sub uni-ellipsis-2">鐗╂枡缂栫爜锛歿{item.matCode}}</view> + <view class="uni-title-sub uni-ellipsis-2">鏁伴噺锛歿{item.matQuantity}}</view> + </view> + </view> + </template> + </uni-list-item> + <uni-list-item direction="column" v-for="item in boxBarcodes" :key="item.sn"> + <template v-slot:body> + <view class="uni-list-box"> + <uni-icons type="trash" size="22" style="position: absolute;right: 5%;" + @click="deleteList(item.sn)"> + </uni-icons> + <view class="uni-content"> + <view class="uni-title-sub uni-ellipsis-2">璁㈠崟鍙凤細{{item.orderNo}}</view> + <view class="uni-note">鐗╂枡缂栫爜锛歿{item.matCode}}</view> + <view class="uni-note">鐢熶骇鏃ユ湡锛歿{item.matProductionDate}}</view> + <view class="uni-note">鏁伴噺锛歿{item.matQty}}</view> + <view class="uni-note">鏄惁鎷i�夛細{{item.isPicking}}</view> + </view> + </view> + </template> + </uni-list-item> + </uni-list> + </view> + </view> + <view v-if="current === 2" class="headerstyle"> + <view class="itemstyle"> + <uni-forms label-width="120"> + <uni-forms-item label="鎵樼洏鏉$爜"> + <uni-easyinput type="text" :focus="!istrue2" v-model="barcode2" placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" + ref='midInput' @input="inputChangebarcode2()" /> + </uni-forms-item> + <uni-forms-item label="鍐呯鏍囩"> + <uni-easyinput type="text" @input="inputChange2()" v-model="innerboxcode" + placeholder="璇锋壂鎻忓唴绠辨爣绛�" ref='midInput' :focus="istrue2" /> + </uni-forms-item> + <uni-forms-item> + <button @click="submit" type="primary" size="default" style="margin-top: 2%;">缁勭洏</button> + </uni-forms-item> + </uni-forms> + </view> + </view> + <view v-if="current === 1" class="headerstyle"> + <view class="itemstyle"> + <uni-forms label-width="120"> + <uni-forms-item label="鎵樼洏鏉$爜"> + <uni-easyinput type="text" :focus="!addressFocus" v-model="inboundBarcode" + placeholder="璇锋壂鎻忔墭鐩樻潯鐮�" ref='midInput' @input="inputChangebarcode3" /> + </uni-forms-item> + <uni-forms-item label="鍦板潃鏉$爜"> + <uni-easyinput type="text" v-model="address" placeholder="璇锋壂鎻忓湴鍧�鏉$爜" ref='midInput' + :focus="addressFocus" /> + </uni-forms-item> + <uni-forms-item> + <button @click="inbound" type="primary" size="default" style="margin-top: 2%;">鍏ュ簱纭</button> + </uni-forms-item> + </uni-forms> + </view> + </view> + </view> + <u-toast ref="uToast" /> + </view> +</template> + +<script> + // const SixUniTts = uni.requireNativePlugin("SmallSix-SixUniTts") + export default { + data() { + return { + items: ['鐩樼偣', '鍏ュ簱'],//'鎷i�夌粍鐩�', + current: 0, + isPicking: false, + istrue: false, + barcode: '', + materialsns: "", + boxBarcodes: [], + sns: [], + barcodefocus: true, + totalNum: 0, + pickNum: 0, + num: 0, + orderTotalNum: 0, + orderPickNum: 0, + orderNo: "", + matTotal: [], + istrue2: false, + barcode2: '', + innerboxcode: "", + sns2: [], + barcodefocus: true, + addressFocus: false, + inboundBarcode: "", + address: "", + } + }, + onLoad(res) { + this.barcodefocus = false; + this.istrue = false; + }, + methods: { + onClickItem(e) { + this.barcodeFo = true; + this.focus = false; + this.addressFocus = false; + if (this.current !== e.currentIndex) { + this.current = e.currentIndex; + } + }, + inbound() { + var postData = { + MainData: { + "barcode": this.inboundBarcode, + "startPoint": this.address + } + } + this.$u.post('/api/Inbound/RequestInbound', postData).then(res => { + if (res.status) { + uni.$showMsg(res.message); + this.inboundBarcode = ""; + this.address = ""; + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }).catch(err => { + this.$refs.uToast.show({ + title: err.message, + type: "error" + }) + }) + }, + inputChangebarcode3() { + this.addressFocus = false; + this.$nextTick(function(x) { + if (this.inboundBarcode != '') { + this.addressFocus = true; + } + }) + }, + picking() { + if (this.barcode == "") { + this.$refs.uToast.show({ + title: "璇锋壂鎻忔墭鐩樻潯鐮�", + type: "error" + }) + return; + } + if (this.sns.length == 0) { + this.$refs.uToast.show({ + title: "璇锋壂鎻忓唴绠辨爣绛�", + type: "error" + }) + return; + } + var params = { + MainData: { + "barcode": this.barcode, + "num": this.num, + "pickNum": this.pickNum + }, + DetailData: this.sns + } + this.$u.post('/api/StockOperate/MatPicking', params).then(res => { + if (res.status) { + uni.$showMsg('鐩樼偣鎴愬姛!') + this.barcode = ""; + this.boxBarcodes = []; + this.sns = []; + this.materialsns = ""; + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }) + }, + inputChange(e) { + this.$nextTick(() => { + this.istrue = false; + var matInfo = this.materialsns.split('|'); + if (matInfo.length == 7) { + var matObj = { + matCode: matInfo[1], + matProductionDate: matInfo[3], + matQty: matInfo[5], + orderNo: matInfo[6], + sn: this.materialsns, + isPicking: this.isPicking + } + var temp = this.boxBarcodes.find(x => x.orderNo == matObj.orderNo); + if (!temp) { + var tmp = this.matTotal.find(x => x.matCode == matObj.matCode); + if (!tmp) { + this.matTotal.push({ + matCode: matObj.matCode, + matQuantity: parseInt(matObj.matQty) + }) + } else { + tmp.matQuantity += parseInt(matObj.matQty); + } + this.sns.push({ + innerboxcode: this.materialsns, + isSplit: this.isPicking + }); + this.boxBarcodes.push(matObj); + this.isPicking = false; + setTimeout(this.updateFocus, 100); + } else { + this.$refs.uToast.show({ + title: "鎵爜閲嶅", + type: "error" + }) + setTimeout(this.updateFocus, 100); + } + } else { + this.$refs.uToast.show({ + title: "鎵爜閿欒,璇锋壂鎻忔纭唴绠辩爜", + type: "error" + }) + setTimeout(this.updateFocus, 100); + } + }) + }, + checkedClick() { + this.isPicking = !this.isPicking; + this.istrue = false; + this.$nextTick(function(x) { + if (this.barcode != '') { + this.istrue = true; + } + }) + }, + updateFocus() { + this.materialsns = ''; + if (!this.istrue) { + this.istrue = true; + } + }, + inputChangebarcode() { + this.boxBarcodes = []; + this.istrue = false; + this.$nextTick(function(x) { + if (this.barcode != '') { + var postData = { + MainData: { + "barcode": this.barcode + } + }; + this.$u.post('/api/StockInfo/GetStockOutboundOrder', postData).then(res => { + if (res.status) { + if (res.data.totalNum == res.data.pickNum) { + res.data.innerBoxCode.forEach(x => { + var matInfo = x.split('|'); + if (matInfo.length > 6) { + var matObj = { + matCode: matInfo[1], + matProductionDate: matInfo[3], + matQty: matInfo[5], + orderNo: matInfo[6], + sn: this.materialsns, + isPicking: this.isPicking + } + this.sns.push({ + innerboxcode: this.materialsns, + isSplit: this.isPicking + }); + if (!this.boxBarcodes.find(x => x.orderNo == matObj + .orderNo)) { + this.boxBarcodes.push(matObj); + } + } + }) + } + this.totalNum = res.data.totalNum; + this.pickNum = res.data.pickNum; + this.orderPickNum = res.data.orderPickNum; + this.orderTotalNum = res.data.orderTotalNum; + this.orderNo = res.data.orderNo; + } + }) + this.istrue = true; + } + }) + }, + deleteList(res) { + this.matTotal.map((item, index) => { + var temp = this.boxBarcodes.find(x => x.sn == res); + if (temp) { + if (item.matCode == temp.matCode) { + if (item.matQuantity - temp.matQty == 0) { + this.matTotal.splice(index, 1); + } else { + item.matQuantity -= temp.matQty; + } + } + } + }) + this.sns.map((item, index) => { + if (item.innerboxcode == res) { + this.sns.splice(index, 1); + } + }) + this.boxBarcodes.map((item, index) => { + if (item.sn == res) { + this.boxBarcodes.splice(index, 1); + } + }) + }, + + submit() { + if (this.barcode2 == "") { + this.$refs.uToast.show({ + title: "璇锋壂鎻忔墭鐩樻潯鐮�", + type: "error" + }) + return; + } + if (this.innerboxcode == "") { + this.$refs.uToast.show({ + title: "璇锋壂鎻忓唴绠辨爣绛�", + type: "error" + }) + return; + } + this.$u.post('/api/StockOperate/PickingBoxing', { + MainData: { + "barcode": this.barcode2, + "innerboxcode": this.innerboxcode + }, + DelKeys: this.sns2 + }).then(res => { + if (res.status) { + uni.$showMsg('缁勭洏鎴愬姛!') + this.barcode2 = ""; + this.innerboxcode = ""; + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }).catch(err => { + this.$refs.uToast.show({ + title: err.message, + type: "error" + }) + }) + }, + inputChange2(e) { + + }, + inputChangebarcode2() { + this.istrue2 = false; + this.$nextTick(function(x) { + if (this.barcode2 != '') { + this.istrue2 = true; + } + }) + }, + } + } +</script> + +<style lang="scss"> + @import '@/common/uni-ui.scss'; + + .content { + display: flex; + height: 150px; + } + + .content-text { + font-size: 14px; + color: #666; + } + + .itemstyle { + margin-top: 20px; + margin-left: 5%; + } + + .headerstyle { + width: 90%; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/inboundorder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/inboundorder.vue" new file mode 100644 index 0000000..868fe1b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/inboundorder.vue" @@ -0,0 +1,177 @@ +<template> + <view> + <u-sticky> + <view style="background-color: #ffffff;"> + <uni-search-bar @confirm="search" v-model="searchValue"></uni-search-bar> + </view> + </u-sticky> + <uni-list :border="true"> + <uni-list-item direction="column" clickable @click="groupClick(item.inboundOrderNo)" link + :to="page+item.inboundOrderNo" v-for="item in allReceivingOrders" :key="item.inboundOrderNo"> + <template v-slot:body> + <uni-group margin-top="20"> + <view> 鍗曞彿:{{item.inboundOrderNo}} </view> + <view> 鍒涘缓浜�:{{item.creater}} </view> + <view> 鏃ユ湡:{{item.createDate}} </view> + </uni-group> + </template> + </uni-list-item> + + </uni-list> + <uni-load-more :status="status" v-if="loadVisible"></uni-load-more> + + <u-back-top :scroll-top="scrollTop" top="400"></u-back-top> + </view> +</template> + +<script> + export default { + data() { + return { + page: "/pages/raworderboxing/raworderboxing?", + loadVisible: false, + searchValue: "", + status: "more", + allReceivingOrders: [], + pageNo: 1, + scrollTop: 0, + warehouseId: "" + } + }, + onLoad(res) { + this.warehouseId = res.warehouseId; + this.page = this.page + "warehouseId=" + this.warehouseId + "&orderNo="; + this.getData(); + }, + onReachBottom() { + this.pageNo += 1; + this.getData(); + }, + onPageScroll(e) { + this.scrollTop = e.scrollTop; + }, + methods: { + search(res) { + this.getData(); + }, + groupClick() { + + }, + getData() { + var postData = { + MainData: { + warehouseId: this.warehouseId, + orderNo: this.searchValue, + pageNo: this.pageNo + }, + } + this.$u.post('/api/InboundOrder/GetInboundOrders', postData).then((res) => { + if (res.status) { + if (res.data.length > 0) { + if (this.searchValue == '') { + this.allReceivingOrders = this.allReceivingOrders.concat(res.data); + // this.allReceivingOrders = res.data; + if (this.allReceivingOrders.length > 3) { + this.loadVisible = true; + } else { + this.loadVisible = false; + } + } else { + this.allReceivingOrders = res.data; + if (this.allReceivingOrders.length > 3) { + this.loadVisible = true; + } else { + this.loadVisible = false; + } + } + } else { + this.status = 'noMore'; + //this.allReceivingOrders = []; + this.loadVisible = true; + } + } + }) + } + } + } +</script> + +<style lang="scss"> + @import '@/common/uni-ui.scss'; + + page { + display: flex; + flex-direction: column; + box-sizing: border-box; + background-color: #efeff4; + min-height: 100%; + height: auto; + } + + .tips { + color: #67c23a; + font-size: 14px; + line-height: 40px; + text-align: center; + background-color: #f0f9eb; + height: 0; + opacity: 0; + transform: translateY(-100%); + transition: all 0.3s; + } + + .tips-ani { + transform: translateY(0); + height: 40px; + opacity: 1; + } + + .content { + width: 100%; + display: flex; + } + + .list-picture { + width: 100%; + height: 145px; + } + + .thumb-image { + width: 100%; + height: 100%; + } + + .ellipsis { + display: flex; + overflow: hidden; + } + + .uni-ellipsis-1 { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .uni-ellipsis-2 { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + + .customcss { + display: flex; + position: fixed; + width: 100%; + top: 10px; + text-align: center; + z-index: 999; + left: 30px; + height: 20%; + } + + .footer { + padding-top: 50%; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" new file mode 100644 index 0000000..53ba37b --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/pickingMat.vue" @@ -0,0 +1,237 @@ +<template> + <view> + <view class="header"> + <uni-forms label-width="120"> + <uni-forms-item label="鎵樼洏鏉$爜"> + <uni-easyinput type="text" @input="inputChange()" v-model="value" placeholder="璇锋壂鐮�" ref='midInput' + :focus="true" /> + </uni-forms-item> + <uni-forms-item> + <button @click="submit" type="primary" size="default" style="margin-top: 2%;">鎷i�夊畬鎴�</button> + </uni-forms-item> + </uni-forms> + </view> + <uni-list class="footer"> + <uni-list-item direction="column" v-if="value2"> + <label>{{value2}}</label> + </uni-list-item> + <uni-list-item direction="column" v-for="item in matTotal" :key="item.matCode"> + <template v-slot:body> + <view class="uni-list-box"> + <view class="uni-content"> + <view class="uni-title-sub uni-ellipsis-2">鐗╂枡缂栫爜锛歿{item.matCode}}</view> + <view class="uni-title-sub uni-ellipsis-2">鏁伴噺锛歿{item.matQuantity}}</view> + </view> + </view> + </template> + </uni-list-item> + + <uni-list-item direction="column" v-for="(item,index) in matInfo" :key="index"> + <template v-slot:body> + <view class="uni-list-box"> + <view class="uni-content"> + <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">鐗╂枡缂栫爜锛歿{item.matCode}} + </view> + <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">鐗╂枡鍚嶇О锛歿{item.matName}} + </view> + <view class="uni-title-sub uni-ellipsis-2" style="font-size: 1.1em;">鏁伴噺锛歿{item.matQty}} + </view> + </view> + </view> + </template> + </uni-list-item> + </uni-list> + + <u-toast ref="uToast" /> + </view> +</template> + +<script> + export default { + data() { + return { + value: "", + matInfo: [], + value2: "", + matTotal:[] + } + }, + onLoad(res) { + //this.hideboard(); + }, + methods: { + submit() { + if (this.value.length == 0) { + this.$refs.uToast.show({ + title: "璇锋壂鐮�", + type: "error" + }) + return; + } + var param; + var matInfo = this.value.split('|'); + if (matInfo.length == 7) { + param = { + MainData: { + "innerCode": this.value + } + } + } else { + param = { + MainData: { + "barcode": this.value + } + } + } + this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => { + if (resdt.status) { + uni.$showMsg('瑙g洏鎴愬姛!') + this.value = ""; + this.matInfo = []; + } else { + this.$refs.uToast.show({ + title: resdt.message, + type: "error" + }) + } + }).catch(err => { + this.$refs.uToast.show({ + title: err.message, + type: "error" + }) + }) + }, + inputChange(e) { + this.$nextTick(() => { + if (this.value.length == 0) { + return; + } + var matInfo = this.value.split('|'); + this.matInfo = []; + if (matInfo.length == 7) { + this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', { + MainData: { + "innerCode": this.value + } + }).then(res => { + if (res.status) { + this.matInfo = res.data.stockInfo; + this.matTotal = res.data.stockTotal; + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }) + } else { + this.$u.post('/api/StockOperate/GetStockInfoByBarcode', { + MainData: { + "barcode": this.value + } + }).then(res => { + if (res.status) { + this.matInfo = res.data.stockInfo; + this.matTotal = res.data.stockTotal; + // console.log(res.data); + // console.log(this.matTotal); + } else { + this.$refs.uToast.show({ + title: res.message, + type: "error" + }) + } + }) + } + }) + }, + } + } +</script> + +<style lang="scss"> + @import '@/common/uni-ui.scss'; + + page { + display: flex; + flex-direction: column; + box-sizing: border-box; + background-color: #efeff4; + min-height: 100%; + height: auto; + } + + .tips { + color: #67c23a; + font-size: 14px; + line-height: 40px; + text-align: center; + background-color: #f0f9eb; + height: 0; + opacity: 0; + transform: translateY(-100%); + transition: all 0.3s; + } + + .tips-ani { + transform: translateY(0); + height: 40px; + opacity: 1; + } + + .content { + width: 100%; + display: flex; + } + + .list-picture { + width: 100%; + height: 145px; + } + + .thumb-image { + width: 100%; + height: 100%; + } + + .ellipsis { + display: flex; + overflow: hidden; + } + + .uni-ellipsis-1 { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .uni-ellipsis-2 { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + + .customcss { + display: flex; + position: fixed; + width: 100%; + top: 10px; + text-align: center; + z-index: 999; + left: 30px; + height: 20%; + } + + .footer { + // padding-top: 30%; + } + + .header { + width: 100%; + height: 150px; + background-color: #ffffff; + padding: 20rpx 40rpx; + } +</style> \ No newline at end of file diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/printingink/index.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/printingink/index.vue" new file mode 100644 index 0000000..9b4d0ee --- /dev/null +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/\346\267\256\345\256\211PDA/pages/stash/printingink/index.vue" @@ -0,0 +1,169 @@ +<template> + <!-- <u-card :title="title" > --> + <view class="" slot="body"> + <!-- <view v-for="(item,index) in tree" :key="item.id"> --> + <u-grid :col="3"> + <u-grid-item @tap="clickCoupon(item.url)" v-for="(item) in tree" :key="item.menuId"> + <u-icon name="coupon" :size="50"></u-icon> + <view class="grid-text">{{item.menuName}}</view> + </u-grid-item> + </u-grid> + <!-- </view> --> + <u-toast ref="uToast" /> + </view> + + <!-- </u-card> --> +</template> + +<script> + import { + config + } from '../../../common/config.js' + export default { + data() { + return { + // title: '鎿嶄綔鍔熻兘' + datas: [], + tree: [], + warehouseId: "", + version: "" + } + }, + onShow() { + // uni.getSystemInfo({ + // success: (res) => { + // this.version = res.appWgtVersion; + // // console.log(res); + // //妫�娴嬪綋鍓嶅钩鍙帮紝濡傛灉鏄畨鍗撳垯鍚姩瀹夊崜鏇存柊 + // if (res.platform == "android") { + // this.AndroidCheckUpdate(); + // } + // } + // }); + }, + onLoad(res) { + // var id = this.$mp.query.id; + // this.warehouseId = this.$mp.query.warehouseId; + this.warehouseId = res.warehouseId; + this.getCurrentTree(res.menuId); + }, + mounted() { + + }, + methods: { + AndroidCheckUpdate: function() { + var _this = this; + uni.request({ + url: 'http://10.1.211.101:9004/api/PDA/GetPDAVersion?version=' + this.version, + method: 'GET', + data: {}, + success: res => { + if (res.data.data) { + + uni.showToast({ + title: '鏈夋柊鐨勭増鏈彂甯冿紝妫�娴嬪埌鎮ㄧ洰鍓嶄负Wifi杩炴帴锛岀▼搴忓凡鍚姩鑷姩鏇存柊銆傛柊鐗堟湰涓嬭浇瀹屾垚鍚庡皢鑷姩寮瑰嚭瀹夎绋嬪簭銆�', + mask: false, + duration: 5000, + icon: "none" + }); + var dtask = plus.downloader.createDownload( + "http://10.1.211.101:9004/api/PDA/DownLoadApp", {}, + function(d, status) { + // 涓嬭浇瀹屾垚 + if (status == 200) { + plus.runtime.install(plus.io.convertLocalFileSystemURL(d + .filename), {}, {}, function(error) { + uni.showToast({ + title: '瀹夎澶辫触', + mask: false, + duration: 1500 + }); + }) + } else { + uni.showToast({ + title: '鏇存柊澶辫触', + mask: false, + duration: 1500 + }); + } + }); + dtask.start(); + } + }, + fail: () => { + console.log('璇锋眰澶辫触') + }, + complete: () => {} + }); + }, + getCurrentTree(id) { + this.$u.post('/api/Sys_Menu/GetTreeMenuPDAStash?ParentId=' + id, {}).then(result => { + this.tree = result; + }) + }, + getTree(id, data, isRootId) { + this.datas.forEach((x) => { + if (x.pid == id) { + x.lv = data.lv + 1; + if (isRootId) { + x.rootId = id; + } + if (!data.children) data.children = []; + data.children.push(x); + this.getTree(x.id, x, isRootId); + } + }); + }, + getPermission(text) { + // return true; + return this.datas.find(x => x.text == text); + }, + clickCoupon(url) { + // console.log("clickCoupon") + if (this.hasLogin()) { + // this.$u.route(url) + this.$u.route({ + url: url, + params: { + warehouseId: this.warehouseId + } + }) + } else { + this.$t.message.loading('鐧诲綍澶辨晥璇烽噸鏂扮櫥褰�') + uni.reLaunch({ + url: '/pages/login/login' + }); + } + }, + lock() { + console.log("lock") + if (this.hasLogin()) { + this.$u.route("pages/feeding/feeding") + } else { + this.$t.message.loading('鐧诲綍澶辨晥璇烽噸鏂扮櫥褰�') + uni.reLaunch({ + url: '/pages/login/login' + }); + } + }, + + //鍒ゆ柇鏄惁鐧诲綍 + hasLogin() { + let haslogin = uni.getStorageSync('jo_user') + if (haslogin == null || haslogin == "") { + return false + } else { + return true + } + } + } + } +</script> + +<style lang="scss" scoped> + .grid-text { + font-size: 28rpx; + margin-top: 4rpx; + color: $u-type-info; + } +</style> \ No newline at end of file -- Gitblit v1.9.3