forked from gzzfw/frontEnd/gzDyh

dminyi
2024-08-09 a2a5220469a3e1f8bc216f47c887ca4c941920b0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<!--申请调解-->
<page-meta page-style="{{ popup.visible || recordingVisible || popupMsg.show ? 'overflow: hidden;' : '' }}" />
 
<wxs module="wxs" src="../../utils/wxs/util.wxs" />
 
<van-toast id="van-toast" />
 
<common-page bind:onCancelPicker="handleClosePopup" bind:onChangePicker="handleChangeColumns" bind:onClosePopup="handleClosePopup" bind:onConfirmPicker="handleConfirmPicker" popup="{{ popup }}">
  <!-- 步骤条 -->
  <view class="steps">
    <steps stepsActive="{{ stepsActive }}" stepsData="{{ steps }}" stepsType="picture" />
  </view>
  <!-- 未提交前 -->
  <block wx:if="{{ stepsActive !== 2 }}">
    <!-- 填写申请 -->
    <block wx:if="{{ stepsActive === 0 }}">
      <!-- 意向调解组织 or 意向调解员 -->
      <view class="card" style="background: linear-gradient(95deg,rgba(173,198,255,0.50) 0%, rgba(214,228,255,0.80) 4%, rgba(214,228,255,0.55) 100%)" wx:if="{{ submitData.wantUserId || submitData.wantUnitId }}">
        <view class="cell">
          <view class="cell-title">意向{{ submitData.wantUserId ? '调解员' : '调解组织' }}</view>
          <view class="cell-select">{{ submitData.wantUserId ? submitData.wantUserName : submitData.wantUnitName }}</view>
          <view bind:tap="handleDeleteWant" class="wantUser-delete second-font">删除</view>
        </view>
      </view>
      <!-- 纠纷信息 -->
      <view class="card" style="padding-bottom:32rpx">
        <view bindtap="handleShowPopup" class="cell" data-title="纠纷发生地" data-type="location">
          <view class="cell-title">
            纠纷发生地
            <text class="cell-required">(必填)</text>
          </view>
          <view class="{{ !submitData.prov ? 'cell-placeholder' : '' }} cell-select">{{ submitData.prov ? wxs.showLocation(submitData) : '未选择' }}</view>
          <view class="cell-arrow">
            <van-icon name="arrow" />
          </view>
        </view>
        <view class="cell2 cell-noPadding">
          <view class="cell-title-line">纠纷发生地详址</view>
          <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0;" data-key="addr" placeholder="填写后优先推荐附近的调解组织" value="{{ submitData.addr }}" />
        </view>
        <view bindtap="handleShowPopup" class="cell cell-noPadding" data-title="纠纷类型" data-type="caseCause">
          <view class="cell-title">纠纷类型</view>
          <view class="{{ !submitData.caseTypeName ? 'cell-placeholder' : '' }} cell-select">{{ submitData.caseTypeName ? submitData.caseTypeName : '未选择' }}</view>
          <view class="cell-arrow">
            <van-icon name="arrow" />
          </view>
        </view>
        <block>
          <view class="cell2 cell-noPadding">
            <view class="cell-title-line">
              纠纷描述
              <text class="cell-required">(必填)</text>
            </view>
            <van-field autosize="{{ { maxHeight: 88, minHeight: 22 } }}" bind:change="handleChange" border="{{ false }}" custom-style="padding:0;" data-key="caseDes" placeholder="请简要描述纠纷发生的时间、地点及经过" type="textarea" value="{{ submitData.caseDes }}" />
            <!-- <view class="case">
              <view class="img-case_2">
                <image src="/img/case_1.png" class="img1"></image>
              </view>
              <view>您在纠纷描述中提到了租赁合同,但您并未上传对应材料,请核实并补充对应材料。</view>
            </view> -->
          </view>
          <recording bind:getwords="handleGetWords" bind:onVisible="handleVisibleRecording" data-type="caseDes" />
        </block>
        <block>
          <view class="cell2">
            <view class="cell-title-line">
              调解请求
              <text class="cell-required">(必填)</text>
            </view>
            <van-field autosize="{{ { maxHeight: 88, minHeight: 22 } }}" bind:change="handleChange" bind:focus="handlecaseClaimFocus" border="{{ false }}" custom-style="padding:0;" data-key="caseClaim" placeholder="请逐条描述您的调解请求,如请求1...请求2..." placeholder-style="color: rgba(0, 0, 0, 0.5)" type="textarea" value="{{ submitData.caseClaim }}" />
            <view wx:if="{{tipData.caseList.length}}" class="case">
              <view style="display:'flex'">
                <view class="img-case_2">
                  <image src="/img/case_1.png" class="img1"></image>
                  <view>请参考类案中的请求:</view>
                </view>
                <view>
                  可能不合理或不完整的请求:
                </view>
                <view style="white-space: pre-line;" data-index="{{ index }}" data-item="{{ item }}" wx:for="{{tipData.caseList}}" wx:key="index">{{item}}
                </view>
                <view>
                  类案中的请求:
                </view>
                <view data-index="{{ index }}" data-item="{{ item }}" wx:for="{{tipData.guideList}}" wx:key="index">{{item}}
                </view>
              </view>
            </view>
            <block wx:if="{{showCase}}">
              <view class="caseBox-content" catch:tap="_case">
                <view class="caseBox-dot">类案</view>
                <!--【相似度80.3%】黑山县刘某某与张某某黑山县刘某某与张某某黑山县刘某某与张某某-->
                <view class="caseBox-Item">{{similarity}}{{caseText}}</view>
                <view class="caseBox-arrow">
                  <van-icon name="arrow-down" size="8" wx:if="{{showDetail}}" />
                  <van-icon name="arrow-up" size="8" wx:else />
                </view>
 
              </view>
              <view wx:if="{{showDetail}}">
                <view style="display:flex;font-size:12px;justify-content: center;">{{caseTitle}}</view>
                <view style="background-color: #fff;font-size: 12px;display: flex;">{{caseText}}</view>
              </view>
 
            </block>
          </view>
          <recording bind:getwords="handleGetWords" bind:onVisible="handleVisibleRecording" data-type="caseClaim" />
        </block>
      </view>
      <!-- 申请/被申请人信息 -->
      <view class="card" style="padding:16rpx 16rpx 16rpx 32rpx;">
        <!-- 申请人 -->
        <block wx:for="{{ submitData.plaintiffList }}" wx:key="index">
          <view class="party">
            <view class="party-img party-img-shen">申请</view>
            <view bind:tap="handleEditParty" class="party-content" data-edittype="edit" data-formtype="plaintiffList" data-index="{{index}}">
              <view class="party-content-title">
                <view class="party-content-title-name">
                  <ellipsis-text content="{{ item.trueName }}" />
                </view>
                <view class="party-content-title-phone">{{ item.mobile }}</view>
              </view>
              <view class="party-content-subTitle">
                <ellipsis-text content="{{ titleShow[item.perClass][0] }}{{ item.deputy ? ' | ' : '' }}{{ item.deputy || '' }}{{ item.certiNo ? ' | ' : '' }}{{ item.certiNo || '' }}" fontsize="24" />
              </view>
            </view>
            <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="plaintiffList">增加</view>
          </view>
          <!-- 代理人 -->
          <view class="party" wx:if="{{ !!item.agent }}">
            <view class="party-img party-img-shen">申请</view>
            <view bind:tap="handleEditParty" class="party-content" data-agent="{{true}}" data-edittype="edit" data-formtype="plaintiffList" data-index="{{index}}">
              <view class="party-content-title">
                <view class="party-content-title-name">
                  <ellipsis-text content="{{ item.agent.trueName }}" />
                </view>
                <view class="party-content-title-phone">{{ item.agent.mobile }}</view>
                <view class="tag tag-cyan" style="margin-left:12rpx">代理人</view>
              </view>
              <view class="party-content-subTitle">
                <ellipsis-text content="代理对象 | {{ item.trueName }}" fontsize="24" />
              </view>
            </view>
            <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="plaintiffList">增加</view>
          </view>
        </block>
        <!-- 新增申请人button -->
        <block wx:if="{{ submitData.plaintiffList.length === 0 }}">
          <view class="party">
            <view class="party-img party-img-shen">申请</view>
            <view class="party-noneAdd">
              <van-button bind:click="handleEditParty" block custom-style="border: 2rpx dashed rgba(0,0,0,0.20)" data-formtype="plaintiffList" icon="{{ imgUrl }}register-add-party.png">增加申请人信息</van-button>
            </view>
          </view>
        </block>
        <!-- 被申请人 -->
        <block wx:for="{{ submitData.defendantList }}" wx:key="index">
          <view class="party">
            <view class="party-img party-img-bei">被申</view>
            <view bind:tap="handleEditParty" class="party-content" data-edittype="edit" data-formtype="defendantList" data-index="{{index}}">
              <view class="party-content-title">
                <view class="party-content-title-name">
                  <ellipsis-text content="{{ item.trueName }}" />
                </view>
                <view class="party-content-title-phone">{{ item.mobile }}</view>
              </view>
              <view class="party-content-subTitle">
                <ellipsis-text content="{{ titleShow[item.perClass][0] }}{{ item.deputy ? ' | ' : '' }}{{ item.deputy || '' }}{{ item.certiNo ? ' | ' : '' }}{{ item.certiNo || '' }}" fontsize="24" />
              </view>
            </view>
            <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="defendantList">增加</view>
          </view>
          <!-- 代理人 -->
          <view class="party" wx:if="{{ !!item.agent }}">
            <view class="party-img party-img-bei">被申</view>
            <view bind:tap="handleEditParty" class="party-content" data-agent="{{true}}" data-edittype="edit" data-formtype="defendantList" data-index="{{index}}">
              <view class="party-content-title">
                <view class="party-content-title-name">
                  <ellipsis-text content="{{ item.agent.trueName }}" />
                </view>
                <view class="party-content-title-phone">{{ item.agent.mobile }}</view>
                <view class="tag tag-orange" style="margin-left:12rpx">代理人</view>
              </view>
              <view class="party-content-subTitle">
                <ellipsis-text content="代理对象 | {{ item.trueName }}" fontsize="24" />
              </view>
            </view>
            <view bind:tap="handleEditParty" class="party-add second-font" data-formtype="defendantList">增加</view>
          </view>
        </block>
        <!-- 新增被申请人button -->
        <block wx:if="{{ submitData.defendantList.length === 0 }}">
          <view class="party">
            <view class="party-img party-img-bei">被申</view>
            <view class="party-noneAdd">
              <van-button bind:click="handleEditParty" block custom-style="border: 2rpx dashed rgba(0,0,0,0.20)" data-formtype="defendantList" icon="{{ imgUrl }}register-add-party.png">增加被申请人信息</van-button>
            </view>
          </view>
        </block>
      </view>
      <!-- 纠纷材料 -->
      <view class="card">
        <view bindtap="handleGoToMaterial" class="cell" data-title="纠纷发生地" data-type="location">
          <view class="cell-title">纠纷材料</view>
          <view class="{{ !materialNum ? 'cell-placeholder' : '' }} cell-select">{{ materialNum ? materialNum + '份资料' : '未上传' }}</view>
          <view class="cell-arrow">
            <van-icon name="arrow" />
          </view>
        </view>
      </view>
    </block>
    <!-- 核实申请 -->
    <block wx:if="{{ stepsActive === 1 }}">
      <mediate-detail caseData="{{ submitData }}" materialNum="{{ materialNum }}" pageType="3" />
    </block>
    <!-- 隔离出下层固定dom的高度便于page滚动 -->
    <view class="height-none" catch:tap="_searchCase" />
    <!-- 按钮 -->
    <view class="submitButton" catch:tap="">
      <view style="margin-right: 48rpx;" wx:if="{{ stepsActive === 1 }}">
        <van-button bind:click="handleNext" block custom-class="btn" custom-style="width:240rpx;" data-type="back" type="default">修改</van-button>
      </view>
      <view style="flex: 1;">
        <van-button bind:click="handleNext" block data-type="next" type="primary">{{ stepsActive === 1 ? '提交' : '预览申请' }}</van-button>
        <view class="safeHeight" />
      </view>
    </view>
  </block>
  <!-- 已提交 -->
  <block wx:else>
    <view class="success">
      <van-icon color="#07c160" name="checked" size="106rpx" />
      <view class="success-title">申请已经提交</view>
      <view class="success-subTitle">可通过小程序首页<navigator class="success-link" style="display: inline;" url="/pages/myMediate/index">我的调解</navigator>功能跟进调解进度</view>
      <view class="success-NewButton">
        <view class="success-RedButton">
          <navigator url="/pages/myMediate/index" style="color: #fff;font-size: 14px;">我的调解</navigator>
        </view>
      </view>
      <view>
        <navigator class="success-link" style="display: inline;" url="/pages/homePage/index">返回首页</navigator>
      </view>
      <!-- <view class="success-button">
                <van-button bind:click="handleGoHomepage" custom-class="btn btn-white" type="primary">{{ changeVisible ? '返回我的调解' : '返回首页' }}</van-button>
            </view> -->
    </view>
  </block>
  <!-- 消息提醒 and 新增当事人form -->
  <van-popup bind:close="handleClosePopupMsg" closeable custom-style="background-color:{{ popupMsg.partyTabActive === '1' ? '#e5e5e5' : '#ffffff'}}" position="bottom" round show="{{ popupMsg.show }}" title="{{ popupMsg.title || '' }}" zIndex="999">
    <view class="popupMsg-draft" wx:if="{{ popupMsg.type === 1 }}">检测到存在过往草稿申请记录,是否为您恢复?</view>
    <!-- 新增当事人form -->
    <view class="popupMsg" wx:else>
      <view class="popupMsg-tab" style="padding-bottom:{{ popupMsg.partyTabActive === '2' ? 0 : undefind }}" wx:if="{{ popupMsg.partyTabActive }}">
        <van-tabs active="{{ popupMsg.partyTabActive }}" bind:click="handleChangeTab" disabled="{{ popupMsg.editType === 'edit' ? true : false }}" line-width="54rpx" nav-class="{{ popupMsg.partyTabActive === '1' ? 'popupMsg-nav-class' : 'popupMsg-nav-class2'}}" tab-active-class="tab-active-class">
          <van-tab name="1" title="当事人" />
          <van-tab name="2" title="代理人" />
        </van-tabs>
      </view>
      <view class="popupMsg-tab-card" wx:if="{{ popupMsg.partyTabActive === '1' }}">
        <view bind:tap="handleChangePerClass" class="popupMsg-tab-card-item {{ popupMsg.data.perClass === item.value ? 'popupMsg-tab-card-item-active' : '' }}" data-index="{{ index }}" data-item="{{ item }}" wx:for="{{ popupMsg.partyArr }}" wx:key="index">
          <view class="popupMsg-tab-card-item-bg" style="border-bottom-left-radius:{{ index === popupMsg.perClassIndex + 1 ? '20rpx' : '0' }};border-bottom-right-radius:{{ index === popupMsg.perClassIndex - 1 ? '20rpx' : '0' }};">{{ item.label }}</view>
        </view>
      </view>
      <view class="popupMsg-form">
        <view class="cell">
          <view class="cell-title">
            {{ titleShow[popupMsg.data.perClass][1] }}
            <text class="cell-required">(必填)</text>
          </view>
          <view class="cell-select">
            <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="trueName" input-align="right" placeholder="请输入{{ titleShow[popupMsg.data.perClass][2] }}" value="{{ popupMsg.data.trueName || '' }}" />
          </view>
          <view bind:tap="handleVisiblePopupSelect" class="popupMsg-check" data-type="open">选择</view>
        </view>
        <view class="cell cell-noPadding" wx:if="{{ popupMsg.data.perClass !== '09_01001-1' && popupMsg.partyTabActive === '1' }}">
          <view class="cell-title">
            {{ titleShow[popupMsg.data.perClass][3] }}
            <text class="cell-required">(必填)</text>
          </view>
          <view class="cell-select">
            <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="deputy" input-align="right" placeholder="请输入真实姓名" value="{{ popupMsg.data.deputy || '' }}" />
          </view>
        </view>
        <view class="cell cell-noPadding">
          <view class="cell-title">
            手机号码
            <text wx:if="{{ popupMsg.type === 2 || popupMsg.partyTabActive === '2' }}" class="cell-required">(必填)</text>
          </view>
          <view class="cell-select">
            <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="mobile" input-align="right" placeholder="请输入常用的手机号码" value="{{ popupMsg.data.mobile || '' }}" />
          </view>
        </view>
        <view class="cell cell-noPadding">
          <view class="cell-title">身份证号码</view>
          <view class="cell-select">
            <van-field bind:change="handleChange" border="{{ false }}" custom-style="padding:0" data-formtype="popupMsg" data-key="certiNo" input-align="right" placeholder="根据调解实名规定,需要填写此项" value="{{ popupMsg.data.certiNo || '' }}" />
          </view>
        </view>
      </view>
      <view class="popupMsg-ocrButton">
        <van-button bind:click="handleOCR" block color="#F2F2F2" custom-style="color:rgba(0,0,0,85)" icon="{{ imgUrl }}camera.png" type="primary">拍照识别身份证</van-button>
      </view>
      <!-- 代理对象 -->
      <view class="popupMsg-agent" wx:if="{{ popupMsg.partyTabActive === '2' }}">
        <view class="cell-title">
          代理对象
          <text class="cell-required">(必填)</text>
        </view>
        <view class="popupMsg-agent-content">
          <view bind:tap="handleSelectAgent" class="popupMsg-agent-item {{ index === popupMsg.partyIndex ? 'popupMsg-agent-item-active' : '' }}" data-index="{{ index }}" wx:for="{{ submitData[popupMsg.type === 2 ? 'plaintiffList' : 'defendantList' ] }}" wx:if="{{ !!item.trueName }}" wx:key="index">
            <view>{{ item.trueName || '无' }}</view>
            <van-icon name="success" wx:if="{{ index === popupMsg.partyIndex }}" />
          </view>
          <block wx:if="{{ submitData[popupMsg.type === 2 ? 'plaintiffList' : 'defendantList' ].length === 0 }}">
            <van-empty class="popupMsg-agent-none" description="尚未添加当事人" />
          </block>
        </view>
      </view>
    </view>
    <view class="popupMsg-button">
      <view style="margin-right:48rpx" wx:if="{{ popupMsg.editType === 'edit' }}">
        <van-button bind:click="handleEditParty" block custom-class="btn btn-white" custom-style="width:240rpx;background-color:#f2f2f2;" data-edittype="delete" type="primary">删除</van-button>
      </view>
      <view style="flex:1">
        <van-button bind:click="handleClickPopupMsg" block type="primary">{{ popupMsg.buttonText }}</van-button>
        <view class="safeHeight" />
      </view>
    </view>
  </van-popup>
  <!-- 选择人员 -->
  <van-popup bind:close="handleVisiblePopupSelect" data-type="close" round show="{{ popupSelect.show }}" zIndex="999">
    <view class="popupSelect">
      <scroll-view scroll-y="{{true}}" style="max-height:600rpx;padding:64rpx 0;">
        <view bind:tap="handleSelectPerson" class="popupSelect-item" data-index="{{ index }}" wx:for="{{ popupSelect.data }}" wx:key="index">
          <view class="popupSelect-item-content">
            <view>{{ item.trueName }}</view>
            <view class="popupSelect-item-content-subTitle">{{ titleShow[item.perClass][0] }}{{ !!item.deputy ? ' | ' : '' }}{{ item.deputy || '' }} | {{ item.mobile }}</view>
          </view>
          <view class="popupSelect-item-icon" wx:if="{{ index === popupSelect.activeIndex }}">
            <van-icon name="success" size="20" />
          </view>
        </view>
        <van-empty description="暂无历史人员数据" wx:if="{{ popupSelect.data.length === 0 }}" />
      </scroll-view>
      <view class="popupSelect-button">
        <view bind:tap="handleVisiblePopupSelect" class="popupSelect-button-item" data-type="close">取消</view>
        <view bind:tap="handleConfirmPerson" class="popupSelect-button-item">确定</view>
      </view>
    </view>
  </van-popup>
</common-page>