xiazhengtongxue
2026-03-16 acf83c45ef4f342380d1ef1f146a1d575de7c9eb
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue
@@ -1,19 +1,10 @@
<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>
<script>
import extend from "@/extension/taskinfo/task.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
@@ -26,9 +17,7 @@
      url: "/Task/",
      sortName: "CreateDate",
    });
    const editFormFields = ref({});
    const editFormOptions = ref([]);
    const searchFormFields = ref({
    const editFormFields = ref({
      taskNum: "",
      palletCode: "",
      roadway: "",
@@ -40,38 +29,63 @@
      nextAddress: "",
      creater: "",
      createDate: "",
      palletType: "",
      WarehouseId: "",
    });
    const editFormOptions = ref([
      [
        { title: "任务状态", field: "taskStatus", type: "select", dataKey: "taskStatusEnum", data: [], },
      ],
      [
        { title: "起始地址", field: "sourceAddress", type: "string" },
        { title: "目标地址", field: "targetAddress", type: "string" },
      ],
      [
        { title: "当前位置", field: "currentAddress", type: "string" },
        { title: "下一位置", field: "nextAddress", type: "string" },
      ]
    ]);
    const searchFormFields = ref({
      taskId: "",
      taskNum: "",
      palletCode: "",
      roadway: "",
      taskStatus: "",
      taskType: "",
      sourceAddress: "",
      targetAddress: "",
      currentAddress: "",
      nextAddress: "",
      createDate: "",
    });
    const searchFormOptions = ref([
      [
        { title: "任务号", field: "taskNum", type: "int" },
        { title: "任务号", field: "taskId", type: "int" },
        { title: "MES号", field: "taskNum", type: "like" },
        { title: "托盘编号", field: "palletCode", type: "like" },
        { title: "创建人", field: "creater", type: "like" },
      ],
      [
        { title: "任务类型",field: "taskType",type: "selectList",dataKey: "taskType",data: [],},
        { title: "任务状态",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],},
        { title: "任务类型", field: "taskType", type: "selectList", dataKey: "taskTypeEnum", data: [], },
        { title: "任务状态", field: "taskStatus", type: "selectList", dataKey: "taskStatusEnum", data: [], },
        { title: "巷道号", field: "roadway", type: "like" },
      ],
      [
        { title: "起始地址", field: "sourceAddress", type: "like" },
        { title: "目标地址", field: "targetAddress", type: "like" },
        { title: "创建时间", field: "createDate", type: "datetime" },
        { title: "仓库", field: "warehouseId", type: "selectList", dataKey: "warehouseEnum", data: [], },
      ],
    ]);
    const columns = ref([
      {
        field: "taskId",
        title: "taskId",
        title: "任务号",
        type: "int",
        width: 90,
        hidden: true,
        readonly: true,
        require: true,
        align: "left",
      },
      {
        field: "taskNum",
        title: "任务号",
        title: "MES订单编号",
        type: "int",
        width: 120,
        align: "left",
@@ -80,29 +94,50 @@
        field: "palletCode",
        title: "托盘编号",
        type: "string",
        width: 160,
        width: 120,
        align: "left",
      },
      {
        field: "palletType",
        title: "托盘类型",
        type: "string",
        width: 80,
        align: "center",
        formatter: (row) => {
          if (row.warehouseId === 2) {
            return "成品";
          } else {
            return row.palletType == 1 ? "布料" : "松布料";
          }
        }
      },
      {
        field: "roadway",
        title: "巷道号",
        type: "string",
        width: 120,
        width: 70,
        align: "left",
      }, {
        field: "warehouseId",
        title: "仓库编号",
        type: "int",
        width: 80,
        align: "left",
        bind: { key: "warehouseEnum", data: [] },
      },
      {
        field: "taskType",
        title: "任务类型",
        type: "int",
        width: 120,
        width: 90,
        align: "left",
        bind: { key: "taskType", data: [] },
        bind: { key: "taskTypeEnum", data: [] },
      },
      {
        field: "taskStatus",
        title: "任务状态",
        type: "int",
        width: 150,
        width: 120,
        align: "left",
        bind: { key: "taskStatusEnum", data: [] },
      },
@@ -110,64 +145,49 @@
        field: "sourceAddress",
        title: "起始地址",
        type: "int",
        width: 220,
        width: 150,
        align: "left",
      },
      {
        field: "targetAddress",
        title: "目标地址",
        type: "string",
        width: 220,
        width: 150,
        align: "left",
      },
      // {
      //   field: "currentAddress",
      //   title: "当前位置",
      //   type: "string",
      //   width: 120,
      //   align: "left",
      // },
      // {
      //   field: "nextAddress",
      //   title: "下一位置",
      //   type: "string",
      //   width: 120,
      //   align: "left",
      // },
      {
        field: "exceptionMessage",
        title: "异常信息",
        field: "currentAddress",
        title: "当前位置",
        type: "string",
        width: 90,
        width: 150,
        align: "left",
      },
      {
        field: "grade",
        title: "优先级",
        type: "int",
        width: 80,
        field: "nextAddress",
        title: "下一位置",
        type: "string",
        width: 150,
        align: "left",
      },
      {
        field: "depth",
        title: "深度",
        type: "int",
        width: 80,
        field: "remark",
        title: "备注",
        type: "string",
        width: 100,
        align: "left",
      },
      // {
      //   field: "grade",
      //   title: "优先级",
      //   type: "int",
      //   width: 80,
      //   align: "left",
      // },
      {
        field: "dispatchertime",
        title: "任务下发时间",
        type: "datetime",
        width: 160,
        align: "left",
        hidden:true,
      },
      {
        field: "wMSId",
        title: "WMS任务主键",
        type: "int",
        width: 120,
        align: "left",
        hidden: true,
      },
@@ -199,14 +219,7 @@
        width: 160,
        align: "left",
      },
      {
        field: "remark",
        title: "备注",
        type: "string",
        width: 100,
        align: "left",
        hidden: true,
      },
    ]);
    const detail = ref({
      cnName: "#detailCnName",
@@ -226,5 +239,4 @@
    };
  },
});
</script>
</script>