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