|
@@ -8,8 +8,14 @@
|
|
|
<el-button type="primary" @click="Reporting_onSubmit" style="height: 50px;font-size: 20px;margin-left: 20px;">面料入库</el-button>
|
|
<el-button type="primary" @click="Reporting_onSubmit" style="height: 50px;font-size: 20px;margin-left: 20px;">面料入库</el-button>
|
|
|
<!-- <el-button type="danger" @click="deldetail_delclick" style="width: 80px;height: 50px;" v-if="del_details=== true" :disabled="details_Selection === '' " class="bt" >删除</el-button> -->
|
|
<!-- <el-button type="danger" @click="deldetail_delclick" style="width: 80px;height: 50px;" v-if="del_details=== true" :disabled="details_Selection === '' " class="bt" >删除</el-button> -->
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+
|
|
|
<layout>
|
|
<layout>
|
|
|
-
|
|
|
|
|
|
|
+ <layout-sider :resize-directions="['right']" :width="200" style="margin-right: 10px;">
|
|
|
|
|
+ <div class="JKWTree-tree" style="height: 70vh;">
|
|
|
|
|
+ <h3>日期</h3>
|
|
|
|
|
+ <el-tree :data="treeData" class="treecolor" highlight-current="true" @node-click="handleNodeClick" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </layout-sider>
|
|
|
<layout-content >
|
|
<layout-content >
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
@@ -144,9 +150,15 @@
|
|
|
<!-- <el-descriptions-item label="计划用料">{{ mianliaotabData.计划用料 }}</el-descriptions-item> -->
|
|
<!-- <el-descriptions-item label="计划用料">{{ mianliaotabData.计划用料 }}</el-descriptions-item> -->
|
|
|
<!-- <el-descriptions-item label="计划门幅">{{ mianliaotabData.计划门幅 }}</el-descriptions-item> -->
|
|
<!-- <el-descriptions-item label="计划门幅">{{ mianliaotabData.计划门幅 }}</el-descriptions-item> -->
|
|
|
<!-- <el-descriptions-item label="单位">{{ mianliaotabData.单位 }}</el-descriptions-item> -->
|
|
<!-- <el-descriptions-item label="单位">{{ mianliaotabData.单位 }}</el-descriptions-item> -->
|
|
|
- <el-descriptions-item label="单位">{{ mianliaotabData.单位 }}</el-descriptions-item>
|
|
|
|
|
- <el-descriptions-item label="库存数量">{{ mianliaotabData.库存数量 }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="累计入库数量">{{ mianliaotabData.入仓总数量 }}</el-descriptions-item>
|
|
<el-descriptions-item label="累计入库数量">{{ mianliaotabData.入仓总数量 }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="库存数量">{{ mianliaotabData.库存数量 }}</el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item label="单位" >
|
|
|
|
|
+ <el-radio-group v-model="mianliaotabData.单位" >
|
|
|
|
|
+ <el-radio label="米" border >米</el-radio>
|
|
|
|
|
+ <el-radio label="码" border >码</el-radio>
|
|
|
|
|
+ <el-radio label="公斤" border >公斤</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
<!-- <el-descriptions-item label="领用数量">{{ mianliaotabData.领用数量 }}</el-descriptions-item> -->
|
|
<!-- <el-descriptions-item label="领用数量">{{ mianliaotabData.领用数量 }}</el-descriptions-item> -->
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
@@ -154,10 +166,10 @@
|
|
|
<el-descriptions-item label="定额用料">{{ mianliaotabData.定额用料 }}</el-descriptions-item>
|
|
<el-descriptions-item label="定额用料">{{ mianliaotabData.定额用料 }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="定额门幅">{{ mianliaotabData.定额门幅 }}</el-descriptions-item>
|
|
<el-descriptions-item label="定额门幅">{{ mianliaotabData.定额门幅 }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="实际门幅">
|
|
<el-descriptions-item label="实际门幅">
|
|
|
- <el-input v-model="mianliaotabData.实际门幅" placeholder="" style="margin: 0; width: 100px;"/>
|
|
|
|
|
|
|
+ <el-input v-model="mianliaotabData.实际门幅" placeholder="" class="green-bg-item" style="margin: 0; width: 100px; "/>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="入库数量">
|
|
|
|
|
- <el-input v-model="mianliaotabData.入库数量" id='rksl' placeholder="" style="margin: 0; width: 100px;"/>
|
|
|
|
|
|
|
+ <el-descriptions-item label="入库数量" >
|
|
|
|
|
+ <el-input v-model="mianliaotabData.入库数量" id='rksl' placeholder="" class="green-bg-item" style="margin: 0; width: 100px;"/>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
@@ -169,7 +181,13 @@
|
|
|
<el-divider><span class="print-title" style="font-size: 18px;">面料入库单</span></el-divider>
|
|
<el-divider><span class="print-title" style="font-size: 18px;">面料入库单</span></el-divider>
|
|
|
<el-descriptions class="margin-top" :column="3" :size="size" border>
|
|
<el-descriptions class="margin-top" :column="3" :size="size" border>
|
|
|
<el-descriptions-item label="入库单号">{{danhao}}</el-descriptions-item>
|
|
<el-descriptions-item label="入库单号">{{danhao}}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="入库日期">{{riqi}}</el-descriptions-item>
|
|
|
|
|
|
|
+ <el-descriptions-item label="入库日期" >
|
|
|
|
|
+ <el-date-picker class="green-bg-item"
|
|
|
|
|
+ v-model="riqi"
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ placeholder="选择日期">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
<el-descriptions-item label="入库人员">{{chukuren}}</el-descriptions-item>
|
|
<el-descriptions-item label="入库人员">{{chukuren}}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
<br>
|
|
<br>
|
|
@@ -199,7 +217,7 @@
|
|
|
<el-table-column align="left" label="关联订单" prop="关联订单" width="300"/>
|
|
<el-table-column align="left" label="关联订单" prop="关联订单" width="300"/>
|
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
|
<template #default="{ row, $index }">
|
|
<template #default="{ row, $index }">
|
|
|
- <el-button @click="deleteRow($index)" type="text" size="small">
|
|
|
|
|
|
|
+ <el-button @click="deleteRow($index)" type="danger" size="small">
|
|
|
移除
|
|
移除
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -272,7 +290,7 @@ import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
import {ref, reactive} from 'vue'
|
|
import {ref, reactive} from 'vue'
|
|
|
import {getInputDetail,
|
|
import {getInputDetail,
|
|
|
inputStash,
|
|
inputStash,
|
|
|
-InputOrderSearch,outReport,FabricDetail,gitReceiptNumber,FabricDetaillist,FabricDetaildel,ReceiptList,ReceiptDetail} from '@/api/mes/job'
|
|
|
|
|
|
|
+InputOrderSearch,outReport,FabricDetail,gitReceiptNumber,FabricDetaillist,FabricDetaildel,ReceiptList,ReceiptDetail,fetchMonthlyFabricRecords} from '@/api/mes/job'
|
|
|
import { ElMessage, ElMessageBox,ElUpload, ElButton } from 'element-plus';
|
|
import { ElMessage, ElMessageBox,ElUpload, ElButton } from 'element-plus';
|
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
import { useUserStore } from '@/pinia/modules/user'
|
|
|
// import { get } from 'scriptjs';
|
|
// import { get } from 'scriptjs';
|
|
@@ -314,6 +332,75 @@ const restableData = reactive([])//表格
|
|
|
const _orderid = ref('')//订单子编号
|
|
const _orderid = ref('')//订单子编号
|
|
|
const _kh = ref('')//生产款号
|
|
const _kh = ref('')//生产款号
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+// 侧边栏数据请求
|
|
|
|
|
+
|
|
|
|
|
+const treeData = reactive([]);
|
|
|
|
|
+const getTreeData = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const response = await fetchMonthlyFabricRecords();
|
|
|
|
|
+
|
|
|
|
|
+ if (response.code === 0 && response.data.入库) {
|
|
|
|
|
+ // 1. 只处理入库数据
|
|
|
|
|
+ const transformedData = Object.entries(response.data.入库).map(([month, dates]) => ({
|
|
|
|
|
+ label: month, // "2025-03"
|
|
|
|
|
+ children: dates.map(date => ({
|
|
|
|
|
+ label: date, // "2025-03-31"
|
|
|
|
|
+ params: {
|
|
|
|
|
+ date, // 已经是正确格式,无需再转换
|
|
|
|
|
+ month // 添加月份信息便于后续使用
|
|
|
|
|
+ }
|
|
|
|
|
+ }))
|
|
|
|
|
+ }));
|
|
|
|
|
+
|
|
|
|
|
+ // 2. 更简洁的数组更新方式
|
|
|
|
|
+ Object.assign(treeData, transformedData);
|
|
|
|
|
+ } else if (!response.data.入库) {
|
|
|
|
|
+ console.warn('接口中没有入库数据');
|
|
|
|
|
+ treeData.length = 0; // 清空数据
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取数据失败:', error);
|
|
|
|
|
+ // 可以在这里添加错误提示
|
|
|
|
|
+ ElMessage.error('获取入库数据失败');
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+getTreeData();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const nodedata = ref('')
|
|
|
|
|
+const handleNodeClick = async (node, check) => {
|
|
|
|
|
+ nodedata.value = node.label
|
|
|
|
|
+ console.log(nodedata.value);
|
|
|
|
|
+ restableData.splice(0, restableData.length);//清空表格
|
|
|
|
|
+
|
|
|
|
|
+ // 取消所有节点的颜色
|
|
|
|
|
+ const allNodes = document.querySelectorAll('.treecolor .el-tree-node');
|
|
|
|
|
+ allNodes.forEach(node => {
|
|
|
|
|
+ node.querySelector('.el-tree-node__label').style.color = '';
|
|
|
|
|
+ });
|
|
|
|
|
+ // 获取点击的节点 给当前点击的节点改变颜色【红色】
|
|
|
|
|
+ const clickedNodeId = node['$treeNodeId'];
|
|
|
|
|
+ const clickedNode = document.querySelector(`.treecolor .el-tree-node[data-key="${clickedNodeId}"]`);
|
|
|
|
|
+ if (clickedNode) {
|
|
|
|
|
+ clickedNode.querySelector('.el-tree-node__label').style.color = 'red';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //订单信息数据查询【接口】
|
|
|
|
|
+ const ReceiptList_res = await ReceiptList({mouth:nodedata.value,search:'',page:1,limit:50});
|
|
|
|
|
+ if (ReceiptList_res && ReceiptList_res.data && Array.isArray(ReceiptList_res.data.table)) {
|
|
|
|
|
+ const filteredData = ReceiptList_res.data.table.filter(item => item.单号类型 === '入库');
|
|
|
|
|
+ // 更新数据
|
|
|
|
|
+ recordtableData.splice(0, recordtableData.length);
|
|
|
|
|
+ recordtableData.splice(0, 0, ...filteredData);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.error("数据获取失败");
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//input实时调用
|
|
//input实时调用
|
|
|
const handleInput = async ()=>{
|
|
const handleInput = async ()=>{
|
|
|
restableData.splice(0, restableData.length);//清空表格
|
|
restableData.splice(0, restableData.length);//清空表格
|
|
@@ -887,6 +974,7 @@ const handleSizeChange = (val) => {
|
|
|
:deep(.el-table__body tr.current-row) > td {
|
|
:deep(.el-table__body tr.current-row) > td {
|
|
|
background: #ff80ff !important;
|
|
background: #ff80ff !important;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
:deep(.el-table td .cell) {
|
|
:deep(.el-table td .cell) {
|
|
@@ -931,4 +1019,11 @@ const handleSizeChange = (val) => {
|
|
|
overflow: hidden !important;
|
|
overflow: hidden !important;
|
|
|
text-overflow: ellipsis !important;
|
|
text-overflow: ellipsis !important;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+:deep(.green-bg-item >.el-input__wrapper) {
|
|
|
|
|
+ background-color: #80fa80 !important; /* 浅绿色背景 */
|
|
|
|
|
+ padding: 8px 12px !important;
|
|
|
|
|
+ border-radius: 4px !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|