|
|
@@ -9,8 +9,9 @@
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
:columns="columns"
|
|
|
- :datasource="datasource"
|
|
|
+ :datasource="workPlanList"
|
|
|
:need-page="false"
|
|
|
+ cache-key="work-plan-detail-index"
|
|
|
>
|
|
|
<!-- <ele-pro-table
|
|
|
ref="table"
|
|
|
@@ -363,15 +364,32 @@
|
|
|
addOpen: false,
|
|
|
visible: false,
|
|
|
dataWork: {},
|
|
|
- sourceList: []
|
|
|
+ sourceList: [],
|
|
|
+ workPlanList: []
|
|
|
};
|
|
|
},
|
|
|
+
|
|
|
+ watch: {
|
|
|
+ taskId: {
|
|
|
+ handler(obj) {
|
|
|
+ if (obj) {
|
|
|
+ this.getPlanList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
created() {
|
|
|
this.requestDict('质检计划类型');
|
|
|
this.requestDict('不良品处理类型');
|
|
|
this.requestDict('取样类型');
|
|
|
this.getTnspectionPlanType();
|
|
|
this.getQualityMethodCode();
|
|
|
+
|
|
|
+ // this.getPlanList();
|
|
|
+ // this.search();
|
|
|
},
|
|
|
computed: {
|
|
|
seekList() {
|
|
|
@@ -431,30 +449,26 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // datasource({ page, where, limit }) {
|
|
|
- // // return getList({
|
|
|
- // // ...where,
|
|
|
- // // pageNum: page,
|
|
|
- // // size: limit
|
|
|
- // // });
|
|
|
- // return getList({
|
|
|
- // // ...where,
|
|
|
- // produceSourceTaskId: this.dataWork.taskId,
|
|
|
- // sourceCode: this.dataWork.data.code,
|
|
|
+ // async datasource({ page, limit }) {
|
|
|
+ // const res = await getList({
|
|
|
+ // produceSourceTaskId: this.taskId,
|
|
|
+ // sourceCode: this.code,
|
|
|
// pageNum: page,
|
|
|
// size: limit
|
|
|
// });
|
|
|
+
|
|
|
+ // return res;
|
|
|
// },
|
|
|
|
|
|
- async datasource({ page, limit }) {
|
|
|
+ async getPlanList() {
|
|
|
const res = await getList({
|
|
|
produceSourceTaskId: this.taskId,
|
|
|
sourceCode: this.code,
|
|
|
- pageNum: page,
|
|
|
- size: limit
|
|
|
+ pageNum: 1,
|
|
|
+ size: -1
|
|
|
});
|
|
|
|
|
|
- return res;
|
|
|
+ this.workPlanList = res.list;
|
|
|
},
|
|
|
|
|
|
openEdits(type, row) {
|
|
|
@@ -462,38 +476,13 @@
|
|
|
this.$refs.detailsRef.open(row);
|
|
|
},
|
|
|
|
|
|
- // async getSourceList({ page, limit }) {
|
|
|
- // const res = await getList({
|
|
|
- // produceSourceTaskId: this.dataWork.taskId,
|
|
|
- // sourceCode: this.dataWork.data.code,
|
|
|
- // pageNum: page,
|
|
|
- // size: limit
|
|
|
- // });
|
|
|
-
|
|
|
- // console.log(res);
|
|
|
- // this.sourceList = res?.list ? res?.list : [];
|
|
|
- // },
|
|
|
-
|
|
|
search(where) {
|
|
|
+ this.getPlanList();
|
|
|
// this.$refs.table.reload({
|
|
|
- // where: where,
|
|
|
+ // limit: 20,
|
|
|
// page: 1
|
|
|
// });
|
|
|
- this.$refs.table.reload({
|
|
|
- limit: 20,
|
|
|
- page: 1
|
|
|
- });
|
|
|
},
|
|
|
- // open(req) {
|
|
|
- // this.visible = true;
|
|
|
- // this.dataWork = req;
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.datasource({
|
|
|
- // limit: 20,
|
|
|
- // page: 1
|
|
|
- // });
|
|
|
- // });
|
|
|
- // },
|
|
|
|
|
|
openEdit(type, row) {
|
|
|
const req = {
|
|
|
@@ -503,35 +492,6 @@
|
|
|
};
|
|
|
|
|
|
this.$refs.editRef.open(req);
|
|
|
- // const menusList = this.$store.state.user.menus;
|
|
|
- // let found = false;
|
|
|
- // for (const item of menusList) {
|
|
|
- // if (item.children) {
|
|
|
- // for (const item2 of item.children) {
|
|
|
- // if (item2.path === '/inspectionWork/edit') {
|
|
|
- // found = true;
|
|
|
- // const id = type !== 'add' ? row.id : '';
|
|
|
- // const qualityType = type !== 'add' ? row.qualityType : null;
|
|
|
- // const qualityTimeStart = row.qualityTimeStart || '';
|
|
|
-
|
|
|
- // this.$router.push({
|
|
|
- // path: '/inspectionWork/edit',
|
|
|
- // query: {
|
|
|
- // type,
|
|
|
- // id,
|
|
|
- // qualityType,
|
|
|
- // qualityTimeStart
|
|
|
- // }
|
|
|
- // });
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // if (!found) {
|
|
|
- // this.$message.error('请到角色管理配置菜单权限!');
|
|
|
- // }
|
|
|
},
|
|
|
downloadFile(file) {
|
|
|
getFile({ objectName: file.storePath }, file.name);
|
|
|
@@ -545,7 +505,7 @@
|
|
|
.catch((e) => {});
|
|
|
},
|
|
|
done() {
|
|
|
- console.log(22222);
|
|
|
+ this.search();
|
|
|
// this.$refs.search.search();
|
|
|
// this.getSourceList({
|
|
|
// page: 1,
|