企业管理--企业管理接口对接
This commit is contained in:
@@ -23,10 +23,12 @@
|
||||
<!-- 操作按钮区域-->
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
<a-button type="primary" icon="export">导出</a-button>
|
||||
<a-button type="primary" icon="download">下载模板</a-button>
|
||||
<a-button type="danger" icon="delete">批量删除</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('企业管理')">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="downTemplate('企业管理导入模板')">下载模板</a-button>
|
||||
<a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>
|
||||
</div>
|
||||
<!-- 操作按钮区域-end-->
|
||||
|
||||
@@ -38,7 +40,7 @@
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:scroll="{x: 1000}"
|
||||
:scroll="{x: 1100}"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@@ -50,13 +52,20 @@
|
||||
</template>
|
||||
<template slot="imgSlot" slot-scope="text">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
||||
<img v-else :src="getImgView(text)" height="25px" alt=""
|
||||
style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
||||
<img
|
||||
v-else
|
||||
:src="getImgView(text)"
|
||||
height="25px"
|
||||
alt=""
|
||||
style="max-width:80px;font-size: 12px;font-style: italic;"/>
|
||||
</template>
|
||||
<template slot="fileSlot" slot-scope="text,record">
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
||||
:value="text" :length="20"/>
|
||||
<j-ellipsis
|
||||
@click.native="uploadFile(record.chargeNoticeFileId)"
|
||||
style="color:#219AFF;cursor: pointer"
|
||||
:value="text"
|
||||
:length="20"/>
|
||||
</template>
|
||||
|
||||
<template slot="text" slot-scope="text,record">
|
||||
@@ -69,7 +78,7 @@
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
<business-management-module ref="modalForm"></business-management-module>
|
||||
<business-management-module ref="modalForm" @ok="modalFormOk"></business-management-module>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -82,6 +91,11 @@ export default {
|
||||
name: 'BusinessManagement',
|
||||
components: { JEllipsis, BusinessManagementModule },
|
||||
mixins: [JeroListMixin],
|
||||
computed: {
|
||||
importExcelUrl: function(){
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
labelCol: {
|
||||
@@ -105,13 +119,13 @@ export default {
|
||||
}, {
|
||||
title: '企业名称',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
width: 300,
|
||||
dataIndex: 'companyName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '公司地址',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
width: 350,
|
||||
dataIndex: 'companyAddress',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
@@ -121,6 +135,7 @@ export default {
|
||||
}, {
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'createTime'
|
||||
}, {
|
||||
title: '银行户名',
|
||||
@@ -138,12 +153,12 @@ export default {
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '',
|
||||
delete: '',
|
||||
deleteBatch: '',
|
||||
exportXlsUrl: '',
|
||||
importExcelUrl: '',
|
||||
exportTemplateUrl: ''
|
||||
list: '/company/payCompanyManagement/list',
|
||||
delete: '/company/payCompanyManagement/delete',
|
||||
deleteBatch: '/company/payCompanyManagement/deleteBatch',
|
||||
exportXlsUrl: '/company/payCompanyManagement/exportXls',
|
||||
importExcelUrl: '/company/payCompanyManagement/importExcel',
|
||||
downTemplateUrl: '/company/payCompanyManagement/downloadExcelModel'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,15 +137,15 @@ export default {
|
||||
validateTrigger: 'blur'
|
||||
},
|
||||
companyPhone: {
|
||||
rules: [{ validator: this.checkCompanyPhone }]
|
||||
rules: [{ required: false, validator: this.checkCompanyPhone }]
|
||||
},
|
||||
postalCode: {
|
||||
rules: [{ validator: this.checkPostcode }]
|
||||
rules: [{ required: false, validator: this.checkPostcode }]
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: '',
|
||||
edit: ''
|
||||
add: '/company/payCompanyManagement/add',
|
||||
edit: '/company/payCompanyManagement/edit'
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -171,13 +171,11 @@ export default {
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
let httpurl = ''
|
||||
let method = ''
|
||||
let method = 'post'
|
||||
if (!this.model.id) {
|
||||
httpurl += this.url.add
|
||||
method = 'post'
|
||||
} else {
|
||||
httpurl += this.url.edit
|
||||
method = 'put'
|
||||
}
|
||||
const formData = Object.assign(this.model, values)
|
||||
console.log('表单提交数据', formData)
|
||||
@@ -205,11 +203,15 @@ export default {
|
||||
* @param callback
|
||||
*/
|
||||
checkCompanyPhone(rules, value, callback) {
|
||||
if (phoneReg(value) || isPhone(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请填写正确的电话号码')
|
||||
if (value) {
|
||||
if (phoneReg(value) || isPhone(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请填写正确的电话号码')
|
||||
}
|
||||
return
|
||||
}
|
||||
callback()
|
||||
},
|
||||
/**
|
||||
* 邮编校验
|
||||
@@ -218,11 +220,15 @@ export default {
|
||||
* @param callback
|
||||
*/
|
||||
checkPostcode(rules, value, callback) {
|
||||
if (postcode(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请输入正确格式的邮编')
|
||||
if (value) {
|
||||
if (postcode(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请输入正确格式的邮编')
|
||||
}
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user