|
|
@@ -1,12 +1,17 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<layout>
|
|
|
- <h1 style="margin: 0%;margin-bottom: 6px;">面料库存汇总</h1>
|
|
|
+ <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"
|
|
|
+ <!-- <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-button type="primary" @click="Reporting_onSubmit" style="height: 50px;font-size: 20px;">查询</el-button> -->
|
|
|
+ </el-input> -->
|
|
|
+
|
|
|
+ <el-date-picker
|
|
|
+ v-model="mlscgdformData['日期']" id="日期" @input="handleInput"
|
|
|
+ style="height: 50px;margin-left: 20px;"
|
|
|
+ type="date"/>
|
|
|
+ <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>
|
|
|
@@ -81,8 +86,18 @@ const minutes = String(today.getMinutes()).padStart(2, '0');
|
|
|
const seconds = String(today.getSeconds()).padStart(2, '0');
|
|
|
const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
const currentDates = `${year}-${month}-${day}`;
|
|
|
+const currentDatess = `${year}-${month}`;
|
|
|
+
|
|
|
+
|
|
|
+const mlscgdformData = reactive({
|
|
|
+ 日期: '',
|
|
|
+});
|
|
|
+
|
|
|
//自动聚焦光标input
|
|
|
const getMachineMacdata = async () => {
|
|
|
+ mlscgdformData['日期'] = currentDates
|
|
|
+ restableData.splice(0, restableData.length);//清空表格
|
|
|
+
|
|
|
setTimeout(() => {
|
|
|
const inputElement = document.getElementById('searchInput');
|
|
|
if (inputElement) {
|
|
|
@@ -92,11 +107,19 @@ const getMachineMacdata = async () => {
|
|
|
}
|
|
|
getMachineMacdata();
|
|
|
|
|
|
+
|
|
|
+const fabricListdada = async () => {
|
|
|
+
|
|
|
+ //订单信息数据查询【接口】
|
|
|
+ const fabricListdata = await fabricList({mouth:currentDates});
|
|
|
+ console.log(fabricListdata)
|
|
|
+ restableData.splice(0,fabricListdata.length,...fabricListdata.data);
|
|
|
+}
|
|
|
+fabricListdada()
|
|
|
//全局调用参数
|
|
|
const add_searchInfo = ref('')//搜索
|
|
|
const restableData = reactive([])//表格
|
|
|
const _orderid = ref('')//订单子编号
|
|
|
-
|
|
|
const handleInput = async ()=>{
|
|
|
add_onSubmit()
|
|
|
}
|
|
|
@@ -104,8 +127,16 @@ const handleInput = async ()=>{
|
|
|
//查询按钮
|
|
|
const add_onSubmit = async ()=>{
|
|
|
restableData.splice(0, restableData.length);//清空表格
|
|
|
+ //日期转换
|
|
|
+ let lhrq_formattedDeliveryDate = '';
|
|
|
+ if (mlscgdformData['日期']) {
|
|
|
+ const date = new Date(mlscgdformData['日期']);
|
|
|
+ lhrq_formattedDeliveryDate = `${date.getFullYear()}-${('0' + (date.getMonth() + 1)).slice(-2)}-${('0' + date.getDate()).slice(-2)}`;
|
|
|
+ }
|
|
|
+
|
|
|
//订单信息数据查询【接口】
|
|
|
- const fabricListdata = await fabricList({order:add_searchInfo.value});
|
|
|
+ const fabricListdata = await fabricList({mouth:lhrq_formattedDeliveryDate});
|
|
|
+ console.log(fabricListdata)
|
|
|
restableData.splice(0,fabricListdata.length,...fabricListdata.data);
|
|
|
};
|
|
|
|