Browse Source

111

shibei_master
jiangyy 3 years ago
parent
commit
54701e66c5
  1. 287
      src/views/modules/communityService/measure/info.vue

287
src/views/modules/communityService/measure/info.vue

@ -1,41 +1,30 @@
<template> <template>
<el-dialog <el-dialog title="需求信息"
title="需求信息"
width="50%" width="50%"
top="5vh" top="5vh"
append-to-body append-to-body
class="dialog-h" class="dialog-h"
:visible="true" :visible="true"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="handlerClose" :before-close="handlerClose">
> <el-form label-width="120px"
<el-form
label-width="120px"
:model="form" :model="form"
:rules="rules" :rules="rules"
ref="ruleForm" ref="ruleForm"
class="form-wr dialog-h-content scroll-h" class="form-wr dialog-h-content scroll-h">
> <el-form-item label="操作方式"
<el-form-item label="操作方式" prop="addType"> prop="addType">
<el-radio-group v-model="addType"> <el-radio-group v-model="addType">
<el-radio label="look">查看</el-radio> <el-radio label="look">查看</el-radio>
<template v-if="form.reportType != 'self_help'"> <template v-if="form.reportType != 'self_help'">
<el-radio label="edit" v-if="form.status === 'pending'" <el-radio label="edit"
>修改</el-radio v-if="form.status === 'pending'">修改</el-radio>
> <el-radio label="cancel"
<el-radio v-if="form.status !== 'finished' && form.status !== 'canceled'">取消</el-radio>
label="cancel"
v-if="form.status !== 'finished' && form.status !== 'canceled'"
>取消</el-radio
>
</template> </template>
<el-radio <el-radio label="appoint"
label="appoint" v-if="form.status === 'pending' || form.status === 'assigned'">指派</el-radio>
v-if="form.status === 'pending' || form.status === 'assigned'" <!-- <el-radio label="finish"
>指派</el-radio
>
<el-radio
label="finish"
v-if=" v-if="
(form.reportType == 'self_help' && (form.reportType == 'self_help' &&
form.serviceShowFlag && form.serviceShowFlag &&
@ -44,230 +33,198 @@
form.status === 'assigned' || form.status === 'assigned' ||
form.status === 'have_order' || form.status === 'have_order' ||
(form.status == 'finished' && !form.evaluateFlag) (form.status == 'finished' && !form.evaluateFlag)
" ">完成</el-radio> -->
>完成</el-radio <el-radio label="finish"
> v-if="
(form.reportType == 'self_help' &&
form.serviceShowFlag &&
form.serviceType !== 'volunteer' &&
form.status !== 'finished') ||
form.status === 'assigned' ||
form.status === 'have_order'
">完成</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="所属网格" prop="gridId"> <el-form-item label="所属网格"
<el-input prop="gridId">
v-if="disabled" <el-input v-if="disabled"
v-model="form.gridName" v-model="form.gridName"
:disabled="disabled" :disabled="disabled"
class="input-width" class="input-width"></el-input>
></el-input>
<!-- <span >{{ form.gridName }}</span> --> <!-- <span >{{ form.gridName }}</span> -->
<el-select <el-select v-else
v-else
v-model="form.gridId" v-model="form.gridId"
filterable filterable
placeholder="请选择" placeholder="请选择"
class="input-width" class="input-width"
clearable clearable
:disabled="disabled" :disabled="disabled"
@change="handleGridChange" @change="handleGridChange">
> <el-option v-for="item in disabled ? optionsG : optionsEditG"
<el-option
v-for="item in disabled ? optionsG : optionsEditG"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value">
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="需求类型" prop="categoryCode"> <el-form-item label="需求类型"
<el-input prop="categoryCode">
v-if="disabled" <el-input v-if="disabled"
v-model="form.categoryName" v-model="form.categoryName"
:disabled="disabled" :disabled="disabled"
class="input-width" class="input-width"
clearable clearable></el-input>
></el-input> <el-cascader v-else
<el-cascader
v-else
v-model="form.categoryCodeArr" v-model="form.categoryCodeArr"
:options="demandOptions" :options="demandOptions"
:disabled="disabled" :disabled="disabled"
clearable clearable
class="input-width" class="input-width"
@change="handleCateSlect" @change="handleCateSlect"></el-cascader>
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="上报类型" prop="reportType"> <el-form-item label="上报类型"
<el-input prop="reportType">
v-if="disabled" <el-input v-if="disabled"
v-model="form.reportTypeName" v-model="form.reportTypeName"
:disabled="disabled" :disabled="disabled"
class="input-width" class="input-width"></el-input>
></el-input> <el-select v-else
<el-select
v-else
v-model="form.reportType" v-model="form.reportType"
filterable filterable
class="input-width" class="input-width"
placeholder="请选择" placeholder="请选择"
clearable clearable
:disabled="disabled" :disabled="disabled">
> <el-option v-for="item in reportOptions"
<el-option
v-for="item in reportOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value">
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="上报人" prop="reportUserName"> <el-form-item label="上报人"
<el-input prop="reportUserName">
v-model="form.reportUserName" <el-input v-model="form.reportUserName"
:disabled="disabled" :disabled="disabled"
placeholder="请输入" placeholder="请输入"
class="input-width" class="input-width"
clearable clearable></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上报人手机号" prop="reportUserMobile"> <el-form-item label="上报人手机号"
<el-input prop="reportUserMobile">
v-model="form.reportUserMobile" <el-input v-model="form.reportUserMobile"
:disabled="disabled" :disabled="disabled"
placeholder="请输入" placeholder="请输入"
class="input-width" class="input-width"
maxlength="11" maxlength="11"
clearable clearable></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上报时间" prop="reportTime"> <el-form-item label="上报时间"
<el-date-picker prop="reportTime">
v-model="form.reportTime" <el-date-picker v-model="form.reportTime"
type="datetime" type="datetime"
class="input-width" class="input-width"
clearable clearable
:disabled="disabled" :disabled="disabled"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间" placeholder="选择日期时间">
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="需求人" prop="demandUserId"> <el-form-item label="需求人"
<el-input prop="demandUserId">
v-if="disabled" <el-input v-if="disabled"
v-model="form.demandUserName" v-model="form.demandUserName"
:disabled="disabled" :disabled="disabled"
class="input-width" class="input-width"></el-input>
></el-input> <el-select v-else
<el-select
v-else
v-model="selectDemandUser" v-model="selectDemandUser"
class="input-width" class="input-width"
filterable filterable
:disabled="disabled" :disabled="disabled"
placeholder="请选择" placeholder="请选择"
clearable clearable
@change="handleDemandChange" @change="handleDemandChange">
> <el-option v-for="item in demandUserList"
<el-option
v-for="item in demandUserList"
:key="item.demandUserId" :key="item.demandUserId"
:label="item.label" :label="item.label"
:value="item" :value="item">
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="服务时间" prop="wantServiceTime"> <el-form-item label="服务时间"
<el-date-picker prop="wantServiceTime">
v-model="form.wantServiceTime" <el-date-picker v-model="form.wantServiceTime"
type="datetime" type="datetime"
class="input-width" class="input-width"
clearable clearable
:disabled="disabled" :disabled="disabled"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间" placeholder="选择日期时间">
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="需求内容" prop="content"> <el-form-item label="需求内容"
<el-input prop="content">
v-model="form.content" <el-input v-model="form.content"
:autosize="{ minRows: 2, maxRows: 10 }" :autosize="{ minRows: 2, maxRows: 10 }"
:disabled="disabled" :disabled="disabled"
type="textarea" type="textarea"
clearable clearable
class="input-width-textarea" class="input-width-textarea"
placeholder="请输入内容" placeholder="请输入内容"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="
v-if="
addType === 'appoint' || addType === 'appoint' ||
addType == 'finish' || addType == 'finish' ||
(addType == 'look' && form.serviceShowFlag) (addType == 'look' && form.serviceShowFlag)
" "
label="服务方" label="服务方"
prop="serviceType" prop="serviceType">
>
<template v-if="disabled && addType !== 'appoint'"> <template v-if="disabled && addType !== 'appoint'">
<el-input <el-input v-model="form.serviceShowName"
v-model="form.serviceShowName"
:disabled="disabled" :disabled="disabled"
class="input-width" class="input-width"></el-input>
></el-input>
</template> </template>
<template v-else> <template v-else>
<el-select <el-select v-model="form.serviceType"
v-model="form.serviceType"
class="input-width-small" class="input-width-small"
placeholder="请选择" placeholder="请选择"
clearable clearable
:disabled="disabled && addType !== 'appoint'" :disabled="disabled && addType !== 'appoint'"
@change="handleServiceChange('add', $event)" @change="handleServiceChange('add', $event)">
> <el-option v-for="item in serviceOptions"
<el-option
v-for="item in serviceOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value">
>
</el-option> </el-option>
</el-select> </el-select>
- -
<el-select <el-select v-model="form.serverId"
v-model="form.serverId"
class="input-width-middle" class="input-width-middle"
filterable filterable
placeholder="请选择" placeholder="请选择"
clearable clearable
:disabled="disabled && addType !== 'appoint'" :disabled="disabled && addType !== 'appoint'">
> <el-option v-for="item in serviceOptiondList"
<el-option
v-for="item in serviceOptiondList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value">
>
</el-option> </el-option>
</el-select> </el-select>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="addType == 'look' && form.status == 'canceled'"
v-if="addType == 'look' && form.status == 'canceled'"
label="取消时间" label="取消时间"
prop="cancelTime" prop="cancelTime">
>
<span>{{ form.cancelTime }}</span> <span>{{ form.cancelTime }}</span>
</el-form-item> </el-form-item>
<template <template v-if="
v-if="
(addType == 'finish' && form.reportType != 'self_help') || (addType == 'finish' && form.reportType != 'self_help') ||
(addType == 'look' && form.status == 'finished') (addType == 'look' && form.status == 'finished')
" ">
> <el-form-item label="实际服务时间"
<el-form-item label="实际服务时间" prop="serviceStartTime"> prop="serviceStartTime">
<el-date-picker <el-date-picker v-model="finishServiceTime"
v-model="finishServiceTime"
class="input-width-min" class="input-width-min"
clearable clearable
:disabled="disabled && addType != 'finish'" :disabled="disabled && addType != 'finish'"
@ -276,47 +233,40 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="handelBlurServiceTime" @change="handelBlurServiceTime">
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="完成情况" prop="finishResult"> <el-form-item label="完成情况"
<el-radio prop="finishResult">
v-model="form.finishResult" <el-radio v-model="form.finishResult"
label="resolved" label="resolved"
:disabled="disabled && addType != 'finish'" :disabled="disabled && addType != 'finish'">已解决</el-radio>
>已解决</el-radio <el-radio v-model="form.finishResult"
>
<el-radio
v-model="form.finishResult"
label="unresolved" label="unresolved"
:disabled="disabled && addType != 'finish'" :disabled="disabled && addType != 'finish'">未解决</el-radio>
>未解决</el-radio
>
</el-form-item> </el-form-item>
<el-form-item label="评价" prop="score" class="form-score"> <el-form-item label="评价"
<el-rate prop="score"
v-model="form.score" class="form-score">
<el-rate v-model="form.score"
:allow-half="true" :allow-half="true"
:disabled="disabled && addType != 'finish'" :disabled="disabled && addType != 'finish'"></el-rate>
></el-rate>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="finishDesc"> <el-form-item label="备注"
<el-input prop="finishDesc">
v-model="form.finishDesc" <el-input v-model="form.finishDesc"
:autosize="{ minRows: 2, maxRows: 10 }" :autosize="{ minRows: 2, maxRows: 10 }"
:disabled="disabled && addType != 'finish'" :disabled="disabled && addType != 'finish'"
type="textarea" type="textarea"
clearable clearable
class="input-width-textarea" class="input-width-textarea"
placeholder="请输入内容" placeholder="请输入内容"></el-input>
></el-input>
</el-form-item> </el-form-item>
</template> </template>
<template v-if="addType == 'finish' && form.reportType == 'self_help'"> <template v-if="addType == 'finish' && form.reportType == 'self_help'">
<el-form-item label="实际服务时间" prop="serviceStartTime"> <el-form-item label="实际服务时间"
<el-date-picker prop="serviceStartTime">
v-model="finishServiceTime" <el-date-picker v-model="finishServiceTime"
class="input-width-min" class="input-width-min"
clearable clearable
:disabled="disabled && addType != 'finish'" :disabled="disabled && addType != 'finish'"
@ -325,22 +275,19 @@
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
@change="handelBlurServiceTime" @change="handelBlurServiceTime">
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</template> </template>
</el-form> </el-form>
<div class="resi-btns"> <div class="resi-btns">
<el-button size="small" @click="handlerClose">关闭</el-button> <el-button size="small"
<el-button @click="handlerClose">关闭</el-button>
v-if="addType != 'look'" <el-button v-if="addType != 'look'"
type="primary" type="primary"
size="small" size="small"
:loading="btnLoading" :loading="btnLoading"
@click="handleSubmit" @click="handleSubmit">提交</el-button>
>提交</el-button
>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -863,6 +810,8 @@ export default {
res.data.parentCode + res.data.categoryCode, res.data.parentCode + res.data.categoryCode,
], ],
}; };
this.finishServiceTime = [this.form.serviceStartTime, this.form.serviceEndTime]
this.getGridList(); this.getGridList();
this.getDemandOptions(); this.getDemandOptions();
this.getDemandUserList(); this.getDemandUserList();

Loading…
Cancel
Save