提交 129c9c81 authored 作者: 宋雄's avatar 宋雄

修改bug

上级 c2ca1828
NODE_ENV=development
VUE_APP_API_BASE_URL='http://192.168.0.118:9999'
# VUE_APP_API_BASE_URL='http://192.168.0.100:9999'
# VUE_APP_API_BASE_URL='http://220.203.25.212:9999'
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
......
......@@ -85,7 +85,7 @@ const dispatchCommunityRepairApi = (params)=>postAction("/property-community/pro
// 投诉管理
const querycommunityComplaintApi = (params)=>getAction("/property-community/property/communityComplaint/queryById",params);
const auditCommunityComplaintApi = (params)=>postAction("/property-community/property/communityComplaint/audit",params);
const auditCommunityComplaintApi = (params)=>postAction("/property-community/property/communityComplaint/edit",params);
//数据字典
const addDict = (params)=>postAction("/sys/dict/add",params);
......
......@@ -32,9 +32,9 @@ export const REPAIR_STATUS = [
{label: '待派单', value: 'waitDispatch'},
{label: '待接收', value: 'waitReceive'},
{label: '维修中', value: 'inRepair'},
{label: '单待审核', value: 'finishWaitAudit'},
{label: '单审核驳回', value: 'finishRefuse'},
{label: '提单审核通过', value: 'finishAuditPass'}
{label: '单待审核', value: 'finishWaitAudit'},
{label: '单审核驳回', value: 'finishRefuse'},
{label: '已完成', value: 'finishAuditPass'}
]
// 费用计算公式
......
......@@ -39,16 +39,21 @@
</a-form-model>
</j-form-container>
<j-form-container v-if="!formDisabled">
<a-form-model ref="form" :model="form" slot="detail">
<a-form-model ref="form" :model="form" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="处理状态" :labelCol="{ xs: { span: 24 }, sm: { span: 2 } }" :wrapperCol="wrapperCol" prop="complaintStatus">
<a-select v-model="form.complaintStatus" placeholder="请选择与业主关系" style="width:50%">
<a-select-option value="pending">处理中</a-select-option>
<a-form-model-item label="处理状态" :labelCol="{ xs: { span: 24 }, sm: { span: 2 } }" :wrapperCol="wrapperCol" prop="handleStatus">
<a-select v-model="form.handleStatus" placeholder="请选择与业主关系" style="width:50%">
<a-select-option value="pending" v-if="model.handleStatus !== 'pending'">处理中</a-select-option>
<a-select-option value="finish">处理完成</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="model.handleStatus === 'pending'">
<a-form-model-item label="处理结果" :labelCol="{ xs: { span: 24 }, sm: { span: 2 } }" :wrapperCol="wrapperCol" prop="handleResult">
<a-textarea v-model="model.handleResult" placeholder="请输入" style="width:80%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
......@@ -71,7 +76,7 @@
currentStep: 1,
model:{},
form: {
complaintStatus: 'pending',
handleStatus: 'pending',
auditOpinion: ''
},
labelCol: {
......@@ -82,6 +87,10 @@
xs: { span: 24 },
sm: { span: 20 },
},
validatorRules: {
handleStatus: [{ required: true, message: '请选择处理状态', trigger: 'change' }],
handleResult: [{ required: true, message: '请输入处理结果', trigger: 'blur' }]
},
confirmLoading: false,
}
},
......@@ -98,19 +107,27 @@
async getDetail() {
this.confirmLoading = true
let {result} = await querycommunityComplaintApi({id: this.$route.query.id})
if(result.handleStatus === 'pending') {
this.form.handleStatus = 'finish'
}
this.model = {...result}
this.confirmLoading = false
},
onReturn() {
this.closeCurrent()
},
async onSubmit() {
let res = await auditCommunityComplaintApi({
id: this.$route.query.id,
complaintStatus: this.form.complaintStatus
onSubmit() {
this.$refs.form.validate(async valid => {
if (valid) {
let res = await auditCommunityComplaintApi({
...this.model,
id: this.$route.query.id,
handleStatus: this.form.handleStatus
})
this.$message.success(res.message);
this.closeCurrent()
}
})
this.$message.success(res.message);
this.closeCurrent()
}
}
}
......
......@@ -55,7 +55,7 @@
</a-form-model-item>
</a-col>
<template v-if="model.repairStatus === 'finishwaitAudit' || model.repairStatus === 'finishAuditPass'">
<template v-if="model.repairStatus === 'finishWaitAudit' || model.repairStatus === 'finishAuditPass'">
<a-col :span="12">
<a-form-model-item label="维修员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceName">
<a-input v-model="model.maintenanceName" placeholder="请输入"></a-input>
......@@ -82,8 +82,14 @@
<a-col :span="24">
<a-form-model-item label="审核意见" :labelCol="{ xs: { span: 24 }, sm: { span: 2 } }" :wrapperCol="wrapperCol" prop="repairStatus">
<a-select v-model="form.repairStatus" placeholder="请选择与业主关系" style="width:50%">
<a-select-option value="waitDispatch">审核通过</a-select-option>
<a-select-option value="initiateRefuse">审核驳回</a-select-option>
<template v-if="model.repairStatus === 'initiateWaitAudit'">
<a-select-option value="waitDispatch">审核通过</a-select-option>
<a-select-option value="initiateRefuse">审核驳回</a-select-option>
</template>
<template v-if="model.repairStatus === 'finishWaitAudit'">
<a-select-option value="finishAuditPass">审核通过</a-select-option>
<a-select-option value="finishRefuse">审核驳回</a-select-option>
</template>
</a-select>
</a-form-model-item>
</a-col>
......@@ -123,7 +129,7 @@
currentStep: 1,
model:{},
form: {
repairStatus: 'waitDispatch',
repairStatus: '',
auditOpinion: ''
},
labelCol: {
......@@ -139,7 +145,7 @@
},
computed: {
formDisabled(){
return this.$route.query.type === '1'
return this.$route.query.type === 'detail'
},
},
created () {
......@@ -178,7 +184,7 @@
let res = await auditCommunityRepairApi({
id: this.$route.query.id,
repairStatus: this.form.repairStatus,
auditOpinion: this.form.repairStatus === 'waitDispatch' ? '' : this.form.repairStatus
auditOpinion: this.form.auditOpinion
})
this.$message.success(res.message);
this.closeCurrent()
......
......@@ -55,7 +55,7 @@
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
......@@ -65,16 +65,20 @@
<span :style="{'color': record.employeeStatus === '1' ? 'green' : 'red'}">{{record.employeeStatus === '1' ? '在职' : '离职'}}</span>
</span>
<span slot="action" slot-scope="text, record">
<a @click="onDetail(record.id, '1')">详情</a>
<a @click="onDetail(record.id, 'detail')">详情</a>
<template v-if="record.repairStatus === 'initiateWaitAudit'">
<a-divider type="vertical"/>
<a @click="onDetail(record.id, '2')">报单审核</a>
<a @click="onDetail(record.id)">报单审核</a>
</template>
<template v-if="record.repairStatus === 'waitDispatch'">
<a-divider type="vertical"/>
<a @click="onDispatch(record.id)">派单</a>
</template>
<template v-if="record.repairStatus === 'finishWaitAudit'">
<a-divider type="vertical"/>
<a @click="onDetail(record.id)">回单审核</a>
</template>
</span>
</a-table>
......@@ -169,7 +173,8 @@
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 150
width: 150,
fixed: 'right'
}
]
let currentDispathId = ''
......@@ -183,12 +188,6 @@
repairStatus: REPAIR_STATUS,
// 表头
columns: columns,
pagination: {
total: 0,
current: 1,
pageSize: 10,
showSizeChanger: true
},
url: {
list: "/property-community/property/communityRepair/list",
delete: '/property-community/property/communityRepair/delete',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论