fix: 采购统计日期修正

This commit is contained in:
shijing 2024-03-26 13:51:53 +08:00
parent 2346b053b5
commit ff19bedf76
2 changed files with 160 additions and 131 deletions

View File

@ -1,25 +1,46 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
</div>
<div class="left-panel"></div>
<div class="right-panel">
<el-select v-model="query.mgroup" clearable>
<el-option v-for="item in mgroupOption"
<el-option
v-for="item in mgroupOption"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
<el-date-picker v-model="query.handle_date" type="date" placeholder="选择日期" value-format="YYYY-MM-DD" />
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
<el-date-picker
v-model="query.handle_date"
type="date"
placeholder="选择日期"
value-format="YYYY-MM-DD"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
>查询</el-button
>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :query="query">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:query="query"
>
<el-table-column type="index" width="50" />
<el-table-column label="物料" prop="material_out_name" show-overflow-tooltip>
<el-table-column
label="物料"
prop="material_out_name"
show-overflow-tooltip
min-width="120"
>
</el-table-column>
<el-table-column label="工序" prop="mgroup_name">
</el-table-column>
@ -77,7 +98,11 @@
</el-table-column>
<el-table-column label="班组" prop="shift_name">
</el-table-column>
<el-table-column label="所属车间" prop="belong_dept_name" show-overflow-tooltip>
<el-table-column
label="所属车间"
prop="belong_dept_name"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作时间" prop="handle_date">
</el-table-column>
@ -95,27 +120,27 @@ export default {
apiObj: this.$API.wpm.mlog.list,
query: {
page: 1,
page_size: 20
page_size: 20,
},
selection: [],
state_: {
10: '',
20: '',
10: "",
20: "",
},
mgroupOption:[],
mgroupOption: [],
};
},
mounted() {
this.getMgroup();
},
methods: {
getMgroup(){
this.$API.mtm.mgroup.list.req({page:0,}).then((res) => {
getMgroup() {
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
this.mgroupOption = res;
});
},
handleQuery() {
this.$refs.table.queryData(this.query)
this.$refs.table.queryData(this.query);
},
resetQuery() {
this.query = {};

View File

@ -127,18 +127,22 @@
hideDo
>
<el-table-column type="index" width="50" />
<el-table-column label="日期" prop="date">
<template #default="scope">
<span>{{ scope.row. }}-</span>
<span v-if="scope.row.周">{{
scope.row.
}}</span>
<span v-if="scope.row.月">{{
scope.row.
}}</span>
</template>
<el-table-column label="年份" prop="年" />
<el-table-column
v-if="queryType == '月'"
label="周"
prop="周"
/>
<el-table-column
v-else
label="月份"
prop="月"
/>
<el-table-column label="名称" prop="物料名">
</el-table-column>
<el-table-column label="名称" prop="物料">
<el-table-column label="规格" prop="规格">
</el-table-column>
<el-table-column label="型号" prop="型号">
</el-table-column>
<el-table-column label="数量" prop="数量">
</el-table-column>