|
|
|
@ -1,5 +1,10 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config yzz"> |
|
|
|
<div> |
|
|
|
<span @click="favoriteFunction()"> |
|
|
|
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|
|
|
<el-form-item :label="'申请单号'"> |
|
|
|
@ -299,6 +304,12 @@ |
|
|
|
}from "@/api/orderIssure/soIssueNotify.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import {getEamWorkShop} from "@/api/factory/site.js"; |
|
|
|
import { |
|
|
|
getTableDefaultListLanguage, |
|
|
|
getTableUserListLanguage, |
|
|
|
} from "@/api/table.js" |
|
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Chooselist |
|
|
|
@ -456,40 +467,6 @@ |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120 |
|
|
|
// },{ |
|
|
|
// userId: this.$store.state.user.name, |
|
|
|
// functionId: 701002, |
|
|
|
// serialNumber: '701002Table1PlanIssueDate', |
|
|
|
// tableId: "701002Table1", |
|
|
|
// tableName: "领料申请主表", |
|
|
|
// columnProp: "planIssueDate", |
|
|
|
// headerAlign: "center", |
|
|
|
// align: "left", |
|
|
|
// columnLabel: "计划领料日期", |
|
|
|
// columnHidden: false, |
|
|
|
// columnImage: false, |
|
|
|
// columnSortable: false, |
|
|
|
// sortLv: 0, |
|
|
|
// status: true, |
|
|
|
// fixed: '', |
|
|
|
// columnWidth: 100 |
|
|
|
// },{ |
|
|
|
// userId: this.$store.state.user.name, |
|
|
|
// functionId: 701002, |
|
|
|
// serialNumber: '701002Table1RealIssueDate', |
|
|
|
// tableId: "701002Table1", |
|
|
|
// tableName: "领料申请主表", |
|
|
|
// columnProp: "realIssueDate", |
|
|
|
// headerAlign: "center", |
|
|
|
// align: "left", |
|
|
|
// columnLabel: "实际领料日期", |
|
|
|
// columnHidden: false, |
|
|
|
// columnImage: false, |
|
|
|
// columnSortable: false, |
|
|
|
// sortLv: 0, |
|
|
|
// status: true, |
|
|
|
// fixed: '', |
|
|
|
// columnWidth: 100 |
|
|
|
},{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701002, |
|
|
|
@ -1181,6 +1158,7 @@ |
|
|
|
columnWidth: 120 |
|
|
|
}, |
|
|
|
], |
|
|
|
favorite: false, |
|
|
|
dataRole: { |
|
|
|
partTypeDesc: [ |
|
|
|
{ |
|
|
|
@ -1224,7 +1202,93 @@ |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
created () { |
|
|
|
// 按钮控制 |
|
|
|
// this.getButtonAuthData() |
|
|
|
// 获取用户的 site 和 bu |
|
|
|
// this.getSiteAndBuByUserName() |
|
|
|
// 校验用户是否收藏 |
|
|
|
this.favoriteIsOk() |
|
|
|
|
|
|
|
// 动态列 |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table2',2) |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table3',3) |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table4',4) |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table5',5) |
|
|
|
// if (!this.authSearch) { |
|
|
|
// // 获取数据列表 |
|
|
|
// this.getDataList() |
|
|
|
// } |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 动态列开始 获取 用户保存的 格式列 |
|
|
|
async getTableUserColumn(tableId, columnId) { |
|
|
|
let queryTableUser = { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
status: true, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableUserListLanguage(queryTableUser).then(({data}) => { |
|
|
|
if (data.rows.length > 0) { |
|
|
|
//this.columnList1 = [] |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.columnList1 = data.rows |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
this.columnList2 = data.rows |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
this.columnList3 = data.rows |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
this.columnList4 = data.rows |
|
|
|
break; |
|
|
|
case 5: |
|
|
|
this.columnList5 = data.rows |
|
|
|
break; |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.getColumnList(tableId, columnId) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取 tableDefault 列 |
|
|
|
async getColumnList (tableId, columnId) { |
|
|
|
let queryTable= { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableDefaultListLanguage(queryTable).then(({data}) => { |
|
|
|
if (!data.rows.length == 0) { |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.columnList1 = data.rows |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
this.columnList2 = data.rows |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
this.columnList3 = data.rows |
|
|
|
break; |
|
|
|
case 4: |
|
|
|
this.columnList4 = data.rows |
|
|
|
break; |
|
|
|
case 5: |
|
|
|
this.columnList5 = data.rows |
|
|
|
break; |
|
|
|
} |
|
|
|
} else { |
|
|
|
// this.showDefault = true. |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList (val, type) { |
|
|
|
this.tagNo = val |
|
|
|
@ -1477,7 +1541,42 @@ |
|
|
|
|
|
|
|
return '' |
|
|
|
}, |
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk () { |
|
|
|
let userFavorite = { |
|
|
|
userId: this.$store.state.user.id, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
userFavoriteList(userFavorite).then(({data}) => { |
|
|
|
for (let i = 0; i < data.list.length; i++) { |
|
|
|
if (this.$route.meta.menuId === data.list[i].menuId) { |
|
|
|
this.favorite = true |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 收藏 OR 取消收藏 |
|
|
|
favoriteFunction () { |
|
|
|
let userFavorite = { |
|
|
|
userId: this.$store.state.user.id, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
} |
|
|
|
if (this.favorite) { |
|
|
|
removeUserFavorite(userFavorite).then(({data}) => { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.favorite = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
// 收藏 |
|
|
|
saveUserFavorite(userFavorite).then(({data}) => { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.favorite = true |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
|