ruanqi 1 year ago
parent
commit
b0375ae521
  1. 5
      src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue
  2. 167
      src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

5
src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue

@ -1,5 +1,10 @@
<template>
<div class="mod-config yzzInput yzz">
<div>
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
</div>
<el-form :inline="true" label-position="top" style="margin-top: -0px">
<el-row :gutter="20">
<el-col :span="20">

167
src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue

@ -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>

Loading…
Cancel
Save