入场检验列表

This commit is contained in:
shijing 2024-03-01 16:49:07 +08:00
parent 2d86e13808
commit 0ef2c8ba18
1 changed files with 66 additions and 82 deletions

View File

@ -2,109 +2,93 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-date-picker <el-date-picker v-model="query.test_date" type="date" value-format="YYYY-MM-DD" />
v-model="query.date" <el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button>
type="date"
value-format="YYYY-MM-DD"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
>查询</el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable <scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params" :query="query">
ref="table" <el-table-column type="index" width="50" />
:apiObj="apiObj" <el-table-column label="产品名称" prop="material_name" show-overflow-tooltip>
row-key="id"
stripe
:params="query"
>
<el-table-column type="index" width="50"/>
<el-table-column label="产品名称" prop="name" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="入场批次" prop="number"> <el-table-column label="批次号" prop="batch">
</el-table-column> </el-table-column>
<el-table-column label="总袋(桶)数" prop="model"> <el-table-column label="总袋(桶)数" prop="count_bag">
</el-table-column> </el-table-column>
<el-table-column label="抽样数量" prop="factory"> <el-table-column label="抽样数量" prop="count_sampling">
</el-table-column> </el-table-column>
<el-table-column label="称重记录/Kg" prop="production_date"> <el-table-column label="称重记录/Kg" prop="weight_kgs">
</el-table-column> </el-table-column>
<el-table-column label="抽样计算总重量/Kg" prop="production_date"> <el-table-column label="抽样计算总重量/Kg" prop="production_date">
<template #default="scope">
{{ countWeight(scope.row) }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="合同采购量/Kg" prop="buy_date"> <el-table-column label="合同采购量/Kg" prop="buy_date">
</el-table-column> </el-table-column>
<el-table-column label="检验报告" prop="production_date"> <el-table-column label="检验结论">
</el-table-column>
<el-table-column label="结论判定" prop="production_date">
</el-table-column>
<el-table-column label="检验员" prop="production_date">
</el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="150">
<template #default="scope"> <template #default="scope">
<el-link type="primary" @click="table_show(scope.row)">查看</el-link> <el-tag v-if="scope.row.is_testok" type="success">
<el-divider direction="vertical"></el-divider> 合格
<el-link type="danger" @click="table_del(scope.row)" v-auth="'ptest.delete'">删除</el-link> </el-tag>
<el-tag v-else type="danger">
不合格
</el-tag>
</template> </template>
</el-table-column> --> </el-table-column>
<!-- <el-table-column label="结论"> <el-table-column label="检验员" prop="test_user_name">
<template #default="scope"> </el-table-column>
<el-tag v-if="scope.row.state===10" type="success"> <el-table-column label="检验日期" prop="test_date">
{{ state_[scope.row.state] }} </el-table-column>
</el-tag>
<el-tag v-else-if="scope.row.state===20" type="warning">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else-if="scope.row.state===30">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
</el-tag>
</template>
</el-table-column> -->
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
</template> </template>
<script> <script>
export default { export default {
name: "rparty", name: "rparty",
data() { data() {
return { return {
// apiObj: this.$API.qm.list, apiObj: this.$API.inm.mioitem.list,
apiObj:null, query: {
query: { test_date: '',
page:1, },
page_size:20, params: { type: 20, mio__type: 'pur_in' },
type:10 selection: [],
}, state_: {
selection: [], 10: '',
state_: { 20: '',
10: '', },
20: '', };
}, },
}; methods: {
//
table_show(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("show", 10).setData(row);
});
}, },
methods: { handleQuery() {
// this.$refs.table.queryData(this.query)
table_show(row) { },
this.dialog.save = true; countWeight(row) {
this.$nextTick(() => { let weight = 0, single = 0, allW = 0;
this.$refs.saveDialog.open("show",10).setData(row); let kgs = row.weight_kgs;
if (kgs.length > 0) {
kgs.forEach(item => {
weight += item;
}); });
}, single = weight / kgs.length;
handleQuery() { allW = single * row.count_bag;
this.$refs.table.queryData(this.query) }
}, return allW;
resetQuery() {
this.query = {};
},
}, },
}; resetQuery() {
this.query = {};
},
},
};
</script> </script>