payne
2024-04-25 ed9b0c0b150e295e9a5db053882019a3a64ec299
库位页面修改
已修改9个文件
96 ■■■■ 文件已修改
DBScript/01_DDL/04_DDL_INDEX.sql 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBScript/02_DML/01_InitData.sql 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/addForm.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/editForm.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsWarehouse/addForm.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/CommonHelper/SerialSN/EnumSerialType.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/Dto/WmsPlaceInput.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/WmsPlaceService.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBScript/01_DDL/04_DDL_INDEX.sql
@@ -7,3 +7,7 @@
-- 客户编号创建一个新的唯一索引 update liuwq 2024-04-25
CREATE UNIQUE INDEX idx_base_customer_custCode
ON base_customer (CustCode);
-- 库位编号创建一个新的唯一索引 update liuwq 2024-04-25
CREATE UNIQUE INDEX idx_wms_place_placeCode
ON wms_place (PlaceCode);
DBScript/02_DML/01_InitData.sql
@@ -63,3 +63,25 @@
(Id, SerialRuleNo, SerialType, ItemNo, SourceType, SerialLength, SearchStart, DecimalType, UserDefine, SerialCodeFlag, Description, SerialTypeNo, GetData, PadLeft, IssueStatus, CreatedTime, UpdatedTime, CreatedUserId, CreatedUserName, UpdatedUserId, UpdatedUserName, IsDeleted)
VALUES(34, N'1', 30, 5, N'SN', 3, 0, 1, NULL, 0, N'客户编号-流水号', NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0);
-- 初始化  库位编号 【Editby liuwq,2024-04-25】
    DELETE Base_SerialRuleDetail where SerialType =40;
    GO
        INSERT INTO dbo.Base_SerialRuleDetail
