huangxiaoqiang
2026-03-10 d20a0bf191b78b59d18af198b7816a273e1cc283
前端表格与查询条件优化,修正后端排序逻辑

本次提交主要优化了任务、工单、库存等页面的表格字段和查询条件,统一字段名称、顺序及宽度,提升数据展示完整性和可用性。扩展了工单和库存的多维查询项,调整部分字段为更贴合业务的名称。修正后端排序逻辑,避免因大小写导致的排序失效。统一表格组件写法,清理无用代码,提升整体代码规范性。
已修改9个文件
151 ■■■■■ 文件已修改
项目代码/WCS/WCSClient/src/extension/taskinfo/task.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSClient/src/views/taskinfo/task.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServer/WIDESEAWCS_Core/BaseServices/ServiceBase.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/widesea_wms/OrderInfo/Dt_AssemblyOrderInfo.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/widesea_wms/OrderInfo/Dt_PaintingOrderInfo.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/widesea_wms/stock/Dt_CarBodyInfo.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/widesea_wms/stock/VV_StockInfo.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WCSClient/src/extension/taskinfo/task.js
@@ -51,6 +51,7 @@
        searchBefore(param) {
            //界面查询前,可以给param.wheres添加查询参数
            //返回false,则不会执行查询
            param.order = "Asc";
            return true;
        },
        searchAfter(result) {
ÏîÄ¿´úÂë/WCS/WCSClient/src/views/taskinfo/task.vue
@@ -1,16 +1,8 @@
<template>
  <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
    :editFormFields="editFormFields"
    :editFormOptions="editFormOptions"
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
    :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
    :table="table" :extend="extend">
  </view-grid>
</template>
  <script>
@@ -24,7 +16,7 @@
      cnName: "任务信息",
      name: "task",
      url: "/Task/",
      sortName: "CreateDate",
      sortName: "createDate",
    });
    const editFormFields = ref({
      taskNum:"",
@@ -106,9 +98,9 @@
      },
      {
        field: "palletCode",
        title: "托盘编号",
        title: "滑橇号",
        type: "string",
        width: 160,
        width: 100,
        align: "left",
      },
      {
@@ -162,19 +154,19 @@
        width: 110,
        align: "left",
      },
      {
        field: "productionLine",
        title: "产线",
        type: "string",
        width: 70,
        align: "left",
        bind: { key: "ProductionLine", data: [] }
      },
      // {
      //   field: "productionLine",
      //   title: "产线",
      //   type: "string",
      //   width: 70,
      //   align: "left",
      //   bind: { key: "ProductionLine", data: [] }
      // },
      {
        field: "exceptionMessage",
        title: "异常信息",
        type: "string",
        width: 90,
        width: 150,
        align: "left",
       
      },
@@ -182,7 +174,7 @@
        field: "grade",
        title: "优先级",
        type: "int",
        width: 60,
        width: 90,
        align: "left",
      },
      {
ÏîÄ¿´úÂë/WCS/WCSServer/WIDESEAWCS_Core/BaseServices/ServiceBase.cs
@@ -151,7 +151,7 @@
                {
                    return new Dictionary<string, OrderByType> {
                        {
                            pageData.Sort,pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc
                            pageData.Sort,pageData.Order?.ToLower() == OrderByType.Asc.ToString().ToLower() ? OrderByType.Asc : OrderByType.Desc
                        } };
                }
            }
ÏîÄ¿´úÂë/WMS/WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx
@@ -103,6 +103,7 @@
        col.showOverflowTooltip = true
      })
      //示例:自定义表格列
      //表格上添加自定义按钮
      // this.columns.push({
