From 7ffa19f1fe3b37519e83ed1f86715154b13c00f3 Mon Sep 17 00:00:00 2001 From: maven <2163098428@qq.com> Date: 星期二, 26 八月 2025 15:16:10 +0800 Subject: [PATCH] yys 生产管控(完成基础逻辑) --- src/views/production/components/ProductionDetailsTable.vue | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/views/production/components/ProductionDetailsTable.vue b/src/views/production/components/ProductionDetailsTable.vue index 13cd614..43be265 100644 --- a/src/views/production/components/ProductionDetailsTable.vue +++ b/src/views/production/components/ProductionDetailsTable.vue @@ -1,5 +1,24 @@ <template> <el-table :data="tableData" :border="border" style="width: 100%"> + <el-table-column label="鐓ゆ枡绫诲瀷" min-width="120"> + <template #default="{ row, $index }"> + <el-select + clearable + v-model="row.type" + placeholder="璇烽�夋嫨鐓ゆ枡绫诲瀷" + filterable + :key="`coalId-select-${$index}-${typeList.length}`" + :disabled="isViewMode" + > + <el-option + v-for="(item, index) of typeList" + :key="`option-${index}-${item.value}`" + :label="item.label" + :value="item.value" + /> + </el-select> + </template> + </el-table-column> <el-table-column label="鐓ょ" min-width="120"> <template #default="{ row, $index }"> <el-select @@ -164,6 +183,16 @@ import {getCoalInfoList} from "@/api/production"; import {userListAll} from "@/api/publicApi"; +const typeList = [ + { + label: "鎴愬搧", + value: 1, + }, + { + label: "鍘熸枡", + value: 2, + } + ] const props = defineProps({ modelValue: { type: Array, @@ -229,7 +258,7 @@ // 璁$畻鎬绘垚鏈� const calculateTotalCost = (row) => { const laborCost = parseFloat(row.laborCost) || 0; - const energyCost = parseFloat(row.energyCost) || 0; + const energyCost = parseFloat(row.energyConsumptionCost) || 0; const equipmentDepreciation = parseFloat(row.equipmentDepreciation) || 0; const purchasePrice = parseFloat(row.purchasePrice) || 0; @@ -387,6 +416,7 @@ purchasePrice: "", totalCost: "", producerId: "", + type: 1, ...rowData, }; tableData.value = [...tableData.value, defaultRow]; -- Gitblit v1.9.3