提交 cf3a574e authored 作者: 宋雄's avatar 宋雄

优化

上级 3abc1fac
......@@ -117,6 +117,7 @@ const getDetailReconciliationApi = (params)=>getAction("/property-community/prop
const getAccountListByIdApi = (params)=>getAction("/property-community/property/communityReconciliation/getAccountListById",params);
const communityAuditAccountPageApi = (params)=>postAction("/property-community/property/communityReconciliation/communityAudit",params);
const getCommunityRecordListApi = (params)=>getAction("/property-central/property/auditRecord/getRecordList",params);
const communitySubAuditApi = (params)=>getAction("/property-community/property/communityReconciliation/communitySubAudit",params);
const communitySubCompanyApi = (params)=>getAction("/property-community/property/communityReconciliation/communitySubCompany",params);
// 商铺管理
const shopAuditApi = (params)=>postAction("/property-central/shop/shopInfo/audit",params);
......@@ -272,6 +273,7 @@ export {
getAccountListByIdApi,
communityAuditAccountPageApi,
getCommunityRecordListApi,
communitySubAuditApi,
communitySubCompanyApi,
freezeOrPropertyApi,
setOwnerLabelApi,
......
......@@ -100,6 +100,13 @@ export const COMPANY_AUDIT_STATUS = [
{label: '物业审核驳回', value: 'companyRefuse'}
]
// 总平台对账审核状态
export const CENTRAL_AUDIT_STATUS = [
{label: '总平台待审核', value: 'centralWaitAudit'},
{label: '总平台审核通过', value: 'centralAuditPass'},
{label: '总平台审核驳回', value: 'centralRefuse'}
]
// 分利对账审核状态
export const FENLICENTRAL_AUDIT_STATUS = [
{label: '未对账', value: '1'},
......
......@@ -68,8 +68,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="本期度数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentDegrees">
<a-input-number v-model="model.currentDegrees" placeholder="请输入本期度数"
style="width:100%"></a-input-number>
<a-input-number v-model="model.currentDegrees" placeholder="请输入本期度数" :min="minDegrees" style="width:100%"></a-input-number>
</a-form-model-item>
</a-col>
<a-col :span="12">
......@@ -243,6 +242,9 @@ export default {
formDisabled() {
return this.disabled
},
minDegrees() {
return this.model.currentDegrees ? (NUmber(this.model.currentDegrees) + 1) : 1
}
},
created() {
//备份model原始值
......
......@@ -72,7 +72,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="本期度数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="currentDegrees">
<a-input-number v-model="model.currentDegrees" placeholder="请输入本期度数" style="width:100%" @change="onDegreesChange"></a-input-number>
<a-input-number v-model="model.currentDegrees" placeholder="请输入本期度数" style="width:100%" @blur="onDegreesChange"></a-input-number>
</a-form-model-item>
</a-col>
<a-col :span="12">
......@@ -256,7 +256,7 @@
let res = await queryLastDegreesByIdApi({roomId: this.model.roomId,chargeTypeId: this.model.chargeTypeId})
this.model.lastDegrees = res.result
if(this.model.currentDegrees) {
this.onDegreesChange(this.model.currentDegrees)
this.onDegreesChange()
}
},
async onqueryByRoomId() {
......@@ -319,10 +319,14 @@
}
});
},
onDegreesChange(value) {
if(this.model.lastDegrees || this.model.lastDegrees == 0) {
this.model.useAmount = (value - Number(this.model.lastDegrees)).toFixed(2)
this.model.totalAmount = (Number(this.model.useAmount) * this.amount).toFixed(2)
onDegreesChange() {
if(this.model.currentDegrees <= Number(this.model.lastDegrees)) {
this.$message.warning('本期度数不能低于上去度数,请验证!')
} else {
if(this.model.lastDegrees || this.model.lastDegrees == 0) {
this.model.useAmount = (this.model.currentDegrees - Number(this.model.lastDegrees)).toFixed(2)
this.model.totalAmount = (Number(this.model.useAmount) * this.amount).toFixed(2)
}
}
},
submitForm () {
......
......@@ -43,6 +43,7 @@
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="onReconciliation()"><a-icon type="audit" />批量审核</a-menu-item>
<a-menu-item key="2" @click="onSubmit()"><a-icon type="audit" />批量申请对账</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
......@@ -64,7 +65,7 @@
<a-divider type="vertical" />
<a href="javascript:;" @click="propertyDetails(2, record.id)">审核</a>
</template>
<template v-if="record.communityAuditStatus === 'communityRefuse' || record.companyAuditStatus === 'companyRefuse'">
<template v-if="record.communityAuditStatus === 'communityRefuse' || record.companyAuditStatus === 'companyRefuse' || record.centralAuditStatus === 'centralRefuse'">
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)" placement="topLeft">
<a>删除</a>
......@@ -72,20 +73,32 @@
</template>
<template v-if="record.communityAuditStatus === 'communityAuditPass' && !record.companyAuditStatus">
<a-divider type="vertical" />
<a href="javascript:;" @click="onReconciliation(record.id)">申请对账</a>
<a href="javascript:;" @click="onSubmit(record.id)">申请对账</a>
</template>
</span>
</a-table>
</div>
<!-- table区域-end -->
<a-modal v-model="visibleAudit" :width="400">
<template slot="footer">
<a-button key="back" @click="visibleAudit = false">取消</a-button>
<a-button key="reject" type="danger" @click="handleAudit('refuse')">驳回</a-button>
<a-button key="submit" type="primary" @click="handleAudit('auditPass')">通过</a-button>
</template>
<div class="ant-modal-confirm-body">
<a-icon type="question-circle" style="color:#faad14;margin-right: 16px;font-size:22px;" />
<span class="ant-modal-confirm-title">确认要审核当前对账吗?</span>
</div>
</a-modal>
</a-card>
</template>
<script>
import { communitySubCompanyApi } from '@/api/api'
import { communitySubAuditApi, communitySubCompanyApi } from '@/api/api'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { filterDictTextByStatic, RECONCILIATION_STATUS, COMPANY_AUDIT_STATUS } from '@/assets/static.js'
import { filterDictTextByStatic, RECONCILIATION_STATUS, COMPANY_AUDIT_STATUS, CENTRAL_AUDIT_STATUS } from '@/assets/static.js'
const columns = [
{
......@@ -142,6 +155,15 @@ const columns = [
return filterDictTextByStatic(COMPANY_AUDIT_STATUS, text)
}
},
{
title: '总平台审核状态',
dataIndex: 'centralAuditStatus',
key: 'centralAuditStatus',
align: 'center',
customRender: function (text) {
return filterDictTextByStatic(CENTRAL_AUDIT_STATUS, text)
}
},
{
title: '操作',
dataIndex: 'action',
......@@ -165,41 +187,65 @@ export default {
list: '/property-community/property/communityReconciliation/list',
delete: '/property-community/property/communityReconciliation/delete',
deleteBatch: '/property-community/property/communityReconciliation/deleteBatch',
}
},
visibleAudit: false
}
},
methods: {
onCheckboxProps: record=> {
let props = {
disabled: record.communityAuditStatus !== 'communityAuditPass',
onCheckboxProps: record=> ({
props: {
disabled: record.communityAuditStatus === 'communityRefuse' || (record.communityAuditStatus === 'communityAuditPass' && (record.companyAuditStatus === 'companyWaitAudit' || record.companyAuditStatus === 'companyAuditPass')),
name: record.id
}
return props
},
}),
propertyDetails(type, id) {
let params = id ? `?type=${type}&id=${id}` : `?type=${type}`
this.$router.push({
path: '/property/RecordDetails' + params
})
},
onReconciliation(id) {
let ids = id || this.selectedRowKeys.join(',')
let that = this
this.$confirm({
title: id ? '确认要审核当前对账吗?' : '确认要批量审核当前对账吗?',
closable: true,
okText: '确认',
onOk() {
return communitySubCompanyApi({
ids
}).then((res) => {
that.$message.success('申请对账成功!')
that.searchQuery()
})
}
handleAudit(type) {
let ids = this.selectedRowKeys.join(',')
communitySubAuditApi({
ids,
auditStatus: type
}).then(res=> {
this.visibleAudit = false
this.$message.success(`${type === 'auditPass' ? '审核' : '驳回'}成功!`)
this.searchQuery()
})
},
onReconciliation() {
let flag = this.selectionRows.some(item=>item.communityAuditStatus === 'communityAuditPass')
if(flag) {
this.$message.warning('请注意,已选数据中有 已审核 账单!')
} else {
this.visibleAudit = true
}
},
onSubmit(id) {
let flag = this.selectionRows.some(item=>item.communityAuditStatus !== 'communityAuditPass')
if(flag) {
this.$message.warning('请注意,已选数据中有 未审核 账单!')
} else {
let ids = id || this.selectedRowKeys.join(',')
let that = this
this.$confirm({
title: id ? '确认要申请当前对账吗?' : '确认要批量申请当前对账吗?',
closable: true,
okText: '确认',
onOk() {
return communitySubCompanyApi({
ids
}).then((res) => {
that.$message.success('申请对账成功!')
that.searchQuery()
})
}
})
}
}
},
}
}
</script>
<style scoped>
......
......@@ -257,6 +257,7 @@ export default {
longitude: '',
latitude: '',
accessAddress: '',
adminPassword: '123456'
},
labelCol: {
xs: { span: 24 },
......@@ -280,7 +281,7 @@ export default {
registAdress: [{ required: true, message: '请选择注册地址', trigger: 'change' }],
addressInfo: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
logoUrl: [{ required: true, message: '请上传LOGO', trigger: 'change' }],
adminLoginName: [{ required: true, message: '请输入管理员账号', trigger: 'blur' }],
// adminLoginName: [{ required: true, message: '请输入管理员账号', trigger: 'blur' }],
contractUrl: [{ required: true, message: '请上传合同附件', trigger: 'change' }],
adminPassword: [{ required: true, message: '请输入管理员密码', trigger: 'blur' }],
accessAddress: [
......
......@@ -10,15 +10,16 @@
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-range-picker
style="width: 100%"
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
@change="onDateChange"
@ok="onDateOk"
/>
<a-form-item label="入驻开始时间">
<a-date-picker placeholder="入驻开始时间" valueFormat="YYYY-MM-DD" v-model="queryParam.beginDate"></a-date-picker>
</a-form-item>
</a-col>
<a-col :md="6" :sm="8">
<a-form-item label="入驻结束时间">
<a-date-picker placeholder="入驻结束时间" valueFormat="YYYY-MM-DD" v-model="queryParam.endDate"></a-date-picker>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="8" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
......@@ -44,7 +45,7 @@
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
......@@ -186,12 +187,6 @@ export default {
// 表头
columns: columns,
loading: false,
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true
},
url: {
list: "/property-central/shop/shopInfo/list",
audit: "/property-central/shop/shopInfo/audit",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论