ocpview-plus 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/dist/efviewplus.min.esm.js +99954 -0
  4. package/dist/efviewplus.min.js +142 -0
  5. package/dist/locale/lang.js +1 -0
  6. package/dist/locale/zh-CN.js +1 -0
  7. package/dist/locale/zh-TW.js +1 -0
  8. package/dist/locale/zh-UG.js +1 -0
  9. package/dist/style.css +9 -0
  10. package/dist/styles/efviewplus.css +1 -0
  11. package/package.json +144 -0
  12. package/src/components/base/controlbase.vue +191 -0
  13. package/src/components/base/controlbox.vue +102 -0
  14. package/src/components/base/index.js +3 -0
  15. package/src/components/base/load.js +20 -0
  16. package/src/components/base/probase.js +220 -0
  17. package/src/components/base/size.js +78 -0
  18. package/src/components/billbox/billbox.vue +68 -0
  19. package/src/components/billbox/index.js +2 -0
  20. package/src/components/cascaderbox/cascaderbox.vue +184 -0
  21. package/src/components/cascaderbox/index.js +2 -0
  22. package/src/components/checkbox/checkbox.vue +76 -0
  23. package/src/components/checkbox/checkgroupbox.vue +104 -0
  24. package/src/components/checkbox/index.js +3 -0
  25. package/src/components/colorbox/colorbox.vue +44 -0
  26. package/src/components/colorbox/index.js +2 -0
  27. package/src/components/combobox/combobox.vue +220 -0
  28. package/src/components/combobox/index.js +2 -0
  29. package/src/components/conditionbox/conditionbase.vue +195 -0
  30. package/src/components/conditionbox/conditionbox.vue +63 -0
  31. package/src/components/conditionbox/conditionfilterbox.vue +477 -0
  32. package/src/components/conditionbox/conditionselectorbox.vue +237 -0
  33. package/src/components/conditionbox/index.js +5 -0
  34. package/src/components/conditionbox/queryconditionbox.vue +26 -0
  35. package/src/components/conditionbox/queryconditionboxbase.vue +124 -0
  36. package/src/components/conditionbox/searchconditionbox.vue +114 -0
  37. package/src/components/conditionbox/searchgrid.vue +391 -0
  38. package/src/components/datebox/datebox.vue +129 -0
  39. package/src/components/datebox/daterangebox.vue +155 -0
  40. package/src/components/datebox/index.js +3 -0
  41. package/src/components/form/baseform.vue +677 -0
  42. package/src/components/form/detailsbox.vue +487 -0
  43. package/src/components/form/formbox.vue +29 -0
  44. package/src/components/form/formcardbox.vue +268 -0
  45. package/src/components/form/formcardgroupbox.vue +252 -0
  46. package/src/components/form/formcompro.js +19 -0
  47. package/src/components/form/formdetail.vue +129 -0
  48. package/src/components/form/formdetailtwo.vue +302 -0
  49. package/src/components/form/index.js +8 -0
  50. package/src/components/form/toolanchor.js +46 -0
  51. package/src/components/form/workform.vue +168 -0
  52. package/src/components/grid/basegrid.vue +1061 -0
  53. package/src/components/grid/editgrid.vue +51 -0
  54. package/src/components/grid/editgridbase.vue +947 -0
  55. package/src/components/grid/editgridcard.vue +193 -0
  56. package/src/components/grid/expandrow.vue +137 -0
  57. package/src/components/grid/index.js +6 -0
  58. package/src/components/grid/viewgrid.vue +122 -0
  59. package/src/components/grid/viewgridbase.vue +1284 -0
  60. package/src/components/icon/common-icon.vue +53 -0
  61. package/src/components/icon/eicon.vue +29 -0
  62. package/src/components/icon/icons.vue +42 -0
  63. package/src/components/icon/index.js +2 -0
  64. package/src/components/label/index.js +3 -0
  65. package/src/components/label/showtext.vue +95 -0
  66. package/src/components/load/loadcartoon.vue +228 -0
  67. package/src/components/map/index.js +2 -0
  68. package/src/components/map/mapbox.vue +348 -0
  69. package/src/components/masterplate/appendix.vue +586 -0
  70. package/src/components/masterplate/approval.vue +803 -0
  71. package/src/components/masterplate/base.vue +985 -0
  72. package/src/components/masterplate/billasyncimport.vue +614 -0
  73. package/src/components/masterplate/billconditionbox.vue +224 -0
  74. package/src/components/masterplate/billconditionsbox.vue +427 -0
  75. package/src/components/masterplate/billdetailform.vue +990 -0
  76. package/src/components/masterplate/billimport.vue +263 -0
  77. package/src/components/masterplate/billquerygrid.vue +316 -0
  78. package/src/components/masterplate/billsinglegrid.vue +234 -0
  79. package/src/components/masterplate/birtreport.vue +185 -0
  80. package/src/components/masterplate/detailbtntoolbar.vue +311 -0
  81. package/src/components/masterplate/detailsbox.vue +386 -0
  82. package/src/components/masterplate/editgridcard.vue +222 -0
  83. package/src/components/masterplate/editgridcard2.vue +109 -0
  84. package/src/components/masterplate/formcard.vue +106 -0
  85. package/src/components/masterplate/formcardgroupbox.vue +168 -0
  86. package/src/components/masterplate/formdetailtwo.vue +356 -0
  87. package/src/components/masterplate/gridcolset.vue +227 -0
  88. package/src/components/masterplate/index.js +23 -0
  89. package/src/components/masterplate/layouttemplate.vue +33 -0
  90. package/src/components/masterplate/leftlistrightdetails.vue +474 -0
  91. package/src/components/masterplate/leftlistrightlist.vue +465 -0
  92. package/src/components/masterplate/lefttreerightdetails.vue +619 -0
  93. package/src/components/masterplate/levelreport.vue +510 -0
  94. package/src/components/masterplate/listbtntoolbar.vue +257 -0
  95. package/src/components/masterplate/listdetails.vue +769 -0
  96. package/src/components/masterplate/operlog.vue +272 -0
  97. package/src/components/masterplate/options.vue +110 -0
  98. package/src/components/masterplate/page.vue +102 -0
  99. package/src/components/masterplate/promptmessage.vue +74 -0
  100. package/src/components/masterplate/querybar.vue +490 -0
  101. package/src/components/masterplate/report.vue +357 -0
  102. package/src/components/masterplate/rowbtntoolbar.vue +126 -0
  103. package/src/components/masterplate/simpletree.vue +129 -0
  104. package/src/components/masterplate/simpleviewgrid.vue +144 -0
  105. package/src/components/mychart/bar/bar.vue +202 -0
  106. package/src/components/mychart/basechart.vue +190 -0
  107. package/src/components/mychart/complexmychart/barline.vue +154 -0
  108. package/src/components/mychart/gauge/gauge.vue +83 -0
  109. package/src/components/mychart/index.js +9 -0
  110. package/src/components/mychart/line/line.vue +202 -0
  111. package/src/components/mychart/liquidfill/liquidfill.vue +109 -0
  112. package/src/components/mychart/pie/pie.vue +96 -0
  113. package/src/components/mychart/radar/radar.vue +122 -0
  114. package/src/components/mychart/scatter/scatter.vue +76 -0
  115. package/src/components/numberbox/append.js +11 -0
  116. package/src/components/numberbox/index.js +3 -0
  117. package/src/components/numberbox/numberbox.vue +303 -0
  118. package/src/components/numberbox/numberrangebox.vue +423 -0
  119. package/src/components/picturebox/filebox.vue +365 -0
  120. package/src/components/picturebox/index.js +3 -0
  121. package/src/components/picturebox/picturebox.vue +541 -0
  122. package/src/components/picturebox/uploadbox.vue +164 -0
  123. package/src/components/poptagbox/index.js +2 -0
  124. package/src/components/poptagbox/poptagbox.vue +389 -0
  125. package/src/components/poptextbox/index.js +2 -0
  126. package/src/components/poptextbox/poptextbox.vue +601 -0
  127. package/src/components/radiobox/index.js +2 -0
  128. package/src/components/radiobox/radiogroupbox.vue +76 -0
  129. package/src/components/richtextbox/editor.vue +150 -0
  130. package/src/components/richtextbox/index.js +2 -0
  131. package/src/components/richtextbox/richtextbox.vue +448 -0
  132. package/src/components/textbox/index.js +2 -0
  133. package/src/components/textbox/textbox.vue +98 -0
  134. package/src/components/timebox/index.js +2 -0
  135. package/src/components/timebox/timebox.vue +76 -0
  136. package/src/components/toolbar/ebutton.vue +169 -0
  137. package/src/components/toolbar/index.js +3 -0
  138. package/src/components/toolbar/toolbar.vue +446 -0
  139. package/src/components/tree/basetree.vue +725 -0
  140. package/src/components/tree/index.js +3 -0
  141. package/src/components/tree/treedata.vue +51 -0
  142. package/src/components/tree/treedatabase.vue +189 -0
  143. package/src/components/upload/billimport.vue +233 -0
  144. package/src/components/upload/index.js +2 -0
  145. package/src/components/videobox/index.js +2 -0
  146. package/src/components/videobox/uploadbox.vue +148 -0
  147. package/src/components/videobox/videobox.vue +503 -0
  148. package/src/components/wrichtextbox/editor.vue +219 -0
  149. package/src/components/wrichtextbox/index.js +2 -0
  150. package/src/components/wrichtextbox/wrichtextbox.vue +63 -0
  151. package/src/index.js +215 -0
  152. package/src/locale/format.js +51 -0
  153. package/src/locale/index.js +63 -0
  154. package/src/locale/lang/zh-CN.js +123 -0
  155. package/src/locale/lang/zh-TW.js +114 -0
  156. package/src/locale/lang/zh-UG.js +115 -0
  157. package/src/locale/lang.js +15 -0
  158. package/src/method/case/case.js +1180 -0
  159. package/src/method/config/queryconfig.js +24 -0
  160. package/src/method/const/const.js +815 -0
  161. package/src/method/index.js +8 -0
  162. package/src/static/excel/exportexcel.js +627 -0
  163. package/src/static/iview/coustom.js +463 -0
  164. package/src/store/index.js +19 -0
  165. package/src/store/modules/app.js +53 -0
  166. package/src/styles/README.md +3 -0
  167. package/src/styles/common.less +75 -0
  168. package/src/styles/components/anchor.less +74 -0
  169. package/src/styles/components/approval.less +136 -0
  170. package/src/styles/components/button.less +208 -0
  171. package/src/styles/components/card.less +51 -0
  172. package/src/styles/components/content.less +38 -0
  173. package/src/styles/components/font.less +314 -0
  174. package/src/styles/components/form.less +72 -0
  175. package/src/styles/components/iconfont/fonts/iconfont.less +1376 -0
  176. package/src/styles/components/iconfont/fonts/iconfont.svg +699 -0
  177. package/src/styles/components/iconfont/fonts/iconfont.ttf +0 -0
  178. package/src/styles/components/iconfont/fonts/iconfont.woff +0 -0
  179. package/src/styles/components/iconfont/fonts/iconfont.woff2 +0 -0
  180. package/src/styles/components/index.less +16 -0
  181. package/src/styles/components/input.less +290 -0
  182. package/src/styles/components/modal.less +203 -0
  183. package/src/styles/components/page.less +340 -0
  184. package/src/styles/components/select.less +361 -0
  185. package/src/styles/components/steps.less +367 -0
  186. package/src/styles/components/table.less +544 -0
  187. package/src/styles/components/tabs.less +249 -0
  188. package/src/styles/components/upload.less +83 -0
  189. package/src/styles/custom.less +67 -0
  190. package/src/styles/index.less +6 -0
  191. package/src/styles/pack.less +6 -0
  192. package/src/utils/EfuMessenger.js +155 -0
  193. package/src/utils/assist.js +353 -0
  194. package/src/utils/index.js +1 -0
  195. package/src/utils/random_str.js +10 -0