(Id, SerialRuleNo, SerialType, ItemNo, SourceType, SerialLength, SearchStart, DecimalType, UserDefine, SerialCodeFlag, Description, SerialTypeNo, GetData, PadLeft, IssueStatus, CreatedTime, UpdatedTime, CreatedUserId, CreatedUserName, UpdatedUserId, UpdatedUserName, IsDeleted)
VALUES(40, N'1', 40, 1, N'UD', 15, 0, 1, N'BC_', 0, N'客户编号-前缀', NULL, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO dbo.Base_SerialRuleDetail
(Id, SerialRuleNo, SerialType, ItemNo, SourceType, SerialLength, SearchStart, DecimalType, UserDefine, SerialCodeFlag, Description, SerialTypeNo, GetData, PadLeft, IssueStatus, CreatedTime, UpdatedTime, CreatedUserId, CreatedUserName, UpdatedUserId, UpdatedUserName, IsDeleted)
VALUES(41, N'1', 40, 2, N'Y4', 4, 0, 1, NULL, 0, N'客户编号-年份', NULL, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO dbo.Base_SerialRuleDetail
(Id, SerialRuleNo, SerialType, ItemNo, SourceType, SerialLength, SearchStart, DecimalType, UserDefine, SerialCodeFlag, Description, SerialTypeNo, GetData, PadLeft, IssueStatus, CreatedTime, UpdatedTime, CreatedUserId, CreatedUserName, UpdatedUserId, UpdatedUserName, IsDeleted)
VALUES(42, N'1', 40, 3, N'M2', 4, 0, 1, NULL, 0, N'客户编号-月份', NULL, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO dbo.Base_SerialRuleDetail
(Id, SerialRuleNo, SerialType, ItemNo, SourceType, SerialLength, SearchStart, DecimalType, UserDefine, SerialCodeFlag, Description, SerialTypeNo, GetData, PadLeft, IssueStatus, CreatedTime, UpdatedTime, CreatedUserId, CreatedUserName, UpdatedUserId, UpdatedUserName, IsDeleted)
VALUES(43, N'1', 40, 4, N'D2', 4, 0, 1, NULL, 0, N'客户编号-日', NULL, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0);
INSERT INTO dbo.Base_SerialRuleDetail
(Id, SerialRuleNo, SerialType, ItemNo, SourceType, SerialLength, SearchStart, DecimalType, UserDefine, SerialCodeFlag, Description, SerialTypeNo, GetData, PadLeft, IssueStatus, CreatedTime, UpdatedTime, CreatedUserId, CreatedUserName, UpdatedUserId, UpdatedUserName, IsDeleted)
VALUES(44, N'1', 40, 5, N'SN', 3, 0, 1, NULL, 0, N'客户编号-流水号', NULL, 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0);
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/addForm.vue
@@ -3,10 +3,10 @@
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-form-item label="库位编码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
        <!-- <a-form-item label="库位编码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入库位编码"
            v-decorator="['placeCode', { rules: [{ required: true, message: '请输入库位编码!' }] }]" />
        </a-form-item>
        </a-form-item> -->
        <a-form-item label="库位名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入库位名称"
            v-decorator="['placeName', { rules: [{ required: true, message: '请输入库位名称!' }] }]" />
@@ -31,7 +31,7 @@
            }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="是否堆垛机库位" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
        <!-- <a-form-item label="是否堆垛机库位" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-switch v-decorator="['isSrmPlace', { valuePropName: 'checked' }]" />
        </a-form-item>
        <a-form-item label="堆垛机库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
@@ -54,7 +54,7 @@
        </a-form-item>
        <a-form-item label="输送线库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入输送线库位号" v-decorator="['transPlaceNo']" />
        </a-form-item>
        </a-form-item> -->
        <a-form-item label="是否激活与任务调度" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-switch v-decorator="['isActivateWCS', { valuePropName: 'checked' }]" />
        </a-form-item>
@@ -67,7 +67,7 @@
        <a-form-item label="所在库区" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-select style="width: 100%" placeholder="请选择所在库区"
            v-decorator="['areaid', { rules: [{ required: true, message: '请选择所在库区!' }] }]">
            <a-select-option v-for="(item, index) in WmsAreaData" :key="index" :value="item.areaCode">{{ item.areaName
            <a-select-option v-for="(item, index) in WmsAreaData" :key="index" :value="item.id">{{ item.areaName
            }}</a-select-option>
          </a-select>
          <!-- <a-input placeholder="请输入所在库区" v-decorator="['areaId', {rules: [{required: true, message: '请输入所在库区!'}]}]" /> -->
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/editForm.vue
@@ -30,7 +30,7 @@
            <a-select-option v-for="(item,index) in placeStatusData" :key="index" :value="Number(item.code)">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="是否堆垛机库位" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
        <!-- <a-form-item label="是否堆垛机库位" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-switch v-decorator="['isSrmPlace', { valuePropName: 'checked' }]" />
        </a-form-item>
        <a-form-item label="堆垛机库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
@@ -53,7 +53,7 @@
        </a-form-item>
        <a-form-item label="输送线库位号" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入输送线库位号" v-decorator="['transPlaceNo']" />
        </a-form-item>
        </a-form-item> -->
        <a-form-item label="是否激活与任务调度" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-switch v-decorator="['isActivateWCS', { valuePropName: 'checked' }]" />
        </a-form-item>
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsPlace/index.vue
@@ -27,10 +27,10 @@
                  </a-select>
                </a-form-item>
              </a-col>
              <a-col :md="8" :sm="24">
              <!-- <a-col :md="8" :sm="24">
                <a-form-item label="库位类型名称">
                  <a-input v-model="queryParam.placeTypeName" allow-clear placeholder="请输入库位类型名称"/>
                </a-form-item>
                </a-form-item> -->
              </a-col><a-col :md="8" :sm="24">
                <a-form-item label="库位属性">
                  <a-select :allowClear="true" style="width: 100%" v-model="queryParam.placeStatus" placeholder="请选择库位属性">
@@ -38,7 +38,7 @@
                  </a-select>
                </a-form-item>
              </a-col>
            <a-col :md="8" :sm="24">
            <!-- <a-col :md="8" :sm="24">
                <a-form-item label="是否堆垛机库位">
                    <a-select :allowClear="true" style="width: 100%" v-model="queryParam.isSrmPlace" placeholder="请选择是否堆垛机库位">
                        <a-select-option v-for="(item,index) in isSrmPlaceData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
@@ -89,7 +89,7 @@
                <a-form-item label="输送线库位号">
                  <a-input v-model="queryParam.transPlaceNo" allow-clear placeholder="请输入输送线库位号"/>
                </a-form-item>
              </a-col>
              </a-col> -->
            <a-col :md="8" :sm="24">
                <a-form-item label="是否激活与任务调度">
                    <a-select :allowClear="true" style="width: 100%" v-model="queryParam.isActivateWCS" placeholder="请选择是否激活与任务调度">
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsWarehouse/addForm.vue
@@ -87,7 +87,15 @@
    add(record) {
      this.visible = true
      this.$nextTick(() => {
        this.form.setFieldsValue(
          {
            length: 0,
            width: 0,
            height:0,
          }
        )
      });
    },
    /**
iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/CommonHelper/SerialSN/EnumSerialType.cs
@@ -26,6 +26,13 @@
        [Description("客户编号")]
        客户编号 = 30,
        /// <summary>
        /// 库位编号
        /// </summary>
        [Description("库位编号")]
        库位编号 = 40,
    }
}
iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/Dto/WmsPlaceInput.cs
@@ -351,7 +351,6 @@
        /// <summary>
        /// 库位编码
        /// </summary>
        [Required(ErrorMessage = "库位编码不能为空")]
        public virtual string PlaceCode { get; set; }
        
        /// <summary>
@@ -374,7 +373,6 @@
        /// <summary>
        /// 库位类型名称
        /// </summary>
        [Required(ErrorMessage = "库位类型名称不能为空")]
        public virtual string PlaceTypeName { get; set; }
        
        /// <summary>
iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/WmsPlaceService.cs
@@ -27,18 +27,20 @@
        private readonly IRepository<SysDictData, MasterDbContextLocator> _sysDictDataRep;
        private readonly ISysExcelTemplateService _sysExcelTemplateService;
        private readonly static object _lock = new();
        private readonly IRepository<WmsArea, MasterDbContextLocator> _wmsAreaRep;
        public WmsPlaceService(
            IRepository<WmsPlace,MasterDbContextLocator> wmsPlaceRep
            ,IRepository<SysDictType, MasterDbContextLocator> sysDictTypeRep
            ,IRepository<SysDictData, MasterDbContextLocator> sysDictDataRep
            ,ISysExcelTemplateService sysExcelTemplateService
            , IRepository<WmsArea, MasterDbContextLocator> wmsAreaRep
        )
        {
            _wmsPlaceRep = wmsPlaceRep;
         _sysDictTypeRep = sysDictTypeRep;
         _sysDictDataRep = sysDictDataRep;
         _sysExcelTemplateService = sysExcelTemplateService;
            _wmsAreaRep = wmsAreaRep;
        }
        /// <summary>
@@ -197,6 +199,20 @@
        public async Task Add(AddWmsPlaceInput input)
        {
            var wmsPlace = input.Adapt<WmsPlace>();
            wmsPlace.PlaceCode =await SerialUtil.GetSerial(EnumSerialType.库位编号);
            var area = (await _wmsAreaRep.DetachedEntities.FirstOrDefaultAsync(u => u.Id == input.AreaId&&u.IsDeleted==false)).Adapt<WmsAreaOutput>();
            if (area == null)
            {
                throw Oops.Oh($"库区不存在");
            }
            if (area.IsDisabled==true)
            {
                throw Oops.Oh($"库区已禁用");
            }
            wmsPlace.AreaName= area.AreaName;
            wmsPlace.AreaCode= area.AreaCode;
            wmsPlace.PlaceTypeName = wmsPlace.PlaceType.ToString();
                        //验证
            await CheckExisit(wmsPlace);
@@ -231,6 +247,19 @@
            if (!isExist) throw Oops.Oh(ErrorCode.D1002);
            var wmsPlace = input.Adapt<WmsPlace>();
            var area = (await _wmsAreaRep.DetachedEntities.FirstOrDefaultAsync(u => u.Id == input.AreaId && u.IsDeleted == false)).Adapt<WmsAreaOutput>();
            if (area == null)
            {
                throw Oops.Oh($"库区不存在");
            }
            if (area.IsDisabled == true)
            {
                throw Oops.Oh($"库区已禁用");
            }
            wmsPlace.AreaName = area.AreaName;
            wmsPlace.AreaCode = area.AreaCode;
            wmsPlace.PlaceTypeName = wmsPlace.PlaceType.ToString();
            //验证
            await CheckExisit(wmsPlace,true);