@@ -142,6 +143,7 @@
    searchBefore(param) {
      //界面查询前,可以给param.wheres添加查询参数
      //返回false,则不会执行查询
      param.order = "asc";
      return true
    },
    searchAfter(result) {
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/widesea_wms/OrderInfo/Dt_AssemblyOrderInfo.vue
@@ -40,6 +40,16 @@
                { "title": "工单号", "field": "workOrderNo", "type": "text" },
                { "title": "订单号", "field": "vehicleOrderNo", "type": "text" },
                { "title": "pvi", "field": "pvi", "type": "text" },
                { "title": "车型特征值", "field": "vehicleCharacteristic", "type": "text" },
            ],
            [
                { "title": "工厂", "field": "plantCode", "type": "text" },
                { "title": "订单类型", "field": "orderType", "type": "select", dataKey: "OrderType", data: [] },
                { "title": "工单顺序号", "field": "sequenceNo", "type": "text" },
                { "title": "整车物料号", "field": "vehicleCode", "type": "text" },
            ], [
                { "title": "白车身物料号", "field": "biwMaterial", "type": "text" },
                { "title": "彩车身物料号", "field": "pbMaterial", "type": "string" },
            ],
        ]);
        const columns = ref([{ field: 'Id', title: '主键', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
@@ -47,7 +57,7 @@
        //{ field: 'splitStrategy', title: '生产模式', type: 'string', width: 110, require: true, align: 'left' },
        { field: 'vehicleOrderNo', title: '订单号', type: 'string', width: 90, require: true, align: 'left' },
        { field: 'orderType', title: '订单类型', type: 'string', width: 110, require: true, align: 'left', bind: { key: "OrderType", data: [] } },
        { field: 'workOrderNo', title: '工单号', type: 'string', width: 90, require: true, align: 'left' },
        { field: 'workOrderNo', title: '工单号', type: 'string', width: 150, require: true, align: 'left' },
        { field: 'pvi', title: 'pvi', type: 'string', width: 100, require: true, align: 'left' },
        { field: 'sequenceNo', title: '工单顺序号', type: 'string', width: 120, require: true, align: 'left', sort: true },
        { field: 'vehicleCharacteristic', title: '车型特征值', type: 'string', width: 90, require: true, align: 'left' },
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/widesea_wms/OrderInfo/Dt_PaintingOrderInfo.vue
@@ -5,15 +5,9 @@
 *业务请在@/extension/widesea_wms/invoices/Dt_OutOrder.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
@@ -45,14 +39,25 @@
            [
                { "title": "工单号", "field": "workOrderNo", "type": "text" },
                { "title": "pvi", "field": "pvi", "type": "text" },
                { "title": "工单类型", "field": "workOrderType", "type": "select", dataKey: "OrderType", data: [] },
                { "title": "出库日期", "field": "orderDate", "type": "datetime" },
            ], [
                { "title": "白车身物料号", "field": "biwMaterial", "type": "text" },
                { "title": "彩车身物料号", "field": "pbMaterial", "type": "text" },
                { "title": "车型特征值", "field": "vehicleCharacteristic", "type": "string" },
                { "title": "天窗特征值", "field": "skylightCharacteristic", "type": "string" },
            ], [
                { "title": "车身颜色", "field": "carBodyCharacteristic", "type": "text" },
                { "title": "双色车身", "field": "twoToneCharacteristic", "type": "text" },
                { "title": "工单顺序号", "field": "sequenceNo", "type": "string" },
                { "title": "CTC配置", "field": "config1", "type": "string" },
            ],
            ]);
            const columns = ref([{field:'Id',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'plantCode',title:'工厂',type:'string',width:100,require:true,align:'left'},
                       //{field:'workshopCode',title:'车间',type:'string',width:70,require:true,align:'left'},
                       //{field:'splitStrategy',title:'生产模式',type:'string',width:110,require:true,align:'left'},
                       {field:'workOrderNo',title:'工单号',type:'string',width:220,require:true,align:'left'},
        { field: 'workOrderNo', title: '工单号', type: 'string', width: 200, require: true, align: 'left' },
                       {field:'workOrderType',title:'工单类型',type:'string',width:110,require:true,align:'left',bind: { key: "OrderType", data: []}},
                       {field:'pvi',title:'pvi',type:'string',width:100,require:true,align:'left'},
                       {field:'biwMaterial',title:'白车身物料号',type:'string',width:120,require:true,align:'left'},
@@ -60,11 +65,11 @@
                       {field:'skylightCharacteristic',title:'天窗特征值',type:'string',width:100,require:true,align:'left'},
                       {field:'carBodyCharacteristic',title:'车身颜色',type:'string',width:100,require:true,align:'left'},
                       {field:'twoToneCharacteristic',title:'双色车身',type:'string',width:100,require:true,align:'left'},
                       {field:'sequenceNo',title:'工单顺序号',type:'string',width:90,require:true,align:'left'},
        { field: 'sequenceNo', title: '工单顺序号', type: 'string', width: 150, require: true, align: 'left' },
                       {field:'config1',title:'CTC配置',type:'string',width:110,require:true,align:'left'},
                       {field:'pbMaterial',title:'彩车身物料号',type:'string',width:220,require:true,align:'left'},
                       //{field:'config3',title:'备用3',type:'string',width:110,require:true,align:'left'},
                       {field:'workOrderSendStatus',title:'工单下发状态',type:'string',width:220,require:true,align:'left'},
        { field: 'workOrderSendStatus', title: '工单下发状态', type: 'string', width: 120, require: true, align: 'left' },
                       {field:'creater',title:'创建人',type:'string',sort:true,width:110,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',sort:true,width:150,align:'left',sort:true},
                       {field:'modifier',title:'修改人',type:'string',sort:true,width:100,align:'left'},
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/widesea_wms/stock/Dt_CarBodyInfo.vue
@@ -35,32 +35,40 @@
        const searchFormOptions = ref([
            [
                { "title": "滑橇号", "field": "palletCode", type: "text" },
                //{ "title": "物料编号", "field": "materielCode", type: "text" },
                 { "title": "PVI", "field": "pvi", type: "text" },
                { "title": "车身类型", "field": "carType", type: "select", dataKey: "BodyType", data: [] },
                //{ "title": "组盘类型", "field": "groupType", type: "select", dataKey: "GroupType", data: [] },
                { "title": "总装工单号", "field": "assemblyWorrkNo", type: "string" },
            ],
            [
                { "title": "工单类型", "field": "workOrderType", type: "select", dataKey: "OrderType", data: [] },
                { "title": "焊装工单号", "field": "workOrderNo", type: "string" },
                { "title": "涂装工单号", "field": "plantingWorkNo", type: "string" },
                { "title": "彩车身物料号", "field": "pbMaterial", type: "string" },
                { "title": "白车身物料号", "field": "biwMaterialCode", type: "string" },
            ],
            [
                { "title": "车型特征", "field": "vehicleCharacteristic", type: "string" },
                { "title": "天窗特征", "field": "skylightCharacteristic", type: "string" },
                { "title": "车身颜色", "field": "carBodyCharacteristic", type: "string" },
                { "title": "VIN", "field": "vin", type: "string" },
            ]
        ]);
        const columns = ref([
            { field: 'id', title: 'ID', type: 'int', width: 110, readonly: true, hidden: true, require: true, align: 'left' },
            { field: 'palletCode', title: '滑橇号', type: 'string', width: 110, align: 'left', sort: true },
            { field: 'workOrderNo', title: '焊装工单号', type: 'string', width: 110, align: 'left' },
             { field: 'plantingWorkNo', title: '涂装工单号', type: 'string', width: 110, align: 'left' },
            { field: 'workOrderNo', title: '焊装工单号', type: 'string', width: 180, align: 'left' },
            { field: 'plantingWorkNo', title: '涂装工单号', type: 'string', width: 180, align: 'left' },
              { field: 'assemblyWorrkNo', title: '总装工单号', type: 'string', width: 110, align: 'left' },
            { field: 'pvi', title: 'PVI码', type: 'string', width: 110, align: 'left' },
            { field: 'carType', title: '车身类型', type: 'int', width: 110, align: 'left',bind: { key: "BodyType", data: [] } },
            { field: 'workOrderType', title: '工单类型', type: 'string', width: 110, align: 'left', bind: { key: "OrderType", data: [] }  },
            { field: 'biwMaterialCode', title: '白车身物料号', type: 'string', width: 110, align: 'left' },
            { field: 'pbMaterial', title: '彩车身物料号', type: 'string', width: 110, align: 'left' },
            { field: 'vehicleCharacteristic', title: '车型特征', type: 'string', width: 110, align: 'left' },
            { field: 'skylightCharacteristic', title: '天窗特征', type: 'string', width: 110, align: 'left' },
            { field: 'carBodyCharacteristic', title: '车身颜色', type: 'string', width: 110, align: 'left' },
            { field: 'biwMaterialCode', title: '白车身物料号', type: 'string', width: 150, align: 'left' },
            { field: 'pbMaterial', title: '彩车身物料号', type: 'string', width: 150, align: 'left' },
            { field: 'vehicleCharacteristic', title: '车型特征', type: 'string', width: 90, align: 'left' },
            { field: 'skylightCharacteristic', title: '天窗特征', type: 'string', width: 90, align: 'left' },
            { field: 'carBodyCharacteristic', title: '车身颜色', type: 'string', width: 90, align: 'left' },
            //{ field: 'bodyStatus', title: '当前状态', type: 'int', width: 110, align: 'left', bind: { key: "BodyStatus", data: [] } },
             { field: 'vin', title: 'VIN', type: 'string', width: 110, align: 'left', sort: true,},
            { field: 'biwInPassTime', title: '焊装上线时间', type: 'datetime', width: 110, align: 'left' },
            { field: 'biwInPassTime', title: '焊装上线时间', type: 'datetime', width: 150, align: 'left' },
            { field: 'description', title: '备注', type: 'string', width: 120, align: 'left' },
            { field: 'creater', title: '创建人', type: 'string', width: 100, align: 'left' },
            { field: 'createDate', title: '创建时间', type: 'datetime', sort: true, width: 100, align: 'left' },
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/widesea_wms/stock/VV_StockInfo.vue
@@ -33,14 +33,27 @@
        });
        const searchFormOptions = ref([
            [
                { "title": "条码", "field": "palletCode", type: "text" },
                { "title": "滑橇号", "field": "palletCode", type: "text" },
                { "title": "库位号", "field": "locationCode", type: "text" },
                { "title": "库存状态", "field": "stockStatus", type: "select", dataKey: "CurrentStatue", data: [] },
                { "title": "锁定状态", "field": "stockStatus", type: "select", dataKey: "BodyStatus", data: [] },
                { "title": "拉动锁定", "field": "lockOrder", type: "select", dataKey: "LockStatus", data: [] },
            ],
            [
                { "title": "车身ID", "field": "carBodyID", type: "int" },
                { "title": "PVI", "field": "pvi", type: "string" },
                { "title": "巷道号", "field": "roadwayNo", type: "int" },
                { "title": "任务状态", "field": "taskStatus", type: "select", dataKey: "TaskInfoStatus", data: [] },
            ],
            [
                { "title": "车身类型", "field": "carType", type: "select", dataKey: "BodyType", data: [] },
                { "title": "工单类型", "field": "workOrderType", type: "select", dataKey: "OrderType", data: [] },
                { "title": "白车身物料号", "field": "biwMaterialCode", type: "int" },
                { "title": "彩车身物料号", "field": "pbMaterial", type: "string" },
            ],
            [
                { "title": "车身颜色", "field": "carBodyCharacteristic", type: "string" },
                { "title": "天窗特征", "field": "skylightCharacteristic", type: "string" },
                { "title": "车型", "field": "vehicleCharacteristic", type: "string" },
            ]
        ]);
        const columns = ref([
@@ -52,7 +65,7 @@
            { field: 'palletCode', title: '滑橇号', type: 'string', width: 75, align: 'left' },
            { field: 'vehicleCharacteristic', title: '车型', type: 'string', width: 75, align: 'left' },
            { field: 'carType', title: '车身类型', type: 'int', width: 80, align: 'left', bind: { key: "BodyType", data: [] } },
            { field: 'workOrderType', title: '工单类型', type: 'string', width: 75, align: 'left', bind: { key: "OrderType", data: [] } },
            { field: 'workOrderType', title: '工单类型', type: 'string', width: 100, align: 'left', bind: { key: "OrderType", data: [] } },
            { field: 'skylightCharacteristic', title: '天窗特征', type: 'string', width: 75, align: 'left' },
            { field: 'carBodyCharacteristic', title: '车身颜色', type: 'string', width: 75, align: 'left' },
            { field: 'biwMaterialCode', title: '白车身物料号', type: 'string', width: 110, align: 'left' },
ÏîÄ¿´úÂë/WMS/WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue
@@ -20,7 +20,7 @@
            cnName: '任务信息',
            name: 'taskinfo/Dt_Task',
            url: "/Task/",
            sortName: "TaskId"
            sortName: "createDate"
        });
        const editFormFields = ref({
        });
@@ -33,14 +33,12 @@
                { "title": "任务号", "field": "taskNum", "type": "text" },
                { "title": "滑橇号", "field": "palletCode", "type": "text" },
                { "title": "任务类型", "field": "taskType", "type": "select", dataKey: "TaskType", data: [] },
                { "title": "任务状态", "field": "taskState", "type": "select", dataKey: "TaskStatus", data: [] },
            ],
            [
                { "title": "起始位置", "field": "sourceAddress", type: "text" },
                //{ "title": "当前位置", "field": "currentAddress", type: "text" },
                //{ "title": "下一位置", "field": "nextAddress", type: "text" },
                { "title": "目标位置", "field": "targetAddress", type: "text" },
                { "title": "任务状态", "field": "taskState", "type": "select", dataKey: "TaskStatus", data: [] },
            ],
            [
                { "title": "巷道", "field": "roadway", type: "text" },
@@ -50,17 +48,15 @@
        ]);
        const columns = ref([{ field: 'TaskId', title: '主键', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'taskNum', title: '任务号', type: 'int', width: 110, align: 'left', sort: true },
        { field: 'pvi', title: 'pvi', type: 'int', width: 110, align: 'left',},
        { field: 'palletCode', title: '滑橇号', type: 'string', width: 180, align: 'left' },
        { field: 'pvi', title: 'pvi', type: 'int', width: 150, align: 'left', },
        { field: 'palletCode', title: '滑橇号', type: 'string', width: 120, align: 'left' },
        { field: 'pnboundNo', title: '单据号', type: 'string', width: 110, align: 'left',hidden:true },
        { field: 'groupID', title: '库存ID', type: 'int', width: 110, hidden: true, align: 'left' },
        { field: 'groupDetailId', title: '组盘明细ID', type: 'int', width: 110, hidden: true, align: 'left' },
        { field: 'roadway', title: '巷道', type: 'string', width: 110, align: 'left' },
        { field: 'taskType', title: '任务类型', type: 'int', width: 110, align: 'left', bind: { key: "TaskType", data: [] } },
        { field: 'taskState', title: '任务状态', type: 'int', width: 110, align: 'left', bind: { key: "TaskStatus", data: [] } },
        { field: 'taskState', title: '任务状态', type: 'int', width: 150, align: 'left', bind: { key: "TaskStatus", data: [] } },
        { field: 'sourceAddress', title: '起始位置', type: 'string', width: 110, align: 'left' },
        ///{ field: 'currentAddress', title: '当前位置', type: 'string', width: 110, align: 'left' },
        //{ field: 'nextAddress', title: '下一位置', type: 'string', width: 110, align: 'left' },
        { field: 'targetAddress', title: '目标位置', type: 'string', width: 110, align: 'left' },
        { field: 'grade', title: '优先级', type: 'int', width: 60, align: 'left' },
        { field: 'dispatchertime', title: '任务下发时间', type: 'datetime', width: 150, align: 'left', sort: true },