@@ -0,0 +1,803 @@
1
+ <template>
2
+ <div>
3
+ <Modal title="人员列表" width="660" v-model="showuser">
4
+ <Row style="margin-bottom:14px" type="flex" justify="start" align="middle" >
5
+ <Col span='6' v-if="!showapproval">
6
+ 已选抄送人:<span style="color:#AF292E">{{selectuserdata.length}}</span><span v-text="info"></span>
7
+ </Col>
8
+ <Col span='6' v-if="showapproval">
9
+ 已选审批<span v-text="info"></span> :<span style="color:#AF292E">{{selectuserdata.length}}</span><span v-text="info"></span>
10
+ </Col>
11
+ <Col span='18'>
12
+ <Row type="flex" justify="end" align="middle" >
13
+ <Button type="text" custom-icon="iconfont icon-custom-quanshan" @click="delAll" >全部删除</Button>
14
+ </Row>
15
+ </Col>
16
+ </Row>
17
+ <Row type="flex" justify="start" style="min-height:82px;border:1px dashed #DCDFE6;padding:10px">
18
+ <Tag v-for="(item,index) in selectuserdata" :key="'tag_' + index" :name="item.userCode" closable @on-close="closeCommon(item.userCode,'selectuserdata')" style="margin-right:8px"> {{item.userName}}</Tag>
19
+ </Row>
20
+ <Card style="margin-top:16px;" :padding="0" dis-hover>
21
+ <template #title>
22
+ <Row v-if="!showapproval" type="flex" justify="start" align="middle" >
23
+ <Col span='4'>
24
+ 已勾选:<span style="color:#AF292E">{{select.length}}</span><span v-text="info"></span>
25
+ </Col>
26
+ <Col span='20'>
27
+ <Row type="flex" justify="end" align="middle" >
28
+ <Input placeholder="请输入用户名称/工号/手机号" v-model="searchValue" search style="width: 380px;border-radius:20px;margin-top:10xp" @on-search="searchUser" @on-enter="searchUser"/>
29
+ </Row>
30
+ </Col>
31
+ </Row>
32
+ <Row v-else type="flex" justify="start" align="middle" >
33
+ <Col span='8'>
34
+ <RadioGroup v-model="selectType" @on-change="selectTypeChange">
35
+ <Radio label="USER">
36
+ <span>审批人</span>
37
+ </Radio>
38
+ <Radio label="USERGROUP">
39
+ <span>岗位</span>
40
+ </Radio>
41
+ </RadioGroup>
42
+ </Col>
43
+ <Col span='16'>
44
+ <Row type="flex" justify="end" align="middle" >
45
+ <Input placeholder="请输入编码/名称" v-model="searchValue" search style="width: 380px;border-radius:20px;margin-top:10xp" @on-search="searchStation" @on-enter="searchStation"/>
46
+ </Row>
47
+ </Col>
48
+ </Row>
49
+ </template>
50
+ <CheckboxGroup class="checkbox-group" name="user" v-model="select" style="max-height:250px;padding-left:14px" @on-change="selectUser">
51
+ <div class="checkbox" v-for='(item,index) in userdata' :key="'checkbox_' + index" >
52
+ <Checkbox :label='item.userCode' class="checkboxrow" >
53
+ <div style="display: flex; align-items: center;">
54
+ <div class='icon'>
55
+ <div >{{item.userName}}</div>
56
+ </div>
57
+ <div class='uname'>{{item.userName}}</div>
58
+ </div>
59
+ </Checkbox>
60
+ </div>
61
+ </CheckboxGroup>
62
+ </Card>
63
+ <template #footer>
64
+ <div>
65
+ <Row type="flex" justify="end" align="middle" :gutter="8">
66
+ <Col>
67
+ <Button style="width:66px" @click="userCancel" >取消</Button>
68
+ </Col>
69
+ <Col>
70
+ <Button style="width:66px;margin-left:14px" type="info" @click="userOk" >确认</Button>
71
+ </Col>
72
+ </Row>
73
+ </div>
74
+ </template>
75
+ </Modal>
76
+ <Drawer class-name="efutureapproval" title="工作流" v-model="showDrawer" :width="534">
77
+ <div class="drawer-box">
78
+ <div ref="head">
79
+ <div class="work-head">
80
+ <span>单据编号:{{value.billno}}</span>
81
+ <span>状态:{{value.statusName}}</span>
82
+ </div>
83
+ <div v-if='copyuser.length > 0' class="work-head">
84
+ <span>已抄送:<span><Tag v-for="(item,index) in copyuser" :key="'taguser_' + index" style="margin-left:10px">{{item.name}}</Tag> </span></span>
85
+ </div>
86
+ <p class="title"><span class="text">审批日志</span></p>
87
+ </div>
88
+ <div :style="contentStyle">
89
+ <ul class="content">
90
+ <li class="log-list" v-for="(item,index) in auditLog" :key="index">
91
+ <div class="line-wrap"></div>
92
+ <div class="left">
93
+ <template v-if="item.mulflag === 'N'">
94
+ <span>{{item.username}}</span>
95
+ </template>
96
+ <template v-else>
97
+ <Icon custom="iconfont icon-custom-approve" size="20" color="#fff"/>
98
+ </template>
99
+ <div class="icon-wrap">
100
+ <Icon v-if="item.act_status_ === 'Y'" custom="iconfont icon-custom-wancheng" color="#739943" />
101
+ <Icon v-else-if="item.act_status_ === 'M' || item.act_status_ === 'A'" custom="iconfont icon-custom-daishenpi" color="#f3b352" />
102
+ <Icon v-else-if="item.act_status_ === 'N'" color="#9a9b9d" custom="iconfont icon-custom-chehui" />
103
+ <Icon v-else custom="iconfont icon-custom-weishenpi" color="#ef6e73" />
104
+ </div>
105
+ </div>
106
+ <div class="right">
107
+ <p class="top">
108
+ <span style="font-size:16px;font-weight">{{item.describe_}}</span>
109
+ <span class="status">{{item.act_status_name}}</span>
110
+ </p>
111
+ <div>
112
+ <span>{{item.act_time_}}</span>
113
+ <p class="desc">意见:<span v-text="getMessage(item.message)"></span></p>
114
+ </div>
115
+ <div class="card" v-if="item.tasklist.length > 1">
116
+ <ul class="main">
117
+ <Row type="flex" justify="start" :gutter="16">
118
+ <Col v-for="(tmp, index2) in item.tasklist" :key="'task_' + index2" v-show="index2 < maxUser || (index2 >= maxUser && tmp.active)" >
119
+ <li class="user-list">
120
+ <div class="user">
121
+ <span>{{tmp.username}}</span>
122
+ <div class="icon-wrap">
123
+ <Icon v-if="item.status === 'Y'" custom="iconfont icon-custom-wancheng" color="#739943" />
124
+ <Icon v-else-if="item.status === 'M' || item.status === 'A'" custom="iconfont icon-custom-daishenpi" color="#f3b352" />
125
+ <Icon v-else-if="item.status === 'N'" color="#9a9b9d" custom="iconfont icon-custom-chehui" />
126
+ <Icon v-else custom="iconfont icon-custom-weishenpi" color="#ef6e73" />
127
+ </div>
128
+ </div>
129
+ <p style="z-index:99">{{tmp.username}}</p>
130
+ </li>
131
+ </Col>
132
+ </Row>
133
+ </ul>
134
+ <Row v-if="item.tasklist > maxUser" type="flex" justify="center" align="middle">
135
+ <Col>
136
+ <Button v-if="!item.active" icon="ios-arrow-down" type="text" @click="showGroupUser(index)">展开 </Button>
137
+ <Button v-if="item.active" icon="ios-arrow-up" type="text" @click="showGroupUser(index)"> 收起</Button>
138
+ </Col>
139
+ </Row>
140
+ </div>
141
+ </div>
142
+ </li>
143
+ </ul>
144
+ </div>
145
+ </div>
146
+ <div ref="foot" class="footer">
147
+ <Form v-show="showBtn" :label-width="45">
148
+ <FormItem label="抄送:">
149
+ <Row type="flex" justify="start" align="middle" >
150
+ <Col span='2'>
151
+ <span style="color:#AF292E"> {{copy.length}}</span> <span>人</span>
152
+ </Col>
153
+ <Col span='22'>
154
+ <Row type="flex" justify="end" align="middle">
155
+ <p @click.stop="addUser" style="cursor:pointer">
156
+ <Icon custom="iconfont icon-custom-add" size="12" color="#AF292E"/>
157
+ <span style="margin-left:9px;color:#AF292E;font-size:14px"> 添加抄送人 </span>
158
+ </p>
159
+ </Row>
160
+ </Col>
161
+ </Row>
162
+ <Row type="flex" justify="start" align="middle" style="height:42px;border:1px solid #DCDFE6">
163
+ <Tag v-for="(item,index) in copy" :key="'tag2_' + index" :name="item.userCode" style="margin-left:8px"> {{item.userName}}</Tag>
164
+ </Row>
165
+ </FormItem>
166
+ <FormItem v-show="false" label="审批:">
167
+ <Row type="flex" justify="start" align="middle" >
168
+ <Col span='2'>
169
+ <span style="color:#AF292E;cursor:pointer"> {{approvals.length}}</span> <span v-text="info2"></span>
170
+ </Col>
171
+ <Col span='22'>
172
+ <Row type="flex" justify="end" align="middle">
173
+ <p @click.stop="addApproval" style="cursor:pointer">
174
+ <Icon custom="iconfont icon-custom-add" size="12" color="#AF292E"/>
175
+ <span style="margin-left:9px;color:#AF292E;font-size:14px"> 添加审批人 </span>
176
+ </p>
177
+ </Row>
178
+ </Col>
179
+ </Row>
180
+ <Row type="flex" justify="start" align="middle" style="height:42px;border:1px solid #DCDFE6">
181
+ <Tag v-for="(item,index) in approvals" :key="'tag3_' + index" :name="item.userCode" style="margin-left:8px"> {{item.userName}}</Tag>
182
+ </Row>
183
+ </FormItem>
184
+ <FormItem label="意见:">
185
+ <Input v-model="idea" type='textarea' :autosize="rowsConfig"></Input>
186
+ </FormItem>
187
+ </Form>
188
+ <Row type="flex" v-if="showBtn" justify="end" :gutter="10" style="padding-top:20px;padding-bottom:4px">
189
+ <Col v-if="showSubmit">
190
+ <Button customIcon="iconfont icon-custom-submit" @click="onSubmit" >提交</Button>
191
+ </Col>
192
+ <Col v-if="showReset">
193
+ <Button customIcon="iconfont icon-custom-recall" @click="billBack" >撤回</Button>
194
+ </Col>
195
+ <Col v-show="false">
196
+ <Button customIcon="iconfont icon-custom-jiaqian" @click="billBack" >加签</Button>
197
+ </Col>
198
+ <Col v-if="showReject">
199
+ <Button customIcon="iconfont icon-custom-reject" @click="reject" >驳回</Button>
200
+ </Col>
201
+ <Col v-if="showApprove">
202
+ <Button customIcon="iconfont icon-custom-approve" @click="submitApprove" >审批</Button>
203
+ </Col>
204
+ </Row>
205
+ </div>
206
+ </Drawer>
207
+ </div>
208
+ </template>
209
+
210
+ <script>
211
+ import elementResizeDetectorMaker from 'element-resize-detector'
212
+ import load from '@/components/base/load';
213
+ import size from '@/components/base/size';
214
+ export default {
215
+ name: 'mapprovalbox',
216
+ mixins: [load,size],
217
+ data() {
218
+ return {
219
+ myConfig: {
220
+ resources: '',
221
+ classPrefix: '',
222
+ },
223
+ value: {
224
+ billmoduleid: '',
225
+ billno: '',
226
+ billstatus: '',
227
+ statusName: ''
228
+ },
229
+ buttonlist:[],
230
+ auditLog: [],
231
+ copyuser: [],
232
+ isSub: false,
233
+ showuser: false,
234
+ isSubmit: false,
235
+ showBtn:true,
236
+ selectType: 'USER',
237
+ list: [],
238
+ select: [],
239
+ showSubmit: false,
240
+ showDrawer:false,
241
+ showApprove:false,
242
+ showReject:false,
243
+ showReset:false,
244
+ copy:[],
245
+ approvals:[],
246
+ idea:'',
247
+ rowsConfig:{ minRows: 3, maxRows: 6 },
248
+ maxUser:6,
249
+ extraHeight:0,
250
+ extraHeight2:0,
251
+ userdata:[],
252
+ searchValue:'',
253
+ selectuserdata:[],
254
+ showapproval:false,
255
+ curlSelectType:'USER'
256
+ };
257
+ },
258
+ created() {
259
+ this.myConfig = Object.assign({}, this.myConfig, this.config);
260
+ },
261
+ computed: {
262
+ contentStyle () {
263
+ let height = this.$Store.state.app.clientHeight;
264
+ if (this.extraHeight) {
265
+ height = height - Number(this.extraHeight);
266
+ }
267
+ if (this.extraHeight2) {
268
+ height = height - Number(this.extraHeight2);
269
+ }
270
+ height = height - 90;
271
+ return 'overflow-y: auto;max-height:' + height + 'px;';
272
+ },
273
+ info () {
274
+ if (this.selectType === 'USER') {
275
+ return '人';
276
+ } else {
277
+ return '组';
278
+ }
279
+ },
280
+ info2 () {
281
+ if (this.curlSelectType === 'USER') {
282
+ return '人';
283
+ } else {
284
+ return '组';
285
+ }
286
+ }
287
+ },
288
+ props:{
289
+ config: {
290
+ type:Object,
291
+ default:null
292
+ },
293
+ },
294
+ methods: {
295
+ onSubmit() {
296
+ this.billSubmit();
297
+ },
298
+ setData(config) {
299
+ this.clearData();
300
+ this.$nextTick(() => {
301
+ this.value ={};
302
+ Object.assign(this.value, config);
303
+ this.getAuditLog();
304
+ if (this.value.billstatus === 'S') {
305
+ // this.getSubuser();
306
+ }
307
+ //this.initBtn();
308
+ });
309
+ },
310
+ initBtn () {
311
+ if (this.value.billstatus === 'N') {
312
+ this.showSubmit = true;
313
+ } else {
314
+ this.showSubmit = false;
315
+ }
316
+ if (this.value.billstatus !== 'N' && this.value.billstatus !== 'S' && this.value.billstatus !== 'R' && this.value.billstatus !== 'A') {
317
+ this.showBtn = false;
318
+ } else {
319
+ this.showBtn = true;
320
+ }
321
+ },
322
+ clearData() {
323
+ this.auditLog = [];
324
+ this.selectType ='USER';
325
+ this.curlSelectType ='USER';
326
+ this.selectuserdata = [];
327
+ this.userdata = [];
328
+ this.select = [];
329
+ this.idea = '';
330
+ this.approvals = [];
331
+ },
332
+ getSubuser() { // 获取提交人
333
+ this.isSub = false;
334
+ this.doPost(
335
+ '.getBillSubmitter',
336
+ {billno: this.value.billno, modecode: this.value.billmoduleid},
337
+ (data) => {
338
+ let usercode = this.getUserCode();
339
+ if (data == usercode) {
340
+ this.isSub = true;
341
+ }
342
+ }
343
+ );
344
+ },
345
+ getAuditLog() { // 获取审批日志
346
+ this.showSubmit = false;
347
+ this.showReset = false;
348
+ this.showReject = false;
349
+ this.showApprove = false;
350
+ this.doPost(
351
+ '.getProcessList',
352
+ {billno: this.value.billno, modecode: this.value.billmoduleid},
353
+ (data) => {
354
+ if (data.procinfo && data.procinfo.proclist) {
355
+ let result = data.procinfo.proclist || [];
356
+ let copylist = [];
357
+ if (data.procinfo.cc && data.procinfo.cc.length > 0) {
358
+ data.procinfo.cc.forEach(item => {
359
+ let tmp = {};
360
+ tmp.active = false;
361
+ tmp.copyuser = item;
362
+ tmp.name = item.substr(-2, 2);
363
+ copylist.push(tmp);
364
+ });
365
+ }
366
+ result.forEach(item => {
367
+ item.active = false;
368
+ item.tasklist.forEach(list => {
369
+ if (list.usernam) {
370
+ list.userName = list.username.substr(-2, 2);
371
+ }
372
+ });
373
+ });
374
+
375
+
376
+ if (data.procinfo.btnlist) {
377
+ data.procinfo.btnlist.forEach(el => {
378
+ if (el === '提交') {
379
+ this.showSubmit = true;
380
+ }
381
+ if (el === '撤回') {
382
+ this.showReset = true;
383
+ }
384
+ if (el === '驳回') {
385
+ this.showReject = true;
386
+ }
387
+ if (el === '审批') {
388
+ this.showApprove = true;
389
+ }
390
+ })
391
+ }
392
+
393
+ this.auditLog = result;
394
+ this.copyuser = copylist || [];
395
+ }
396
+ if (this.showSubmit || this.showReset || this.showApprove || this.showReject) {
397
+ this.showBtn = true;
398
+ } else {
399
+ this.showBtn = false;
400
+ }
401
+ }
402
+ );
403
+ },
404
+ showGroupUser(index) {
405
+ this.auditLog[index].active = !this.auditLog[index].active;
406
+ },
407
+ billBack() { // 审批撤回
408
+ this.doPost(
409
+ '.billrepeal',
410
+ {billno: this.value.billno},
411
+ (data) => {
412
+ this.alert(data.msg,null,3);
413
+ this.showDrawer = false;
414
+ }
415
+ );
416
+ },
417
+ reject() { // 审批驳回
418
+ if (!this.idea) {
419
+ this.alert('意见不能为空',null,1);
420
+ return;
421
+ }
422
+ let para = {};
423
+ para = {billno: this.value.billno,comment: this.idea};
424
+ this.doCc(para);
425
+ this.doPost(
426
+ '.billreject' ,
427
+ para,
428
+ (data) => {
429
+ this.showDrawer = false;
430
+ this.alert(data.msg,null,3);
431
+ }
432
+ );
433
+ },
434
+ doCc (param) {
435
+ if (this.copy.length > 0) {
436
+ let cc = [];
437
+ this.copy.forEach(el => {
438
+ cc.push(el.usercode);
439
+ });
440
+ param.cc = cc;
441
+ }
442
+ },
443
+ billSubmit() {
444
+ let param = {
445
+ billno: this.value.billno
446
+ };
447
+ this.doCc();
448
+ if (this.idea) {
449
+ param.comment = this.idea;
450
+ }
451
+ this.doPost(
452
+ '.billsubmit',
453
+ param,
454
+ (data) => {
455
+ this.showDrawer = false;
456
+ this.$nextTick(() =>{
457
+ setTimeout(() => {
458
+ this.alert(data.msg,null,3);
459
+ }, 250);
460
+ });
461
+ }
462
+ );
463
+ },
464
+ submitApprove() {
465
+ this.doPost(
466
+ '.billapproval',
467
+ {billno: this.value.billno,comment: this.idea},
468
+ (data) => {
469
+ this.showDrawer = false;
470
+ this.alert(data.msg,null,3);
471
+ });
472
+ },
473
+ addAuditUser() {
474
+ if (!this.idea) {
475
+ this.alert('意见不能为空',null,1);
476
+ return;
477
+ }
478
+ if (this.approvals.length === 0) {
479
+ this.alert('审批人不能为空');
480
+ return;
481
+ }
482
+ let param = {
483
+ billno: this.value.billno,
484
+ userid: this.getUserCode(),
485
+ comment: this.idea
486
+ };
487
+ param.addTaskInfo = {};
488
+ param.addTaskInfo.type = this.curlSelectType;
489
+ param.addTaskInfo.list = []
490
+ this.approvals.forEach(el => {
491
+ param.addTaskInfo.list.push(el.userCode);
492
+ })
493
+ this.doCc();
494
+ this.doPost(
495
+ '.billaddtask',
496
+ param,
497
+ (data) => {
498
+ this.alert(data.msg,null,3);
499
+
500
+ }
501
+ );
502
+ },
503
+ doPost(method,postData,SuccessFun) {
504
+ let self = this;
505
+ this.showLoading();
506
+ self.asyncPost(this.myConfig.resources, this.myConfig.classPrefix + method, postData, function(data){
507
+ SuccessFun(data);
508
+ self.hideLoading();
509
+ },function(data) {
510
+ self.hideLoading();
511
+ self.$nextTick(() =>{
512
+ setTimeout(() => {
513
+ self.alert(data,null,2);
514
+ }, 250);
515
+ });
516
+ },function(data) {
517
+ self.hideLoading();
518
+ self.$nextTick(() =>{
519
+ setTimeout(() => {
520
+ self.alert(data,null,2);
521
+ }, 250);
522
+ });
523
+ });
524
+ },
525
+ open () {
526
+ this.showDrawer = true;
527
+ },
528
+ addUser() {
529
+ this.userdata = [];
530
+ this.searchValue = '';
531
+ this.selectuserdata = this.$Method.copy(this.copy);
532
+ this.showuser = true;
533
+ this.showapproval = false;
534
+ this.selectType = 'USER';
535
+ },
536
+ getMessage(msg) {
537
+ if (msg) {
538
+ return msg;
539
+ } else {
540
+ return '-';
541
+ }
542
+ },
543
+ setExtraHeight () {
544
+ let height = 0;
545
+ if (this.$refs.head) {
546
+ height = this.$refs.head.offsetHeight;
547
+ }
548
+ this.extraHeight = height;
549
+ },
550
+ setExtraHeight2 () {
551
+ let height = 0;
552
+ if (this.$refs.foot) {
553
+ height = this.$refs.foot.offsetHeight;
554
+ }
555
+ this.extraHeight2 = height;
556
+ },
557
+ searchUser() {
558
+ this.getCopyUserData();
559
+ },
560
+ getCopyUserData () {
561
+ if (!this.searchValue) {
562
+ this.alert("查询内容不能为空");
563
+ return;
564
+ }
565
+ let para = {};
566
+ para.searchValue = this.searchValue;
567
+ para.status= [0,1];
568
+ para.page_size = 999;
569
+ this.userdata = [];
570
+ let self = this;
571
+ this.asyncPost(this.OmdUrl.amp, 'usercenter.account.search', para, function (data) {
572
+ if (data.account) {
573
+ self.userdata = data.account;
574
+ }
575
+ });
576
+ },
577
+ getStationData () {
578
+ if (!this.searchValue) {
579
+ this.alert("查询内容不能为空");
580
+ return;
581
+ }
582
+ let para = {};
583
+ para.searchValue = this.searchValue;
584
+ para.page_size = 999;
585
+ this.userdata = [];
586
+ let self = this;
587
+ this.asyncPost(this.OmdUrl.amp, 'usercenter.station.search', para, function (data) {
588
+ if (data.station) {
589
+ let station = [];
590
+ data.station.forEach(el => {
591
+ let tmp = {};
592
+ tmp.userCode = el.stationCode;
593
+ tmp.userName = el.stationName;
594
+ station.push(tmp);
595
+ })
596
+ self.userdata = station;
597
+ }
598
+ });
599
+ },
600
+ selectUser(obj) {
601
+ this.initSelectUserData(obj);
602
+ },
603
+ initSelectUserData(tmp) {
604
+ let temp = [];
605
+ tmp.forEach(el => {
606
+ let index = this.userdata.findIndex(el2 => el2.userCode === el);
607
+ if (index > -1) {
608
+ temp.push(this.$Method.copy(this.userdata[index]));
609
+ }
610
+ });
611
+ let temp2 = [];
612
+ this.selectuserdata.forEach(el => {
613
+ let index = this.userdata.findIndex(el2 => el2.userCode === el.userCode);
614
+ if (index > -1) {
615
+ let index2 = temp.findIndex(el3 => el3.userCode === el.userCode);
616
+ if (index2 > -1) {
617
+ temp2.push(this.$Method.copy(el));
618
+ }
619
+ } else {
620
+ temp2.push(this.$Method.copy(el));
621
+ }
622
+ });
623
+ temp.forEach(el => {
624
+ let index = temp2.findIndex(el2 => el.userCode === el2.userCode);
625
+ if (index === -1) {
626
+ temp2.push(this.$Method.copy(el))
627
+ }
628
+ })
629
+ this.selectuserdata = temp2;
630
+ },
631
+ userCancel() {
632
+ this.showuser = false;
633
+ },
634
+ userOk(){
635
+ if (this.showapproval) {
636
+ this.approvals = this.$Method.copy(this.selectuserdata);
637
+ this.curlSelectType = this.selectType;
638
+ } else {
639
+ this.copy = this.$Method.copy(this.selectuserdata);
640
+
641
+ }
642
+ this.showuser = false;
643
+ },
644
+ addApproval(){
645
+ this.userdata = [];
646
+ this.searchValue = '';
647
+ this.selectuserdata = this.$Method.copy(this.approvals);
648
+ this.showapproval = true;
649
+ this.showuser = true;
650
+ this.selectType = this.curlSelectType;
651
+ },
652
+ closeCommon(usercode,name) {
653
+ let index = this[name].findIndex(el => el.userCode === usercode);
654
+ if (index > -1) {
655
+ this[name].splice(index,1);
656
+ }
657
+ },
658
+ delAll() {
659
+ this.selectuserdata = [];
660
+ },
661
+ searchStation() {
662
+ this.getStationData();
663
+ },
664
+ clearUser() {
665
+ this.userdata = [];
666
+ this.selectuserdata = [];
667
+ this.searchValue = '';
668
+ },
669
+ selectTypeChange() {
670
+ this.clearUser();
671
+ }
672
+ },
673
+ mounted () {
674
+ this.observer = elementResizeDetectorMaker();
675
+ if (this.$refs.head) {
676
+ this.observer.listenTo(this.$refs.head, this.setExtraHeight);
677
+ }
678
+ if (this.$refs.foot) {
679
+ this.observer.listenTo(this.$refs.foot, this.setExtraHeight2);
680
+ }
681
+ },
682
+ beforeUnmount() {
683
+ if (this.$refs.head) {
684
+ this.observer.removeListener(this.$refs.head, this.setExtraHeight);
685
+ }
686
+ if (this.$refs.foot) {
687
+ this.observer.removeListener(this.$refs.foot, this.setExtraHeight2);
688
+ }
689
+ }
690
+ };
691
+ </script>
692
+
693
+ <style lang="less" scoped>
694
+ .efutureapproval .content .line-wrap::after{
695
+ position: absolute;
696
+ content:'';
697
+ width: 1px;
698
+ height: calc(100% - 42px);
699
+ background-color: #eee;
700
+ }
701
+ .checkbox-group {
702
+ height: 390px;
703
+ overflow-y: auto;
704
+ }
705
+
706
+ .checkbox-group .checkbox{
707
+ padding: 5px 0;
708
+ }
709
+
710
+ .checkbox .icon{
711
+ width: 35px;
712
+ height: 35px;
713
+ color: #fff;
714
+ line-height: 35px;
715
+ font-size: 12px;
716
+ text-align: center;
717
+ border-radius: 50%;
718
+ margin: 0 10px;
719
+ background-color: #AF292E;
720
+ }
721
+
722
+ .checkbox .uname{
723
+ white-space: nowrap;
724
+ text-overflow: ellipsis;
725
+ overflow: hidden;
726
+ }
727
+
728
+ .checkboxrow {
729
+ width: 100%;
730
+ display: flex;
731
+ align-items: center;
732
+ }
733
+
734
+
735
+ .username,
736
+ .user-item {
737
+ position: relative;
738
+ width: 40px;
739
+ height: 40px;
740
+ text-align: center;
741
+ line-height: 38px;
742
+ color: #fff;
743
+ margin-right: 17px;
744
+ border-radius: 50%;
745
+ background-color: #3389ff;
746
+ }
747
+
748
+ .username .icon,
749
+ .user-item .icon {
750
+ position: absolute;
751
+ bottom: -1px;
752
+ right: 0;
753
+ width: 15px;
754
+ height: 15px;
755
+ line-height: 14px;
756
+ border-radius: 50%;
757
+ background-color: #fff;
758
+ }
759
+
760
+ .user-item .icon {
761
+ width: 15px;
762
+ height: 15px;
763
+ }
764
+
765
+ .username .icon .iconfont {
766
+ font-size: 15px;
767
+ }
768
+
769
+ .user-item .icon .iconfont {
770
+ font-size: 15px;
771
+ }
772
+ .checkboxrow {
773
+ .ivu-checkbox-label-text {
774
+ display: flex;
775
+ align-items: center
776
+ }
777
+ }
778
+
779
+ .user-list {
780
+ display: flex;
781
+ flex-direction: column;
782
+ align-items: flex-start;
783
+ }
784
+
785
+ .user-list .user-list-wrap {
786
+ display: flex;
787
+ margin: 10px 0px;
788
+ align-items: center;
789
+ }
790
+
791
+ .user-list-wrap .name {
792
+ color: #808385;
793
+ }
794
+
795
+
796
+ .user-item {
797
+ width: 40px;
798
+ min-width: 40px;
799
+ height: 40px;
800
+ margin-right: 0;
801
+ line-height: 40px;
802
+ }
803
+ </style>