feat: 更新仓库枚举值和过滤条件,添加不等操作符支持
refactor: 重构任务和库存相关界面的查询逻辑
fix: 修复库存状态过滤条件错误问题
style: 统一代码格式和命名规范
已修改12个文件
289 ■■■■ 文件已修改
Code/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.jsx 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/extension/stock/groupPalle.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stock.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/extension/taskinfo/agvTask.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.jsx 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/views/stock/groupPalle.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Const/HtmlElementType.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Code/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.jsx
@@ -1,18 +1,17 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import gridBody from './extend/taskExecuteDetail.vue'
import gridBody from "./extend/taskExecuteDetail.vue";
let extension = {
    components: {
        //查询界面扩展组件
        gridHeader: '',
    gridHeader: "",
        gridBody: gridBody,
        gridFooter: '',
    gridFooter: "",
        //新建、编辑弹出框扩展组件
        modelHeader: '',
        modelBody: '',
        modelFooter: ''
    modelHeader: "",
    modelBody: "",
    modelFooter: "",
    },
    tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  tableAction: "", //指定某张表的权限(这里填写表名,默认不用填写)
    buttons: { view: [], box: [], detail: [] }, //扩展的按钮
    methods: {
        //下面这些方法可以保留也可以删除
@@ -28,19 +27,17 @@
            //扩展页面初始化操作
            this.columns.push({
                field: '操作',
                title: '操作',
        field: "操作",
        title: "操作",
                width: 70,
                fixed: 'right',
                align: 'center',
        fixed: "right",
        align: "center",
                formatter: (row) => {
                    return (
                        '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看</i>'
                    );
          return '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">查看</i>';
                },
                click: (row) => {
                    this.$refs.gridBody.open(row);
                }
        },
            });
        },
        onInited() {
@@ -51,6 +48,27 @@
        searchBefore(param) {
            //界面查询前,可以给param.wheres添加查询参数
            //返回false,则不会执行查询
      // 第一个过滤条件
      const roadwayFilter1 = {
        name: "roadway",
        value: "ZJSC1",
        displayType: "notequal",
      };
      // 第二个过滤条件
      const roadwayFilter2 = {
        name: "roadway",
        value: "FJSC1",
        displayType: "notequal",
      };
      if (!param.wheres) {
        param.wheres = [];
      }
      // 将两个过滤条件添加到查询参数中
      param.wheres.push(roadwayFilter1);
      param.wheres.push(roadwayFilter2);
            return true;
        },
        searchAfter(result) {
@@ -76,7 +94,7 @@
            //(3)this.editFormFields.字段='xxx';
            //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
            //看不懂就把输出看:console.log(this.editFormOptions)
        }
    }
    },
  },
};
export default extension;
Code/WMS/WIDESEA_WMSClient/src/extension/stock/groupPalle.jsx
@@ -100,7 +100,7 @@
      // 框架初始化配置后
    },
    searchBefore(param) {
      const locationCodeFilter = {
      const stockStatusFilter = {
        name: "stockStatus",
        value: "1",
        displayType: "int"
@@ -109,7 +109,7 @@
        param.wheres = [];
      }
      // 将过滤条件添加到查询参数中
      param.wheres.push(locationCodeFilter);
      param.wheres.push(stockStatusFilter);
      return true;
    },
    searchAfter(result) {
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stock.jsx
@@ -43,6 +43,16 @@
      }
    },
    searchBefore(param) {
      const stockStatusFilter = {
        name: "stockStatus",
        value: "1",
        displayType: "notequal"
      };
      if (!param.wheres) {
        param.wheres = [];
      }
      // 将过滤条件添加到查询参数中
      param.wheres.push(stockStatusFilter);
      return true;
    },
    searchAfter(result) {
Code/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.jsx
@@ -3,58 +3,74 @@
let extension = {
  components: {
    //查询界面扩展组件
    gridHeader: '',
    gridBody: '',
    gridFooter: '',
    gridHeader: "",
    gridBody: "",
    gridFooter: "",
    //新建、编辑弹出框扩展组件
    modelHeader: '',
    modelBody: '',
    modelFooter: ''
    modelHeader: "",
    modelBody: "",
    modelFooter: "",
  },
  tableAction: '',
  tableAction: "",
  buttons: { view: [], box: [], detail: [] },
  methods: {
    onInit() {
      // 添加MES操作列
      this.columns.push({
        title: '操作',
        field: '操作',
        align: 'center',
        title: "操作",
        field: "操作",
        align: "center",
        width: 200,
        fixed: 'right',
        fixed: "right",
        render: (h, { row, column, index }) => {
          return (
            <div>
              <el-button
                type="primary"
                size="small"
                onClick={($e) => { this.handleInbound(row); }}
              >进站</el-button>
                onClick={($e) => {
                  this.handleInbound(row);
                }}
              >
                进站
              </el-button>
              <el-button
                type="success"
                size="small"
                style="margin-left: 8px"
                onClick={($e) => { this.handleOutbound(row); }}
              >出站</el-button>
                onClick={($e) => {
                  this.handleOutbound(row);
                }}
              >
                出站
              </el-button>
            </div>
          );
        }
        },
      });
    },
    // 托盘进站操作
    async handleInbound(row) {
      try {
        await this.$confirm(`确认执行托盘进站操作?\n托盘编号:${row.palletCode}`, "进站确认", {
        await this.$confirm(
          `确认执行托盘进站操作?\n托盘编号:${row.palletCode}`,
          "进站确认",
          {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
            type: "warning",
          },
        );
        const result = await this.http.post("/api/StockInfo/inboundInContainer", {
        const result = await this.http.post(
          "/api/StockInfo/inboundInContainer",
          {
          palletCode: row.palletCode,
          stockId: row.id
        }, "正在调用MES接口...");
            stockId: row.id,
          },
          "正在调用MES接口...",
        );
        if (result.status) {
          this.$Message.success(result.message || "托盘进站成功");
@@ -72,16 +88,24 @@
    // 托盘出站操作
    async handleOutbound(row) {
      try {
        await this.$confirm(`确认执行托盘出站操作?\n托盘编号:${row.palletCode}`, "出站确认", {
        await this.$confirm(
          `确认执行托盘出站操作?\n托盘编号:${row.palletCode}`,
          "出站确认",
          {
          confirmButtonText: "确认",
          cancelButtonText: "取消",
          type: "warning"
        });
            type: "warning",
          },
        );
        const result = await this.http.post("/api/StockInfo/outboundInContainer", {
        const result = await this.http.post(
          "/api/StockInfo/outboundInContainer",
          {
          palletCode: row.palletCode,
          stockId: row.id
        }, "正在调用MES接口...");
            stockId: row.id,
          },
          "正在调用MES接口...",
        );
        if (result.status) {
          this.$Message.success(result.message || "托盘出站成功");
@@ -100,6 +124,16 @@
      // 框架初始化配置后
    },
    searchBefore(param) {
      const stockStatusFilter = {
        name: "stockStatus",
        value: "1",
        displayType: "notequal",
      };
      if (!param.wheres) {
        param.wheres = [];
      }
      // 将过滤条件添加到查询参数中
      param.wheres.push(stockStatusFilter);
      return true;
    },
    searchAfter(result) {
@@ -116,8 +150,8 @@
    },
    modelOpenAfter(row) {
      // 点击编辑、新建按钮弹出框后
    }
  }
    },
  },
};
export default extension;
Code/WMS/WIDESEA_WMSClient/src/extension/taskinfo/agvTask.jsx
@@ -28,14 +28,14 @@
  // 第一个过滤条件
  const roadwayFilter1 = {
    name: "roadway",
    value: "ZJ1",
    value: "ZJSC1",
    displayType: "like",
  };
  
  // 第二个过滤条件
  const roadwayFilter2 = {
    name: "roadway",
    value: "FJ1",
    value: "FJSC1",
    displayType: "like",
  };
Code/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.jsx
@@ -1,47 +1,48 @@
//此js文件是用来自定义扩展业务代码,可以扩展一些自定义页面或者重新配置生成的代码
import gridBodyExtension from './extend/gridBodyExtension.vue'
import gridBodyExtension from "./extend/gridBodyExtension.vue";
let extension = {
    components: {
      //查询界面扩展组件
      gridHeader: '',
    gridHeader: "",
      gridBody: gridBodyExtension,
      gridFooter: '',
    gridFooter: "",
      //新建、编辑弹出框扩展组件
      modelHeader: '',
      modelBody: '',
      modelFooter: '',
    modelHeader: "",
    modelBody: "",
    modelFooter: "",
    },
    tableAction: '', //指定某张表的权限(这里填写表名,默认不用填写)
  tableAction: "", //指定某张表的权限(这里填写表名,默认不用填写)
    buttons: { view: [], box: [], detail: [] }, //扩展的按钮
    methods: {
       //下面这些方法可以保留也可以删除
      onInit() {
        //添加"手动创建任务"按钮
        this.buttons.push({
          name: '手动创建任务',
          icon: 'el-icon-plus',
          type: 'primary',
          value: 'ManualCreateTask',
        name: "手动创建任务",
        icon: "el-icon-plus",
        type: "primary",
        value: "ManualCreateTask",
          onClick: () => {
            this.$refs.gridBody.open();
          }
        },
        });
        //添加"手动下发"按钮
        this.buttons.push({
          name: '手动下发',
          icon: 'el-icon-s-promotion',
          type: 'primary',
          value: 'DispatchTasksToWCS',
        name: "手动下发",
        icon: "el-icon-s-promotion",
        type: "primary",
        value: "DispatchTasksToWCS",
          onClick: () => {
            let rows = this.$refs.table.getSelected();
            if (rows.length == 0) return this.$error("请先选择任务");
            this.$refs.gridBody.openDispatch(rows);
          }
        },
        });
        let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel');
      let TaskHandCancelBtn = this.buttons.find(
        (x) => x.value == "TaskHandCancel",
      );
      if (TaskHandCancelBtn) {
        TaskHandCancelBtn.onClick = function () {
          let rows = this.$refs.table.getSelected();
@@ -52,15 +53,17 @@
            .post("api/Task/TaskCancel?taskNum="+param, "数据处理中...")
            .then((x) => {
              if (x.status) {
                this.$Message.success('任务取消成功.');
                this.$Message.success("任务取消成功.");
                this.refresh();
              } else {
                return this.$error(x.message);
              }
            });
        };
        }
      }
      let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted');
      let TaskHandCompletedBtn = this.buttons.find(
        (x) => x.value == "TaskHandCompleted",
      );
      if (TaskHandCompletedBtn) {
        TaskHandCompletedBtn.onClick = function () {
          let rows = this.$refs.table.getSelected();
@@ -71,13 +74,13 @@
            .post("api/Task/TaskCompleted?taskNum="+param, "数据处理中...")
            .then((x) => {
              if (x.status) {
                this.$Message.success('任务手动完成');
                this.$Message.success("任务手动完成");
                this.refresh();
              } else {
                return this.$error(x.message);
              }
            });
        }
        };
      }
      },
      onInited() {
@@ -88,6 +91,28 @@
      searchBefore(param) {
        //界面查询前,可以给param.wheres添加查询参数
        //返回false,则不会执行查询
      // 第一个过滤条件
      const roadwayFilter1 = {
        name: "roadway",
        value: "ZJSC1",
        displayType: "notequal",
      };
      // 第二个过滤条件
      const roadwayFilter2 = {
        name: "roadway",
        value: "FJSC1",
        displayType: "notequal",
      };
      if (!param.wheres) {
        param.wheres = [];
      }
      // 将两个过滤条件添加到查询参数中
      param.wheres.push(roadwayFilter1);
      param.wheres.push(roadwayFilter2);
        return true;
      },
      searchAfter(result) {
@@ -113,7 +138,7 @@
        //(3)this.editFormFields.字段='xxx';
        //如果需要给下拉框设置默认值,请遍历this.editFormOptions找到字段配置对应data属性的key值
        //看不懂就把输出看:console.log(this.editFormOptions)
      }
    }
    },
  },
  };
  export default extension;
