| | |
| | | @close="handleClose" |
| | | > |
| | | <el-button type="primary" @click="handlData">éæ©æ°æ®</el-button> |
| | | <ETable |
| | | <ETableModify |
| | | :columns="columns" |
| | | height="200" |
| | | @cell-edit="handleCellEdit" |
| | |
| | | v-model="innerVisible" |
| | | width="1000" |
| | | title="éæ©é
ç½®æ°æ®" |
| | | center |
| | | append-to-body |
| | | > |
| | | <ETable |
| | | @selection-change="handleSelectionChange" |
| | | :showOperations="false" |
| | | :columns="formalDatabaseDataColumns" |
| | | :columns="formalDatabaseColumns" |
| | | :tableData="formalDatabaseData" |
| | | height="400" |
| | | @cell-edit="handleCellEdit" |
| | |
| | | |
| | | <script setup> |
| | | import { ref, reactive, watch } from "vue"; |
| | | import ETable from "@/components/Table/EtableModify.vue"; |
| | | import ETable from "@/components/Table/ETable.vue"; |
| | | import ETableModify from "@/components/Table/EtableModify.vue"; |
| | | import ProductionDetailsTable from "./ProductionDetailsTable.vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { Delete, Warning, Plus } from "@element-plus/icons-vue"; |
| | | import { getOfficialAll } from "@/api/production/index.js"; |
| | | |
| | | const props = defineProps({ |
| | | visible: { |
| | |
| | | const tableData = ref([]); |
| | | const currentRow = ref(null); |
| | | const columns = [ |
| | | { label: "ç
¤ç§", prop: "category" }, |
| | | { label: "çå¼", prop: "Calorific" }, |
| | | { label: "åºåæ°é", prop: "stock" }, |
| | | { label: "æ¬æ¬¡ä½¿ç¨æ°é", prop: "used" }, |
| | | { label: "ä¾åºååç§°", prop: "supplierName" }, |
| | | { label: "ç
¤ç§", prop: "coal" }, |
| | | ]; |
| | | const detailsTableData = ref([ |
| | | |
| | |
| | | const handleRowClick = (row) => { |
| | | currentRow.value = row; |
| | | }; |
| | | const formalDatabaseDataColumns = ref([ |
| | | { prop: "name", label: "ä¾åºååç§°", width: 150 }, |
| | | { prop: "type", label: "ç
¤ç§ç±»å", width: 120 }, |
| | | const formalDatabaseColumns = ref([ |
| | | { prop: "supplierName", label: "ä¾åºååç§°", width: 150 }, |
| | | { prop: "coal", label: "ç
¤ç§ç±»å", width: 120 }, |
| | | { prop: "unit", label: "åä½", width: 100 }, |
| | | { prop: "number", label: "éè´æ°é", width: 100 }, |
| | | { prop: "money", label: "åä»·ï¼å«ç¨ï¼", width: 120 }, |
| | | { prop: "money1", label: "æ»ä»·ï¼å«ç¨ï¼", width: 120 }, |
| | | { prop: "money2", label: "ç¨ç", width: 80 }, |
| | | { prop: "money3", label: "ä¸å«ç¨åä»·", width: 120 }, |
| | | { prop: "createUser", label: "ç»è®°äºº", width: 100 }, |
| | | { prop: "createTime", label: "ç»è®°æ¥æ", width: 150 }, |
| | | { prop: "inventoryQuantity", label: "åºåæ°é", width: 100 }, |
| | | { prop: "priceIncludingTax", label: "åä»·ï¼å«ç¨ï¼", width: 120 }, |
| | | { prop: "totalPriceIncludingTax", label: "æ»ä»·ï¼å«ç¨ï¼", width: 120 }, |
| | | { prop: "priceExcludingTax", label: "åä»·(ä¸å«ç¨)", width: 120 }, |
| | | { prop: "totalPriceExcludingTax", label: "æ»ä»·(ä¸å«ç¨)", width: 120 }, |
| | | ]); |
| | | // è¡¨åæ°æ® |
| | | const formData = reactive({ |
| | |
| | | reviewer: "", |
| | | date: "", |
| | | }); |
| | | const handlData = () => { |
| | | const handlData =async () => { |
| | | innerVisible.value = true; |
| | | let res = await getOfficialAll(); |
| | | console.log("è·åé
ç½®æ°æ®", res); |
| | | if (res.code === 200) { |
| | | formalDatabaseData.value = res.data; |
| | | } else { |
| | | ElMessage.error("è·åé
ç½®æ°æ®å¤±è´¥"); |
| | | } |
| | | }; |
| | | const formalDatabaseData = ref([]); |
| | | const formalDatabaseSelectedData = ref([]); |
| | |
| | | (row) => row.id === item.id |
| | | ); |
| | | if (!existingItem) { |
| | | tableData.value.push({ |
| | | id: item.id, |
| | | category: item.type, |
| | | Calorific: item.money4, |
| | | stock: item.number, |
| | | used: 0, // åå§ä½¿ç¨æ°é为0 |
| | | }); |
| | | tableData.value.push([item, { |
| | | used: 0, // æ·»å é»è®¤çä½¿ç¨æ°é |
| | | }]); |
| | | } |
| | | }); |
| | | innerVisible.value = false; |
| | | console.log("éä¸çæ°æ®:", tableData.value); |
| | | }; |
| | | const handleSelectionChange = (selection) => { |
| | | formalDatabaseSelectedData.value = selection; |