| | |
| | | |
| | | <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({ |
| | |
| | | url: "/Task/", |
| | | sortName: "CreateDate", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({ |
| | | const editFormFields = ref({ |
| | | taskNum: "", |
| | | palletCode: "", |
| | | roadway: "", |
| | |
| | | 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: "palletCode", |
| | | title: "æçç¼å·", |
| | | type: "string", |
| | | width: 160, |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "palletType", |
| | | title: "æçç±»å", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "taskpalltype", data: [] }, |
| | | 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: "taskTypeEnum", data: [] }, |
| | | }, |
| | |
| | | field: "taskStatus", |
| | | title: "ä»»å¡ç¶æ", |
| | | type: "int", |
| | | width: 150, |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "taskStatusEnum", data: [] }, |
| | | }, |
| | |
| | | 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, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "nextAddress", |
| | | title: "ä¸ä¸ä½ç½®", |
| | | type: "string", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "grade", |
| | | title: "ä¼å
级", |
| | | type: "int", |
| | | width: 80, |
| | | 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, |
| | | }, |
| | |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | |
| | | |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | </script> |