已删除3个文件
已修改10个文件
已添加19个文件
| | |
| | | taskState = TaskStatusEnum.SC_Execute; |
| | | deviceCode = item.StackerCraneCode; |
| | | roadwayNo = responseContent.Data.ToString(); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task.CurrentAddress, item.StationCode); |
| | | device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode); |
| | | } |
| | | else |
| | | { |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | | } |
| | | } |
| | | |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: router.NextPosi); |
| | | if (task.TargetAddress.Contains("SCUTL-001")) |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: router.NextPosi); |
| | | } |
| | | else |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: "1102"); |
| | | } |
| | | |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup || task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup) |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | |
| | | name: 'returnOrder', |
| | | component: () => import('@/views/inbound/returnOrder.vue') |
| | | } |
| | | , { |
| | | path: '/takeStockOrder', |
| | | name: 'takeStockOrder', |
| | | component: () => import('@/views/inbound/takeStockOrder.vue') |
| | | } |
| | | ] |
| | | |
| | | export default viewgird |
| | |
| | | }, |
| | | { |
| | | field: "returnId", |
| | | title: "æ¶è´§å主é®", |
| | | title: "éæå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | |
| | | { |
| | | field: "materielSpec", |
| | | title: "ç©æè§æ ¼", |
| | | type: "int", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/inbound/takeStockOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "çç¹å", |
| | | name: "takeStockOrder", |
| | | url: "/TakeStockOrder/", |
| | | sortName: "id", |
| | | }); |
| | | |
| | | const searchFormFields = ref({ |
| | | orderNo:"" |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo", type: "like" }, |
| | | ] |
| | | ]); |
| | | |
| | | const editFormFields = ref({ |
| | | orderNo:"", |
| | | warehouseId: "", |
| | | remark:"" |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | readonly: "true", |
| | | }, |
| | | { |
| | | title: "ä»åº", |
| | | field: "warehouseId", |
| | | type: "select", |
| | | dataKey: "warehouses", |
| | | data: [], |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | } |
| | | ] |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "çç¹åå·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | link: true, |
| | | }, |
| | | { |
| | | field: "takeStockStatus", |
| | | title: "çç¹ç¶æ", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "returnStatus", data: [] }, |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind:{key: "warehouses", data: []} |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "éæåæç»", |
| | | table: "Dt_ReturnOrderDetail", |
| | | columns: [ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "takeStockId", |
| | | title: "çç¹å主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼ç ", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | required: true, |
| | | edit: { type: "string" } |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | required: true, |
| | | edit: { type: "string" } |
| | | }, |
| | | { |
| | | field: "sysQty", |
| | | title: "è´¦é¢æ°é", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | required: true, |
| | | edit: { type: "decimal" } |
| | | }, |
| | | { |
| | | field: "qty", |
| | | title: "å®çæ°é", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | required: true, |
| | | edit: { type: "decimal" } |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "materielSpec", |
| | | title: "ç©æè§æ ¼", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ], |
| | | sortName: "id", |
| | | key: "id", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_Common.OrderEnum |
| | | { |
| | | /// <summary> |
| | | /// çç¹ç¶æ |
| | | /// </summary> |
| | | public enum TakeStockStatusEnum |
| | | { |
| | | /// <summary> |
| | | /// æªéæ |
| | | /// </summary> |
| | | [Description("æªçç¹")] |
| | | NotTake = 0, |
| | | |
| | | /// <summary> |
| | | /// éæä¸ |
| | | /// </summary> |
| | | [Description("çç¹ä¸")] |
| | | Taking = 1, |
| | | |
| | | /// <summary> |
| | | /// éæå®æ |
| | | /// </summary> |
| | | [Description("çç¹å®æ")] |
| | | Taked = 2 |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Description("éæåå·ç¼ç è§å")] |
| | | TLCodeRule, |
| | | /// <summary> |
| | | /// çç¹åå·ç¼ç è§å |
| | | /// </summary> |
| | | [Description("çç¹åå·ç¼ç è§å")] |
| | | PDCodeRule, |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// çç¹åæç»ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface ITakeStockOrderDetailRepository : IRepository<Dt_TakeStockOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | /// <summary> |
| | | /// çç¹åä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface ITakeStockOrderRepository : IRepository<Dt_TakeStockOrder> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface ITakeStockOrderDetailService : IService<Dt_TakeStockOrderDetail> |
| | | { |
| | | ITakeStockOrderDetailRepository Repository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface ITakeStockOrderService : IService<Dt_TakeStockOrder> |
| | | { |
| | | ITakeStockOrderRepository Repository { get; } |
| | | |
| | | /// <summary> |
| | | /// çç¹ |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent MatPicking(SaveModel saveModel); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// çç¹åä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class TakeStockOrderDetailRepository : RepositoryBase<Dt_TakeStockOrderDetail>, ITakeStockOrderDetailRepository |
| | | { |
| | | public TakeStockOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | /// <summary> |
| | | /// çç¹åä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class TakeStockOrderRepository : RepositoryBase<Dt_TakeStockOrder>, ITakeStockOrderRepository |
| | | { |
| | | public TakeStockOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using SqlSugar.Extensions; |
| | | using WIDESEA_Common.CommonEnum; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class TakeStockOrderDetailService : ServiceBase<Dt_TakeStockOrderDetail, ITakeStockOrderDetailRepository>, ITakeStockOrderDetailService |
| | | { |
| | | public ITakeStockOrderDetailRepository Repository => BaseDal; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | public TakeStockOrderDetailService(ITakeStockOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Core.Helper; |
| | | using Microsoft.AspNetCore.Mvc.RazorPages; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class TakeStockOrderService : ServiceBase<Dt_TakeStockOrder, ITakeStockOrderRepository>, ITakeStockOrderService |
| | | { |
| | | public ITakeStockOrderRepository Repository => BaseDal; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IBasicRepository _basicRepository; |
| | | public TakeStockOrderService(ITakeStockOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IBasicRepository basicRepository) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | | _basicRepository = basicRepository; |
| | | } |
| | | /// <summary> |
| | | /// æ°å¢ |
| | | /// </summary> |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | Dt_Warehouse? warehouse = null; |
| | | if (saveModel.MainData.TryGetValue(nameof(Dt_TakeStockOrder.WarehouseId).FirstLetterToLower(), out object? warehouseId) && warehouseId != null && !string.IsNullOrEmpty(warehouseId.ToString())) |
| | | { |
| | | warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehouseId.ObjToInt()); |
| | | if (warehouse == null) |
| | | return WebResponseContent.Instance.Error("æªæ¾å°ä»åºä¿¡æ¯"); |
| | | } |
| | | |
| | | if (saveModel.DetailData.Count>0) |
| | | { |
| | | for (int i = 0; i < saveModel.DetailData.Count; i++) |
| | | { |
| | | if (saveModel.DetailData[i].TryGetValue(nameof(Dt_TakeStockOrderDetail.MaterielCode).FirstLetterToLower(), out object? materielCode) && materielCode != null && !string.IsNullOrEmpty(materielCode.ToString())) |
| | | { |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == materielCode.ToString() && x.WarehouseId == warehouse.WarehouseId); |
| | | if (materielInfo == null) return WebResponseContent.Instance.Error($"æªæ¾å°æ¬ä»åºç©æ{materielCode}ä¿¡æ¯"); |
| | | saveModel.DetailData[i].Add(nameof(Dt_TakeStockOrderDetail.MaterielName).FirstLetterToLower(),materielInfo.MaterielName); |
| | | saveModel.DetailData[i].Add(nameof(Dt_TakeStockOrderDetail.MaterielSpec).FirstLetterToLower(), materielInfo.MaterielSpec); |
| | | saveModel.DetailData[i].Add(nameof(Dt_TakeStockOrderDetail.Unit).FirstLetterToLower(), materielInfo.MaterielUnit); |
| | | } |
| | | } |
| | | } |
| | | saveModel.MainData.Add(nameof(Dt_TakeStockOrder.TakeStockStatus).FirstLetterToLower(), TakeStockStatusEnum.NotTake.ObjToInt()); |
| | | return base.AddData(saveModel); |
| | | } |
| | | /// <summary> |
| | | /// è·å对åºä»åºçç¹å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public WebResponseContent GetTakeStockOrders(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content =new WebResponseContent(); |
| | | try |
| | | { |
| | | int pageNo = saveModel.MainData["pageNo"].ObjToInt(); |
| | | string? orderNo = saveModel.MainData["orderNo"].ToString(); |
| | | int warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); |
| | | List<Dt_TakeStockOrder> takeStockOrders = new List<Dt_TakeStockOrder>(); |
| | | if (string.IsNullOrEmpty(orderNo)) |
| | | { |
| | | takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => x.TakeStockStatus < TakeStockStatusEnum.Taked.ObjToInt() && x.WarehouseId == warehouseId).ToPageList(pageNo, 5); |
| | | } |
| | | else |
| | | { |
| | | takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => (x.OrderNo.Contains(orderNo) && x.TakeStockStatus < TakeStockStatusEnum.Taked.ObjToInt() && x.WarehouseId == warehouseId)).ToPageList(pageNo, 5); |
| | | } |
| | | content.OK(data: takeStockOrders); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | public WebResponseContent MatPicking(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// çç¹å |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_TakeStockOrder), "çç¹å")] |
| | | public class Dt_TakeStockOrder : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çç¹åå· |
| | | /// </summary> |
| | | [CodeRule(RuleCodeEnum.PDCodeRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "çç¹åå·")] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çç¹ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "çç¹ç¶æ")] |
| | | public int TakeStockStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 500, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çç¹æç» |
| | | /// </summary> |
| | | [PropertyValidate("éæåæç»", NotNullAndEmpty = true), Navigate(NavigateType.OneToMany, nameof(Dt_TakeStockOrderDetail.TakeStockId), nameof(Id))] |
| | | public List<Dt_TakeStockOrderDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// çç¹åæç» |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_TakeStockOrderDetail), "çç¹åæç»")] |
| | | public class Dt_TakeStockOrderDetail : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çç¹åä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éæå主é®")] |
| | | public int TakeStockId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼ç ")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æè§æ ¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "ç©æè§æ ¼")] |
| | | public string MaterielSpec { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è´¦é¢æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "è´¦é¢æ°é")] |
| | | public float SysQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å®çæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "å®çæ°é")] |
| | | public float Qty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 500, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); |
| | | } |
| | | public WebResponseContent MatPicking(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content= new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | throw new Exception("æ åºå"); |
| | | } |
| | | } |
| | | tasks.ForEach(x => |
| | | { |
| | | x.TargetAddress = model.Line; |
| | | }); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | int id = BaseDal.AddData(tasks); |
| | |
| | | return _invokeERPService.InvokeReturnApi(returnModel); |
| | | } |
| | | /// <summary> |
| | | /// æ¨éERPéæä¸æ¥ |
| | | /// ERPçèµ¢/äºä¸æ¥æ¥å£è°ç¨ |
| | | /// </summary> |
| | | [HttpPost, Route("InvokeTakeStockApi"), AllowAnonymous] |
| | | public string InvokeTakeStockApi([FromBody] ERPTakeStockModel takeModel) |
| | |
| | | return Service.MaterielGroup(inboundOrderId, palletCode, serNum); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¤ä¸ªç©æç ç»ç |
| | | /// </summary> |
| | | /// <param name="inboundOrderId"></param> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="serNums"></param> |
| | | /// <returns></returns> |
| | | // <summary> |
| | | // å¤ä¸ªç©æç ç»ç |
| | | // </summary> |
| | | // <returns></returns> |
| | | //[HttpPost, HttpGet, Route("MaterielGroup")] |
| | | //public WebResponseContent MaterielGroup(int inboundOrderId, string palletCode, List<string> serNums) |
| | | //{ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | | /// <summary> |
| | | /// çç¹å |
| | | /// </summary> |
| | | [Route("api/TakeStockOrder")] |
| | | [ApiController] |
| | | public class TakeStockOrderController : ApiBaseController<ITakeStockOrderService, Dt_TakeStockOrder> |
| | | { |
| | | public TakeStockOrderController(ITakeStockOrderService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | | /// <summary> |
| | | /// çç¹æç»å |
| | | /// </summary> |
| | | [Route("api/TakeStockOrderDetail")] |
| | | [ApiController] |
| | | public class TakeStockOrderDetailController : ApiBaseController<ITakeStockOrderDetailService, Dt_TakeStockOrderDetail> |
| | | { |
| | | public TakeStockOrderDetailController(ITakeStockOrderDetailService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | builder.Services.AddWebSocketSetup(); |
| | | builder.Services.AddSqlsugarSetup();//SqlSugar å¯å¨æå¡ |
| | | builder.Services.AddDbSetup();//Db å¯å¨æå¡ |
| | | //builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | builder.Services.AddInitializationHostServiceSetup();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | builder.Services.AddHostedService<PermissionDataHostService>();//åºç¨åå§åæå¡æ³¨å
¥ |
| | | builder.Services.AddAutoMapperSetup(); |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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.OrderNo)" link |
| | | :to="page+item.OrderNo" v-for="item in allReceivingOrders" :key="item.OrderNo"> |
| | | <template v-slot:body> |
| | | <uni-group margin-top="20"> |
| | | <view> åå·:{{item.OrderNo}} </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/stash/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/TakeStockOrder/GetTakeStockOrders', 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> |