|
|
@@ -2,27 +2,28 @@
|
|
|
<div class="ele-body">
|
|
|
<el-card shadow="never" v-loading="loading">
|
|
|
<order-search @search="getList" ref="searchRef"> </order-search>
|
|
|
- <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :selection.sync="selection">
|
|
|
+ <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :selection.sync="selection" :pageSize="20"
|
|
|
+ :pageSizes="[20, 30, 40, 50, 100]">
|
|
|
<!-- 操作列 -->
|
|
|
<template v-slot:toolbar>
|
|
|
<el-button type="primary" slot="reference" :disabled="selection.length == 0"
|
|
|
@click="disposeList(1)">批量处置</el-button>
|
|
|
|
|
|
- <el-popconfirm class="ele-action" title="确定要删除吗?" @confirm="remove" style="margin-left: 10px">
|
|
|
- <template v-slot:reference>
|
|
|
- <el-button :disabled="selection.length == 0" type="danger">批量删除</el-button>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
+<!-- <el-popconfirm class="ele-action" title="确定要删除吗?" @confirm="remove" style="margin-left: 10px">-->
|
|
|
+<!-- <template v-slot:reference>-->
|
|
|
+<!-- <el-button :disabled="selection.length == 0" type="danger">批量删除</el-button>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </el-popconfirm>-->
|
|
|
</template>
|
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-popconfirm class="ele-action" title="确定要删除吗?" v-if="row.status == 0" @confirm="remove(row)">
|
|
|
- <template v-slot:reference>
|
|
|
- <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
- 删除
|
|
|
- </el-link>
|
|
|
- </template>
|
|
|
- </el-popconfirm>
|
|
|
- <el-link slot="reference" type="primary" :underline="false" icon="el-icon-edit" v-if="row.status == 0"
|
|
|
+<!-- <el-popconfirm class="ele-action" title="确定要删除吗?" v-if="row.disposalStatus == null" @confirm="remove(row)">-->
|
|
|
+<!-- <template v-slot:reference>-->
|
|
|
+<!-- <el-link type="danger" :underline="false" icon="el-icon-delete">-->
|
|
|
+<!-- 删除-->
|
|
|
+<!-- </el-link>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </el-popconfirm>-->
|
|
|
+ <el-link slot="reference" type="primary" :underline="false" icon="el-icon-edit" v-if="row.disposalStatus == null"
|
|
|
@click="disposeList(2, row)">
|
|
|
处置
|
|
|
</el-link>
|
|
|
@@ -53,6 +54,7 @@ import {
|
|
|
deleteUnacceptedProductDetail,
|
|
|
dispose
|
|
|
} from '@/api/unacceptedProduct/index';
|
|
|
+import {getUnqualifiedPage} from "@/api/unqualifiedProduct";
|
|
|
export default {
|
|
|
components: {
|
|
|
OrderSearch,
|
|
|
@@ -63,7 +65,7 @@ export default {
|
|
|
return {
|
|
|
loading: false,
|
|
|
selection: [],
|
|
|
- datasource: [],
|
|
|
+ // datasource: [],
|
|
|
disposeType: '',
|
|
|
dialogVisible: false,
|
|
|
current: null,
|
|
|
@@ -92,14 +94,24 @@ export default {
|
|
|
showOverflowTooltip: true,
|
|
|
fixed: 'left'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // prop: 'code',
|
|
|
+ // label: '编码',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'workOrderId',
|
|
|
+ // label: '工单号',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
{
|
|
|
- prop: 'code',
|
|
|
- label: '编码',
|
|
|
+ prop: 'categoryName',
|
|
|
+ label: '产品名称',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'workOrderId',
|
|
|
- label: '工单号',
|
|
|
+ prop: 'categoryCode',
|
|
|
+ label: '产品编码',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
@@ -108,52 +120,42 @@ export default {
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'engravingCode',
|
|
|
+ prop: 'engrave',
|
|
|
label: '刻码',
|
|
|
align: 'center'
|
|
|
},
|
|
|
- {
|
|
|
- prop: 'productName',
|
|
|
- label: '产品名称',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'productCode',
|
|
|
- label: '产品编码',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'specification',
|
|
|
- label: '规格',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'brandNo',
|
|
|
- label: '牌号',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // prop: 'specification',
|
|
|
+ // label: '规格',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'brandNo',
|
|
|
+ // label: '牌号',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
- prop: 'unqualifiedQuantity',
|
|
|
- label: '数量',
|
|
|
- align: 'center',
|
|
|
- width: 60
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'produceRoutingName',
|
|
|
- label: '工艺路线',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'produceTaskName',
|
|
|
- label: '工序',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'unqualifiedReason',
|
|
|
- label: '原因',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // prop: 'unqualifiedQuantity',
|
|
|
+ // label: '数量',
|
|
|
+ // align: 'center',
|
|
|
+ // width: 60
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'produceRoutingName',
|
|
|
+ // label: '工艺路线',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'produceTaskName',
|
|
|
+ // label: '工序',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // prop: 'unqualifiedReason',
|
|
|
+ // label: '原因',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
|
|
|
{
|
|
|
prop: 'createTime',
|
|
|
@@ -167,7 +169,7 @@ export default {
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'type',
|
|
|
+ prop: 'disposalStatus',
|
|
|
label: '处置类型',
|
|
|
align: 'center',
|
|
|
// slot: 'SlottingType'
|
|
|
@@ -198,24 +200,27 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList();
|
|
|
+ // this.getList();
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- getList() {
|
|
|
- getDetail(this.$route.query.id).then((res) => {
|
|
|
- this.datasource = res;
|
|
|
+ // getList() {
|
|
|
+ // getDetail({unqualifiedProductsId:this.$route.query.id}).then((res) => {
|
|
|
+ // this.datasource = res;
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+ // /* 表格数据源 */
|
|
|
+ async datasource({ page, where, limit }) {
|
|
|
+ where.unqualifiedProductsId = this.$route.query.id;
|
|
|
+ const arr = await getDetail({
|
|
|
+ ...where,
|
|
|
+ pageNum: page,
|
|
|
+ size: limit
|
|
|
});
|
|
|
+ this.tableData = arr.list;
|
|
|
+ console.log(arr, 'arr')
|
|
|
+ return arr.list;
|
|
|
},
|
|
|
- // /* 表格数据源 */
|
|
|
- // async datasource({ page, limit, where }) {
|
|
|
- // const result = await getDetail(this.$route.query.id);
|
|
|
- // console.log(result, 'result');
|
|
|
- // return {
|
|
|
- // list: result,
|
|
|
- // count: result.length
|
|
|
- // };
|
|
|
- // },
|
|
|
remove(row) {
|
|
|
let ids = row ? [row.id] : this.selection.map((item) => item.id);
|
|
|
deleteUnacceptedProductDetail(ids).then((res) => {
|