|
|
@@ -1,23 +1,23 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
+ <el-form>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="searchInfo" placeholder="搜索订单编号或生产款号" @keyup.enter="handleSearch()" style="width: 180px;" />
|
|
|
+ <el-button type="primary" icon="Search" class="search" @click="handleSearch" />
|
|
|
+ <el-button type="primary" icon="Download" @click="exportToExcel" style="margin: 5px;float: right;">导出库存Excel</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
<layout>
|
|
|
- <h1 style="margin: 0%;margin-bottom: 6px;">选择日期查询当月面料库存汇总</h1>
|
|
|
- <el-row :gutter="24" style="margin-bottom: 6px;">
|
|
|
- <!-- <el-input v-model="add_searchInfo" placeholder="请扫描订单编号或输入生产款号模糊查询" @input="handleInput"
|
|
|
- @keyup.enter="add_onSubmit" id="searchInput" style="width: 340px;height: 50px;margin-left: 10px;">
|
|
|
- </el-input> -->
|
|
|
-
|
|
|
- <!-- <el-date-picker
|
|
|
- v-model="mlscgdformData['日期']" id="日期" @input="handleInput"
|
|
|
- style="height: 50px;margin-left: 20px;"
|
|
|
- type="mouth"/> -->
|
|
|
- <el-date-picker v-model="mlscgdformData['日期']" @input="handleInput" type="month" placeholder="选择月份"style="height: 50px;margin-left: 20px;"></el-date-picker>
|
|
|
- <el-button type="primary" @click="add_onSubmit" style="height: 50px;font-size: 20px;">查询</el-button>
|
|
|
- <!-- <el-button type="primary" icon="reading" @click="details_onSubmit" style="height: 50px;font-size: 20px;">出库退还记录</el-button> -->
|
|
|
- </el-row>
|
|
|
+ <layout-sider :resize-directions="['right']" :width="220" style="margin-right: 10px;">
|
|
|
+ <div class="JKWTree-tree" style="height: 70vh;">
|
|
|
+ <h3>面料库存</h3>
|
|
|
+ <el-tree :data="treeData" highlight-current="true" @node-click="handleNodeClick" />
|
|
|
+ </div>
|
|
|
+ </layout-sider>
|
|
|
+
|
|
|
<layout>
|
|
|
-
|
|
|
- <layout-content >
|
|
|
+ <layout-content>
|
|
|
<div class="gva-table-box">
|
|
|
<el-table ref="multipleTable" style="width: 100%;height: 64vh" tooltip-effect="dark"
|
|
|
:row-style="{ height: '40px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
@@ -28,15 +28,26 @@
|
|
|
@row-click="tableRowClick" :show-overflow-tooltip="true"
|
|
|
@selection-change="handleSelectionChange">
|
|
|
<!-- <el-table-column type="selection" width="80" /> -->
|
|
|
- <el-table-column align="left" label="订单编号" prop="订单编号" width="105" />
|
|
|
- <el-table-column align="left" label="客户编号" prop="客户编号" width="80"/>
|
|
|
- <el-table-column align="left" label="生产款号" prop="生产款号" width="170"/>
|
|
|
- <el-table-column align="left" label="款式" prop="款式" width="170"/>
|
|
|
- <el-table-column align="left" label="物料名称" prop="物料名称" width="160"/>
|
|
|
- <el-table-column align="left" label="库存总量" prop="入库总量" width="100"/>
|
|
|
- <el-table-column align="left" label="面料结余" prop="面料结余" width="100"/>
|
|
|
- <el-table-column align="left" label="投料单位" prop="投料单位" width="100"/>
|
|
|
- </el-table>
|
|
|
+ <el-table-column align="left" label="订单编号" prop="订单编号" width="105" />
|
|
|
+ <el-table-column align="left" label="客户编号" prop="客户编号" width="80"/>
|
|
|
+ <el-table-column align="left" label="生产款号" prop="生产款号" width="170"/>
|
|
|
+ <el-table-column align="left" label="款式" prop="款式" width="170"/>
|
|
|
+ <el-table-column align="left" label="物料名称" prop="物料名称" width="160"/>
|
|
|
+ <el-table-column align="left" label="库存总量" prop="入库总量" width="100"/>
|
|
|
+ <el-table-column align="left" label="面料结余" prop="面料结余" width="100"/>
|
|
|
+ <el-table-column align="left" label="投料单位" prop="投料单位" width="100"/>
|
|
|
+ </el-table>
|
|
|
+ <div class="gva-pagination">
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="page"
|
|
|
+ :page-sizes="[10, 30, 50, 100]"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
<div class="dialog-footer" style="text-align: left;margin-right: 60px;">
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -67,7 +78,7 @@ export default {
|
|
|
// 全量引入格式化工具 请按需保留
|
|
|
import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
|
|
|
import {ref, reactive} from 'vue'
|
|
|
-import {getSpotList,getSpotTab,orderSearch,outReport,orderBomList,FabricDetail,fabricList} from '@/api/mes/job'
|
|
|
+import {getSpotList,getSpotTab,orderSearch,outReport,orderBomList,FabricDetail,fabricList,fabricListmonth} from '@/api/mes/job'
|
|
|
import {ElMessage} from "element-plus";
|
|
|
// import { get } from 'scriptjs';
|
|
|
defineOptions({name: 'Company'})
|
|
|
@@ -90,9 +101,47 @@ const currentDates = `${year}-${month}-${day}`;
|
|
|
const currentDatess = `${year}-${month}`;
|
|
|
|
|
|
|
|
|
+// 侧边栏数据请求
|
|
|
+const treeData = reactive([])
|
|
|
+ const gettreeData = async () => {
|
|
|
+ const response = await fabricListmonth()
|
|
|
+ if (response.code === 0) {
|
|
|
+ const transformedData = response.data.map(item => ({
|
|
|
+ label: item.date,
|
|
|
+ params: {
|
|
|
+ date: item.date.substring(0, 4) + '-' + item.date.substring(4),
|
|
|
+ },
|
|
|
+ }))
|
|
|
+ treeData.splice(0, treeData.length, ...transformedData)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ gettreeData()
|
|
|
+
|
|
|
const mlscgdformData = reactive({
|
|
|
日期: '',
|
|
|
});
|
|
|
+const nodedata = ref('')
|
|
|
+const handleNodeClick = async (node, check) => {
|
|
|
+ console.log(node);
|
|
|
+ nodedata.value = node.label
|
|
|
+ restableData.splice(0, restableData.length);//清空表格
|
|
|
+ //订单信息数据查询【接口】
|
|
|
+ const fabricListdata = await fabricList({order:'',mouth:nodedata.value,page:page.value,limit:pageSize.value});
|
|
|
+ console.log(fabricListdata)
|
|
|
+ restableData.splice(0,fabricListdata.length,...fabricListdata.data.table);
|
|
|
+ total.value = fabricListdata.data.total;
|
|
|
+ }
|
|
|
+
|
|
|
+const searchInfo = ref('')
|
|
|
+ //查询按钮
|
|
|
+const handleSearch = async ()=>{
|
|
|
+ restableData.splice(0, restableData.length);//清空表格
|
|
|
+ //订单信息数据查询【接口】
|
|
|
+ const fabricListdata = await fabricList({order:searchInfo.value,mouth:nodedata.value,page:page.value,limit:pageSize.value});
|
|
|
+ console.log(fabricListdata)
|
|
|
+ restableData.splice(0,fabricListdata.length,...fabricListdata.data.table);
|
|
|
+ total.value = fabricListdata.data.total;
|
|
|
+};
|
|
|
|
|
|
|
|
|
//自动聚焦光标input
|
|
|
@@ -109,19 +158,7 @@ const getMachineMacdata = async () => {
|
|
|
}
|
|
|
getMachineMacdata();
|
|
|
|
|
|
- //日期转换
|
|
|
-let lhrq_formattedDeliveryDate = ''; //转化后的日期
|
|
|
-if (mlscgdformData['日期']) {
|
|
|
- const date = new Date(mlscgdformData['日期']);
|
|
|
- lhrq_formattedDeliveryDate = `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}`;
|
|
|
-}
|
|
|
-const fabricListdada = async () => {
|
|
|
- //订单信息数据查询【接口】
|
|
|
- const fabricListdata = await fabricList({mouth:lhrq_formattedDeliveryDate});
|
|
|
- console.log(fabricListdata)
|
|
|
- restableData.splice(0,fabricListdata.length,...fabricListdata.data);
|
|
|
-}
|
|
|
-fabricListdada()
|
|
|
+
|
|
|
//全局调用参数
|
|
|
const add_searchInfo = ref('')//搜索
|
|
|
const restableData = reactive([])//表格
|
|
|
@@ -130,14 +167,7 @@ const handleInput = async ()=>{
|
|
|
add_onSubmit()
|
|
|
}
|
|
|
|
|
|
-//查询按钮
|
|
|
-const add_onSubmit = async ()=>{
|
|
|
- restableData.splice(0, restableData.length);//清空表格
|
|
|
- //订单信息数据查询【接口】
|
|
|
- const fabricListdata = await fabricList({mouth:lhrq_formattedDeliveryDate});
|
|
|
- console.log(fabricListdata)
|
|
|
- restableData.splice(0,fabricListdata.length,...fabricListdata.data);
|
|
|
-};
|
|
|
+
|
|
|
|
|
|
//表格行点击
|
|
|
const tableRowClick = async (row)=>{
|
|
|
@@ -152,18 +182,17 @@ const resbomtableData = ref([]);
|
|
|
// 分页相关的响应式变量
|
|
|
const page = ref(1)
|
|
|
const total = ref(0)
|
|
|
-const pageSize = ref(10)
|
|
|
+const pageSize = ref(50)
|
|
|
// 分页
|
|
|
const handleCurrentChange = (val) => {
|
|
|
page.value = val;
|
|
|
- _getStaffList();
|
|
|
+ handleSearch();
|
|
|
};
|
|
|
|
|
|
// 修改页面容量 点击多少条/页
|
|
|
const handleSizeChange = (val) => {
|
|
|
- page.value = 10;//默认显示
|
|
|
pageSize.value = val;
|
|
|
- _getStaffList();
|
|
|
+ handleSearch();
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|