Commit d50eb3632bbdf60c4464a84cf8838267ab3ce091
1 parent
88a62993
Exists in
charge
fix:修改问题
Showing
15 changed files
with
1027 additions
and
301 deletions
Show diff stats
api/charge.js
... | ... | @@ -2,8 +2,10 @@ const { http } = uni.$u |
2 | 2 | |
3 | 3 | /* 拜访列表 */ |
4 | 4 | export const getMcVisitList = params => http.get('/schsf/mcVisit/list', { params }) |
5 | -/* 附件 */ | |
5 | +/* 批量查看附件 */ | |
6 | 6 | export const getMcFileList = data => http.post('/schsf/mcFile/detailsList',data) |
7 | +/* 文件-查看详情(单个) */ | |
8 | +export const getByUuid = uuid => http.get('/schsf/mcFile/getByUuid/'+uuid) | |
7 | 9 | /* 流程记录 */ |
8 | 10 | export const getMcOperationLogList = params => http.get('/schsf/mcOperationLog/list', { params }) |
9 | 11 | /* 查询财年 */ |
... | ... | @@ -42,3 +44,5 @@ export const getMcConstructionList = params => http.get('/schsf/mcConstruction/l |
42 | 44 | export const mcConstructionEngineering = data => http.post('/schsf/mcConstruction/engineering', data ) |
43 | 45 | /* 运营维护 */ |
44 | 46 | export const mcConstructionOperation = data => http.post('/schsf/mcConstruction/operations', data ) |
47 | +/* 钉钉认证接口 */ | |
48 | +export const getDingtalkConfig = params => http.get('/schsf/dingtalk/getConfig', { params }) | ... | ... |
common/config.js
components/popUpFillIn/popUpFillIn.vue
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | <!-- 点火维护 --> |
12 | 12 | <u-form-item v-if="type==='dhwh'" required label="是否已点火" labelWidth="100"> |
13 | 13 | <view class="flex justify-between margin-tb w100"> |
14 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueDHWH" @change="DHchange"> | |
14 | + <u-radio-group activeColor="#CF000D" placement="row" v-model="radiovalueDHWH" @change="DHchange"> | |
15 | 15 | <u-radio class="margin-right" name="是">是</u-radio> |
16 | 16 | <u-radio name="否">否</u-radio> |
17 | 17 | </u-radio-group> |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <!-- 工程维护 --> |
21 | 21 | <u-form-item v-if="type==='gcwh'" required label="是否竣工" labelWidth="100"> |
22 | 22 | <view class="flex justify-between margin-tb w100"> |
23 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueGCWH" @change="GCchange"> | |
23 | + <u-radio-group activeColor="#CF000D" placement="row" v-model="radiovalueGCWH" @change="GCchange"> | |
24 | 24 | <u-radio class="margin-right" name="是">是</u-radio> |
25 | 25 | <u-radio name="否">否</u-radio> |
26 | 26 | </u-radio-group> |
... | ... | @@ -30,63 +30,76 @@ |
30 | 30 | <!-- 运营维护 --> |
31 | 31 | <u-form-item v-if="type==='yywh'" required label="是否通气到表前" labelWidth="100"> |
32 | 32 | <view class="flex justify-between margin-tb w100"> |
33 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueYYWH" @change="YYchange"> | |
33 | + <u-radio-group activeColor="#CF000D" placement="row" v-model="radiovalueYYWH" @change="YYchange"> | |
34 | 34 | <u-radio class="margin-right" name="是">是</u-radio> |
35 | 35 | <u-radio name="否">否</u-radio> |
36 | 36 | </u-radio-group> |
37 | 37 | </view> |
38 | 38 | </u-form-item> |
39 | 39 | <view class="usuallyCard padding margin-bottom-sm"> |
40 | - <view class="margin-tb text-lg" v-if="dhShow && gcShow"> | |
40 | + <view class="margin-tb text-lg"> | |
41 | 41 | 基本维护 |
42 | 42 | </view> |
43 | 43 | <!-- 点火维护 --> |
44 | - <u-form-item v-if="type==='dhwh'" required label="点火时间" labelWidth="100" borderBottom> | |
44 | + <u-form-item v-if="type==='dhwh'" required label="用户编号" labelWidth="100" borderBottom> | |
45 | + <u-input v-model="model.userCode" placeholder="请输入" border="none"></u-input> | |
46 | + <!-- <u-icon slot="right" name="calendar" size="20" @click="datetimeShow = true"></u-icon> --> | |
47 | + </u-form-item> | |
48 | + <u-form-item v-if="type==='dhwh' && dhShow" required label="点火时间" labelWidth="100" borderBottom> | |
45 | 49 | <u-input v-model="model.ignTime" placeholder="请选择" disabled disabledColor="#fff" |
46 | 50 | border="none"></u-input> |
47 | 51 | <u-icon slot="right" name="calendar" size="20" @click="datetimeShow = true"></u-icon> |
48 | 52 | </u-form-item> |
49 | - <u-form-item v-if="type==='dhwh'" required label="未点火原因" labelWidth="100" borderBottom> | |
53 | + <u-form-item v-if="type==='dhwh' && !dhShow" required label="未点火原因" labelWidth="100" borderBottom> | |
50 | 54 | <u-input v-model="model.nIgnRsn" placeholder="请选择" disabled disabledColor="#fff" |
51 | 55 | border="none"></u-input> |
52 | - <u-icon slot="right" name="arrow-down" size="20" @click="handleIgnition('sys_mc_ignition_rsn')"></u-icon> | |
56 | + <u-icon slot="right" name="arrow-down" size="20" | |
57 | + @click="handleIgnition('sys_mc_ignition_rsn')"></u-icon> | |
53 | 58 | </u-form-item> |
54 | 59 | |
55 | 60 | <!-- 工程维护 --> |
56 | - <u-form-item v-if="type==='gcwh'" required label="市场派单时间" labelWidth="100" borderBottom> | |
57 | - <u-input v-model="model.assignmentTime" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
61 | + <u-form-item v-if="type==='gcwh' && gcShow" required label="市场派单时间" labelWidth="100" borderBottom> | |
62 | + <u-input v-model="model.assignmentTime" placeholder="请选择" disabled disabledColor="#fff" | |
63 | + border="none"></u-input> | |
58 | 64 | <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon> |
59 | 65 | </u-form-item> |
60 | - <u-form-item v-if="type==='gcwh'" required label="竣工时间" labelWidth="100" borderBottom> | |
61 | - <u-input v-model="model.completionTime" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
66 | + <u-form-item v-if="type==='gcwh' && gcShow" required label="竣工时间" labelWidth="100" borderBottom> | |
67 | + <u-input v-model="model.completionTime" placeholder="请选择" disabled disabledColor="#fff" | |
68 | + border="none"></u-input> | |
62 | 69 | <u-icon slot="right" name="calendar" size="20" @click="multipleChange('completionTime')"></u-icon> |
63 | 70 | </u-form-item> |
64 | - <u-form-item v-if="type==='gcwh'" required label="未竣工原因" labelWidth="100" borderBottom> | |
65 | - <u-input v-model="model.nonNcmpRsn" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
66 | - <u-icon slot="right" name="arrow-down" size="20" @click="handleIgnition('sys_mc_construction_kb_rsn')"></u-icon> | |
71 | + <u-form-item v-if="type==='gcwh' && !gcShow" required label="未竣工原因" labelWidth="100" borderBottom> | |
72 | + <u-input v-model="model.nonNcmpRsn" placeholder="请选择" disabled disabledColor="#fff" | |
73 | + border="none"></u-input> | |
74 | + <u-icon slot="right" name="arrow-down" size="20" | |
75 | + @click="handleIgnition('sys_mc_construction_kb_rsn')"></u-icon> | |
67 | 76 | </u-form-item> |
68 | 77 | |
69 | 78 | <!-- 运营维护 --> |
70 | - <u-form-item v-if="type==='yywh'" required label="市场派单时间" labelWidth="100" borderBottom> | |
71 | - <u-input v-model="model.assignmentTime" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
79 | + <u-form-item v-if="type==='yywh' && yyShow" required label="市场派单时间" labelWidth="100" borderBottom> | |
80 | + <u-input v-model="model.assignmentTime" placeholder="请选择" disabled disabledColor="#fff" | |
81 | + border="none"></u-input> | |
72 | 82 | <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon> |
73 | 83 | </u-form-item> |
74 | - <u-form-item v-if="type==='yywh'" required label="通气到到表前时间" labelWidth="100" borderBottom> | |
75 | - <u-input v-model="model.gctMtrrisTime" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
84 | + <u-form-item v-if="type==='yywh' && yyShow" required label="通气到到表前时间" labelWidth="100" borderBottom> | |
85 | + <u-input v-model="model.gctMtrrisTime" placeholder="请选择" disabled disabledColor="#fff" | |
86 | + border="none"></u-input> | |
76 | 87 | <u-icon slot="right" name="calendar" size="20" @click="multipleChange('gctMtrrisTime')"></u-icon> |
77 | 88 | </u-form-item> |
78 | - <u-form-item v-if="type==='yywh'" required label="未完成原因" labelWidth="100" borderBottom> | |
79 | - <u-input v-model="model.gctNcmpRsn" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
80 | - <u-icon slot="right" name="arrow-down" size="20" @click="handleIgnition('sys_mc_construction_yy_rsn')"></u-icon> | |
89 | + <u-form-item v-if="type==='yywh' && !yyShow" required label="未完成原因" labelWidth="100" borderBottom> | |
90 | + <u-input v-model="model.gctNcmpRsn" placeholder="请选择" disabled disabledColor="#fff" | |
91 | + border="none"></u-input> | |
92 | + <u-icon slot="right" name="arrow-down" size="20" | |
93 | + @click="handleIgnition('sys_mc_construction_yy_rsn')"></u-icon> | |
81 | 94 | </u-form-item> |
82 | 95 | </view> |
83 | 96 | </view> |
84 | 97 | <view class="flex justify-between bg-white padding-tb-xs padding-lr"> |
85 | 98 | <view class="w48" @click="close"> |
86 | - <u-button :customStyle="{color:'#EA5504'}">取消</u-button> | |
99 | + <u-button :customStyle="{color:'#CF000D'}">取消</u-button> | |
87 | 100 | </view> |
88 | 101 | <view class="w48" @click="confirm"> |
89 | - <u-button color="#EA5504">确定</u-button> | |
102 | + <u-button color="#CF000D">确定</u-button> | |
90 | 103 | </view> |
91 | 104 | </view> |
92 | 105 | </view> |
... | ... | @@ -96,7 +109,7 @@ |
96 | 109 | @cancel="pickerShow = false" @confirm="pickerConfirm"></u-picker> |
97 | 110 | <!-- <u-calendar :show="calendarShow" @close="closeCalender" @confirm="confirmCalender"></u-calendar> --> |
98 | 111 | <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm" |
99 | - @cancel="datetimeShow = false" @close="datetimeShow = false" mode="datetime"></u-datetime-picker> | |
112 | + @cancel="datetimeShow = false" @close="datetimeShow = false" mode="date"></u-datetime-picker> | |
100 | 113 | </view> |
101 | 114 | </template> |
102 | 115 | |
... | ... | @@ -120,6 +133,10 @@ |
120 | 133 | IgnitionID: { |
121 | 134 | type: Number |
122 | 135 | }, |
136 | + userCode: { | |
137 | + type: String, | |
138 | + default: "" | |
139 | + }, | |
123 | 140 | }, |
124 | 141 | data() { |
125 | 142 | return { |
... | ... | @@ -129,26 +146,30 @@ |
129 | 146 | dataTimeValue: Number(new Date()), |
130 | 147 | radiovalueDHWH: "", |
131 | 148 | radiovalueGCWH: "", |
132 | - radiovalueYYWH:"", | |
149 | + radiovalueYYWH: "", | |
133 | 150 | model: { |
134 | - ignTime: "", | |
135 | - nIgnRsn: "" | |
151 | + | |
152 | + // ignTime: "", | |
153 | + // nIgnRsn: "" | |
136 | 154 | }, |
137 | 155 | rules: {}, |
138 | 156 | pickerShow: false, |
139 | 157 | columns: [], |
140 | 158 | dhShow: true, |
141 | 159 | gcShow: true, |
142 | - yyShow:true, | |
143 | - currentName:"", | |
160 | + yyShow: true, | |
161 | + currentName: "", | |
144 | 162 | }; |
145 | 163 | }, |
146 | 164 | methods: { |
147 | 165 | open() { |
166 | + this.model.userCode = this.userCode; | |
148 | 167 | this.show = true; |
149 | 168 | }, |
150 | 169 | close() { |
170 | + console.log("close") | |
151 | 171 | this.show = false; |
172 | + this.model = {}; | |
152 | 173 | }, |
153 | 174 | handleIgnition(dict) { |
154 | 175 | let dictArr = this.getDictDatas(dict); |
... | ... | @@ -167,7 +188,7 @@ |
167 | 188 | uni.$u.toast('请选择点火时间'); |
168 | 189 | return |
169 | 190 | } |
170 | - if (!this.model.nIgnRsn) { | |
191 | + if (!this.model.nIgnRsn && this.radiovalueDHWH === '否') { | |
171 | 192 | uni.$u.toast('请选择未点火原因'); |
172 | 193 | return |
173 | 194 | } |
... | ... | @@ -186,7 +207,7 @@ |
186 | 207 | uni.$u.toast('请选择市场竣工时间'); |
187 | 208 | return |
188 | 209 | } |
189 | - if (!this.model.nonNcmpRsn) { | |
210 | + if (!this.model.nonNcmpRsn && this.radiovalueGCWH === '否') { | |
190 | 211 | uni.$u.toast('请选择竣工原因'); |
191 | 212 | return |
192 | 213 | } |
... | ... | @@ -206,7 +227,7 @@ |
206 | 227 | uni.$u.toast('请选择通气到表前时间'); |
207 | 228 | return |
208 | 229 | } |
209 | - if (!this.model.gctNcmpRsn) { | |
230 | + if (!this.model.gctNcmpRsn && this.radiovalueGCWH === '否') { | |
210 | 231 | uni.$u.toast('请选择未完成原因'); |
211 | 232 | return |
212 | 233 | } |
... | ... | @@ -214,12 +235,12 @@ |
214 | 235 | } |
215 | 236 | this.show = false; |
216 | 237 | }, |
217 | - async submitDh(){ | |
238 | + async submitDh() { | |
218 | 239 | let data = { |
219 | 240 | id: this.IgnitionID, |
220 | 241 | ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N', |
221 | 242 | nIgnRsn: this.model.nIgnRsn, |
222 | - ignTime: this.model.ignTime | |
243 | + ignTime: this.model.ignTime + ' 00:00:00' | |
223 | 244 | } |
224 | 245 | console.log(this.radiovalueGCWH); |
225 | 246 | console.log("点火数据", data); |
... | ... | @@ -232,12 +253,12 @@ |
232 | 253 | uni.$u.toast(result.msg) |
233 | 254 | } |
234 | 255 | }, |
235 | - async submitGc(){ | |
256 | + async submitGc() { | |
236 | 257 | let data = { |
237 | 258 | id: this.IgnitionID, |
238 | 259 | isCompleted: this.radiovalueGCWH === '是' ? 'Y' : 'N', |
239 | - assignmentTime: this.model.assignmentTime, | |
240 | - completionTime: this.model.completionTime, | |
260 | + assignmentTime: this.model.assignmentTime + ' 00:00:00', | |
261 | + completionTime: this.model.completionTime + ' 00:00:00', | |
241 | 262 | nonNcmpRsn: this.model.nonNcmpRsn |
242 | 263 | } |
243 | 264 | console.log(this.radiovalueGCWH); |
... | ... | @@ -251,13 +272,13 @@ |
251 | 272 | uni.$u.toast(result.msg) |
252 | 273 | } |
253 | 274 | }, |
254 | - async submitYy(){ | |
275 | + async submitYy() { | |
255 | 276 | let data = { |
256 | 277 | id: this.IgnitionID, |
257 | 278 | gasConnMtrRis: this.radiovalueYYWH === '是' ? 'Y' : 'N', |
258 | - assignmentTime: this.model.assignmentTime, | |
259 | - gctMtrrisTime: this.model.gctMtrrisTime, | |
260 | - gctNcmpRsn:this.model.gctNcmpRsn | |
279 | + assignmentTime: this.model.assignmentTime + ' 00:00:00', | |
280 | + gctMtrrisTime: this.model.gctMtrrisTime + ' 00:00:00', | |
281 | + gctNcmpRsn: this.model.gctNcmpRsn | |
261 | 282 | } |
262 | 283 | console.log("运营数据", data); |
263 | 284 | const result = await mcConstructionOperation(data); |
... | ... | @@ -286,7 +307,7 @@ |
286 | 307 | this.model = {} |
287 | 308 | } |
288 | 309 | }, |
289 | - YYchange(e){ | |
310 | + YYchange(e) { | |
290 | 311 | if (e === '是') { |
291 | 312 | this.yyShow = true |
292 | 313 | } else { |
... | ... | @@ -294,20 +315,20 @@ |
294 | 315 | this.model = {} |
295 | 316 | } |
296 | 317 | }, |
297 | - multipleChange(name){ | |
318 | + multipleChange(name) { | |
298 | 319 | this.currentName = name; |
299 | 320 | this.datetimeShow = true; |
300 | 321 | }, |
301 | 322 | pickerConfirm(e) { |
302 | 323 | console.log(e); |
303 | 324 | let data = e.value[0].value; |
304 | - if(this.type === 'dhwh'){ | |
325 | + if (this.type === 'dhwh') { | |
305 | 326 | this.model.nIgnRsn = data; |
306 | 327 | } |
307 | - if(this.type === 'gcwh'){ | |
328 | + if (this.type === 'gcwh') { | |
308 | 329 | this.model.nonNcmpRsn = data; |
309 | 330 | } |
310 | - if(this.type === 'yywh'){ | |
331 | + if (this.type === 'yywh') { | |
311 | 332 | this.model.gctNcmpRsn = data; |
312 | 333 | } |
313 | 334 | this.pickerShow = false; |
... | ... | @@ -318,15 +339,15 @@ |
318 | 339 | this.calendarShow = false; |
319 | 340 | }, |
320 | 341 | dateConfirm(e) { |
321 | - let time = this.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss'); | |
322 | - if(this.type === 'dhwh'){ | |
342 | + let time = this.$u.timeFormat(e.value, 'yyyy-mm-dd'); | |
343 | + if (this.type === 'dhwh') { | |
323 | 344 | this.model.ignTime = time; |
324 | 345 | } |
325 | - if(this.type === 'gcwh'){ | |
346 | + if (this.type === 'gcwh') { | |
326 | 347 | this.model[this.currentName] = time; |
327 | 348 | // this.model.nonNcmpRsn = data; |
328 | 349 | } |
329 | - if(this.type === 'yywh'){ | |
350 | + if (this.type === 'yywh') { | |
330 | 351 | this.model[this.currentName] = time; |
331 | 352 | // this.model.gctNcmpRsn = data; |
332 | 353 | } | ... | ... |
main.js
manifest.json
package-lock.json
... | ... | @@ -2,6 +2,24 @@ |
2 | 2 | "requires": true, |
3 | 3 | "lockfileVersion": 1, |
4 | 4 | "dependencies": { |
5 | + "@babel/runtime": { | |
6 | + "version": "7.24.7", | |
7 | + "resolved": "http://www.hotent.xyz:8081/nexus/repository/group-npm/@babel/runtime/-/runtime-7.24.7.tgz", | |
8 | + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", | |
9 | + "requires": { | |
10 | + "regenerator-runtime": "^0.14.0" | |
11 | + } | |
12 | + }, | |
13 | + "copy-text-to-clipboard": { | |
14 | + "version": "3.2.0", | |
15 | + "resolved": "http://www.hotent.xyz:8081/nexus/repository/group-npm/copy-text-to-clipboard/-/copy-text-to-clipboard-3.2.0.tgz", | |
16 | + "integrity": "sha512-RnJFp1XR/LOBDckxTib5Qjr/PMfkatD0MUCQgdpqS8MdKiNUzBjAQBEN6oUy+jW7LI93BBG3DtMB2KOOKpGs2Q==" | |
17 | + }, | |
18 | + "core-js": { | |
19 | + "version": "3.37.1", | |
20 | + "resolved": "http://www.hotent.xyz:8081/nexus/repository/group-npm/core-js/-/core-js-3.37.1.tgz", | |
21 | + "integrity": "sha512-Xn6qmxrQZyB0FFY8E3bgRXei3lWDJHhvI+u0q9TKIYM49G8pAr0FgnnrFRAmsbptZL1yxRADVXn+x5AGsbBfyw==" | |
22 | + }, | |
5 | 23 | "dingtalk-jsapi": { |
6 | 24 | "version": "3.0.29", |
7 | 25 | "resolved": "https://registry.npmmirror.com/dingtalk-jsapi/-/dingtalk-jsapi-3.0.29.tgz", |
... | ... | @@ -15,10 +33,31 @@ |
15 | 33 | "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz", |
16 | 34 | "integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A==" |
17 | 35 | }, |
36 | + "mutation-observer": { | |
37 | + "version": "1.0.3", | |
38 | + "resolved": "http://www.hotent.xyz:8081/nexus/repository/group-npm/mutation-observer/-/mutation-observer-1.0.3.tgz", | |
39 | + "integrity": "sha512-M/O/4rF2h776hV7qGMZUH3utZLO/jK7p8rnNgGkjKUw8zCGjRQPxB8z6+5l8+VjRUQ3dNYu4vjqXYLr+U8ZVNA==" | |
40 | + }, | |
18 | 41 | "promise-polyfill": { |
19 | 42 | "version": "7.1.2", |
20 | 43 | "resolved": "https://registry.npmmirror.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz", |
21 | 44 | "integrity": "sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ==" |
45 | + }, | |
46 | + "regenerator-runtime": { | |
47 | + "version": "0.14.1", | |
48 | + "resolved": "http://www.hotent.xyz:8081/nexus/repository/group-npm/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", | |
49 | + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" | |
50 | + }, | |
51 | + "vconsole": { | |
52 | + "version": "3.15.1", | |
53 | + "resolved": "http://www.hotent.xyz:8081/nexus/repository/group-npm/vconsole/-/vconsole-3.15.1.tgz", | |
54 | + "integrity": "sha512-KH8XLdrq9T5YHJO/ixrjivHfmF2PC2CdVoK6RWZB4yftMykYIaXY1mxZYAic70vADM54kpMQF+dYmvl5NRNy1g==", | |
55 | + "requires": { | |
56 | + "@babel/runtime": "^7.17.2", | |
57 | + "copy-text-to-clipboard": "^3.0.1", | |
58 | + "core-js": "^3.11.0", | |
59 | + "mutation-observer": "^1.0.3" | |
60 | + } | |
22 | 61 | } |
23 | 62 | } |
24 | 63 | } | ... | ... |
package.json
pages/charge/constructionMaintenance/index.vue
1 | 1 | <template> |
2 | - <view class="app-container"> | |
3 | - <u-navbar :title="title" safeAreaInsetTop placeholder> | |
4 | - <view slot="left" class="text-red"></view> | |
5 | - </u-navbar> | |
6 | - <view class=""> | |
2 | + <view class="app-container"> | |
3 | + <u-navbar :title="title" safeAreaInsetTop placeholder> | |
4 | + <view slot="left" class="text-red"></view> | |
5 | + </u-navbar> | |
6 | + <!-- <view class=""> | |
7 | 7 | <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}" |
8 | 8 | :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" |
9 | 9 | :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}"> |
... | ... | @@ -14,177 +14,366 @@ |
14 | 14 | <uv-drop-down-item name="type" type="2" label="是否立管" value="0"> |
15 | 15 | </uv-drop-down-item> |
16 | 16 | </uv-drop-down> |
17 | - </view> | |
17 | + </view> --> | |
18 | 18 | |
19 | - <view class="usuallyCard margin padding" v-if="list.length" v-for="(item,index) in list" :key="index"> | |
20 | - <view class="flex flex-direction"> | |
21 | - <view class="flex justify-between"> | |
22 | - <view class=""> | |
23 | - <text class="text-grey margin-right-xs">项目公司:</text>{{item.companyName || '--'}} | |
24 | - </view> | |
25 | - <view class="flex"> | |
26 | - <!-- <u-tag bgColor="#EFF1FD" borderColor="#fff" color="#5875EE" size="mini" text="待审批"></u-tag> --> | |
27 | - </view> | |
28 | - </view> | |
19 | + <view class="topSelectCss"> | |
20 | + <view class="flex justify-around"> | |
21 | + <view class="flex align-center" v-for="(item,index) of searchList" @click="openPicker(item)" :key="item.title"> | |
22 | + <view class="text-lg"> | |
23 | + <span v-if="searchForm[item.name]" class="text-red"> | |
24 | + {{searchForm[item.name]}} | |
25 | + </span> | |
26 | + <span v-else>{{ item.title }}</span> | |
27 | + </view> | |
28 | + <view class="margin-left-xs" v-if="item.title == '财年'"> | |
29 | + <u-icon name="calendar-fill" size="25"></u-icon> | |
30 | + </view> | |
31 | + <view class="margin-left-xs" v-else> | |
32 | + <u-icon v-if="currentName == item.key" color="#5875eb" name="arrow-up-fill" size="12"></u-icon> | |
33 | + <u-icon v-else name="arrow-down-fill" color="#999db0" size="12"></u-icon> | |
34 | + </view> | |
35 | + </view> | |
36 | + </view> | |
37 | + </view> | |
38 | + | |
39 | + <view class="usuallyCard margin padding" v-if="list.length" v-for="(item,index) in list" :key="index"> | |
40 | + <view class="flex flex-direction"> | |
41 | + <view class="flex justify-between"> | |
42 | + <view class=""> | |
43 | + <text class="text-grey margin-right-xs">项目公司:</text>{{item.companyName || '--'}} | |
44 | + </view> | |
45 | + <view class="flex"> | |
46 | + <!-- <u-tag bgColor="#EFF1FD" borderColor="#fff" color="#5875EE" size="mini" text="待审批"></u-tag> --> | |
47 | + </view> | |
48 | + </view> | |
29 | 49 | <view class="margin-top-sm"> |
30 | - <text class="text-grey margin-right-xs">村(小区):</text>{{item.vlgOrCmty || '--'}} | |
50 | + <text class="text-grey margin-right-xs">村(小区):</text>{{item.vlgOrCmty || '--'}} | |
51 | + </view> | |
52 | + <view class="margin-top-sm"> | |
53 | + <text class="text-grey margin-right-xs">项目类型:</text>{{item.projectTypeName || '--'}} | |
54 | + </view> | |
55 | + </view> | |
56 | + <view class="flex justify-end margin-top"> | |
57 | + <view class="margin-right" @click="handleDetail(item)"> | |
58 | + <u-button shape="circle">查看详情</u-button> | |
31 | 59 | </view> |
32 | - <view class="margin-top-sm"> | |
33 | - <text class="text-grey margin-right-xs">项目类型:</text>{{item.projectTypeName || '--'}} | |
34 | - </view> | |
35 | - </view> | |
36 | - <view class="flex justify-end margin-top"> | |
37 | - <view class="margin-right" @click="handleDetail(item)"> | |
38 | - <u-button shape="circle">查看详情</u-button> | |
39 | - </view> | |
40 | - <view class="margin-right" @click="handleOpen(item,'gcwh')" v-if="item.isCompleted === 'N' "> | |
41 | - <u-button shape="circle" color="#CF000D">工程维护</u-button> | |
42 | - </view> | |
43 | - <view class="" @click="handleOpen(item,'yywh')" v-if="item.gasConnMtrRis == 'N'"> | |
44 | - <u-button shape="circle" color="#CF000D">运营维护</u-button> | |
60 | + <view class="margin-right" @click="handleOpen(item,'gcwh')" v-if="item.isCompleted === 'N' "> | |
61 | + <u-button shape="circle" color="#CF000D">工程维护</u-button> | |
45 | 62 | </view> |
46 | - </view> | |
47 | - <!-- <view class="nodeCss"> | |
63 | + <view class="" @click="handleOpen(item,'yywh')" v-if="!item.gasConnMtrRis"> | |
64 | + <u-button shape="circle" color="#CF000D">运营维护</u-button> | |
65 | + </view> | |
66 | + </view> | |
67 | + <!-- <view class="nodeCss"> | |
48 | 68 | 当前审批节点:项目公司_市场负责人 |
49 | 69 | </view> --> |
50 | - </view> | |
70 | + </view> | |
51 | 71 | <u-loadmore :status="status" v-if="list.length > 0" /> |
52 | 72 | <u-empty text="暂无数据" icon="/static/images/icon/nodata.png" v-else></u-empty> |
53 | - <popUpFillIn :IgnitionID="IgnitionID" :type="btnType" title="工程维护" ref="popUpFillInRef" @getList="initData"></popUpFillIn> | |
54 | - <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> | |
55 | - </view> | |
73 | + <popUpFillIn :IgnitionID="IgnitionID" :type="btnType" title="工程维护" ref="popUpFillInRef" @getList="initData"> | |
74 | + </popUpFillIn> | |
75 | + | |
76 | + <!-- 字典下拉 --> | |
77 | + <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="selectCancel" | |
78 | + @close="selectCancel" keyName="label" @confirm="selectConfirm"></u-picker> | |
79 | + <!-- 公司下拉--> | |
80 | + <u-picker :show="gsShow" ref="gsPicker" :title="gsName" closeOnClickOverlay :columns="companyList" | |
81 | + @cancel="gsCancel" @close="gsCancel" keyName="label" @confirm="gsConfirm" @change="changeHandler"></u-picker> | |
82 | + <!-- 时间下拉开始 --> | |
83 | + <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> | |
84 | + </view> | |
56 | 85 | </template> |
57 | 86 | |
58 | 87 | <script> |
59 | 88 | import { |
89 | + getCompanyCascader, | |
60 | 90 | getMcConstructionList |
61 | 91 | } from '@/api/charge.js' |
62 | - export default { | |
63 | - components: {}, | |
64 | - props: { | |
65 | - | |
66 | - }, | |
67 | - data() { | |
68 | - return { | |
69 | - title: "施工维护", | |
70 | - keyword: "", | |
71 | - actionStyle: { | |
72 | - 'color': '#fff', | |
73 | - 'background': '#EC1E19', | |
74 | - 'borderRadius': "15px", | |
75 | - 'width': '60px', | |
76 | - 'height': '25px', | |
77 | - 'line-height': '25px', | |
78 | - }, | |
79 | - btnType:"gcwh", | |
80 | - params: { | |
81 | - pageNum: 1, | |
82 | - pageSize: 10, | |
83 | - companyCode: "", | |
84 | - isCompleted: "", | |
85 | - gasConnMtrRis: "" | |
86 | - }, | |
87 | - status: "loadmore", | |
88 | - list: [], | |
89 | - total: null, | |
90 | - IgnitionID:0, | |
91 | - } | |
92 | - }, | |
93 | - computed: { | |
92 | + export default { | |
93 | + components: {}, | |
94 | + props: { | |
94 | 95 | |
95 | - }, | |
96 | - onReachBottom() { | |
97 | - let allTotal = this.params.pageNum * this.params.pageSize | |
98 | - if (allTotal < this.total) { | |
99 | - //当前条数小于总条数 则增加请求页数 | |
100 | - this.params.pageNum++; | |
101 | - this.status = 'loading'; | |
102 | - this.initData() //调用加载数据方法 | |
103 | - } else { | |
104 | - this.status = "nomore" | |
105 | - // console.log('已加载全部数据') | |
106 | - } | |
107 | - }, | |
108 | - onPullDownRefresh() { | |
109 | - this.params.pageNum = 1; | |
110 | - this.keyword = ""; | |
111 | - this.initData(); | |
112 | - setTimeout(() => { | |
113 | - //结束下拉刷新 | |
114 | - uni.stopPullDownRefresh(); | |
115 | - }, 500); | |
116 | - }, | |
117 | - onLoad() { | |
118 | - this.initData() | |
119 | - }, | |
120 | - methods: { | |
121 | - async initData() { | |
122 | - let { | |
123 | - code, | |
124 | - rows, | |
125 | - total | |
126 | - } = await getMcConstructionList(this.params); | |
127 | - if (code === 200) { | |
128 | - if (this.params.pageNum > 1) { | |
129 | - this.list = [...this.list, ...rows] | |
130 | - } else { | |
131 | - this.list = rows; | |
132 | - } | |
133 | - this.total = total; | |
134 | - console.log('list', JSON.parse(JSON.stringify(this.list))); | |
135 | - } | |
136 | - }, | |
96 | + }, | |
97 | + data() { | |
98 | + return { | |
99 | + title: "施工维护", | |
100 | + keyword: "", | |
101 | + actionStyle: { | |
102 | + 'color': '#fff', | |
103 | + 'background': '#EC1E19', | |
104 | + 'borderRadius': "15px", | |
105 | + 'width': '60px', | |
106 | + 'height': '25px', | |
107 | + 'line-height': '25px', | |
108 | + }, | |
109 | + btnType: "gcwh", | |
110 | + params: { | |
111 | + pageNum: 1, | |
112 | + pageSize: 10, | |
113 | + companyCode: "", | |
114 | + isCompleted: "", | |
115 | + gasConnMtrRis: "" | |
116 | + }, | |
117 | + status: "loadmore", | |
118 | + list: [], | |
119 | + total: null, | |
120 | + IgnitionID: 0, | |
121 | + searchForm: { | |
122 | + companyCode: "", | |
123 | + isCompleted: "", | |
124 | + gasConnMtrRis:"" | |
125 | + }, | |
126 | + model: {}, | |
127 | + currentName: "", | |
128 | + userCode: "", | |
129 | + gsShow: false, | |
130 | + pickerShow: false, | |
131 | + columns: [], | |
132 | + companyOption: [], | |
133 | + regionName: [], | |
134 | + groupName: [], | |
135 | + companyName: [], | |
136 | + gsName: "", | |
137 | + searchList: [{ | |
138 | + title: '项目公司', | |
139 | + name: 'companyCode', | |
140 | + type: 'select', | |
141 | + key: 'company', | |
142 | + }, | |
143 | + { | |
144 | + title: '是否竣工', | |
145 | + name: 'isCompleted', | |
146 | + type: 'select', | |
147 | + key: 'isCompleted', | |
148 | + dict: 'sys_cn_yn' | |
149 | + }, | |
150 | + { | |
151 | + title: '是否通气到表前', | |
152 | + name: 'gasConnMtrRis', | |
153 | + type: 'select', | |
154 | + key: 'gasConnMtrRis', | |
155 | + dict: 'sys_cn_yn' | |
156 | + }, | |
157 | + ] | |
158 | + } | |
159 | + }, | |
160 | + computed: { | |
161 | + companyList() { | |
162 | + return [this.regionName, this.groupName, this.companyName]; | |
163 | + } | |
164 | + }, | |
165 | + onReachBottom() { | |
166 | + let allTotal = this.params.pageNum * this.params.pageSize | |
167 | + if (allTotal < this.total) { | |
168 | + //当前条数小于总条数 则增加请求页数 | |
169 | + this.params.pageNum++; | |
170 | + this.status = 'loading'; | |
171 | + this.initData() //调用加载数据方法 | |
172 | + } else { | |
173 | + this.status = "nomore" | |
174 | + // console.log('已加载全部数据') | |
175 | + } | |
176 | + }, | |
177 | + onPullDownRefresh() { | |
178 | + this.params = { | |
179 | + pageNum: 1, | |
180 | + pageSize: 10, | |
181 | + } | |
182 | + this.searchForm = {} | |
183 | + this.keyword = ""; | |
184 | + this.initData(); | |
185 | + setTimeout(() => { | |
186 | + //结束下拉刷新 | |
187 | + uni.stopPullDownRefresh(); | |
188 | + }, 500); | |
189 | + }, | |
190 | + // onLoad() { | |
191 | + // this.initData() | |
192 | + // }, | |
193 | + onShow() { | |
194 | + this.getCompanyCascader(); | |
195 | + this.initData(); | |
196 | + }, | |
197 | + methods: { | |
198 | + async initData() { | |
199 | + let { | |
200 | + code, | |
201 | + rows, | |
202 | + total | |
203 | + } = await getMcConstructionList(this.params); | |
204 | + if (code === 200) { | |
205 | + if (this.params.pageNum > 1) { | |
206 | + this.list = [...this.list, ...rows] | |
207 | + } else { | |
208 | + this.list = rows; | |
209 | + } | |
210 | + this.total = total; | |
211 | + console.log('list', JSON.parse(JSON.stringify(this.list))); | |
212 | + } | |
213 | + }, | |
214 | + async getCompanyCascader() { | |
215 | + this.companyOption = (await getCompanyCascader()).data; | |
216 | + this.companyOption.forEach(item1 => { | |
217 | + this.regionName.push(item1); | |
218 | + item1.children.forEach(item2 => { | |
219 | + this.groupName.push(item2); | |
220 | + item2.children.forEach(item3 => { | |
221 | + this.companyName.push(item3); | |
222 | + }); | |
223 | + }); | |
224 | + }); | |
225 | + console.log("当前公司类", this.companyOption); | |
226 | + }, | |
227 | + async openPicker(data) { | |
228 | + console.log("下拉data", data) | |
229 | + this.currentName = data.key; | |
230 | + console.log('打印data-===', data); | |
231 | + if (data.type === 'select') { | |
232 | + if (data.key == 'company') { | |
233 | + this.gsColumns = [this.regionName, this.groupName, this.companyName]; | |
234 | + this.gsName = `${this.regionName[0].label}`; | |
235 | + this.gsShow = true; | |
236 | + } else { | |
237 | + let dict = data.dict; | |
238 | + let dictArr = this.getDictDatas(dict); | |
239 | + this.columns = [dictArr]; | |
240 | + this.pickerShow = true; | |
241 | + } | |
242 | + } else { | |
243 | + console.log('打印data===', data); | |
244 | + this.datetimeShow = true; | |
245 | + // this.showTimeParams.showStartDailog = true; | |
246 | + } | |
247 | + }, | |
248 | + // 项目公司切换 | |
249 | + changeHandler(e) { | |
250 | + const { | |
251 | + columnIndex, | |
252 | + value, | |
253 | + values, // values为当前变化列的数组内容 | |
254 | + index, | |
255 | + indexs | |
256 | + // 微信小程序无法将picker实例传出来,只能通过ref操作 | |
257 | + } = e | |
258 | + console.log(e); | |
259 | + // 当第一列值发生变化时,变化第二列(后一列)对应的选项 | |
260 | + let [regionIndex, groupIndex, companyIndex] = indexs; | |
261 | + if (columnIndex === 0) { | |
262 | + this.gsName = value[0].label; | |
263 | + console.log(0, this.regionName) | |
264 | + // this.regionName = this.regionName[index]?.children || []; | |
265 | + this.groupName = this.regionName[index]?.children || []; | |
266 | + this.companyName = this.groupName[0]?.children || []; | |
267 | + console.log(1, this.regionName) | |
268 | + console.log(2, this.groupName) | |
269 | + console.log(3, this.companyName) | |
270 | + this.$refs.gsPicker.setIndexs([index, 0, 0], true) | |
271 | + } else if (columnIndex === 1) { | |
272 | + this.gsName = value[1].label; | |
273 | + this.groupName = this.regionName[index]?.children || []; | |
274 | + this.companyName = this.groupName[0]?.children || []; | |
275 | + this.$refs.gsPicker.setIndexs(indexs, true) | |
276 | + } else if (columnIndex === 2) { | |
277 | + this.gsName = value[2].label; | |
278 | + } | |
279 | + // let data2 = value[0].children; | |
280 | + // let data3 = data2[0].children; | |
281 | + // picker为选择器this实例,变化第二列对应的选项 | |
282 | + // this.gsColumns = [this.regionName, data2, data3] | |
283 | + console.log("选择后", this.gsColumns); | |
284 | + }, | |
285 | + selectConfirm(e) { | |
286 | + let data = e.value[0].value; | |
287 | + let dataLabel = e.value[0].label; | |
288 | + if (this.currentName === 'isCompleted') { | |
289 | + this.searchForm.isCompleted = dataLabel; | |
290 | + this.model.isCompleted = data; | |
291 | + this.params.isCompleted = data==='是'?'Y':'N'; | |
292 | + }else if(this.currentName === 'gasConnMtrRis') { | |
293 | + this.searchForm.gasConnMtrRis = dataLabel; | |
294 | + this.model.gasConnMtrRis = data; | |
295 | + this.params.gasConnMtrRis = data==='是'?'Y':'N' | |
296 | + } | |
297 | + this.pickerShow = false; | |
298 | + this.currentName = ''; | |
299 | + this.initData() | |
300 | + }, | |
301 | + selectCancel(e) { | |
302 | + this.pickerShow = false; | |
303 | + this.currentName = ''; | |
304 | + }, | |
305 | + gsConfirm(e) { | |
306 | + console.log("公司", e); | |
307 | + this.model.regionName = e.value[0]?.value; | |
308 | + this.model.groupName = e.value[1]?.value; | |
309 | + this.model.companyName = e.value[2]?.label; | |
310 | + this.model.companyCode = e.value[2]?.value; | |
311 | + this.gsShow = false; | |
312 | + this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...'; | |
313 | + this.params.companyCode = this.model.companyCode; | |
314 | + this.initData(); | |
315 | + this.currentName = ''; | |
316 | + }, | |
317 | + gsCancel() { | |
318 | + this.gsShow = false; | |
319 | + this.currentName = ''; | |
320 | + }, | |
137 | 321 | // 查看详情 |
138 | 322 | handleDetail(item) { |
139 | 323 | uni.navigateTo({ |
140 | 324 | url: '/pages/charge/constructionMaintenance/detail?objData=' + JSON.stringify(item) |
141 | 325 | }) |
142 | 326 | }, |
143 | - handleOpen(item,type){ | |
327 | + handleOpen(item, type) { | |
144 | 328 | this.IgnitionID = item.id; |
145 | 329 | this.btnType = type; |
146 | 330 | this.$refs.popUpFillInRef.open(); |
147 | 331 | } |
148 | - } | |
149 | - } | |
332 | + } | |
333 | + } | |
150 | 334 | </script> |
151 | 335 | |
152 | 336 | <style lang="scss" scoped> |
153 | - /deep/.u-search__content { | |
154 | - width: 70vw; | |
155 | - padding-right: 140rpx; | |
156 | - } | |
337 | + /deep/.u-search__content { | |
338 | + width: 70vw; | |
339 | + padding-right: 140rpx; | |
340 | + } | |
341 | + | |
342 | + /deep/.u-search__action { | |
343 | + position: absolute; | |
344 | + left: 50%; | |
345 | + } | |
157 | 346 | |
158 | - /deep/.u-search__action { | |
159 | - position: absolute; | |
160 | - left: 50%; | |
161 | - } | |
347 | + .nodeCss { | |
348 | + position: relative; | |
349 | + display: flex; | |
350 | + justify-content: center; | |
351 | + align-items: center; | |
352 | + margin: 25rpx auto; | |
353 | + border-radius: 20rpx; | |
354 | + width: 95%; | |
355 | + height: 80rpx; | |
356 | + background: #EFF1FD; | |
357 | + color: #5875EB; | |
358 | + text-align: center; | |
359 | + } | |
162 | 360 | |
163 | - .nodeCss { | |
164 | - position: relative; | |
165 | - display: flex; | |
166 | - justify-content: center; | |
167 | - align-items: center; | |
168 | - margin: 25rpx auto; | |
169 | - border-radius: 20rpx; | |
170 | - width: 95%; | |
171 | - height: 80rpx; | |
172 | - background: #EFF1FD; | |
173 | - color: #5875EB; | |
174 | - text-align: center; | |
175 | - } | |
176 | 361 | |
362 | + .nodeCss::after { | |
363 | + content: ''; | |
364 | + position: absolute; | |
365 | + top: 0%; | |
366 | + right: 25rpx; | |
367 | + transform: translate(-50%, -50%) rotate(45deg); | |
368 | + width: 10px; | |
369 | + height: 10px; | |
370 | + background: #EFF1FD; | |
371 | + border: 1px solid #EFF1FD; | |
372 | + border-style: none none solid solid; | |
373 | + } | |
177 | 374 | |
178 | - .nodeCss::after { | |
179 | - content: ''; | |
180 | - position: absolute; | |
181 | - top: 0%; | |
182 | - right: 25rpx; | |
183 | - transform: translate(-50%, -50%) rotate(45deg); | |
184 | - width: 10px; | |
185 | - height: 10px; | |
186 | - background: #EFF1FD; | |
187 | - border: 1px solid #EFF1FD; | |
188 | - border-style: none none solid solid; | |
189 | - } | |
375 | + .topSelectCss { | |
376 | + padding: 10px 20px; | |
377 | + background: #fff; | |
378 | + } | |
190 | 379 | </style> | ... | ... |
pages/charge/ignitionMaintenance/detail.vue
... | ... | @@ -73,7 +73,11 @@ |
73 | 73 | name: "详细地址", |
74 | 74 | value: "", |
75 | 75 | key: "userDetailedAddress" |
76 | - }, { | |
76 | + },{ | |
77 | + name: "用户编号", | |
78 | + value: "", | |
79 | + key: "userCode" | |
80 | + },{ | |
77 | 81 | name: "户名", |
78 | 82 | value: "", |
79 | 83 | key: "userName" |
... | ... | @@ -84,7 +88,8 @@ |
84 | 88 | }, { |
85 | 89 | name: "点火确认", |
86 | 90 | value: "", |
87 | - key: "ignCnfStatusCode" | |
91 | + key: "ignCnfStatusCode", | |
92 | + dict:"sys_mc_ign_status" | |
88 | 93 | }, { |
89 | 94 | name: "点火时间", |
90 | 95 | value: "", | ... | ... |
pages/charge/ignitionMaintenance/index.vue
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <u-navbar :title="title" safeAreaInsetTop placeholder> |
4 | 4 | <view slot="left" class="text-red"></view> |
5 | 5 | </u-navbar> |
6 | - <view class=""> | |
6 | + <!-- <view class=""> | |
7 | 7 | <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}" |
8 | 8 | :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" |
9 | 9 | :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}"> |
... | ... | @@ -12,6 +12,26 @@ |
12 | 12 | <uv-drop-down-item name="type" type="2" label="点火确认" value="0"> |
13 | 13 | </uv-drop-down-item> |
14 | 14 | </uv-drop-down> |
15 | + </view> --> | |
16 | + | |
17 | + <view class="topSelectCss"> | |
18 | + <view class="flex justify-around"> | |
19 | + <view class="flex align-center" v-for="(item,index) of searchList" @click="openPicker(item)" :key="item.title"> | |
20 | + <view class="text-lg"> | |
21 | + <span v-if="searchForm[item.name]" class="text-red"> | |
22 | + {{searchForm[item.name]}} | |
23 | + </span> | |
24 | + <span v-else>{{ item.title }}</span> | |
25 | + </view> | |
26 | + <view class="margin-left-xs" v-if="item.title == '财年'"> | |
27 | + <u-icon name="calendar-fill" size="25"></u-icon> | |
28 | + </view> | |
29 | + <view class="margin-left-xs" v-else> | |
30 | + <u-icon v-if="currentName == item.key" color="#5875eb" name="arrow-up-fill" size="12"></u-icon> | |
31 | + <u-icon v-else name="arrow-down-fill" color="#999db0" size="12"></u-icon> | |
32 | + </view> | |
33 | + </view> | |
34 | + </view> | |
15 | 35 | </view> |
16 | 36 | |
17 | 37 | <view class="usuallyCard margin padding" v-if="list.length" v-for="(item,index) in list" :key="index"> |
... | ... | @@ -41,7 +61,8 @@ |
41 | 61 | <view class="margin-right" @click="handleDetail(item)"> |
42 | 62 | <u-button shape="circle">查看详情</u-button> |
43 | 63 | </view> |
44 | - <view class="" @click="handleOpen(item)" v-if="item.statusCode !== 'MAINTENANCE_YES' && item.statusCode !== 'CANCEL'"> | |
64 | + <view class="" @click="handleOpen(item)" | |
65 | + v-if="item.statusCode !== 'MAINTENANCE_YES' && item.statusCode !== 'CANCEL'"> | |
45 | 66 | <u-button shape="circle" color="#CF000D">点火维护</u-button> |
46 | 67 | </view> |
47 | 68 | </view> |
... | ... | @@ -52,14 +73,25 @@ |
52 | 73 | <u-loadmore :status="status" v-if="list.length > 0" /> |
53 | 74 | <u-empty text="暂无数据" icon="/static/images/icon/nodata.png" v-else></u-empty> |
54 | 75 | |
55 | - <popUpFillIn :IgnitionID="IgnitionID" type="dhwh" title="点火维护" ref="popUpFillInRef" @getList="initData"> | |
76 | + <popUpFillIn :IgnitionID="IgnitionID" :userCode="userCode" type="dhwh" title="点火维护" ref="popUpFillInRef" | |
77 | + @getList="initData"> | |
56 | 78 | </popUpFillIn> |
79 | + | |
80 | + <!-- 字典下拉 --> | |
81 | + <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="selectCancel" | |
82 | + @close="selectCancel" keyName="label" @confirm="selectConfirm"></u-picker> | |
83 | + <!-- 公司下拉--> | |
84 | + <u-picker :show="gsShow" ref="gsPicker" :title="gsName" closeOnClickOverlay :columns="companyList" | |
85 | + @cancel="gsCancel" @close="gsCancel" keyName="label" @confirm="gsConfirm" @change="changeHandler"></u-picker> | |
86 | + <!-- 时间下拉开始 --> | |
87 | + | |
57 | 88 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> |
58 | 89 | </view> |
59 | 90 | </template> |
60 | 91 | |
61 | 92 | <script> |
62 | 93 | import { |
94 | + getCompanyCascader, | |
63 | 95 | getMcIgnitionList, |
64 | 96 | mcIgnitionMaintenance |
65 | 97 | } from '@/api/charge.js' |
... | ... | @@ -94,10 +126,41 @@ |
94 | 126 | list: [], |
95 | 127 | total: null, |
96 | 128 | IgnitionID: 0, |
129 | + searchForm:{ | |
130 | + companyCode:"", | |
131 | + status: '', | |
132 | + }, | |
133 | + model:{}, | |
134 | + currentName:"", | |
135 | + userCode: "", | |
136 | + gsShow: false, | |
137 | + pickerShow: false, | |
138 | + columns: [], | |
139 | + companyOption: [], | |
140 | + regionName: [], | |
141 | + groupName: [], | |
142 | + companyName: [], | |
143 | + gsName: "", | |
144 | + searchList: [{ | |
145 | + title: '项目公司', | |
146 | + name: 'companyCode', | |
147 | + type: 'select', | |
148 | + key: 'company', | |
149 | + }, | |
150 | + { | |
151 | + title: '点火确认', | |
152 | + name: 'status', | |
153 | + type: 'select', | |
154 | + key: 'status', | |
155 | + dict: 'sys_mc_ign_status' | |
156 | + }, | |
157 | + ] | |
97 | 158 | } |
98 | 159 | }, |
99 | 160 | computed: { |
100 | - | |
161 | + companyList() { | |
162 | + return [this.regionName, this.groupName, this.companyName]; | |
163 | + } | |
101 | 164 | }, |
102 | 165 | onReachBottom() { |
103 | 166 | let allTotal = this.params.pageNum * this.params.pageSize |
... | ... | @@ -112,7 +175,11 @@ |
112 | 175 | } |
113 | 176 | }, |
114 | 177 | onPullDownRefresh() { |
115 | - this.params.pageNum = 1; | |
178 | + this.params = { | |
179 | + pageNum: 1, | |
180 | + pageSize: 10, | |
181 | + } | |
182 | + this.searchForm = {} | |
116 | 183 | this.keyword = ""; |
117 | 184 | this.initData(); |
118 | 185 | setTimeout(() => { |
... | ... | @@ -120,9 +187,13 @@ |
120 | 187 | uni.stopPullDownRefresh(); |
121 | 188 | }, 500); |
122 | 189 | }, |
123 | - onLoad() { | |
124 | - this.initData() | |
190 | + onShow() { | |
191 | + this.getCompanyCascader(); | |
192 | + this.initData(); | |
125 | 193 | }, |
194 | + // onLoad() { | |
195 | + // this.initData() | |
196 | + // }, | |
126 | 197 | methods: { |
127 | 198 | async initData() { |
128 | 199 | let { |
... | ... | @@ -140,6 +211,19 @@ |
140 | 211 | console.log('list', JSON.parse(JSON.stringify(this.list))); |
141 | 212 | } |
142 | 213 | }, |
214 | + async getCompanyCascader() { | |
215 | + this.companyOption = (await getCompanyCascader()).data; | |
216 | + this.companyOption.forEach(item1 => { | |
217 | + this.regionName.push(item1); | |
218 | + item1.children.forEach(item2 => { | |
219 | + this.groupName.push(item2); | |
220 | + item2.children.forEach(item3 => { | |
221 | + this.companyName.push(item3); | |
222 | + }); | |
223 | + }); | |
224 | + }); | |
225 | + console.log("当前公司类", this.companyOption); | |
226 | + }, | |
143 | 227 | // 查看详情 |
144 | 228 | handleDetail(item) { |
145 | 229 | uni.navigateTo({ |
... | ... | @@ -147,9 +231,101 @@ |
147 | 231 | }) |
148 | 232 | }, |
149 | 233 | handleOpen(item) { |
234 | + console.log(item) | |
235 | + this.userCode = item.userCode; | |
150 | 236 | this.IgnitionID = item.id; |
151 | 237 | this.$refs.popUpFillInRef.open(); |
152 | - } | |
238 | + }, | |
239 | + async openPicker(data) { | |
240 | + console.log("下拉data", data) | |
241 | + this.currentName = data.key; | |
242 | + console.log('打印data-===', data); | |
243 | + if (data.type === 'select') { | |
244 | + if (data.key == 'company') { | |
245 | + this.gsColumns = [this.regionName, this.groupName, this.companyName]; | |
246 | + this.gsName = `${this.regionName[0].label}`; | |
247 | + this.gsShow = true; | |
248 | + } else { | |
249 | + let dict = data.dict; | |
250 | + let dictArr = this.getDictDatas(dict); | |
251 | + this.columns = [dictArr]; | |
252 | + this.pickerShow = true; | |
253 | + } | |
254 | + } else { | |
255 | + console.log('打印data===', data); | |
256 | + this.datetimeShow = true; | |
257 | + // this.showTimeParams.showStartDailog = true; | |
258 | + } | |
259 | + }, | |
260 | + // 项目公司切换 | |
261 | + changeHandler(e) { | |
262 | + const { | |
263 | + columnIndex, | |
264 | + value, | |
265 | + values, // values为当前变化列的数组内容 | |
266 | + index, | |
267 | + indexs | |
268 | + // 微信小程序无法将picker实例传出来,只能通过ref操作 | |
269 | + } = e | |
270 | + console.log(e); | |
271 | + // 当第一列值发生变化时,变化第二列(后一列)对应的选项 | |
272 | + let [regionIndex, groupIndex, companyIndex] = indexs; | |
273 | + if (columnIndex === 0) { | |
274 | + this.gsName = value[0].label; | |
275 | + console.log(0, this.regionName) | |
276 | + // this.regionName = this.regionName[index]?.children || []; | |
277 | + this.groupName = this.regionName[index]?.children || []; | |
278 | + this.companyName = this.groupName[0]?.children || []; | |
279 | + console.log(1, this.regionName) | |
280 | + console.log(2, this.groupName) | |
281 | + console.log(3, this.companyName) | |
282 | + this.$refs.gsPicker.setIndexs([index, 0, 0], true) | |
283 | + } else if (columnIndex === 1) { | |
284 | + this.gsName = value[1].label; | |
285 | + this.groupName = this.regionName[index]?.children || []; | |
286 | + this.companyName = this.groupName[0]?.children || []; | |
287 | + this.$refs.gsPicker.setIndexs(indexs, true) | |
288 | + } else if (columnIndex === 2) { | |
289 | + this.gsName = value[2].label; | |
290 | + } | |
291 | + // let data2 = value[0].children; | |
292 | + // let data3 = data2[0].children; | |
293 | + // picker为选择器this实例,变化第二列对应的选项 | |
294 | + // this.gsColumns = [this.regionName, data2, data3] | |
295 | + console.log("选择后", this.gsColumns); | |
296 | + }, | |
297 | + selectConfirm(e) { | |
298 | + let data = e.value[0].value; | |
299 | + let dataLabel = e.value[0].label; | |
300 | + if (this.currentName === 'status') { | |
301 | + this.searchForm.status = dataLabel; | |
302 | + this.model.status = data; | |
303 | + this.params.statusCode = data; | |
304 | + } | |
305 | + this.pickerShow = false; | |
306 | + this.currentName = ''; | |
307 | + this.initData() | |
308 | + }, | |
309 | + selectCancel(e) { | |
310 | + this.pickerShow = false; | |
311 | + this.currentName = ''; | |
312 | + }, | |
313 | + gsConfirm(e) { | |
314 | + console.log("公司", e); | |
315 | + this.model.regionName = e.value[0]?.value; | |
316 | + this.model.groupName = e.value[1]?.value; | |
317 | + this.model.companyName = e.value[2]?.label; | |
318 | + this.model.companyCode = e.value[2]?.value; | |
319 | + this.gsShow = false; | |
320 | + this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...'; | |
321 | + this.params.companyCode = this.model.companyCode; | |
322 | + this.initData(); | |
323 | + this.currentName = ''; | |
324 | + }, | |
325 | + gsCancel() { | |
326 | + this.gsShow = false; | |
327 | + this.currentName = ''; | |
328 | + }, | |
153 | 329 | } |
154 | 330 | } |
155 | 331 | </script> |
... | ... | @@ -192,4 +368,9 @@ |
192 | 368 | border: 1px solid #EFF1FD; |
193 | 369 | border-style: none none solid solid; |
194 | 370 | } |
371 | + | |
372 | + .topSelectCss { | |
373 | + padding: 10px 20px; | |
374 | + background: #fff; | |
375 | + } | |
195 | 376 | </style> | ... | ... |
pages/charge/visitsAndFees/createaVisit.vue
... | ... | @@ -20,8 +20,8 @@ |
20 | 20 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
21 | 21 | v-if="item.type === 'input'" :prop="item.key"> |
22 | 22 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" |
23 | - :disabled="operationStatus ==='YD' || item.key === 'billingPersonName'" | |
24 | - :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'" border="none"></u-input> | |
23 | + :disabled="operationStatus ==='YD' || item.key === 'billingPersonName'" :type="item.mode" | |
24 | + :maxlength="item.max" :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'" border="none"></u-input> | |
25 | 25 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
26 | 26 | </u-form-item> |
27 | 27 | <!-- 选择类型 --> |
... | ... | @@ -105,8 +105,9 @@ |
105 | 105 | <!-- 输入 --> |
106 | 106 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
107 | 107 | v-if="item.type === 'input' && item.show" :prop="item.key"> |
108 | - <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | |
109 | - :disabled="operationStatus ==='YD'" border="none"></u-input> | |
108 | + <u-input v-model="model[item.key]" inputAlign="right" :type="item.mode" :maxlength="item.max" | |
109 | + :placeholder="item.placeholder" disabledColor="#fff" :disabled="operationStatus ==='YD'" | |
110 | + border="none"></u-input> | |
110 | 111 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
111 | 112 | </u-form-item> |
112 | 113 | <!-- 选择 --> |
... | ... | @@ -139,8 +140,8 @@ |
139 | 140 | <!-- 输入 --> |
140 | 141 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
141 | 142 | v-if="item.type === 'input' && item.show" :prop="item.key"> |
142 | - <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | |
143 | - border="none"></u-input> | |
143 | + <u-input v-model="model[item.key]" inputAlign="right" :type="item.mode" :maxlength="item.max" | |
144 | + :placeholder="item.placeholder" disabledColor="#fff" border="none"></u-input> | |
144 | 145 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
145 | 146 | </u-form-item> |
146 | 147 | <!-- 选择 --> |
... | ... | @@ -178,8 +179,8 @@ |
178 | 179 | <view slot="right" class="text-blue" @click="uploadAttachment">上传附件</view> |
179 | 180 | </u-form-item> |
180 | 181 | <view class="bg-gray"> |
181 | - <view class="flex justify-between flex-direction" v-if="attachmentList.length"> | |
182 | - <view class="padding" v-for="(item,index) in attachmentList" :key="index"> | |
182 | + <view class="flex justify-between flex-direction" v-if="attachmentList.length"> | |
183 | + <view class="margin overflow-one-lines" v-for="(item,index) in attachmentList" :key="index"> | |
183 | 184 | {{item.fileName}} |
184 | 185 | </view> |
185 | 186 | <!-- <view class=""> |
... | ... | @@ -196,16 +197,19 @@ |
196 | 197 | <u-button shape="circle" color="#CF000D">{{btnText}}</u-button> |
197 | 198 | </view> |
198 | 199 | |
200 | + <!-- 字典选择 --> | |
199 | 201 | <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="pickerShow = false" |
200 | 202 | @close="pickerShow = false" keyName="label" @confirm="confirm"></u-picker> |
201 | 203 | |
202 | - <u-picker :show="gsShow" ref="gsPicker" closeOnClickOverlay :title="gsName" :columns="gsColumns" | |
204 | + <!-- 公司选择 --> | |
205 | + <u-picker :show="gsShow" ref="gsPicker" closeOnClickOverlay :title="gsName" :columns="companyList" | |
203 | 206 | @cancel="gsShow = false" @close="gsShow = false" keyName="label" @confirm="gsConfirm" |
204 | 207 | @change="changeHandler"></u-picker> |
205 | 208 | |
209 | + <!-- 时间选择 --> | |
206 | 210 | <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm" |
207 | 211 | @cancel="datetimeShow = false" @close="datetimeShow = false" mode="date"></u-datetime-picker> |
208 | - | |
212 | + <!-- 省市区街道选择 --> | |
209 | 213 | <uv-picker ref="regionsPicker" :columns="addressList" @confirm="regionConfirm" keyName="name" |
210 | 214 | :loading="regionLoading" @change="regionChange"></uv-picker> |
211 | 215 | |
... | ... | @@ -213,10 +217,12 @@ |
213 | 217 | </template> |
214 | 218 | |
215 | 219 | <script> |
220 | + import * as dd from 'dingtalk-jsapi' | |
216 | 221 | import cityData from '@/utils/cityOption' |
217 | 222 | import chargeFile from '@/api/chargeFile' |
218 | 223 | import config from '@/common/config.js' |
219 | 224 | import { |
225 | + getByUuid, | |
220 | 226 | getMcFileList, |
221 | 227 | getCurrentFiscalYear, |
222 | 228 | getCompanyCascader, |
... | ... | @@ -224,7 +230,8 @@ |
224 | 230 | getMcVisitUser, |
225 | 231 | addMcVisit, |
226 | 232 | editMcVisit, |
227 | - modification | |
233 | + modification, | |
234 | + getDingtalkConfig | |
228 | 235 | } from '@/api/charge.js' |
229 | 236 | export default { |
230 | 237 | components: {}, |
... | ... | @@ -312,6 +319,12 @@ |
312 | 319 | required: true, |
313 | 320 | message: '请填写联系电话', |
314 | 321 | trigger: ['blur', 'change'] |
322 | + }, { | |
323 | + validator: (rule, value, callback) => { | |
324 | + return uni.$u.test.mobile(value); | |
325 | + }, | |
326 | + message: '手机号码不正确', | |
327 | + trigger: ['change', 'blur'], | |
315 | 328 | }], |
316 | 329 | address: [{ |
317 | 330 | required: true, |
... | ... | @@ -352,6 +365,12 @@ |
352 | 365 | required: true, |
353 | 366 | message: '请输入决策人年龄', |
354 | 367 | trigger: ['blur', 'change'] |
368 | + }, { | |
369 | + validator: (rule, value, callback) => { | |
370 | + return uni.$u.test.digits(value) | |
371 | + }, | |
372 | + message: '决策人年龄不正确', | |
373 | + trigger: ['change', 'blur'], | |
355 | 374 | }], |
356 | 375 | dmIncomeSrc: [{ |
357 | 376 | required: true, |
... | ... | @@ -362,31 +381,55 @@ |
362 | 381 | required: true, |
363 | 382 | message: '请填写决策人联系电话', |
364 | 383 | trigger: ['blur', 'change'] |
384 | + }, { | |
385 | + validator: (rule, value, callback) => { | |
386 | + return uni.$u.test.mobile(value); | |
387 | + }, | |
388 | + message: '联系电话不正确', | |
389 | + trigger: ['change', 'blur'], | |
365 | 390 | }], |
366 | 391 | isCharged: [{ |
367 | 392 | required: true, |
368 | 393 | message: '请选择是否收费', |
369 | 394 | trigger: ['blur', 'change'] |
370 | 395 | }], |
371 | - // userCode: [{ | |
372 | - // required: true, | |
373 | - // message: '请填写用户编号', | |
374 | - // trigger: ['blur', 'change'] | |
375 | - // }], | |
396 | + userCode: [{ | |
397 | + required: false, | |
398 | + message: '请填写用户编号', | |
399 | + trigger: ['blur', 'change'] | |
400 | + }, { | |
401 | + validator: (rule, value, callback) => { | |
402 | + return uni.$u.test.digits(value) | |
403 | + }, | |
404 | + message: '用户编号不正确', | |
405 | + trigger: ['change', 'blur'], | |
406 | + }], | |
376 | 407 | userIdCard: [{ |
377 | 408 | required: true, |
378 | 409 | message: '请填写身份证号', |
379 | 410 | trigger: ['blur', 'change'] |
411 | + }, { | |
412 | + validator: (rule, value, callback) => { | |
413 | + return uni.$u.test.idCard(value) | |
414 | + }, | |
415 | + message: '身份证号码不正确', | |
416 | + trigger: ['change', 'blur'], | |
380 | 417 | }], |
381 | 418 | invoiceNo: [{ |
382 | 419 | required: true, |
383 | 420 | message: '请填写票据单号', |
384 | - trigger: ['blur', 'change'] | |
421 | + trigger: ['blur', 'change'], | |
385 | 422 | }], |
386 | 423 | chargeAmt: [{ |
387 | 424 | required: true, |
388 | 425 | message: '请填写收费金额', |
389 | - trigger: ['blur', 'change'] | |
426 | + trigger: ['blur', 'change'], | |
427 | + }, { | |
428 | + validator: (rule, value, callback) => { | |
429 | + return uni.$u.test.amount(value) | |
430 | + }, | |
431 | + message: '收费金额不正确,保留小数点后2位', | |
432 | + trigger: ['change', 'blur'], | |
390 | 433 | }], |
391 | 434 | paymentMeth: [{ |
392 | 435 | required: true, |
... | ... | @@ -481,7 +524,9 @@ |
481 | 524 | placeholder: "请输入", |
482 | 525 | type: "input", |
483 | 526 | required: true, |
484 | - key: "userPhone" | |
527 | + key: "userPhone", | |
528 | + mode: "number", | |
529 | + max: '11' | |
485 | 530 | }, { |
486 | 531 | label: '省/市/区/街道', |
487 | 532 | placeholder: "请选择", |
... | ... | @@ -509,7 +554,7 @@ |
509 | 554 | type: "select", |
510 | 555 | key: "isIntent", |
511 | 556 | show: true, |
512 | - dict: 'sys_cn_yn' | |
557 | + dict: 'sys_mc_visit_intent' | |
513 | 558 | }, { |
514 | 559 | label: '房屋情况', |
515 | 560 | placeholder: "请选择", |
... | ... | @@ -611,6 +656,8 @@ |
611 | 656 | type: "input", |
612 | 657 | key: "dmAge", |
613 | 658 | show: true, |
659 | + mode: "number", | |
660 | + max: '3' | |
614 | 661 | }, { |
615 | 662 | label: '决策人收入来源', |
616 | 663 | placeholder: "请选择", |
... | ... | @@ -641,6 +688,8 @@ |
641 | 688 | type: "input", |
642 | 689 | key: "userCode", |
643 | 690 | show: true, |
691 | + mode: "number", | |
692 | + max: '10' | |
644 | 693 | }, { |
645 | 694 | label: '身份证号', |
646 | 695 | placeholder: "请输入", |
... | ... | @@ -655,6 +704,8 @@ |
655 | 704 | type: "input", |
656 | 705 | key: "invoiceNo", |
657 | 706 | show: true, |
707 | + mode: "number", | |
708 | + max: '10' | |
658 | 709 | }, { |
659 | 710 | label: '收费金额', |
660 | 711 | placeholder: "请输入", |
... | ... | @@ -662,6 +713,8 @@ |
662 | 713 | type: "input", |
663 | 714 | key: "chargeAmt", |
664 | 715 | show: true, |
716 | + mode: "number", | |
717 | + max: '8' | |
665 | 718 | }, { |
666 | 719 | label: '缴费方式', |
667 | 720 | placeholder: "请选择", |
... | ... | @@ -695,6 +748,9 @@ |
695 | 748 | computed: { |
696 | 749 | addressList() { |
697 | 750 | return [this.provinces, this.city, this.district, this.street]; |
751 | + }, | |
752 | + companyList() { | |
753 | + return [this.regionName, this.groupName, this.companyName]; | |
698 | 754 | } |
699 | 755 | }, |
700 | 756 | onLoad(data) { |
... | ... | @@ -746,6 +802,16 @@ |
746 | 802 | item.show = false; |
747 | 803 | }) |
748 | 804 | } |
805 | + let singleId = this.model.fieldPhotoFile; | |
806 | + if (singleId) { | |
807 | + getByUuid(singleId).then(res => { | |
808 | + console.log("现场照片", res) | |
809 | + if (res.code === 200) { | |
810 | + this.fileList = [res.data]; | |
811 | + } | |
812 | + }) | |
813 | + } | |
814 | + | |
749 | 815 | let uuid = this.model.attachmentFile; |
750 | 816 | console.log(uuid); |
751 | 817 | if (uuid) { |
... | ... | @@ -768,25 +834,93 @@ |
768 | 834 | this.model.isVisited = '是'; |
769 | 835 | this.model.hasDm = '是'; |
770 | 836 | this.model.entryTime = this.$u.timeFormat(this.dataTimeValue, 'yyyy-mm-dd'); |
837 | + // 获取缓存用的工作类型 | |
838 | + this.model.jobNature = uni.getStorageSync('jobNature'); | |
771 | 839 | // 定位获取当前位置 |
772 | 840 | this.getLocaltion(); |
773 | 841 | // 查询财年 |
774 | 842 | await this.getCurrentFiscalYear() |
775 | 843 | await this.getCompanyCascader() |
776 | 844 | let nickName = uni.getStorageSync("nickName"); |
777 | - | |
778 | 845 | this.$set(this.model, 'billingPersonName', nickName) |
779 | - // console.log(this.model.billingPersonName); | |
846 | + console.log("model", this.model); | |
780 | 847 | }, |
781 | - getLocaltion(){ | |
782 | - console.log("定位") | |
783 | - uni.getLocation({ | |
784 | - type: 'wgs84', | |
785 | - success: function (res) { | |
786 | - console.log('当前位置的经度:' + res.longitude); | |
787 | - console.log('当前位置的纬度:' + res.latitude); | |
788 | - } | |
789 | - }); | |
848 | + async getLocaltion() { | |
849 | + if (!this.$isDing) { | |
850 | + return | |
851 | + } | |
852 | + console.log("钉钉定位") | |
853 | + let data = { | |
854 | + url: "http://192.168.0.53:8001/" | |
855 | + } | |
856 | + let that = this; | |
857 | + const result = await getDingtalkConfig(data); | |
858 | + if (result.code === 200) { | |
859 | + let { | |
860 | + agentId, | |
861 | + corpId, | |
862 | + timeStamp, | |
863 | + nonceStr, | |
864 | + signature, | |
865 | + appKey | |
866 | + } = result.data | |
867 | + console.log(agentId) | |
868 | + console.log(corpId) | |
869 | + console.log(timeStamp) | |
870 | + console.log(nonceStr) | |
871 | + console.log(signature) | |
872 | + console.log(appKey) | |
873 | + dd.config({ | |
874 | + agentId: agentId, // 必填,微应用ID | |
875 | + corpId: corpId, //必填,企业ID | |
876 | + timeStamp: timeStamp, // 必填,生成签名的时间戳 | |
877 | + nonceStr: nonceStr, // 必填,自定义固定字符串。 | |
878 | + signature: signature, // 必填,签名 | |
879 | + type: 0, //选填。 | |
880 | + jsApiList: [ | |
881 | + 'device.geolocation.get', | |
882 | + ] | |
883 | + }); | |
884 | + dd.ready(function() { | |
885 | + dd.device.geolocation.get({ | |
886 | + targetAccuracy: 200, // 定位精度 | |
887 | + coordinate: 1, // 获取地理坐标类型 0:返回经纬度坐标 1:返回带有坐标系的地理坐标 | |
888 | + withReGeocode: true, // 是否返回详细的逆地理编码信息 | |
889 | + useCache: true, // 是否使用缓存数据 | |
890 | + onSuccess: function(result) { | |
891 | + // 返回结果示例 | |
892 | + console.log('定位成功:', result); | |
893 | + that.model.visitProvince = result.province; | |
894 | + that.model.visitCity = result.city; | |
895 | + that.model.visitDistrict = result.district; | |
896 | + that.model.visitStreet = result.road; | |
897 | + that.model.visitDetailedAddress = result.address; | |
898 | + that.model.visitLongitude = result.longitude; | |
899 | + that.model.visitLatitude = result.latitude; | |
900 | + // result.latitude: 纬度 | |
901 | + // result.longitude: 经度 | |
902 | + // result.accuracy: 精度 | |
903 | + }, | |
904 | + onFail: function(err) { | |
905 | + // 失败回调 | |
906 | + console.error('定位失败:', err); | |
907 | + } | |
908 | + }); | |
909 | + }); | |
910 | + dd.error(function(err) { | |
911 | + console.error('钉钉SDK初始化失败:', err); | |
912 | + }); | |
913 | + } | |
914 | + | |
915 | + | |
916 | + console.log(result); | |
917 | + // uni.getLocation({ | |
918 | + // type: 'wgs84', | |
919 | + // success: function(res) { | |
920 | + // console.log('当前位置的经度:' + res.longitude); | |
921 | + // console.log('当前位置的纬度:' + res.latitude); | |
922 | + // } | |
923 | + // }); | |
790 | 924 | }, |
791 | 925 | async getCurrentFiscalYear() { |
792 | 926 | let fiscalYear = (await getCurrentFiscalYear()).data; |
... | ... | @@ -816,10 +950,10 @@ |
816 | 950 | // 项目公司单独弹窗 |
817 | 951 | if (item.key === 'company') { |
818 | 952 | this.gsColumns = [this.regionName, this.groupName, this.companyName]; |
819 | - if(this.regionName.length){ | |
953 | + if (this.regionName.length) { | |
820 | 954 | this.gsName = `${this.regionName[0].label}`; |
821 | 955 | this.gsShow = true; |
822 | - }else{ | |
956 | + } else { | |
823 | 957 | uni.$u.toast('未查询到项目公司'); |
824 | 958 | } |
825 | 959 | return |
... | ... | @@ -856,6 +990,10 @@ |
856 | 990 | vlgOrCmty: this.model.vlgOrCmty |
857 | 991 | } |
858 | 992 | const result = await getMcVisitUser(data); |
993 | + if (!result.rows.length) { | |
994 | + uni.$u.toast('未查询相关用户'); | |
995 | + return | |
996 | + } | |
859 | 997 | let col = result.rows.map(item => ({ |
860 | 998 | value: item.userName, |
861 | 999 | label: item.userName, |
... | ... | @@ -878,6 +1016,27 @@ |
878 | 1016 | console.log(this.columns); |
879 | 1017 | // console.log("字典数组", dictArr); |
880 | 1018 | }, |
1019 | + // 清空填充 | |
1020 | + emptyFill(grade) { | |
1021 | + // console.log("清空填充", grade) | |
1022 | + if (grade === 1) { | |
1023 | + this.model.regionName = ""; | |
1024 | + this.model.groupName = ""; | |
1025 | + this.model.companyName = ""; | |
1026 | + this.model.companyCode = "" | |
1027 | + this.model.vlgOrCmty = ""; | |
1028 | + this.model.userName = ""; | |
1029 | + } else if (grade === 2) { | |
1030 | + this.model.userName = ""; | |
1031 | + } | |
1032 | + this.model.address = ""; | |
1033 | + this.model.userPhone = ""; | |
1034 | + this.model.userProvince = ""; | |
1035 | + this.model.userCity = ""; | |
1036 | + this.model.userDistrict = ""; | |
1037 | + this.model.userStreet = ""; | |
1038 | + this.model.userDetailedAddress = ""; | |
1039 | + }, | |
881 | 1040 | handleSFSelect(item) { |
882 | 1041 | this.currentName = item.key; |
883 | 1042 | let dict = item.dict; |
... | ... | @@ -888,16 +1047,28 @@ |
888 | 1047 | // 选择弹出层确认 |
889 | 1048 | confirm(e) { |
890 | 1049 | console.log("确认", e); |
891 | - if (this.currentName === 'company') { | |
892 | - this.model[this.currentName] = `${e.value[2].label}`; | |
893 | - this.model.regionName = e.value[0]?.value; | |
894 | - this.model.groupName = e.value[1]?.value; | |
895 | - this.model.companyName = e.value[2]?.label; | |
896 | - this.model.companyCode = e.value[2]?.value; | |
897 | - } else if (this.currentName === 'userName') { | |
898 | - let data = e.value[0].obj | |
1050 | + if (this.currentName === 'vlgOrCmty') { | |
1051 | + this.emptyFill(2); | |
899 | 1052 | this.model[this.currentName] = e.value[0].value |
1053 | + } else if (this.currentName === 'userName') { | |
1054 | + this.emptyFill(); | |
1055 | + let values = e.values[0][0] | |
1056 | + let data = values.obj | |
1057 | + this.model[this.currentName] = values.value | |
900 | 1058 | this.model['userPhone'] = data.userPhone; |
1059 | + this.model['currentCookingEnergy'] = data.currentCookingEnergy; | |
1060 | + this.model['currentHeatingEnergy'] = data.currentHeatingEnergy; | |
1061 | + this.model['houseCondition'] = data.houseCondition; | |
1062 | + this.model['familyMembers'] = data.familyMembers; | |
1063 | + this.model['fridgeStatus'] = data.fridgeStatus; | |
1064 | + this.model['acStatus'] = data.acStatus; | |
1065 | + this.model['tvStatus'] = data.tvStatus; | |
1066 | + this.model['washerStatus'] = data.washerStatus; | |
1067 | + this.model['waterHeaterStatus'] = data.waterHeaterStatus; | |
1068 | + this.model['pvSystemStatus'] = data.pvSystemStatus; | |
1069 | + this.model['userAge'] = data.userAge; | |
1070 | + this.model['userPhone'] = data.userPhone; | |
1071 | + this.model['userCode'] = data.userCode; | |
901 | 1072 | this.model['userProvince'] = data.province; |
902 | 1073 | this.model['userCity'] = data.city; |
903 | 1074 | this.model['userDistrict'] = data.district; |
... | ... | @@ -916,22 +1087,41 @@ |
916 | 1087 | value, |
917 | 1088 | values, // values为当前变化列的数组内容 |
918 | 1089 | index, |
1090 | + indexs | |
919 | 1091 | // 微信小程序无法将picker实例传出来,只能通过ref操作 |
920 | - picker = this.$refs.uPicker | |
921 | 1092 | } = e |
922 | 1093 | console.log(e); |
923 | 1094 | // 当第一列值发生变化时,变化第二列(后一列)对应的选项 |
924 | - this.gsName = value[0].label | |
925 | - let data2 = value[0].children; | |
926 | - let data3 = data2[0].children; | |
1095 | + let [regionIndex, groupIndex, companyIndex] = indexs; | |
1096 | + if (columnIndex === 0) { | |
1097 | + this.gsName = value[0].label; | |
1098 | + console.log(0, this.regionName) | |
1099 | + // this.regionName = this.regionName[index]?.children || []; | |
1100 | + this.groupName = this.regionName[index]?.children || []; | |
1101 | + this.companyName = this.groupName[0]?.children || []; | |
1102 | + console.log(1, this.regionName) | |
1103 | + console.log(2, this.groupName) | |
1104 | + console.log(3, this.companyName) | |
1105 | + this.$refs.gsPicker.setIndexs([index, 0, 0], true) | |
1106 | + } else if (columnIndex === 1) { | |
1107 | + this.gsName = value[1].label; | |
1108 | + this.groupName = this.regionName[index]?.children || []; | |
1109 | + this.companyName = this.groupName[0]?.children || []; | |
1110 | + this.$refs.gsPicker.setIndexs(indexs, true) | |
1111 | + } else if (columnIndex === 2) { | |
1112 | + this.gsName = value[2].label; | |
1113 | + } | |
1114 | + // let data2 = value[0].children; | |
1115 | + // let data3 = data2[0].children; | |
927 | 1116 | // picker为选择器this实例,变化第二列对应的选项 |
928 | - this.gsColumns = [this.regionName, data2, data3] | |
1117 | + // this.gsColumns = [this.regionName, data2, data3] | |
929 | 1118 | console.log("选择后", this.gsColumns); |
930 | 1119 | }, |
931 | 1120 | // 项目公司独立弹窗,防止共用报错 |
932 | 1121 | gsConfirm(e) { |
933 | 1122 | console.log("公司", e); |
934 | 1123 | if (this.currentName === 'company') { |
1124 | + this.emptyFill(1); | |
935 | 1125 | this.model[this.currentName] = `${e.value[2].label}`; |
936 | 1126 | this.model.regionName = e.value[0]?.value; |
937 | 1127 | this.model.groupName = e.value[1]?.value; |
... | ... | @@ -997,13 +1187,11 @@ |
997 | 1187 | // this.model.userDistrict = value[2].name; |
998 | 1188 | // this.model.userStreet = value[3].name; |
999 | 1189 | const [userProvince, userCity, userDistrict, userStreet] = value.map(item => item.name); |
1000 | - this.model = { | |
1001 | - userProvince, | |
1002 | - userCity, | |
1003 | - userDistrict, | |
1004 | - userStreet, | |
1005 | - address: `${userProvince}${userCity}${userDistrict}${userStreet}` | |
1006 | - }; | |
1190 | + this.model.userProvince = userProvince; | |
1191 | + this.model.userCity = userCity; | |
1192 | + this.model.userDistrict = userDistrict; | |
1193 | + this.model.userStreet = userStreet; | |
1194 | + this.model.address = `${userProvince}${userCity}${userDistrict}${userStreet}` | |
1007 | 1195 | }, |
1008 | 1196 | // 拜访单选 |
1009 | 1197 | bfChange(e) { |
... | ... | @@ -1089,7 +1277,7 @@ |
1089 | 1277 | message: '', |
1090 | 1278 | uuid: result.uuid, |
1091 | 1279 | url: result.url, |
1092 | - obj:result | |
1280 | + obj: result | |
1093 | 1281 | })) |
1094 | 1282 | fileListLen++ |
1095 | 1283 | } |
... | ... | @@ -1121,7 +1309,8 @@ |
1121 | 1309 | console.log("上传附件"); |
1122 | 1310 | uni.chooseFile({ |
1123 | 1311 | count: 1, //默认100 |
1124 | - extension: ['.doc', '.xlsx', '.docx'], | |
1312 | + type: 'all', | |
1313 | + // extension: ['.doc', '.xlsx', '.docx'], | |
1125 | 1314 | success: async (res) => { |
1126 | 1315 | let tempUrl = res.tempFilePaths[0] |
1127 | 1316 | console.log(res); |
... | ... | @@ -1138,8 +1327,12 @@ |
1138 | 1327 | this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N'; |
1139 | 1328 | this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N'; |
1140 | 1329 | this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N'; |
1330 | + this.copyModel.entryTime = this.copyModel.entryTime + ' 00:00:00'; | |
1141 | 1331 | // this.copyModel.attachmentFile = this.attachmentList.map(item => item.uuid).join(","); |
1142 | 1332 | }, |
1333 | + storingData() { | |
1334 | + uni.setStorageSync('jobNature', this.model.jobNature); | |
1335 | + }, | |
1143 | 1336 | // 发起拜访或异动或者修改 |
1144 | 1337 | handleConfirm() { |
1145 | 1338 | this.model.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); |
... | ... | @@ -1157,6 +1350,7 @@ |
1157 | 1350 | console.log(result); |
1158 | 1351 | if (result.code === 200) { |
1159 | 1352 | uni.$u.toast('发起成功'); |
1353 | + this.storingData(); | |
1160 | 1354 | setTimeout(() => { |
1161 | 1355 | this.$goBack(); |
1162 | 1356 | }, 1000) |
... | ... | @@ -1181,6 +1375,7 @@ |
1181 | 1375 | console.log(result); |
1182 | 1376 | if (result.code === 200) { |
1183 | 1377 | uni.$u.toast('修改成功'); |
1378 | + this.storingData(); | |
1184 | 1379 | setTimeout(() => { |
1185 | 1380 | this.$goBack(); |
1186 | 1381 | }, 1000) | ... | ... |
pages/charge/visitsAndFees/detail.vue
pages/charge/visitsAndFees/index.vue
... | ... | @@ -26,11 +26,10 @@ |
26 | 26 | <view class="text-lg"> |
27 | 27 | <span v-if="searchForm[item.name]" class="text-red"> |
28 | 28 | {{searchForm[item.name]}} |
29 | - <span v-if="item.title=='财年'"> | |
30 | - 财年 | |
29 | + <span v-if="item.name === 'year'" :class="isCN?'text-red':''"> | |
31 | 30 | </span> |
32 | 31 | </span> |
33 | - <span v-else>{{ item.title }}</span> | |
32 | + <span v-else :class="isCN&&item.name === 'year'?'text-red':''">{{ item.title }}</span> | |
34 | 33 | </view> |
35 | 34 | <view class="margin-left-xs" v-if="item.title == '财年'"> |
36 | 35 | <u-icon name="calendar-fill" size="25"></u-icon> |
... | ... | @@ -155,12 +154,18 @@ |
155 | 154 | </view> |
156 | 155 | </u-popup> |
157 | 156 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> |
157 | + <!-- 字典下拉 --> | |
158 | 158 | <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="selectCancel" |
159 | 159 | @close="selectCancel" keyName="label" @confirm="selectConfirm"></u-picker> |
160 | - <u-picker :show="gsShow" ref="gsPicker" closeOnClickOverlay :columns="gsColumns" @cancel="gsCancel" | |
161 | - @close="gsCancel" keyName="label" @confirm="gsConfirm" @change="changeHandler"></u-picker> | |
162 | - <u-datetime-picker :show="datetimeShow" :value="searchForm.year" closeOnClickOverlay @confirm="dateConfirm" | |
163 | - @cancel="timeCancel" @close="timeCancel" mode="year"></u-datetime-picker> | |
160 | + <!-- 公司下拉--> | |
161 | + <u-picker :show="gsShow" ref="gsPicker" :title="gsName" closeOnClickOverlay :columns="companyList" | |
162 | + @cancel="gsCancel" @close="gsCancel" keyName="label" @confirm="gsConfirm" @change="changeHandler"></u-picker> | |
163 | + <!-- 时间下拉开始 --> | |
164 | + <u-datetime-picker :show="datetimeShow" title="开始财年" :value="searchForm.startFiscalYear" closeOnClickOverlay | |
165 | + @confirm="dateConfirm" @cancel="timeCancel" @close="timeCancel" mode="year"></u-datetime-picker> | |
166 | + <!-- 时间下拉结束 --> | |
167 | + <u-datetime-picker :show="datetimeShowTwo" title="结束财年" :value="searchForm.finishFiscalYear" closeOnClickOverlay | |
168 | + @confirm="dateConfirm2" @cancel="timeCancel2" @close="timeCancel2" mode="year"></u-datetime-picker> | |
164 | 169 | </view> |
165 | 170 | </template> |
166 | 171 | |
... | ... | @@ -194,8 +199,12 @@ |
194 | 199 | gsShow: false, |
195 | 200 | pickerShow: false, |
196 | 201 | datetimeShow: false, |
202 | + datetimeShowTwo: false, | |
203 | + gsName: "", | |
197 | 204 | searchForm: { |
198 | 205 | year: '', |
206 | + startFiscalYear: '', | |
207 | + finishFiscalYear: '', | |
199 | 208 | companyCode: '', |
200 | 209 | status: '', |
201 | 210 | type: '' |
... | ... | @@ -239,6 +248,11 @@ |
239 | 248 | pageSize: 10, |
240 | 249 | userName: "", |
241 | 250 | isMyAuditing: "", |
251 | + companyCode: "", | |
252 | + statusCode: "", | |
253 | + ticketType: "", | |
254 | + startFiscalYear: "", | |
255 | + finishFiscalYear: "" | |
242 | 256 | }, |
243 | 257 | status: "loadmore", |
244 | 258 | list: [], |
... | ... | @@ -266,10 +280,13 @@ |
266 | 280 | zfShow: false, |
267 | 281 | zfRemarks: "", |
268 | 282 | ZfId: "", |
283 | + isCN: false, | |
269 | 284 | } |
270 | 285 | }, |
271 | 286 | computed: { |
272 | - | |
287 | + companyList() { | |
288 | + return [this.regionName, this.groupName, this.companyName]; | |
289 | + } | |
273 | 290 | }, |
274 | 291 | onReachBottom() { |
275 | 292 | let allTotal = this.params.pageNum * this.params.pageSize |
... | ... | @@ -284,7 +301,12 @@ |
284 | 301 | } |
285 | 302 | }, |
286 | 303 | onPullDownRefresh() { |
287 | - this.params.pageNum = 1; | |
304 | + this.params = { | |
305 | + pageNum: 1, | |
306 | + pageSize: 10, | |
307 | + } | |
308 | + this.searchForm = {} | |
309 | + this.isCN = false; | |
288 | 310 | this.keyword = ""; |
289 | 311 | this.initData(); |
290 | 312 | setTimeout(() => { |
... | ... | @@ -292,11 +314,9 @@ |
292 | 314 | uni.stopPullDownRefresh(); |
293 | 315 | }, 500); |
294 | 316 | }, |
295 | - onLoad() { | |
296 | - this.getCompanyCascader(); | |
297 | - }, | |
298 | 317 | onShow() { |
299 | 318 | this.initData(); |
319 | + this.getCompanyCascader(); | |
300 | 320 | }, |
301 | 321 | methods: { |
302 | 322 | selectConfirm(e) { |
... | ... | @@ -307,46 +327,106 @@ |
307 | 327 | if (this.currentName === 'status') { |
308 | 328 | this.searchForm.status = dataLabel; |
309 | 329 | this.model.status = data; |
330 | + this.params.statusCode = data; | |
310 | 331 | } else if (this.currentName == 'type') { |
311 | 332 | this.searchForm.type = dataLabel; |
312 | 333 | this.model.type = data; |
334 | + this.params.ticketType = data; | |
313 | 335 | } |
314 | 336 | this.pickerShow = false; |
315 | 337 | this.currentName = ''; |
338 | + this.initData() | |
316 | 339 | }, |
317 | - selectCancel() { | |
340 | + selectCancel(e) { | |
318 | 341 | this.pickerShow = false; |
319 | 342 | this.currentName = ''; |
320 | 343 | }, |
321 | 344 | gsConfirm(e) { |
322 | 345 | console.log("公司", e); |
323 | - if (this.currentName === 'company') { | |
324 | - this.model[this.currentName] = `${e.value[2].label}`; | |
325 | - this.model.regionName = e.value[0]?.value; | |
326 | - this.model.groupName = e.value[1]?.value; | |
327 | - this.model.companyName = e.value[2]?.label; | |
328 | - this.model.companyCode = e.value[2]?.value; | |
329 | - } | |
346 | + this.model.regionName = e.value[0]?.value; | |
347 | + this.model.groupName = e.value[1]?.value; | |
348 | + this.model.companyName = e.value[2]?.label; | |
349 | + this.model.companyCode = e.value[2]?.value; | |
330 | 350 | this.gsShow = false; |
351 | + this.searchForm.companyCode = this.model.companyName.slice(0, 5) + '...'; | |
352 | + this.params.companyCode = this.model.companyCode; | |
353 | + this.initData(); | |
331 | 354 | this.currentName = ''; |
332 | 355 | }, |
333 | 356 | gsCancel() { |
334 | 357 | this.gsShow = false; |
335 | 358 | this.currentName = ''; |
336 | 359 | }, |
337 | - changeHandler() {}, | |
360 | + // 项目公司切换 | |
361 | + changeHandler(e) { | |
362 | + const { | |
363 | + columnIndex, | |
364 | + value, | |
365 | + values, // values为当前变化列的数组内容 | |
366 | + index, | |
367 | + indexs | |
368 | + // 微信小程序无法将picker实例传出来,只能通过ref操作 | |
369 | + } = e | |
370 | + console.log(e); | |
371 | + // 当第一列值发生变化时,变化第二列(后一列)对应的选项 | |
372 | + let [regionIndex, groupIndex, companyIndex] = indexs; | |
373 | + if (columnIndex === 0) { | |
374 | + this.gsName = value[0].label; | |
375 | + console.log(0, this.regionName) | |
376 | + // this.regionName = this.regionName[index]?.children || []; | |
377 | + this.groupName = this.regionName[index]?.children || []; | |
378 | + this.companyName = this.groupName[0]?.children || []; | |
379 | + console.log(1, this.regionName) | |
380 | + console.log(2, this.groupName) | |
381 | + console.log(3, this.companyName) | |
382 | + this.$refs.gsPicker.setIndexs([index, 0, 0], true) | |
383 | + } else if (columnIndex === 1) { | |
384 | + this.gsName = value[1].label; | |
385 | + this.groupName = this.regionName[index]?.children || []; | |
386 | + this.companyName = this.groupName[0]?.children || []; | |
387 | + this.$refs.gsPicker.setIndexs(indexs, true) | |
388 | + } else if (columnIndex === 2) { | |
389 | + this.gsName = value[2].label; | |
390 | + } | |
391 | + // let data2 = value[0].children; | |
392 | + // let data3 = data2[0].children; | |
393 | + // picker为选择器this实例,变化第二列对应的选项 | |
394 | + // this.gsColumns = [this.regionName, data2, data3] | |
395 | + console.log("选择后", this.gsColumns); | |
396 | + }, | |
338 | 397 | dateConfirm(e) { |
339 | 398 | let time = this.$u.timeFormat(e.value, 'yyyy'); |
340 | 399 | console.log("选择时间", time); |
341 | - this.model[this.currentName] = time; | |
342 | - this.searchForm.year = time; | |
400 | + // this.model[this.currentName] = time; | |
401 | + this.searchForm.startFiscalYear = time; | |
402 | + this.params.startFiscalYear = time; | |
343 | 403 | this.datetimeShow = false; |
404 | + this.datetimeShowTwo = true; | |
344 | 405 | this.currentName = ''; |
345 | 406 | }, |
346 | 407 | timeCancel() { |
347 | 408 | this.datetimeShow = false; |
348 | 409 | this.currentName = ''; |
349 | 410 | }, |
411 | + dateConfirm2(e) { | |
412 | + let time = this.$u.timeFormat(e.value, 'yyyy'); | |
413 | + console.log("选择时间", time); | |
414 | + // this.model[this.currentName] = time; | |
415 | + if(time < this.params.startFiscalYear){ | |
416 | + uni.$u.toast('结束财年需大于开始财年'); | |
417 | + return; | |
418 | + } | |
419 | + this.searchForm.finishFiscalYear = time; | |
420 | + this.params.finishFiscalYear = time; | |
421 | + this.initData(); | |
422 | + this.datetimeShowTwo = false; | |
423 | + this.isCN = true; | |
424 | + this.currentName = ''; | |
425 | + }, | |
426 | + timeCancel2() { | |
427 | + this.datetimeShowTwo = false; | |
428 | + this.currentName = ''; | |
429 | + }, | |
350 | 430 | async getCompanyCascader() { |
351 | 431 | this.companyOption = (await getCompanyCascader()).data; |
352 | 432 | this.companyOption.forEach(item1 => { |
... | ... | @@ -361,11 +441,13 @@ |
361 | 441 | console.log("当前公司类", this.companyOption); |
362 | 442 | }, |
363 | 443 | async openPicker(data) { |
444 | + console.log("下拉data", data) | |
364 | 445 | this.currentName = data.key; |
365 | 446 | console.log('打印data-===', data); |
366 | 447 | if (data.type === 'select') { |
367 | 448 | if (data.key == 'company') { |
368 | 449 | this.gsColumns = [this.regionName, this.groupName, this.companyName]; |
450 | + this.gsName = `${this.regionName[0].label}`; | |
369 | 451 | this.gsShow = true; |
370 | 452 | } else { |
371 | 453 | let dict = data.dict; |
... | ... | @@ -373,7 +455,6 @@ |
373 | 455 | this.columns = [dictArr]; |
374 | 456 | this.pickerShow = true; |
375 | 457 | } |
376 | - | |
377 | 458 | } else { |
378 | 459 | console.log('打印data===', data); |
379 | 460 | this.datetimeShow = true; |
... | ... | @@ -426,13 +507,13 @@ |
426 | 507 | const bgColorMap = { |
427 | 508 | '3': '#EFF1FD', |
428 | 509 | '2': '#FFF6E6', |
429 | - '1': '#E6F7F7', | |
510 | + '1': '#CF000D', | |
430 | 511 | '0': '#F5F5F7', |
431 | 512 | }; |
432 | 513 | const textColorMap = { |
433 | 514 | '3': '#5875EB', |
434 | 515 | '2': '#FFA500', |
435 | - '1': '#CF000D', | |
516 | + '1': '#ffffff', | |
436 | 517 | '0': '#999DB0', |
437 | 518 | }; |
438 | 519 | ... | ... |
pages/login/mobile.vue
... | ... | @@ -63,8 +63,14 @@ |
63 | 63 | </template> |
64 | 64 | |
65 | 65 | <script> |
66 | - import {passwordLogin,getCodeImg,} from '@/api/auth' | |
67 | - import { encrypt, decrypt } from "@/utils/jsencrypt"; | |
66 | + import { | |
67 | + passwordLogin, | |
68 | + getCodeImg, | |
69 | + } from '@/api/auth' | |
70 | + import { | |
71 | + encrypt, | |
72 | + decrypt | |
73 | + } from "@/utils/jsencrypt"; | |
68 | 74 | import * as dd from 'dingtalk-jsapi' |
69 | 75 | export default { |
70 | 76 | data() { |
... | ... | @@ -110,9 +116,7 @@ |
110 | 116 | onShow() { |
111 | 117 | this.getCode(); |
112 | 118 | this.detectionEnvironment(); |
113 | - this.getLocalCache() | |
114 | - // console.log(this.$isDing); | |
115 | - // this.isDing = true; | |
119 | + this.getLocalCache(); | |
116 | 120 | }, |
117 | 121 | onReady() { |
118 | 122 | // 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则 |
... | ... | @@ -126,7 +130,8 @@ |
126 | 130 | this.isDing = true; |
127 | 131 | dd.ready(() => { |
128 | 132 | dd.runtime.permission.requestAuthCode({ |
129 | - corpId: "dinge6053c157358448735c2f4657eb6378f", | |
133 | + // corpId: "dinge6053c157358448735c2f4657eb6378f", | |
134 | + corpId: "dingf2f9115915afcb54a39a90f97fcb1e09", | |
130 | 135 | onSuccess: (info) => { |
131 | 136 | that.$store.dispatch('Login', { |
132 | 137 | type: 2, |
... | ... | @@ -168,7 +173,7 @@ |
168 | 173 | if (!rememberMe) return; |
169 | 174 | const username = uni.getStorageSync('username') |
170 | 175 | const password = uni.getStorageSync('password') |
171 | - console.log("密码缓存",password); | |
176 | + console.log("密码缓存", password); | |
172 | 177 | this.formData = { |
173 | 178 | username: username === undefined ? this.formData.username : username, |
174 | 179 | password: password === undefined ? this.formData.password : decrypt(password), |
... | ... | @@ -219,7 +224,7 @@ |
219 | 224 | }, |
220 | 225 | mobileLogin(data) { |
221 | 226 | // return |
222 | - console.log("登录信息",data); | |
227 | + console.log("登录信息", data); | |
223 | 228 | this.$store.dispatch('Login', { |
224 | 229 | type: 0, |
225 | 230 | data: data |
... | ... | @@ -237,8 +242,8 @@ |
237 | 242 | url: '/pages/login/workbench' |
238 | 243 | }) |
239 | 244 | }, 300) |
240 | - }).catch(error =>{ | |
241 | - if(error.data.code === 500){ | |
245 | + }).catch(error => { | |
246 | + if (error.data.code === 500) { | |
242 | 247 | this.getCode(); |
243 | 248 | } |
244 | 249 | }) | ... | ... |