647556386
2025-03-14 c5cf76657ef4bda557a445b56466a85db0b2662d
新增物料出库详情单页面
已修改4个文件
已添加2个文件
360 ■■■■■ 文件已修改
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/outStockLockInfo.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/outStockLockInfo.vue 244 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutboundOrderEnum.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/extension/outbound/outStockLockInfo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
/*****************************************************************************************
**  Author:jxx 2022
**  QQ:283591387
**完整文档见:http://v2.volcore.xyz/document/api ã€ä»£ç ç”Ÿæˆé¡µé¢ViewGrid】
**常用示例见:http://v2.volcore.xyz/document/vueDev
**后台操作见:http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
let extension = {
    components: {
      //查询界面扩展组件
      gridHeader: '',
      gridBody: '',
      gridFooter: '',
      //新建、编辑弹出框扩展组件
      modelHeader: '',
      modelBody: '',
      modelFooter: ''
    },
    tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
    buttons: { view: [], box: [], detail: [] }, //扩展的按钮
    methods: {
       //下面这些方法可以保留也可以删除
      onInit() {  //框架初始化配置前,
          //示例:在按钮的最前面添加一个按钮
          //   this.buttons.unshift({  //也可以用push或者splice方法来修改buttons数组
          //     name: '按钮', //按钮名称
          //     icon: 'el-icon-document', //按钮图标vue2版本见iview文档icon,vue3版本见element ui文档icon(注意不是element puls文档)
          //     type: 'primary', //按钮样式vue2版本见iview文档button,vue3版本见element ui文档button
          //     onClick: function () {
          //       this.$Message.success('点击了按钮');
          //     }
          //   });
          //示例:设置修改新建、编辑弹出框字段标签的长度
          // this.boxOptions.labelWidth = 150;
      },
      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;
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/router/viewGird.js
@@ -73,7 +73,12 @@
    path: '/outboundOrderDetail',
    name: 'outboundOrderDetail',
    component: () => import('@/views/outbound/outboundOrderDetail.vue')
  }, {
  },
  {
    path: '/outStockLockInfo',
    name: 'outStockLockInfo',
    component: () => import('@/views/outbound/outStockLockInfo.vue')
  },{
    path: '/stockInfo',
    name: 'stockInfo',
    component: () => import('@/views/stock/stockInfo.vue')
´úÂë¹ÜÀí/WMS/WIDESEA_WMSClient/src/views/outbound/outStockLockInfo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,244 @@
<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/outbound/outStockLockInfo.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    const table = ref({
      key: "id",
      footer: "Foots",
      cnName: "出库详情",
      name: "outStockLockInfo",
      url: "/OutStockLockInfo/",
      sortName: "id",
    });
    const editFormFields = ref({
      orderType: "",
      orderNo:"",
      upperOrderNo: "",
      orderStatus: "",
      remark: "",
      warehouseId:""
    });
    const editFormOptions = ref([
      [
        {
          title: "单据类型",
          required: true,
          field: "orderType",
          type: "select",
          dataKey: "outOrderType",
          data: [],
        },
        {
        field: "orderNo",
        title: "单据编号",
        type: "string",
        readonly:true
      },
        {
          title: "上游单据编号",
          field: "upperOrderNo",
          type: "string",
        },
        {
          title: "单据状态",
          field: "orderStatus",
          type: "select",
          dataKey: "inboundState",
          data: [],
          readonly: true,
        },
        {
          title: "仓库",
          field: "warehouseId",
          type: "select",
          dataKey: "warehouses",
          data: [],
          required: true,
        },
        {
          title: "备注",
          field: "remark",
          type: "textarea",
        },
      ],
    ]);
    const searchFormFields = ref({
      orderNo: "",
      upperOrderNo: "",
      orderType: "",
      orderStatus: "",
      createType: "",
      creater: "",
      createDate: "",
    });
    const searchFormOptions = ref([
      [
        { title: "单据编号", field: "orderNo", type: "like" },
        { title: "批次号", field: "batchNo", type: "like" },
        { title: "物料编号", field: "materielCode", type: "like" },
        {
          title: "单据类型",
          field: "orderType",
          type: "select",
          dataKey: "outOrderType",
          data: [],
        },
      ],
      [
        {title: "物料名称",field: "materielName",type: "like",},
        { title: "单据数量", field: "orderQuantity", type: "like" },
        { title: "原始库存量", field: "originalQuantity", type: "like" },
        { title: "分配库存量", field: "assignQuantity", type: "like" },
      ],
      [
        {title: "货位编号",field: "locationCode",type: "like",},
        { title: "托盘编号", field: "palletCode", type: "like" },
        { title: "任务号", field: "taskNum", type: "like" },
        { title: "状态", field: "status", type: "select",dataKey:"outLockStockStatusEnum", data:[]},
      ],
    ]);
    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",
      },
      {
        field: "batchNo",
        title: "批次号",
        type: "string",
        width: 160,
        align: "left",
        // link: true,
      },
      {
        field: "materielCode",
        title: "物料编号",
        type: "string",
        width: 160,
        align: "left",
      },
      {
        field: "orderType",
        title: "单据类型",
        type: "string",
        width: 150,
        align: "left",
        bind: { key: "outOrderType", data: [] },
      },
      {
        field: "materielName",
        title: "物料名称",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "orderQuantity",
        title: "单据数量",
        type: "string",
        width: 120,
        align: "left"
      },
      {
        field: "originalQuantity",
        title: "原始库存量",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "assignQuantity",
        title: "分配出库量",
        type: "string",
        width: 90,
        align: "left",
      },
      {
        field: "locationCode",
        title: "货位编号",
        type: "datetime",
        width: 160,
        align: "left",
      },
      {
        field: "palletCode",
        title: "托盘编号",
        type: "string",
        width: 100,
        align: "left",
      },
      {
        field: "unit",
        title: "单位",
        type: "datetime",
        width: 160,
        align: "left",
      },
      {
        field: "taskNum",
        title: "任务号",
        type: "string",
        width: 100,
        align: "left",
      },
      {
        field: "status",
        title: "状态",
        type: "string",
        width: 100,
        align: "left",
        bind:{key:"outLockStockStatusEnum", data: []}
      },
    ]);
    const detail = ref({
      cnName: "#detailCnName",
      columns: [],
      sortName: "",
      key: "",
    });
    return {
      table,
      extend,
      editFormFields,
      editFormOptions,
      searchFormFields,
      searchFormOptions,
      columns,
      detail,
    };
  },
});
</script>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Common/OrderEnum/OutboundOrderEnum.cs
@@ -45,6 +45,12 @@
    /// </summary>
    public enum OutOrderTypeEnum
    {
        /// <summary>
        /// MES出库单
        /// </summary>
        [Description("MES出库单")]
        MesOutOrder = 100,
        /// <summary>
        /// ç”Ÿäº§è¿”工单
        /// </summary>
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs
@@ -354,6 +354,31 @@
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "outLockStockStatusEnum":
                        {
                            List<object> data = new List<object>();
                            Type type = typeof(OutLockStockStatusEnum);
                            List<int> enums = Enum.GetValues(typeof(OutLockStockStatusEnum)).Cast<int>().ToList();
                            int index = 0;
                            foreach (var item in enums)
                            {
                                FieldInfo? fieldInfo = typeof(OutLockStockStatusEnum).GetField(((OutLockStockStatusEnum)item).ToString());
                                DescriptionAttribute? description = fieldInfo.GetCustomAttribute<DescriptionAttribute>();
                                if (description != null)
                                {
                                    data.Add(new { key = item.ToString(), value = description.Description });
                                }
                                else
                                {
                                    data.Add(new { key = item.ToString(), value = item.ToString() });
                                }
                                index++;
                            }
                            result = new VueDictionaryDTO { DicNo = key, Config = "", Data = data };
                        }
                        break;
                    case "inOrderType":
                        {
                            List<object> data = new List<object>();
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -6,7 +6,7 @@
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus,returnStatus,returnType",
  "dics": "inOrderType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,receiveOrderTypeEnum,authorityScope,authorityScopes,locationChangeType,warehouses,suppliers,taskType,receiveStatus,purchaseType,purchaseOrderStatus,printStatus,returnStatus,returnType,outLockStockStatusEnum",
  "AllowedHosts": "*",
  "ConnectionStringsEncryption": false,
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true