Code/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue
@@ -27,7 +27,15 @@
      sortName: "id",
    });
    const editFormFields = ref({
      locationCode: "",
      warehouseId: "",
      roadwayNo: "",
      locationType: "",
      enableStatus: "",
      locationStatus: "",
      row: "",
      column: "",
      layer: "",
    });
    const editFormOptions = ref([
      [
Code/WMS/WIDESEA_WMSClient/src/views/stock/groupPalle.vue
@@ -66,24 +66,33 @@
    const editFormFields = ref({
      palletCode: "",
      palletType: 0,
      warehouseId: 0,
      mesUploadStatus: "",
      stockStatus: "",
      locationCode: "",
      locationDetails: ""
    });
    const editFormOptions = ref([
      [
        { field: "palletCode", title: TEXT.palletCode, type: "string" },
        { field: "stockStatus", title: TEXT.stockStatus, type: "select", dataKey: "stockStatusEmun", data: []},
        { field: "locationCode", title: TEXT.locationCode, type: "string" },
      ],
    ]);
    const searchFormFields = ref({
      palletCode: "",
      stockStatus: "",
      locationCode: "",
    });
    const searchFormOptions = ref([
      [
        { title: TEXT.palletCode, field: "palletCode", type: "like" },
        { title: TEXT.stockStatus, field: "stockStatus", type: "selectList", dataKey: "stockStatusEmun", data: [] },
        { title: TEXT.locationCode, field: "locationCode", type: "like" },
      ],
    ]);
Code/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
@@ -66,24 +66,33 @@
    const editFormFields = ref({
      palletCode: "",
      palletType: 0,
      warehouseId: 0,
      mesUploadStatus: "",
      stockStatus: "",
      locationCode: "",
      locationDetails: ""
    });
    const editFormOptions = ref([
      [
        { field: "palletCode", title: TEXT.palletCode, type: "string" },
        { field: "stockStatus", title: TEXT.stockStatus, type: "select", dataKey: "stockStatusEmun", data: []},
        { field: "locationCode", title: TEXT.locationCode, type: "string" },
      ],
    ]);
    const searchFormFields = ref({
      palletCode: "",
      stockStatus: "",
      locationCode: "",
    });
    const searchFormOptions = ref([
      [
        { title: TEXT.palletCode, field: "palletCode", type: "like" },
        { title: TEXT.stockStatus, field: "stockStatus", type: "selectList", dataKey: "stockStatusEmun", data: [] },
        { title: TEXT.locationCode, field: "locationCode", type: "like" },
      ],
    ]);
Code/WMS/WIDESEA_WMSServer/WIDESEA_Common/WareHouseEnum/WarehouseEnum.cs
@@ -33,21 +33,21 @@
        /// 分容1号仓库
        /// </summary>
        [Description("分容1号仓库")]
        HCFR1 = 3,
        HCSC1 = 3,
        /// <summary>
        /// 高温2号仓库
        /// </summary>
        [Description("高温2号仓库")]
        GW2 = 4,
        GWSC2 = 4,
        /// <summary>
        /// 正极卷仓
        /// </summary>
        [Description("正极卷仓")]
        ZJ1 = 5,
        ZJ1 = 6,
        /// <summary>
        /// 负极卷仓
        /// </summary>
        [Description("负极卷仓")]
        FJ1 = 6
        FJ1 = 7
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Const/HtmlElementType.cs
@@ -16,7 +16,7 @@
        public const string textarea = "textarea";
        public const string thanorequal = "thanorequal";
        public const string lessorequal = "lessorequal";
        public const string notequal = "notequal";
        public const string gt = "gt";
        public const string lt = "lt";
@@ -28,5 +28,6 @@
        public const string LessOrequal = "<=";
        public const string Contains = "in";
        public const string Equal = "=";
        public const string NotEqual = "!=";
    }
}
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs
@@ -979,6 +979,15 @@
                case HtmlElementType.like:
                    linqExpression = LinqExpressionType.Contains;
                    break;
                case HtmlElementType.thanorequal:
                    linqExpression = LinqExpressionType.ThanOrEqual;
                    break;
                case HtmlElementType.lessorequal:
                    linqExpression = LinqExpressionType.LessThanOrEqual;
                    break;
                case HtmlElementType.notequal:
                    linqExpression = LinqExpressionType.NotEqual;
                    break;
                default:
                    linqExpression = LinqExpressionType.Equal;
                    break;