| | |
| | | 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; |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | _stockRepository = stockRepository; |
| | | _recordService = recordService; |
| | | _invokeERPService = invokeERPService; |
| | | _warehouseService = warehouseService; |
| | | } |
| | | public WebResponseContent GetInboundOrders(SaveModel saveModel) |
| | | { |
| | |
| | | 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($"æªæ¾å°å
¥åºåä¿¡æ¯"); |
| | |
| | | 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) |
| | |
| | | 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; |
| | |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | } |
| | | 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> |
| | | /// |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | public OutStockLockInfoController(IOutStockLockInfoService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£é |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("GetStockOutboundOrder")] |
| | | public List<Dt_OutStockLockInfo> GetStockOutboundOrder([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.GetStockOutboundOrder(saveModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.GetStockSelectViews(orderId, materielCode); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£é |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("GetStockOutboundOrder")] |
| | | public StockOutboundOrderDTO GetStockOutboundOrder([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.GetStockOutboundOrder(saveModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | "navigationBarTitleText": "ç»å½" |
| | | } |
| | | }, |
| | | |
| | | { |
| | | "path": "pages/stash/printingink/index", |
| | | "style": { |
| | | "navigationBarTitleText": "油墨ä»", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/inboundorder", |
| | | "style": { |
| | | "navigationBarTitleText": "ç»ç", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/pickingMat", |
| | | "style": { |
| | | "navigationBarTitleText": "æ£é", |
| | | "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": { |
| | |
| | | <!-- <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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { config } from '../../common/config.js' |
| | | import { |
| | | config |
| | | } from '../../common/config.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | // title: 'æä½åè½' |
| | | datas: [], |
| | | tree: [], |
| | | version:"" |
| | | version: "" |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.getCurrentTree(); |
| | | }, |
| | | mounted() { |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | AndroidCheckUpdate: function() { |
| | |
| | | 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) { |
| | |
| | | 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) { |
| | |
| | | // 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({ |
| | |
| | | margin-top: 4rpx; |
| | | color: $u-type-info; |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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">æ¯å¦æ£é</checkbox> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="picking" type="primary" style="margin-left: 0px;">æ£é</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">æ¯å¦æ£éï¼{{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: ['çç¹', 'å
¥åº'],//'æ£éç»ç', |
| | | 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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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%;">æ£é宿</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('è§£çæå!') |
| | | 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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |