fix: 任务执行界面查询过滤

This commit is contained in:
caoqianming 2023-12-21 01:26:59 +08:00
parent 4b822b7b52
commit d8f49bb9c5
4 changed files with 17 additions and 23 deletions

View File

@ -353,6 +353,7 @@ export default {
if (res.length == 1) { if (res.length == 1) {
this.currentDept = res[0] this.currentDept = res[0]
this.paramsMtask.mgroup__belong_dept = this.currentDept.id this.paramsMtask.mgroup__belong_dept = this.currentDept.id
this.paramsMtask.state__in = '20,40'
this.apiMtask = this.$API.pm.mtask.list this.apiMtask = this.$API.pm.mtask.list
this.paramsHandover.recive_dept = this.currentDept.id this.paramsHandover.recive_dept = this.currentDept.id

View File

@ -7,13 +7,13 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-date-picker v-model="query.date" type="date" value-format="YYYY-MM-DD" /> <el-date-picker v-model="queryMtask.start_date" type="date" value-format="YYYY-MM-DD" />
<el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQueryMtask">查询</el-button>
</div> </div>
</el-header> </el-header>
<el-main> <el-main>
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" hidePagination <scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="paramsMtask" :query="queryMtask"
@row-click="rowClick" hideDo> @row-click="rowClick">
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="任务编号" prop="number"> <el-table-column label="任务编号" prop="number">
</el-table-column> </el-table-column>
@ -185,12 +185,7 @@ export default {
save: false, save: false,
}, },
apiObj: null, apiObj: null,
query: { query: {},
page: 1,
page_size: 20,
belong_dept_name: '6车间',
date: '2023-10-24'
},
processList: [],// processList: [],//
state_: { state_: {
10: '创建中', 10: '创建中',
@ -210,12 +205,18 @@ export default {
paramsWm: { paramsWm: {
belong_dept__name: '6车间' belong_dept__name: '6车间'
}, },
paramsMtask: {
mgroup__belong_dept__name: '6车间',
is_count_utask: true,
state__in: "20,40"
},
queryMtask: {}
} }
}, },
mounted() { mounted() {
let NowDate = new Date(); let NowDate = new Date();
this.query.date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate(); // this.queryMtask.start_date = NowDate.getFullYear() + '-' + (NowDate.getMonth() + 1) + '-' + NowDate.getDate();
this.apiObj = this.$API.pm.mtask.daylist; this.apiObj = this.$API.pm.mtask.list;
}, },
methods: { methods: {
tomio() { tomio() {
@ -244,13 +245,7 @@ export default {
}); });
}, },
handleQueryMtask() { handleQueryMtask() {
this.$refs.table.refresh(); this.$refs.table.refresh(this.queryMtask);
},
handleQuery() {
this.$refs.table.queryData(this.query)
},
resetQuery() {
this.query = {};
}, },
table_submit(row) { table_submit(row) {
this.$API.pm.mtask.submit.req(row.id).then(res => { this.$API.pm.mtask.submit.req(row.id).then(res => {

View File

@ -10,11 +10,8 @@
</template> </template>
<el-descriptions> <el-descriptions>
<el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item> <el-descriptions-item label="任务编号">{{ currentMtask.number }}</el-descriptions-item>
<el-descriptions-item label="产品名称"> <el-descriptions-item label="产品全称">
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.name }}</span> <span v-if="currentMtask.material_out_">{{ currentMtask.material_out_name }}</span>
</el-descriptions-item>
<el-descriptions-item label="规格型号">
<span v-if="currentMtask.material_out_">{{ currentMtask.material_out_.specification }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="计划数量">{{ currentMtask.count }}</el-descriptions-item> <el-descriptions-item label="计划数量">{{ currentMtask.count }}</el-descriptions-item>
<el-descriptions-item label="计划日期">{{ currentMtask.start_date }}</el-descriptions-item> <el-descriptions-item label="计划日期">{{ currentMtask.start_date }}</el-descriptions-item>

View File

@ -357,6 +357,7 @@ export default {
if (res.length == 1) { if (res.length == 1) {
this.currentDept = res[0] this.currentDept = res[0]
this.paramsMtask.mgroup__belong_dept = this.currentDept.id this.paramsMtask.mgroup__belong_dept = this.currentDept.id
this.paramsMtask.state__in = '20,40'
this.apiMtask = this.$API.pm.mtask.list this.apiMtask = this.$API.pm.mtask.list
this.paramsHandover.recive_dept = this.currentDept.id this.paramsHandover.recive_dept = this.currentDept.id