Zhang-Hong-Lin
4 天以前 232cdf071bfe3bd2b77ba05accba89b67fcc1edc
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/views/taskinfo/task.vue
@@ -1,6 +1,10 @@
<template>
  <view-grid
  <div>
    <div id="zhu">
      <div id="task">任务号</div>
    </div>
    <view-grid
    ref="grid"
    :columns="columns"
    :detail="detail"
@@ -9,15 +13,61 @@
    :searchFormFields="searchFormFields"
    :searchFormOptions="searchFormOptions"
    :table="table"
    :extend="extend"
  >
  </view-grid>
  </div>
</template>
<style scoped>
#task{
  width: 6%;
  height: 300%;
  position: absolute;
  border-radius: 5px;
  left: 2.5%;
  top: 820%;
  cursor: pointer;
  text-align: center;
  line-height: 230%;;
  font-size: 13px;
  font-weight: 700;
  z-index: 100;
}
#shu{
  width: 7%;
  height: 300%;
  position: absolute;
  border-radius: 5px;
  left: 42%;
  top: 220%;
  z-index: 100;
}
#wan{
  width: 4%;
  height: 300%;
  background: #f60;
  position: absolute;
  border-radius: 5px;
  left: 50%;
  top: 220%;
  cursor: pointer;
  text-align: center;
  line-height: 230%;
  color: beige;
  z-index: 100;
}
#zhu {
  width: 100%;
  height: 1vh;
  position: relative;
}
</style>
  <script>
import extend from "@/extension/taskinfo/task.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
  setup() {
    //表其他配置
    const table = ref({
      key: "taskId",
      footer: "Foots",
@@ -26,8 +76,20 @@
      url: "/Task/",
      sortName: "CreateDate",
    });
    //编辑字段
    const editFormFields = ref({});
    const editFormOptions = ref([]);
    //编辑配置
    const editFormOptions = ref([
      [
        {
          field: "taskState",
          title: "任务状态",
          type: "select",
          dataKey: "taskState",
        }
      ]
    ]);
    //查询字段
    const searchFormFields = ref({
      taskNum: "",
      palletCode: "",
@@ -39,10 +101,10 @@
      creater: "",
      createDate: "",
    });
    //查询配置
    const searchFormOptions = ref([
      [
        { title: "任务号", field: "taskNum", type: "int" },
        { title: "托盘编号", field: "palletCode", type: "like" },
        {
          title: "任务类型",
          field: "taskType",
@@ -57,23 +119,28 @@
          dataKey: "taskState",
          data: [],
        },
        {
          title: "物料信息",
          field: "remark",
          type: "selectList",
          dataKey: "remark",
          data: [],
        },
      ],
      [
        { title: "起始地址", field: "sourceAddress", type: "like" },
        { title: "目标地址", field: "targetAddress", type: "like" },
        { title: "当前位置", field: "currentAddress", type: "like" },
        { title: "下一位置", field: "nextAddress", type: "like" },
      ],
      [
        { title: "巷道号", field: "roadway", type: "like" },
        { title: "创建人", field: "creater", type: "like" },
        { title: "创建时间", field: "createDate", type: "datetime" },
      ],
    ]);
    //查询页面table表的配置
    const columns = ref([
      {
        field: "taskId",
        title: "TaskId",
        title: "任务号",
        type: "int",
        width: 90,
        hidden: true,
@@ -82,30 +149,16 @@
        align: "left",
      },
      {
        field: "taskNum",
        title: "任务号",
        field: "taskId",
        title: "任务ID",
        type: "int",
        width: 90,
        align: "left",
      },
      {
        field: "palletCode",
        title: "托盘编号",
        type: "string",
        width: 200,
        align: "left",
      },
      {
        field: "roadway",
        title: "巷道号",
        type: "string",
        width: 90,
        width: 120,
        align: "left",
      },
      {
        field: "taskType",
        title: "任务类型",
        type: "int",
        type: "string",
        width: 90,
        align: "left",
        bind: { key: "taskType", data: [] },
@@ -113,10 +166,18 @@
      {
        field: "taskState",
        title: "任务状态",
        type: "int",
        type: "string",
        width: 150,
        align: "left",
        bind: { key: "taskState", data: [] },
      },
      {
        field: "remark",
        title: "物料信息",
        type: "string",
        width: 120,
        align: "left",
        bind: { key: "mateType", data: [] },
      },
      {
        field: "sourceAddress",
@@ -128,20 +189,6 @@
      {
        field: "targetAddress",
        title: "目标地址",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "currentAddress",
        title: "当前位置",
        type: "string",
        width: 120,
        align: "left",
      },
      {
        field: "nextAddress",
        title: "下一位置",
        type: "string",
        width: 120,
        align: "left",
@@ -212,6 +259,7 @@
        hidden: true,
      },
    ]);
    //主从明细表配置
    const detail = ref({
      cnName: "",
      table: "",