| | |
| | | |
| | | <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/inbound/purchaseOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "éè´å", |
| | | cnName: "äºæéè´å", |
| | | name: "purchaseOrder", |
| | | url: "/PurchaseOrder/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | // orderType: "", |
| | | // inboundOrderNo: "", |
| | | // upperOrderNo: "", |
| | | // remark: "", |
| | | orderType: "", |
| | | inboundOrderNo: "", |
| | | upperOrderNo: "", |
| | | remark: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | // [ |
| | | // { |
| | | // title: "åæ®ç±»å", |
| | | // required: true, |
| | | // field: "orderType", |
| | | // type: "select", |
| | | // dataKey: "inOrderType", |
| | | // data: [], |
| | | // }, |
| | | // { |
| | | // field: "inboundOrderNo", |
| | | // title: "åæ®ç¼å·", |
| | | // type: "string", |
| | | // }, |
| | | // { |
| | | // title: "䏿¸¸åæ®ç¼å·", |
| | | // field: "upperOrderNo", |
| | | // type: "string", |
| | | // }, |
| | | // { |
| | | // title: "夿³¨", |
| | | // field: "remark", |
| | | // type: "textarea", |
| | | // }, |
| | | // ], |
| | | [ |
| | | { |
| | | title: "åæ®ç±»å", |
| | | required: true, |
| | | field: "orderType", |
| | | type: "select", |
| | | dataKey: "inOrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | field: "inboundOrderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "䏿¸¸åæ®ç¼å·", |
| | | field: "upperOrderNo", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "remark", |
| | | type: "textarea", |
| | | }, |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | purchaseOrderNo: "", |
| | | purchaseOrderType: "", |
| | | purchaseOrderStatus: "", |
| | | inboundOrderNo: "", |
| | | upperOrderNo: "", |
| | | orderType: "", |
| | | orderStatus: "", |
| | | createType: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "éè´åå·", field: "purchaseOrderNo", type: "like" }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "purchaseOrderType", |
| | | type: "select", |
| | | dataKey: "purchaseType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "purchaseOrderStatus", |
| | | type: "select", |
| | | dataKey: "purchaseOrderStatus", |
| | | data: [], |
| | | }, |
| | | ] |
| | | { title: "ä»åº", field: "warehouseId", type: "select", dataKey: "warehouses", data: [], }, |
| | | { title: "åæ®ç¼å·", field: "inboundOrderNo", type: "like" }, |
| | | { title: "䏿¸¸åå·", field: "upperOrderNo", type: "like" }, |
| | | { title: "ç¶æ", field: "orderStatus", type: "select", dataKey: "inboundState", data: [], }, |
| | | ], |
| | | [ |
| | | {title: "å建æ¶é´",field: "createDate",type: "datetime",}, |
| | | ], |
| | | |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "purchaseOrderNo", |
| | | title: "éè´åå·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | link: true, |
| | | }, |
| | | { |
| | | field: "purchaseOrderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "", data: [{key:'S',value:"æ åå
¥åº"},{key:'V',value:"å¯å®è¡¥ç»å
¥åº"}] }, |
| | | }, |
| | | |
| | | { |
| | | field: "supplierCode", |
| | | title: "ä¾åºåç¼å·", |
| | | type: "string", |
| | | width: 120, |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderQuantity", |
| | | title: "éè´æ°é", |
| | | type: "decimal", |
| | | type: "int", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "purchaseOrderStatus", |
| | | title: "éè´åç¶æ", |
| | | title: "ç¶æ", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "purchaseOrderStatus", data: [] }, |
| | | bind: { key: "inboundState", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderDate", |
| | | title: "ä¸åæ¥æ", |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 160, |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | |
| | | }, |
| | | { |
| | | field: "modifier", |
| | |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "éè´åæç»", |
| | | table: "InboundOrderDetail", |
| | | columns: [ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "purchaseOrderId", |
| | | title: "éè´å主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "rowNo", |
| | | title: "è¡å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "select", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "materielSpec", |
| | | title: "ç©æè§æ ¼", |
| | | type: "select", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "batchNo", |
| | | // title: "æ¹æ¬¡å·", |
| | | // type: "decimal", |
| | | // width: 90, |
| | | // align: "left", |
| | | // edit: { type: "" }, |
| | | // required: true, |
| | | // }, |
| | | { |
| | | field: "purchaseDetailQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field:"purchaseDetailReceiveQty", |
| | | title: "å·²æ¶æ°é", |
| | | type: "decimal", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "purchaseDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "purchaseOrderStatus", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ], |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "id", |
| | | key: "id", |
| | | }); |
| | |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | </script> |