4 changed files with 685 additions and 11 deletions
-
5src/api/srm/srmSupplier.js
-
11src/views/modules/srm/actionList.vue
-
255src/views/modules/srmAction/actionList.vue
-
425src/views/modules/srmSupplier/supplierList.vue
@ -0,0 +1,5 @@ |
|||
import { createAPI } from '@/utils/httpRequest.js' |
|||
|
|||
// 获取派工单的最新信息
|
|||
export const searchSrmSupplierList = data => createAPI('/srmSupplier/searchSrmSupplierList', 'POST', data) |
|||
export const searchSupplierGroupRequestList = data => createAPI('/srmSupplier/searchSupplierGroupRequestList', 'POST', data) |
|||
@ -1,11 +0,0 @@ |
|||
<script setup> |
|||
|
|||
</script> |
|||
|
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
|||
@ -0,0 +1,255 @@ |
|||
<template> |
|||
<div class="customer-css" > |
|||
<!-- 查询时间和产品 --> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;" > |
|||
<el-row> |
|||
<el-form-item :label="'报表名称:'"> |
|||
<el-input v-model="pageData.reportName" style="width: 120px"></el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item :label="''" style="margin-left: 50px; margin-top: 20px;"> |
|||
<el-button class="customer-bun-min" type="primary" @click="refreshPageTables" style="margin-left: 10px; margin-bottom: 5px;">查询</el-button> |
|||
<el-button class="customer-bun-min" type="primary" @click="addReportModal" style="margin-left: 10px; margin-bottom: 5px;">新增</el-button> |
|||
</el-form-item> |
|||
</el-row> |
|||
</el-form> |
|||
<!-- 工单主表信息 --> |
|||
<el-main style="margin-top: 5px; padding: 0px; width: 100%;"> |
|||
<el-table |
|||
:height="height" |
|||
:data="reportList" |
|||
border |
|||
ref="reportTable" |
|||
highlight-current-row |
|||
@row-click="setCurrentReportRow" |
|||
v-loading="dataListLoading" |
|||
style="margin-top: 0px; width: 100%;"> |
|||
<el-table-column |
|||
fixed="left" |
|||
header-align="center" |
|||
align="center" |
|||
width="220" |
|||
:label="'操作'"> |
|||
<template slot-scope="scope"> |
|||
<a class="customer-a" @click="editCustomerReportModal(scope.row)">编辑</a> |
|||
<a class="customer-a" @click="warnDeleteCustomerReportConfirm(scope.row)">删除</a> |
|||
<a class="customer-a" @click="editCustomerReportSearchColumnModal(scope.row)">查询参数维护</a> |
|||
<a class="customer-a" @click="showCustomerReportSearchColumnModal(scope.row)">查询</a> |
|||
<a class="customer-a" @click="showAuthCustomerReportModal(scope.row)">权限</a> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
v-for="(item,index) in columnReportArray" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-main> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
/*组件*/ |
|||
|
|||
import { |
|||
getCurrentPageTables, |
|||
deleteCustomerReport, |
|||
} from '@/api/report/report_manage.js' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
functionId: this.$route.meta.menuId, |
|||
height: 200, |
|||
currentReportRow: {}, |
|||
pageData: { |
|||
site: this.$store.state.user.site, |
|||
username: this.$store.state.user.name, |
|||
reportName: '', |
|||
reportType: '', |
|||
seqNo: 0, |
|||
status: 1, |
|||
}, |
|||
reportList: [], |
|||
dataListLoading: false, |
|||
columnReportArray: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '5306ReportReportId', |
|||
tableId: "5306Report", |
|||
tableName: "自定义报表", |
|||
columnProp: "reportId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "报表ID", |
|||
columnWidth: '', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '5306ReportReportName', |
|||
tableId: "5306Report", |
|||
tableName: "自定义报表", |
|||
columnProp: "reportName", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "报表名称", |
|||
columnWidth: '', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
|
|||
], |
|||
} |
|||
}, |
|||
/*组件*/ |
|||
components: { |
|||
|
|||
|
|||
}, |
|||
|
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 165; |
|||
}) |
|||
}, |
|||
methods: { |
|||
|
|||
|
|||
|
|||
|
|||
warnDeleteCustomerReportConfirm(currentCustomerReport) { |
|||
this.$confirm('确实要删除报表'+currentCustomerReport.reportName+'吗?', '提示', { |
|||
confirmButtonText: '确认', |
|||
celButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
//执行删除定制报表的功能 |
|||
this.deleteCustomerReportOperation(currentCustomerReport); |
|||
}); |
|||
}, |
|||
|
|||
/*执行删除定制报表的功能*/ |
|||
deleteCustomerReportOperation(currentCustomerReport) { |
|||
//执行删除卷的操作 |
|||
deleteCustomerReport(currentCustomerReport).then(({data}) => { |
|||
//判断是否成功 |
|||
if (data.code === 200) { |
|||
this.$message.success(data.msg); |
|||
//刷新报工的页面 |
|||
this.refreshPageTables(); |
|||
} else { |
|||
this.$message.error(data.msg); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
}, |
|||
created() { |
|||
//查询报表的类型 |
|||
this.refreshReportType(); |
|||
}, |
|||
|
|||
|
|||
} |
|||
</script> |
|||
|
|||
<!--当前页面的标签样式--> |
|||
<style scoped lang="scss"> |
|||
|
|||
/*针对el-card*/ |
|||
.customer-card .el-form-item__content{ |
|||
margin-top: -15px; |
|||
} |
|||
.customer-card .el-form-item{ |
|||
height: 22px; |
|||
} |
|||
|
|||
.customer-border .el-form-item__content{ |
|||
margin-top: -30px; |
|||
} |
|||
|
|||
/*全局年与日类型 宽度*/ |
|||
div.el-time-width{ |
|||
width: 110px !important; |
|||
} |
|||
/* 全局时间右边框*/ |
|||
.customer-css input.el-input__inner{ |
|||
height: 22px !important; |
|||
padding-right: 0px !important; |
|||
} |
|||
/* 控制el-card标签的数据*/ |
|||
div.customer-el-card { |
|||
margin-left: 110px; |
|||
margin-top: -15px; |
|||
height: 20px; |
|||
width: 60px; |
|||
} |
|||
/* 颜色控制 */ |
|||
div.customer-el-card-pink { |
|||
background: #FF00FF; |
|||
} |
|||
|
|||
div.customer-el-card-orange { |
|||
background: #FFD700; |
|||
} |
|||
|
|||
div.customer-el-card-blue { |
|||
background: #0000CD; |
|||
} |
|||
|
|||
/*清掉样式*/ |
|||
.el-radio+.el-radio { |
|||
margin-left: 0px; |
|||
} |
|||
|
|||
|
|||
/*当前按钮的通用样式*/ |
|||
.customer-css .customer-bun-mid{ |
|||
width: 60px; |
|||
text-align: center; |
|||
} |
|||
|
|||
.customer-css .customer-bun-min{ |
|||
width: 50px; |
|||
text-align: center; |
|||
} |
|||
|
|||
.customer-css .customer-bun-max{ |
|||
width: 80px; |
|||
text-align: center; |
|||
} |
|||
/*当前按钮的通用样式*/ |
|||
.customer-css .el-button--medium { |
|||
padding: 5px 5px; |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,425 @@ |
|||
<template> |
|||
<div class="customer-css" > |
|||
<!-- 查询时间和产品 --> |
|||
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;" > |
|||
<el-row> |
|||
<el-col :span="24" style=""> |
|||
<el-form-item :label="'Supplier No:'"> |
|||
<el-input v-model="searchData.supplierNo" style=""></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="'Supplier Name:'"> |
|||
<el-input v-model="searchData.supplierName" style=""></el-input> |
|||
</el-form-item> |
|||
<el-form-item :label="' '" > |
|||
<el-button class="customer-bun-min" type="primary" @click="getMainData" style="">Query</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
|
|||
<el-table |
|||
:height="height" |
|||
:data="mainDataList" |
|||
border |
|||
ref="mainTable" |
|||
highlight-current-row |
|||
@row-click="changeData" |
|||
v-loading="dataListLoading" |
|||
style="margin-top: 0px; width: 100%;"> |
|||
<!-- <el-table-column--> |
|||
<!-- fixed="left"--> |
|||
<!-- header-align="center"--> |
|||
<!-- align="center"--> |
|||
<!-- width="220"--> |
|||
<!-- :label="'操作'">--> |
|||
<!-- <template slot-scope="scope">--> |
|||
<!-- </template>--> |
|||
<!-- </el-table-column>--> |
|||
<el-table-column |
|||
v-for="(item,index) in columnArray1" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!-- 分页插件 --> |
|||
<el-pagination style="margin-top: 0px" |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="pageIndex" |
|||
:page-sizes="[20, 50, 100, 200, 500]" |
|||
:page-size="pageSize" |
|||
:total="totalPage" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
|
|||
<el-tabs v-model="activeName" style="margin-top: 0px; width: 99%;" @tab-click="tabClick" class="customer-tab" type="border-card"> |
|||
<el-tab-pane label="Share" name="share" style=""> |
|||
</el-tab-pane> |
|||
<el-tab-pane label="Group Change Hist" name="groupChangeList" style=""> |
|||
<el-table |
|||
:height="height" |
|||
:data="supplierGroupRequestList" |
|||
border |
|||
ref="table3" |
|||
highlight-current-row |
|||
v-loading="dataListLoading" |
|||
style="margin-top: 0px; width: 100%;"> |
|||
<!-- <el-table-column--> |
|||
<!-- fixed="left"--> |
|||
<!-- header-align="center"--> |
|||
<!-- align="center"--> |
|||
<!-- width="220"--> |
|||
<!-- :label="'操作'">--> |
|||
<!-- <template slot-scope="scope">--> |
|||
<!-- </template>--> |
|||
<!-- </el-table-column>--> |
|||
<el-table-column |
|||
v-for="(item,index) in columnArray3" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|||
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|||
style="width: 100px; height: 80px"/></span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-tab-pane> |
|||
</el-tabs> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
/*组件*/ |
|||
|
|||
import { |
|||
searchSupplierGroupRequestList,searchSrmSupplierList, |
|||
} from '@/api/srm/srmSupplier.js' |
|||
|
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
functionId: this.$route.meta.menuId, |
|||
height: 200, |
|||
currentRow: {}, |
|||
searchData:{ |
|||
supplierNo:'', |
|||
supplierName:'', |
|||
site:this.$store.state.user.site, |
|||
page: 1, |
|||
limit: 10, |
|||
}, |
|||
pageIndex: 1, |
|||
pageSize: 50, |
|||
totalPage: 0, |
|||
mainDataList:[], |
|||
supplierGroupRequestList:[], |
|||
dataListLoading: false, |
|||
activeName: 'groupChangeList', |
|||
columnArray1: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table1SupplierNo', |
|||
tableId: "811001Table1", |
|||
tableName: "供应商信息", |
|||
columnProp: "supplierNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Supplier No", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table1SupplierName', |
|||
tableId: "811001Table1", |
|||
tableName: "供应商信息", |
|||
columnProp: "supplierName", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Supplier Name", |
|||
columnWidth: '300', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table1SupplierGroup', |
|||
tableId: "811001Table1", |
|||
tableName: "供应商信息", |
|||
columnProp: "supplierGroup", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Supplier Group", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
], |
|||
columnArray3: [ |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table3RequestNo', |
|||
tableId: "811001Table3", |
|||
tableName: "供应商等级变更记录", |
|||
columnProp: "requestNo", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Request No", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table3RequestDate', |
|||
tableId: "811001Table3", |
|||
tableName: "供应商等级变更记录", |
|||
columnProp: "requestData", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Request Date", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table3OldSupplierGroup', |
|||
tableId: "811001Table3", |
|||
tableName: "供应商等级变更记录", |
|||
columnProp: "oldSupplierGroup", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Old Supplier Group", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table3NewSupplierGroup', |
|||
tableId: "811001Table3", |
|||
tableName: "供应商等级变更记录", |
|||
columnProp: "newSupplierGroup", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "New Supplier Group", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table3Reason', |
|||
tableId: "811001Table3", |
|||
tableName: "供应商等级变更记录", |
|||
columnProp: "reason", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Reason", |
|||
columnWidth: '200', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table3Status', |
|||
tableId: "811001Table3", |
|||
tableName: "供应商等级变更记录", |
|||
columnProp: "status", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Status", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
{ |
|||
userId: this.$store.state.user.name, |
|||
functionId: this.functionId, |
|||
serialNumber: '811001Table3RequestBy', |
|||
tableId: "811001Table3", |
|||
tableName: "供应商等级变更记录", |
|||
columnProp: "requestBy", |
|||
headerAlign: "center", |
|||
align: "left", |
|||
columnLabel: "Request By", |
|||
columnWidth: '100', |
|||
columnHidden: false, |
|||
columnImage: false, |
|||
columnSortable: false, |
|||
sortLv: 0, |
|||
status: true, |
|||
fixed: false |
|||
}, |
|||
], |
|||
} |
|||
}, |
|||
/*组件*/ |
|||
components: { |
|||
|
|||
|
|||
}, |
|||
|
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
this.height = ( window.innerHeight - 220)/2; |
|||
}) |
|||
}, |
|||
methods: { |
|||
|
|||
getMainData(){ |
|||
this.searchData.limit = this.pageSize |
|||
this.searchData.page = this.pageIndex |
|||
searchSrmSupplierList(this.searchData).then(({data}) => { |
|||
if (data.code === 0) { |
|||
this.mainDataList = data.page.list |
|||
this.pageIndex = data.page.currPage |
|||
this.pageSize = data.page.pageSize |
|||
this.totalPage = data.page.totalCount |
|||
//判断是否全部存在数据 |
|||
if (this.totalPage > 0) { |
|||
//设置选中行 |
|||
this.$refs.mainTable.setCurrentRow(this.mainDataList[0]) |
|||
this.changeData(this.mainDataList[0]) |
|||
|
|||
}else { |
|||
this.changeData(null) |
|||
} |
|||
} |
|||
this.dataListLoading = false |
|||
}) |
|||
}, |
|||
tabClick(tab, event){ |
|||
this.refreshCurrentTabTable() |
|||
}, |
|||
// 每页数 |
|||
sizeChangeHandle (val) { |
|||
this.pageSize = val |
|||
this.pageIndex = 1 |
|||
this.getMainData() |
|||
}, |
|||
|
|||
// 当前页 |
|||
currentChangeHandle (val) { |
|||
this.pageIndex = val |
|||
this.getMainData() |
|||
}, |
|||
changeData(row){ |
|||
this.currentRow=JSON.parse(JSON.stringify(row)) |
|||
this.refreshCurrentTabTable (); |
|||
}, |
|||
refreshCurrentTabTable(){ |
|||
if(this.currentRow===''||this.currentRow===null){ |
|||
this.currentRow={site:'',supplierNo:''} |
|||
} |
|||
if(this.activeName==='share'){ |
|||
|
|||
} |
|||
if(this.activeName==='groupChangeList') { |
|||
console.log(this.activeName) |
|||
let inData={ |
|||
site:this.currentRow.site, |
|||
supplierNo:this.currentRow.supplierNo, |
|||
} |
|||
searchSupplierGroupRequestList(inData).then(({data}) => { |
|||
//区分请求成功和失败的状况 |
|||
if (data && data.code == 0) { |
|||
this.supplierGroupRequestList = data.rows |
|||
|
|||
} else { |
|||
this.supplierGroupRequestList = []; |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
|
|||
}, |
|||
created() { |
|||
//查询报表的类型 |
|||
this.getMainData(); |
|||
}, |
|||
|
|||
|
|||
} |
|||
</script> |
|||
|
|||
<!--当前页面的标签样式--> |
|||
<style scoped lang="scss"> |
|||
|
|||
/deep/ .customer-tab .el-tabs__content { |
|||
padding: 5px !important; |
|||
} |
|||
|
|||
|
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue