From 04d6024553ac73e67148ce578cb01b541eebd02a Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期一, 18 五月 2026 16:37:56 +0800
Subject: [PATCH] Merge branch 'dev_NEW_pro' into dev-new_pro_OA
---
src/views/productionManagement/productionReporting/index.vue | 183 ++++++++++++++++++++++-----------------------
1 files changed, 89 insertions(+), 94 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index b34b14e..fa4e163 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -19,21 +19,6 @@
style="width: 200px;"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="宸ュ崟鐘舵��:">
- <el-select v-model="searchForm.workOrderStatus"
- placeholder="璇烽�夋嫨宸ュ崟鐘舵��"
- style="width: 140px"
- clearable>
- <el-option label="寰呯‘璁�"
- :value="1"></el-option>
- <el-option label="寰呯敓浜�"
- :value="2"></el-option>
- <el-option label="鐢熶骇涓�"
- :value="3"></el-option>
- <el-option label="宸茬敓浜�"
- :value="4"></el-option>
- </el-select>
- </el-form-item>
<el-form-item>
<el-button type="primary"
@click="handleQuery">鎼滅储</el-button>
@@ -114,8 +99,7 @@
style="width: 100%" />
</template>
</el-table-column>
- <el-table-column label="鎿嶄綔"
- width="60">
+ <el-table-column label="鎿嶄綔">
<template #default="scope">
<el-button link
type="primary"
@@ -139,14 +123,36 @@
<input-modal v-if="isShowInput"
v-model:visible="isShowInput"
:production-product-main-id="isShowingId" />
- <output-modal v-if="isShowOutput"
- v-model:visible="isShowOutput"
- :production-product-main-id="isShowingId" />
+ <!-- 鍙傛暟璇︽儏寮圭獥 -->
+ <el-dialog v-model="paramDetailVisible"
+ title="鍙傛暟璇︽儏"
+ width="600px">
+ <div v-if="currentParams && currentParams.length > 0"
+ class="param-detail-list">
+ <el-descriptions :column="1"
+ border>
+ <el-descriptions-item v-for="param in currentParams"
+ :key="param.id"
+ :label="param.paramName">
+ {{ param.inputValue }}
+ <span v-if="param.unit && param.unit !== '/'"
+ class="unit-text">({{ param.unit }})</span>
+ </el-descriptions-item>
+ </el-descriptions>
+ </div>
+ <el-empty v-else
+ description="鏆傛棤鍙傛暟鏁版嵁" />
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="paramDetailVisible = false">鍏抽棴</el-button>
+ </span>
+ </template>
+ </el-dialog>
</div>
</template>
<script setup>
- import { onMounted, ref } from "vue";
+ import { onMounted, ref, reactive, toRefs, getCurrentInstance } from "vue";
import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue";
import { ElMessageBox } from "element-plus";
import {
@@ -157,7 +163,6 @@
import { productionProductMainListPage } from "@/api/productionManagement/productionProductMain.js";
import { userListNoPageByTenantId } from "@/api/system/user.js";
import InputModal from "@/views/productionManagement/productionReporting/Input.vue";
- import OutputModal from "@/views/productionManagement/productionReporting/Output.vue";
const data = reactive({
searchForm: {
@@ -182,84 +187,62 @@
width: 120,
},
{
+ label: "宸ユ椂锛坔锛�",
+ width: 100,
+ prop: "workHour",
+ },
+ {
+ label: "宸ュ簭",
+ prop: "process",
+ width: 120,
+ },
+ {
label: "宸ュ崟缂栧彿",
prop: "workOrderNo",
width: 120,
},
{
- label: "鎶ュ伐鐘舵��",
- prop: "status",
- dataType: "tag",
- formatData: params => {
- if (params == 3) {
- return "宸叉姤宸�";
- } else if (params == 1) {
- return "寰呯敓浜�";
- } else {
- return "鐢熶骇涓�";
- }
- },
- formatType: params => {
- if (params == 3) {
- return "success";
- } else if (params == 1) {
- return "primary";
- } else {
- return "warning";
- }
- },
+ label: "閿�鍞悎鍚屽彿",
+ prop: "salesContractNo",
+ width: 120,
},
{
- label: "宸ュ崟鐘舵��",
- prop: "workOrderStatus",
- dataType: "tag",
- formatData: params => {
- switch (params) {
- case "1":
- return "寰呯‘璁�";
- case "2":
- return "寰呯敓浜�";
- case "3":
- return "鐢熶骇涓�";
- case "4":
- return "宸茬敓浜�";
- default:
- return "";
- }
- },
- formatType: params => {
- switch (params) {
- case "1":
- return "primary";
- case "2":
- return "info";
- case "3":
- return "warning";
- case "4":
- return "success";
- default:
- return "";
- }
- },
+ label: "浜у搧鍚嶇О",
+ prop: "productName",
+ width: 120,
},
{
- label: "鐢熶骇鏃堕棿",
+ label: "浜у搧瑙勬牸鍨嬪彿",
+ prop: "productModelName",
+ width: 120,
+ },
+ {
+ label: "浜у嚭鏁伴噺",
+ prop: "quantity",
+ width: 120,
+ },
+ {
+ label: "鎶ュ簾鏁伴噺",
+ prop: "scrapQty",
+ width: 120,
+ },
+ {
+ label: "鍗曚綅",
+ prop: "unit",
+ width: 120,
+ },
+
+ {
+ label: "鍒涘缓鏃堕棿",
prop: "createTime",
width: 120,
- formatData: params => {
- const date = new Date(params);
- return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(
- 2,
- "0"
- )}-${String(date.getDate()).padStart(2, "0")}`;
- },
},
{
dataType: "action",
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 230,
+ width: 250,
operation: [
{
name: "鏌ョ湅鎶曞叆",
@@ -269,10 +252,10 @@
},
},
{
- name: "鏌ョ湅浜у嚭",
+ name: "鍙傛暟璇︽儏",
type: "text",
clickFun: row => {
- showOutput(row);
+ showParamDetail(row);
},
},
{
@@ -286,6 +269,13 @@
},
]);
const tableData = ref([]);
+ const paramDetailVisible = ref(false);
+ const currentParams = ref([]);
+
+ const showParamDetail = row => {
+ currentParams.value = row.productionOperationParamList || [];
+ paramDetailVisible.value = true;
+ };
const selectedRows = ref([]);
const tableLoading = ref(false);
const childrenLoading = ref(false);
@@ -452,13 +442,6 @@
isShowingId.value = row.id;
};
- // 鎵撳紑浜у嚭妯℃�佹
- const isShowOutput = ref(false);
- const showOutput = row => {
- isShowOutput.value = true;
- isShowingId.value = row.id;
- };
-
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
@@ -467,7 +450,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/salesLedger/work/export", {}, "鐢熶骇鎶ュ伐.xlsx");
+ proxy.download("/productionProductMain/export", {}, "鐢熶骇鎶ュ伐.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -478,4 +461,16 @@
});
</script>
-<style scoped></style>
+<style scoped>
+ .unit-text {
+ margin-left: 5px;
+ color: #909399;
+ font-size: 12px;
+ }
+ .param-detail-list {
+ padding: 10px;
+ }
+ .table_list {
+ margin-top: unset;
+ }
+</style>
--
Gitblit v1.9.3