[add] 金额校验修改,分标委在研项目接口对接
This commit is contained in:
@@ -168,7 +168,7 @@ export default {
|
||||
if (money(value)) {
|
||||
callback()
|
||||
}
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
if (rules.field.indexOf('accountsReceivableAmount') > -1) {
|
||||
callback('请输入金额')
|
||||
|
||||
@@ -79,7 +79,7 @@ export function number(s) {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function money(s) {
|
||||
return /^[0-9](\d{1,9})?(\.\d{1,2})$|^0\.([1-9](\d{0,1})|\d[1-9])$|^[1-9]\d{0,9}$|^0$/.test(s)
|
||||
return /^[-]?[0-9](\d{1,9})?(\.\d{1,2})$|^[-]?0\.([1-9](\d{0,1})|\d[1-9])$|^[-]?[1-9]\d{0,9}$|^0$/.test(s)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -109,14 +109,17 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleAudit(record.id)" v-has="'expenditureContract:aduit'" v-if="record.status === 2">审核</a>
|
||||
<!-- <a @click="handleAudit(record.id)" v-has="'expenditureContract:aduit'" v-if="record.status === 2">审核</a>-->
|
||||
<!-- 待存档、已存档-->
|
||||
<a @click="handleEdit(record.id, record.contractNum)"
|
||||
v-has="'expenditureContract:edit'"
|
||||
v-if="record.status === 1 || record.status === 4">编辑</a>
|
||||
v-if="record.status === 3 || record.status === 5">编辑</a>
|
||||
<!-- 待存档-->
|
||||
<a @click="handleArchive(record.id)" v-has="'expenditureContract:archive'" v-if="record.status === 3">存档</a>
|
||||
<!-- 已报废-->
|
||||
<a @click="handleDelete(record.id)"
|
||||
v-has="'expenditureContract:delete'"
|
||||
v-if="record.status === 1 || record.status === 2 || record.status === 4">删除</a>
|
||||
v-if="record.status === 6">删除</a>
|
||||
<a :disabled="true" v-if="record.status === 5">已存档</a>
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -312,6 +315,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
/deep/ .aduit {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
+1
-1
@@ -670,7 +670,7 @@ export default {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
switch (rules.field) {
|
||||
case 'contractAmount':
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleAudit(record.id)" v-if="record.status === 2" v-has="'revenueContract:aduit'">审核</a>
|
||||
<!-- <a @click="handleAudit(record.id)" v-if="record.status === 2" v-has="'revenueContract:aduit'">审核</a>-->
|
||||
<!-- 草稿、待存档、已存档-->
|
||||
<a @click="handleEdit(record.id, record.contractNum)"
|
||||
v-if="record.status === 1 || record.status === 3 || record.status === 5" v-has="'revenueContract:edit'">编辑</a>
|
||||
|
||||
@@ -783,7 +783,7 @@ export default {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
switch (rules.field) {
|
||||
case 'contractAmount':
|
||||
|
||||
@@ -324,11 +324,11 @@ export default {
|
||||
* @param record
|
||||
*/
|
||||
toUnderStudyProject(record) {
|
||||
console.log('在研项目', record)
|
||||
this.$router.push({
|
||||
path: '/projectManagement/CommitteeMaintenance/UnderStudyProject',
|
||||
query: {
|
||||
title: record.name
|
||||
title: record.name,
|
||||
abbreviation: record.abbreviation
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -831,7 +831,7 @@ export default {
|
||||
}
|
||||
callback()
|
||||
} else {
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
},
|
||||
/*
|
||||
@@ -844,7 +844,7 @@ export default {
|
||||
if (value && money(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ export default {
|
||||
if(value && money(value)){
|
||||
callback()
|
||||
}else {
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
},
|
||||
/*
|
||||
|
||||
@@ -208,7 +208,7 @@ export default {
|
||||
if (value && money(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
}else {
|
||||
callback()
|
||||
|
||||
@@ -335,7 +335,7 @@ export default {
|
||||
if (value && money(value)) {
|
||||
callback()
|
||||
} else {
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
},
|
||||
edit(record) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<a-row>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="项目名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入项目名称" v-model="queryParam.companyName" :maxLength='50'></a-input>
|
||||
<a-input placeholder="请输入项目名称" v-model="queryParam.projectName" :maxLength='50'></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
@@ -28,13 +28,12 @@
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:rowKey="(record, index) => index"
|
||||
:columns="columns"
|
||||
:scroll="{x: 1600}"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
@@ -60,16 +59,21 @@
|
||||
</a-table>
|
||||
</div>
|
||||
</a-card>
|
||||
|
||||
<!-- 文件弹窗-->
|
||||
<committee-under-study-files-modal ref="filesModal"></committee-under-study-files-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeaderTitle from '../../components/layouts/PageHeaderTitle'
|
||||
import { JeroListMixin } from '../../mixins/JeroListMixin'
|
||||
import { getAction } from '../../api/manage'
|
||||
import CommitteeUnderStudyFilesModal from './modules/CommitteeUnderStudyFilesModal'
|
||||
|
||||
export default {
|
||||
name: 'CommitteeUnderStudyProject',
|
||||
components: { PageHeaderTitle },
|
||||
components: { PageHeaderTitle, CommitteeUnderStudyFilesModal },
|
||||
mixins: [JeroListMixin],
|
||||
data() {
|
||||
return {
|
||||
@@ -94,72 +98,111 @@ export default {
|
||||
}, {
|
||||
title: '项目名称',
|
||||
align: 'center',
|
||||
dataIndex: 'companyName',
|
||||
dataIndex: 'projectName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '计划号',
|
||||
align: 'center',
|
||||
dataIndex: 'dutyCode',
|
||||
dataIndex: 'planNo',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '起草单位',
|
||||
align: 'center',
|
||||
dataIndex: 'companyAddress',
|
||||
dataIndex: 'draftCompany',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '项目进度',
|
||||
align: 'center',
|
||||
dataIndex: 'companyPhone',
|
||||
dataIndex: 'projectSchedule',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '立项文件',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
fixed: 'right',
|
||||
dataIndex: 'status_dictText',
|
||||
dataIndex: 'FILE_LIST10',
|
||||
scopedSlots: { customRender: 'project-approval' }
|
||||
}, {
|
||||
title: '征求意见',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
fixed: 'right',
|
||||
dataIndex: 'createTime',
|
||||
dataIndex: 'FILE_LIST20',
|
||||
scopedSlots: { customRender: 'advice' }
|
||||
}, {
|
||||
title: '送审材料',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
fixed: 'right',
|
||||
dataIndex: 'bankAccountName',
|
||||
dataIndex: 'FILE_LIST30',
|
||||
scopedSlots: { customRender: 'review-material' }
|
||||
}
|
||||
],
|
||||
url: {
|
||||
list: '',
|
||||
list: '/payResearchProject/payResearchProject/listForThree'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
let params = this.getQueryParams()//查询条件
|
||||
params.abbreviation = this.$route.query.abbreviation
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
this.dataSource = res.result.result.records
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}
|
||||
if (res.code === 510) {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
this.loading = false
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 查看立项文件
|
||||
* @param record
|
||||
*/
|
||||
viewProjectApproval(record) {
|
||||
console.log('查看立项文件', record)
|
||||
this.$refs.filesModal.title = '立项文件'
|
||||
this.$refs.filesModal.dataSource = record.FILE_LIST10
|
||||
this.$refs.filesModal.visible = true
|
||||
},
|
||||
/**
|
||||
* 查看征求意见
|
||||
* @param record
|
||||
*/
|
||||
viewAdvice(record) {
|
||||
console.log('查看征求意见', record)
|
||||
this.$refs.filesModal.title = '征求意见'
|
||||
this.$refs.filesModal.dataSource = record.FILE_LIST20
|
||||
this.$refs.filesModal.visible = true
|
||||
},
|
||||
/**
|
||||
* 查看送审材料
|
||||
* @param record
|
||||
*/
|
||||
viewReviewMaterial(record) {
|
||||
console.log('查看送审材料', record)
|
||||
this.$refs.filesModal.title = '送审材料'
|
||||
this.$refs.filesModal.dataSource = record.FILE_LIST30
|
||||
this.$refs.filesModal.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<!-- table表格区域-->
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
:rowKey="record => record.id || record.childrenId"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="false"
|
||||
:loading="confirmLoading"
|
||||
class="j-table-force-nowrap">
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<!-- 操作-->
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleDownload(record)">下载</a>
|
||||
<a @click="handlePreview(record)">查看</a>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
</div>
|
||||
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="handleCancel">关闭</a-button>
|
||||
</template>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { downloadFile } from '../../../api/manage'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '../../../store/mutation-types'
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '文件名',
|
||||
align: 'center',
|
||||
dataIndex: 'FILE_NAME',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
title: '上传时间',
|
||||
align: 'center',
|
||||
dataIndex: 'CREAT_TIME',
|
||||
scopedSlots: { customRender: 'time' }
|
||||
}, {
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
dataIndex: 'action',
|
||||
width: 160,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
]
|
||||
export default {
|
||||
name: 'CommitteeUnderStudyFilesModal',
|
||||
data() {
|
||||
return {
|
||||
title: '操作',
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
columns,
|
||||
dataSource: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 下载
|
||||
* @param record
|
||||
*/
|
||||
handleDownload(record) {
|
||||
let param = {
|
||||
fileId: record.FILE_ID,
|
||||
fileName: record.FILE_NAME
|
||||
}
|
||||
downloadFile(`/payResearchProject/payResearchProject/downLoad`, record.FILE_NAME, param)
|
||||
},
|
||||
/**
|
||||
* 预览
|
||||
* @param record
|
||||
*/
|
||||
handlePreview(record) {
|
||||
if (record && record.FILE_ID) {
|
||||
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ record.FILE_ID }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ record.FILE_NAME }`
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(fileFullUrl) }`
|
||||
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
handleCancel() {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@@ -528,7 +528,7 @@ export default {
|
||||
if (money(value)) {
|
||||
callback()
|
||||
}
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
callback('请输入应收金额')
|
||||
}
|
||||
|
||||
@@ -670,7 +670,7 @@ export default {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
callback('请输入应收金额')
|
||||
},
|
||||
|
||||
@@ -333,7 +333,7 @@ export default {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
callback('请输入合法的金额数字,最多2位小数,10位正数')
|
||||
callback('请输入合法的金额数字,最多2位小数,10位整数')
|
||||
}
|
||||
callback()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user