From d6bcd2806fcf3a2f8da602152f2423f7f86226d7 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期一, 05 一月 2026 17:18:40 +0800
Subject: [PATCH] 增加生产报工-投入产出页面
---
src/views/productionManagement/productionReporting/index.vue | 256 ++++++++++++++++++++++-----------------------------
1 files changed, 111 insertions(+), 145 deletions(-)
diff --git a/src/views/productionManagement/productionReporting/index.vue b/src/views/productionManagement/productionReporting/index.vue
index c7ed057..7d55dd6 100644
--- a/src/views/productionManagement/productionReporting/index.vue
+++ b/src/views/productionManagement/productionReporting/index.vue
@@ -2,30 +2,22 @@
<div class="app-container">
<div class="search_form">
<el-form :model="searchForm" :inline="true">
- <el-form-item label="瀹㈡埛鍚嶇О:">
- <el-input v-model="searchForm.customerName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+ <el-form-item label="鎶ュ伐浜哄憳鍚嶇О:">
+ <el-input v-model="searchForm.nickName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
style="width: 200px;"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="鍚堝悓鍙�:">
- <el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
+ <el-form-item label="宸ュ崟鍙�:">
+ <el-input v-model="searchForm.workOrderNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
style="width: 200px;"
@change="handleQuery" />
</el-form-item>
-<!-- <el-form-item label="椤圭洰鍚嶇О:">-->
-<!-- <el-input v-model="searchForm.projectName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"-->
-<!-- style="width: 200px;"-->
-<!-- @change="handleQuery" />-->
-<!-- </el-form-item>-->
- <el-form-item label="鎺掍骇鏃ユ湡:">
- <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
- placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
- </el-form-item>
- <el-form-item label="鐘舵��:">
- <el-select v-model="searchForm.status" placeholder="璇烽�夋嫨鐘舵��" style="width: 140px" clearable>
- <el-option label="寰呯敓浜�" :value="1"></el-option>
- <el-option label="宸叉姤宸�" :value="3"></el-option>
- <el-option label="鐢熶骇涓�" :value="2"></el-option>
+ <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>
@@ -135,31 +127,37 @@
</PIMTable>
</div>
<form-dia ref="formDia" @close="handleQuery"></form-dia>
+ <input-modal
+ v-if="isShowInput"
+ v-model:visible="isShowInput"
+ />
+ <output-modal
+ v-if="isShowOutput"
+ v-model:visible="isShowOutput"
+ />
</div>
</template>
<script setup>
import {onMounted, ref} from "vue";
import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue";
-import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js";
import {ElMessageBox} from "element-plus";
-import dayjs from "dayjs";
import {
productionReportUpdate,
- workListPage,
workListPageById
} from "@/api/productionManagement/productionReporting.js";
+import {
+ productionProductMainListPage,
+} from "@/api/productionManagement/production_product_main.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: {
- customerName: "",
- salesContractNo: "",
- projectName: "",
- status: "",
- entryDate: [dayjs().format("YYYY-MM-DD"), dayjs().format("YYYY-MM-DD")], // 褰曞叆鏃ユ湡锛岄粯璁ゅ綋澶�
- entryDateStart: dayjs().format("YYYY-MM-DD"),
- entryDateEnd: dayjs().format("YYYY-MM-DD"),
+ nickName: "",
+ workOrderNo: "",
+ workOrderStatus: "",
},
});
const { searchForm } = toRefs(data);
@@ -167,13 +165,23 @@
const expandData = ref([]);
const userList = ref([])
const tableColumn = ref([
+ {
+ label: "鎶ュ伐鍗曞彿",
+ prop: "productNo",
+ width: 120,
+ },
+ {
+ label: "鎶ュ伐浜哄憳",
+ prop: "nickName",
+ width: 120,
+ },
+ {
+ label: "宸ュ崟缂栧彿",
+ prop: "workOrderNo",
+ width: 120,
+ },
{
- type: "expand",
- dataType: "slot",
- slot: "expand",
- },
- {
- label: "鐘舵��",
+ label: "鎶ュ伐鐘舵��",
prop: "status",
dataType: "tag",
formatData: (params) => {
@@ -195,92 +203,62 @@
}
},
},
- {
- label: "鎺掍骇鏃ユ湡",
- prop: "schedulingDate",
- width: 120,
- },
- {
- label: "鎺掍骇浜�",
- prop: "schedulingUserName",
- },
- {
- label: "浜х嚎",
- prop: "productionLine",
- },
- {
- label: "鍚堝悓鍙�",
- prop: "salesContractNo",
- width: 200,
- },
- // {
- // label: "瀹㈡埛鍚堝悓鍙�",
- // prop: "customerContractNo",
- // width: 200,
- // },
- {
- label: "瀹㈡埛鍚嶇О",
- prop: "customerName",
- width: 200,
- },
- // {
- // label: "椤圭洰鍚嶇О",
- // prop: "projectName",
- // width:300
- // },
- {
- label: "浜у搧澶х被",
- prop: "productCategory",
- width: 150,
- },
- {
- label: "瑙勬牸鍨嬪彿",
- prop: "specificationModel",
- width: 150,
- },
- {
- label: "缁戝畾鏈哄櫒",
- prop: "speculativeTradingName",
- width: 220,
- },
- {
- label: "鍗曚綅",
- prop: "unit",
- },
- {
- label: "宸ュ簭",
- prop: "process",
- },
- // {
- // label: "鍙e懗鍒嗙被",
- // prop: "type",
- // width: 150,
- // },
- {
- label: "鎹熻��",
- prop: "loss",
- width: 150,
- },
- {
- label: "鎺掍骇鏁伴噺",
- prop: "schedulingNum",
- width: 100,
- },
- {
- label: "鐢熶骇鏁伴噺",
- prop: "finishedNum",
- width: 100,
- },
- {
- label: "寰呯敓浜ф暟閲�",
- prop: "pendingFinishNum",
- width: 100,
- },
- {
- label: "澶囨敞",
- prop: "remark",
- width: 200,
- },
+ {
+ 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 "";
+ }
+ },
+ },
+ {
+ dataType: "action",
+ label: "鎿嶄綔",
+ align: "center",
+ fixed: "right",
+ width: 200,
+ operation: [
+ {
+ name: "鏌ョ湅鎶曞叆",
+ type: "text",
+ clickFun: (row) => {
+ showInput(row)
+ }
+ },
+ {
+ name: "鏌ョ湅浜у嚭",
+ type: "text",
+ clickFun: (row) => {
+ showOutput(row)
+ }
+ },
+ ]
+ }
]);
const tableData = ref([]);
const selectedRows = ref([]);
@@ -320,7 +298,7 @@
const params = { ...searchForm.value, ...page };
params.entryDate = undefined
expandedRowKeys.value = []
- workListPage(params).then(res => {
+ productionProductMainListPage(params).then(res => {
tableLoading.value = false;
tableData.value = res.data.records.map(item => ({
...item,
@@ -414,30 +392,18 @@
})
};
-// 鍒犻櫎
-const handleDelete = () => {
- let ids = [];
- if (selectedRows.value.length > 0) {
- ids = selectedRows.value.map((item) => item.id);
- } else {
- proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
- return;
- }
- ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- staffJoinDel(ids).then((res) => {
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- getList();
- });
- })
- .catch(() => {
- proxy.$modal.msg("宸插彇娑�");
- });
-};
+// 鎵撳紑鎶曞叆妯℃�佹
+const isShowInput = ref(false);
+const showInput = (row) => {
+ isShowInput.value = true;
+}
+
+// 鎵撳紑浜у嚭妯℃�佹
+const isShowOutput = ref(false);
+const showOutput = (row) => {
+ isShowOutput.value = true;
+}
+
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
--
Gitblit v1.9.3