|
|
@@ -1,8 +1,7 @@
|
|
|
<template>
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never" v-loading="loading">
|
|
|
- <productSearch @search="reload" ref="searchRef" >
|
|
|
- </productSearch>
|
|
|
+ <productSearch @search="reload" ref="searchRef"> </productSearch>
|
|
|
|
|
|
<!-- 数据表格 -->
|
|
|
<ele-pro-table
|
|
|
@@ -17,47 +16,39 @@
|
|
|
@update:selection="handleSelectionChange"
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
-
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
-
|
|
|
- size="mini"
|
|
|
- @click=""
|
|
|
- >自建处置单</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" size="mini" @click="handByProd">自建处置单</el-button>
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
<template v-slot:formedNum="{ row }">
|
|
|
- {{ row.notFormedNum || 0 }} / {{ row.formedNum || 0 }}
|
|
|
+ {{ row.notFormedNum || 0 }} / {{ row.formedNum || 0 }}
|
|
|
</template>
|
|
|
|
|
|
<template v-slot:weight="{ row }">
|
|
|
- {{ row.weight || 0 }} / {{ row.weightUnit }}
|
|
|
+ {{ row.weight || 0 }} / {{ row.weightUnit }}
|
|
|
</template>
|
|
|
|
|
|
-
|
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-button type="text" size="mini"
|
|
|
- >详情</el-button
|
|
|
- >
|
|
|
+ <el-button type="text" size="mini">详情</el-button>
|
|
|
</template>
|
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
|
|
|
|
+
|
|
|
+ <addByProduct v-if="addByProductShow" @close="close"></addByProduct>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { getPage } from '@/api/byProduct/index';
|
|
|
import productSearch from './components/product-search.vue';
|
|
|
-
|
|
|
-
|
|
|
+ import addByProduct from './components/addByProduct.vue';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
- productSearch
|
|
|
-
|
|
|
+ productSearch,
|
|
|
+ addByProduct
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
@@ -66,20 +57,16 @@
|
|
|
loading: false,
|
|
|
selection: [],
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ addByProductShow: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
columns() {
|
|
|
return [
|
|
|
-
|
|
|
{
|
|
|
prop: 'code',
|
|
|
label: '处置单号',
|
|
|
- align: 'left',
|
|
|
-
|
|
|
+ align: 'left'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -93,7 +80,6 @@
|
|
|
align: 'center'
|
|
|
},
|
|
|
|
|
|
-
|
|
|
{
|
|
|
prop: 'categoryCode',
|
|
|
label: '物品编码',
|
|
|
@@ -106,13 +92,12 @@
|
|
|
align: 'center'
|
|
|
},
|
|
|
|
|
|
-
|
|
|
{
|
|
|
prop: 'formedNum',
|
|
|
slot: 'formedNum',
|
|
|
label: '不合格品/合格品数量',
|
|
|
align: 'center',
|
|
|
- width: 140,
|
|
|
+ width: 140
|
|
|
},
|
|
|
|
|
|
{
|
|
|
@@ -120,24 +105,22 @@
|
|
|
slot: 'weight',
|
|
|
label: '重量',
|
|
|
align: 'center',
|
|
|
- width: 140,
|
|
|
+ width: 140
|
|
|
},
|
|
|
|
|
|
-
|
|
|
{
|
|
|
prop: 'executorName',
|
|
|
label: '处置人',
|
|
|
align: 'center',
|
|
|
- width: 95,
|
|
|
+ width: 95
|
|
|
},
|
|
|
{
|
|
|
prop: 'createTime',
|
|
|
label: '创建时间',
|
|
|
align: 'center',
|
|
|
- width: 95,
|
|
|
+ width: 95
|
|
|
},
|
|
|
|
|
|
-
|
|
|
{
|
|
|
prop: '',
|
|
|
label: '操作',
|
|
|
@@ -154,13 +137,11 @@
|
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
|
async datasource({ page, limit, where }) {
|
|
|
-
|
|
|
let parma = {
|
|
|
...where,
|
|
|
pageNum: page,
|
|
|
size: limit
|
|
|
};
|
|
|
-
|
|
|
|
|
|
let res = await getPage(parma);
|
|
|
|
|
|
@@ -181,15 +162,26 @@
|
|
|
};
|
|
|
},
|
|
|
|
|
|
-
|
|
|
-
|
|
|
handleSelectionChange(data) {
|
|
|
- console.log(data);
|
|
|
+ console.log(data);
|
|
|
},
|
|
|
/* 刷新表格 */
|
|
|
reload(where = {}) {
|
|
|
this.$refs.table.reload({ page: 1, where });
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ handByProd() {
|
|
|
+ this.addByProductShow = true;
|
|
|
+ },
|
|
|
+ close(val) {
|
|
|
+ if(val) {
|
|
|
+ this.reload();
|
|
|
+
|
|
|
+ }
|
|
|
+ this.addByProductShow = false;
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
};
|
|
|
</script>
|