3 changed files with 575 additions and 16 deletions
-
33src/views/modules/srmDocument/srmSupplierDocumentListDefinition.vue
-
252src/views/modules/srmSupplier/com_srmSupplier_DocumentDefinition.vue
-
306src/views/modules/srmSupplier/supplierList.vue
@ -0,0 +1,252 @@ |
|||||
|
<template> |
||||
|
<div class="customer-css"> |
||||
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
||||
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
||||
|
<el-button type="primary" @click="addModal()">新增</el-button> |
||||
|
</el-form> |
||||
|
</el-form> |
||||
|
<el-table |
||||
|
:data="dataList" |
||||
|
:height=searchData.height |
||||
|
border |
||||
|
v-loading="dataListLoading" |
||||
|
style="width: 100%; "> |
||||
|
<el-table-column |
||||
|
v-for="(item,index) in columnList" :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-column |
||||
|
header-align="center" |
||||
|
align="center" |
||||
|
width="180" |
||||
|
fixed="right" |
||||
|
label="操作"> |
||||
|
<template slot-scope="scope"> |
||||
|
<a type="text" size="small" v-if="scope.row.needRenew=='Y'" @click="renewModew(scope.row)">Renew |</a> |
||||
|
<a type="text" size="small" @click="editModel(scope.row)">Edit |</a> |
||||
|
<a type="text" size="small" @click="deleteData(scope.row)"> Delete</a> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
|
||||
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { |
||||
|
createNewSupplierContract,getNewSupplierContract,deleteSupplierContract |
||||
|
} from '@/api/srm/srmSupplier.js' |
||||
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
||||
|
import {ossUploadNoSaveOSS, previewOssFileById, queryOss} from "../../../api/oss/oss"; |
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
Chooselist |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
dataList: [], |
||||
|
searchData: { |
||||
|
site: '', |
||||
|
username: this.$store.state.user.name, |
||||
|
supplierNo: '', |
||||
|
height:'300', |
||||
|
page: 1, |
||||
|
limit: 1000 |
||||
|
}, |
||||
|
dataListLoading: false, |
||||
|
currentRow:'', |
||||
|
columnList: [ |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 811001, |
||||
|
serialNumber: '811001Table5ContractNo', |
||||
|
tableId: '811001Table5', |
||||
|
tableName: '供应商合同', |
||||
|
columnProp: 'contractNo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '合同编号', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 811001, |
||||
|
serialNumber: '811001Table5ContractName', |
||||
|
tableId: '811001Table5', |
||||
|
tableName: '供应商合同', |
||||
|
columnProp: 'contractName', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '合同名称', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 811001, |
||||
|
serialNumber: '811001Table5ContractDetail', |
||||
|
tableId: '811001Table5', |
||||
|
tableName: '供应商合同', |
||||
|
columnProp: 'contractDetail', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '合同描述', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 240 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 811001, |
||||
|
serialNumber: '811001Table5ContractDate', |
||||
|
tableId: '811001Table5', |
||||
|
tableName: '供应商合同', |
||||
|
columnProp: 'contractDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'left', |
||||
|
columnLabel: '合同日期', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 811001, |
||||
|
serialNumber: '811001Table5CreatedBy', |
||||
|
tableId: '811001Table5', |
||||
|
tableName: '供应商合同', |
||||
|
columnProp: 'createBy', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: 'CreatedBy', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 811001, |
||||
|
serialNumber: '811001Table5CreateDate', |
||||
|
tableId: '811001Table5', |
||||
|
tableName: '供应商合同', |
||||
|
columnProp: 'createDate', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: 'Created Time', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 120 |
||||
|
}, |
||||
|
{ |
||||
|
userId: this.$store.state.user.name, |
||||
|
functionId: 811001, |
||||
|
serialNumber: '811001Table5ValidTo', |
||||
|
tableId: '811001Table5', |
||||
|
tableName: '供应商合同', |
||||
|
columnProp: 'validTo', |
||||
|
headerAlign: 'center', |
||||
|
align: 'center', |
||||
|
columnLabel: 'Valid To', |
||||
|
columnHidden: false, |
||||
|
columnImage: false, |
||||
|
columnSortable: false, |
||||
|
sortLv: 0, |
||||
|
status: true, |
||||
|
fixed: '', |
||||
|
columnWidth: 100 |
||||
|
}, |
||||
|
], |
||||
|
tagNo:'', |
||||
|
tagNo1:'', |
||||
|
uploadLoading:false, |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
// 获取基础数据列表S |
||||
|
getBaseList (val, type) { |
||||
|
this.tagNo = val |
||||
|
this.tagNo1 = type |
||||
|
this.$nextTick(() => { |
||||
|
let strVal = '' |
||||
|
this.$refs.baseList.init(val, strVal) |
||||
|
}) |
||||
|
}, |
||||
|
/* 列表方法的回调 */ |
||||
|
getBaseData (val) { |
||||
|
|
||||
|
}, |
||||
|
//初始化组件的参数 |
||||
|
init(inData) { |
||||
|
//初始化参数 |
||||
|
this.searchData = JSON.parse(JSON.stringify(inData)); |
||||
|
//刷新表格 |
||||
|
this.searchTable(); |
||||
|
|
||||
|
}, |
||||
|
searchTable(){ |
||||
|
getNewSupplierContract(this.searchData).then(({data}) => { |
||||
|
//区分请求成功和失败的状况 |
||||
|
if (data && data.code == 0) { |
||||
|
this.dataList = data.rows |
||||
|
console.log(this.dataList) |
||||
|
} else { |
||||
|
this.dataList = []; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped lang="scss"> |
||||
|
|
||||
|
.rq .auto /deep/ .el-form-item__content{ |
||||
|
height: auto; |
||||
|
line-height: 1.5; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue