质量管理
This commit is contained in:
@@ -9,11 +9,12 @@
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="tableData">
|
||||
:table-data="tableData"
|
||||
:max-height="tableH">
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
:width="110"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
@@ -21,7 +22,7 @@
|
||||
<pagination
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
:total="total"
|
||||
@pagination="getDataList" />
|
||||
<base-dialog
|
||||
:dialogTitle="addOrEditTitle"
|
||||
@@ -61,29 +62,35 @@ import {
|
||||
getWorkOrderList,
|
||||
getTeamList,
|
||||
} from '@/api/base/qualityScrapLog';
|
||||
import tableHeightMixin from '@/mixins/tableHeightMixin';
|
||||
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'createTime',
|
||||
label: '添加时间',
|
||||
filter: parseTime,
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
prop: 'workOrderName',
|
||||
label: '工单',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'teamId',
|
||||
prop: 'teamName',
|
||||
label: '班组',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'detContent',
|
||||
label: '报废原因',
|
||||
showOverflowtooltip: true,
|
||||
},
|
||||
{
|
||||
prop: 'logTime',
|
||||
label: '报废时间',
|
||||
filter: parseTime,
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
@@ -92,7 +99,7 @@ const tableProps = [
|
||||
];
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
mixins: [basicPage, tableHeightMixin],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
@@ -159,6 +166,12 @@ export default {
|
||||
plain: true,
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
total: 0,
|
||||
teamList: [],
|
||||
showDetail: false,
|
||||
};
|
||||
},
|
||||
@@ -181,35 +194,34 @@ export default {
|
||||
// 获取数据列表
|
||||
getDict() {
|
||||
getWorkOrderList().then((res) => {
|
||||
console.log(res);
|
||||
// console.log(response);
|
||||
this.formConfig[0].selectOptions = res.data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
// console.log(this.formConfig[0].selectOptions);
|
||||
// this.listQuery.total = response.data.total;
|
||||
});
|
||||
getTeamList().then((res) => {
|
||||
console.log(res);
|
||||
// console.log(response);
|
||||
this.formConfig[1].selectOptions = res.data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
// console.log(this.formConfig[0].selectOptions);
|
||||
// this.listQuery.total = response.data.total;
|
||||
this.teamList = res.data;
|
||||
});
|
||||
},
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.tableData = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
let arr = response.data.list;
|
||||
arr.forEach((item) => {
|
||||
item.teamName = this.teamList.find((v) => v.id == item.teamId)
|
||||
? this.teamList.find((v) => v.id == item.teamId).name
|
||||
: '';
|
||||
});
|
||||
this.tableData = arr;
|
||||
this.total = response.data.total;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
@@ -217,22 +229,12 @@ export default {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.listQuery.workOrderId = val.workOrderId
|
||||
? val.workOrderId
|
||||
: undefined;
|
||||
this.listQuery.teamId = val.teamId ? val.teamId : undefined;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'reset':
|
||||
this.$refs.searchBarForm.resetForm();
|
||||
this.listQuery = {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
};
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'add':
|
||||
this.addOrEditTitle = '新增';
|
||||
this.addOrUpdateVisible = true;
|
||||
|
||||
Reference in New Issue
Block a user