Commit d50eb3632bbdf60c4464a84cf8838267ab3ce091

Authored by 郭伟龙
1 parent 88a62993
Exists in charge

fix:修改问题

@@ -2,8 +2,10 @@ const { http } = uni.$u @@ -2,8 +2,10 @@ const { http } = uni.$u
2 2
3 /* 拜访列表 */ 3 /* 拜访列表 */
4 export const getMcVisitList = params => http.get('/schsf/mcVisit/list', { params }) 4 export const getMcVisitList = params => http.get('/schsf/mcVisit/list', { params })
5 -/* 附件 */ 5 +/* 批量查看附件 */
6 export const getMcFileList = data => http.post('/schsf/mcFile/detailsList',data) 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 export const getMcOperationLogList = params => http.get('/schsf/mcOperationLog/list', { params }) 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,3 +44,5 @@ export const getMcConstructionList = params => http.get('/schsf/mcConstruction/l
42 export const mcConstructionEngineering = data => http.post('/schsf/mcConstruction/engineering', data ) 44 export const mcConstructionEngineering = data => http.post('/schsf/mcConstruction/engineering', data )
43 /* 运营维护 */ 45 /* 运营维护 */
44 export const mcConstructionOperation = data => http.post('/schsf/mcConstruction/operations', data ) 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
@@ -7,6 +7,7 @@ module.exports = { @@ -7,6 +7,7 @@ module.exports = {
7 // baseUrl: 'http://172.17.56.16:18082/api', //ip正式环境 7 // baseUrl: 'http://172.17.56.16:18082/api', //ip正式环境
8 // baseUrl: 'https://scdcapp.chinagasholdings.com/api', //域名正式环境 8 // baseUrl: 'https://scdcapp.chinagasholdings.com/api', //域名正式环境
9 // 超时 9 // 超时
  10 +
10 timeout: 30000, 11 timeout: 30000,
11 gaodeMapKey:"", 12 gaodeMapKey:"",
12 // 禁用 Cookie 等信息 13 // 禁用 Cookie 等信息
components/popUpFillIn/popUpFillIn.vue
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <!-- 点火维护 --> 11 <!-- 点火维护 -->
12 <u-form-item v-if="type==='dhwh'" required label="是否已点火" labelWidth="100"> 12 <u-form-item v-if="type==='dhwh'" required label="是否已点火" labelWidth="100">
13 <view class="flex justify-between margin-tb w100"> 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 <u-radio class="margin-right" name="是">是</u-radio> 15 <u-radio class="margin-right" name="是">是</u-radio>
16 <u-radio name="否">否</u-radio> 16 <u-radio name="否">否</u-radio>
17 </u-radio-group> 17 </u-radio-group>
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <!-- 工程维护 --> 20 <!-- 工程维护 -->
21 <u-form-item v-if="type==='gcwh'" required label="是否竣工" labelWidth="100"> 21 <u-form-item v-if="type==='gcwh'" required label="是否竣工" labelWidth="100">
22 <view class="flex justify-between margin-tb w100"> 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 <u-radio class="margin-right" name="是">是</u-radio> 24 <u-radio class="margin-right" name="是">是</u-radio>
25 <u-radio name="否">否</u-radio> 25 <u-radio name="否">否</u-radio>
26 </u-radio-group> 26 </u-radio-group>
@@ -30,63 +30,76 @@ @@ -30,63 +30,76 @@
30 <!-- 运营维护 --> 30 <!-- 运营维护 -->
31 <u-form-item v-if="type==='yywh'" required label="是否通气到表前" labelWidth="100"> 31 <u-form-item v-if="type==='yywh'" required label="是否通气到表前" labelWidth="100">
32 <view class="flex justify-between margin-tb w100"> 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 <u-radio class="margin-right" name="是">是</u-radio> 34 <u-radio class="margin-right" name="是">是</u-radio>
35 <u-radio name="否">否</u-radio> 35 <u-radio name="否">否</u-radio>
36 </u-radio-group> 36 </u-radio-group>
37 </view> 37 </view>
38 </u-form-item> 38 </u-form-item>
39 <view class="usuallyCard padding margin-bottom-sm"> 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 </view> 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 <u-input v-model="model.ignTime" placeholder="请选择" disabled disabledColor="#fff" 49 <u-input v-model="model.ignTime" placeholder="请选择" disabled disabledColor="#fff"
46 border="none"></u-input> 50 border="none"></u-input>
47 <u-icon slot="right" name="calendar" size="20" @click="datetimeShow = true"></u-icon> 51 <u-icon slot="right" name="calendar" size="20" @click="datetimeShow = true"></u-icon>
48 </u-form-item> 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 <u-input v-model="model.nIgnRsn" placeholder="请选择" disabled disabledColor="#fff" 54 <u-input v-model="model.nIgnRsn" placeholder="请选择" disabled disabledColor="#fff"
51 border="none"></u-input> 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 </u-form-item> 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 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon> 64 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon>
59 </u-form-item> 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 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('completionTime')"></u-icon> 69 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('completionTime')"></u-icon>
63 </u-form-item> 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 </u-form-item> 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 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon> 82 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon>
73 </u-form-item> 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 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('gctMtrrisTime')"></u-icon> 87 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('gctMtrrisTime')"></u-icon>
77 </u-form-item> 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 </u-form-item> 94 </u-form-item>
82 </view> 95 </view>
83 </view> 96 </view>
84 <view class="flex justify-between bg-white padding-tb-xs padding-lr"> 97 <view class="flex justify-between bg-white padding-tb-xs padding-lr">
85 <view class="w48" @click="close"> 98 <view class="w48" @click="close">
86 - <u-button :customStyle="{color:'#EA5504'}">取消</u-button> 99 + <u-button :customStyle="{color:'#CF000D'}">取消</u-button>
87 </view> 100 </view>
88 <view class="w48" @click="confirm"> 101 <view class="w48" @click="confirm">
89 - <u-button color="#EA5504">确定</u-button> 102 + <u-button color="#CF000D">确定</u-button>
90 </view> 103 </view>
91 </view> 104 </view>
92 </view> 105 </view>
@@ -96,7 +109,7 @@ @@ -96,7 +109,7 @@
96 @cancel="pickerShow = false" @confirm="pickerConfirm"></u-picker> 109 @cancel="pickerShow = false" @confirm="pickerConfirm"></u-picker>
97 <!-- <u-calendar :show="calendarShow" @close="closeCalender" @confirm="confirmCalender"></u-calendar> --> 110 <!-- <u-calendar :show="calendarShow" @close="closeCalender" @confirm="confirmCalender"></u-calendar> -->
98 <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm" 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 </view> 113 </view>
101 </template> 114 </template>
102 115
@@ -120,6 +133,10 @@ @@ -120,6 +133,10 @@
120 IgnitionID: { 133 IgnitionID: {
121 type: Number 134 type: Number
122 }, 135 },
  136 + userCode: {
  137 + type: String,
  138 + default: ""
  139 + },
123 }, 140 },
124 data() { 141 data() {
125 return { 142 return {
@@ -129,26 +146,30 @@ @@ -129,26 +146,30 @@
129 dataTimeValue: Number(new Date()), 146 dataTimeValue: Number(new Date()),
130 radiovalueDHWH: "", 147 radiovalueDHWH: "",
131 radiovalueGCWH: "", 148 radiovalueGCWH: "",
132 - radiovalueYYWH:"", 149 + radiovalueYYWH: "",
133 model: { 150 model: {
134 - ignTime: "",  
135 - nIgnRsn: "" 151 +
  152 + // ignTime: "",
  153 + // nIgnRsn: ""
136 }, 154 },
137 rules: {}, 155 rules: {},
138 pickerShow: false, 156 pickerShow: false,
139 columns: [], 157 columns: [],
140 dhShow: true, 158 dhShow: true,
141 gcShow: true, 159 gcShow: true,
142 - yyShow:true,  
143 - currentName:"", 160 + yyShow: true,
  161 + currentName: "",
144 }; 162 };
145 }, 163 },
146 methods: { 164 methods: {
147 open() { 165 open() {
  166 + this.model.userCode = this.userCode;
148 this.show = true; 167 this.show = true;
149 }, 168 },
150 close() { 169 close() {
  170 + console.log("close")
151 this.show = false; 171 this.show = false;
  172 + this.model = {};
152 }, 173 },
153 handleIgnition(dict) { 174 handleIgnition(dict) {
154 let dictArr = this.getDictDatas(dict); 175 let dictArr = this.getDictDatas(dict);
@@ -167,7 +188,7 @@ @@ -167,7 +188,7 @@
167 uni.$u.toast('请选择点火时间'); 188 uni.$u.toast('请选择点火时间');
168 return 189 return
169 } 190 }
170 - if (!this.model.nIgnRsn) { 191 + if (!this.model.nIgnRsn && this.radiovalueDHWH === '否') {
171 uni.$u.toast('请选择未点火原因'); 192 uni.$u.toast('请选择未点火原因');
172 return 193 return
173 } 194 }
@@ -186,7 +207,7 @@ @@ -186,7 +207,7 @@
186 uni.$u.toast('请选择市场竣工时间'); 207 uni.$u.toast('请选择市场竣工时间');
187 return 208 return
188 } 209 }
189 - if (!this.model.nonNcmpRsn) { 210 + if (!this.model.nonNcmpRsn && this.radiovalueGCWH === '否') {
190 uni.$u.toast('请选择竣工原因'); 211 uni.$u.toast('请选择竣工原因');
191 return 212 return
192 } 213 }
@@ -206,7 +227,7 @@ @@ -206,7 +227,7 @@
206 uni.$u.toast('请选择通气到表前时间'); 227 uni.$u.toast('请选择通气到表前时间');
207 return 228 return
208 } 229 }
209 - if (!this.model.gctNcmpRsn) { 230 + if (!this.model.gctNcmpRsn && this.radiovalueGCWH === '否') {
210 uni.$u.toast('请选择未完成原因'); 231 uni.$u.toast('请选择未完成原因');
211 return 232 return
212 } 233 }
@@ -214,12 +235,12 @@ @@ -214,12 +235,12 @@
214 } 235 }
215 this.show = false; 236 this.show = false;
216 }, 237 },
217 - async submitDh(){ 238 + async submitDh() {
218 let data = { 239 let data = {
219 id: this.IgnitionID, 240 id: this.IgnitionID,
220 ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N', 241 ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N',
221 nIgnRsn: this.model.nIgnRsn, 242 nIgnRsn: this.model.nIgnRsn,
222 - ignTime: this.model.ignTime 243 + ignTime: this.model.ignTime + ' 00:00:00'
223 } 244 }
224 console.log(this.radiovalueGCWH); 245 console.log(this.radiovalueGCWH);
225 console.log("点火数据", data); 246 console.log("点火数据", data);
@@ -232,12 +253,12 @@ @@ -232,12 +253,12 @@
232 uni.$u.toast(result.msg) 253 uni.$u.toast(result.msg)
233 } 254 }
234 }, 255 },
235 - async submitGc(){ 256 + async submitGc() {
236 let data = { 257 let data = {
237 id: this.IgnitionID, 258 id: this.IgnitionID,
238 isCompleted: this.radiovalueGCWH === '是' ? 'Y' : 'N', 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 nonNcmpRsn: this.model.nonNcmpRsn 262 nonNcmpRsn: this.model.nonNcmpRsn
242 } 263 }
243 console.log(this.radiovalueGCWH); 264 console.log(this.radiovalueGCWH);
@@ -251,13 +272,13 @@ @@ -251,13 +272,13 @@
251 uni.$u.toast(result.msg) 272 uni.$u.toast(result.msg)
252 } 273 }
253 }, 274 },
254 - async submitYy(){ 275 + async submitYy() {
255 let data = { 276 let data = {
256 id: this.IgnitionID, 277 id: this.IgnitionID,
257 gasConnMtrRis: this.radiovalueYYWH === '是' ? 'Y' : 'N', 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 console.log("运营数据", data); 283 console.log("运营数据", data);
263 const result = await mcConstructionOperation(data); 284 const result = await mcConstructionOperation(data);
@@ -286,7 +307,7 @@ @@ -286,7 +307,7 @@
286 this.model = {} 307 this.model = {}
287 } 308 }
288 }, 309 },
289 - YYchange(e){ 310 + YYchange(e) {
290 if (e === '是') { 311 if (e === '是') {
291 this.yyShow = true 312 this.yyShow = true
292 } else { 313 } else {
@@ -294,20 +315,20 @@ @@ -294,20 +315,20 @@
294 this.model = {} 315 this.model = {}
295 } 316 }
296 }, 317 },
297 - multipleChange(name){ 318 + multipleChange(name) {
298 this.currentName = name; 319 this.currentName = name;
299 this.datetimeShow = true; 320 this.datetimeShow = true;
300 }, 321 },
301 pickerConfirm(e) { 322 pickerConfirm(e) {
302 console.log(e); 323 console.log(e);
303 let data = e.value[0].value; 324 let data = e.value[0].value;
304 - if(this.type === 'dhwh'){ 325 + if (this.type === 'dhwh') {
305 this.model.nIgnRsn = data; 326 this.model.nIgnRsn = data;
306 } 327 }
307 - if(this.type === 'gcwh'){ 328 + if (this.type === 'gcwh') {
308 this.model.nonNcmpRsn = data; 329 this.model.nonNcmpRsn = data;
309 } 330 }
310 - if(this.type === 'yywh'){ 331 + if (this.type === 'yywh') {
311 this.model.gctNcmpRsn = data; 332 this.model.gctNcmpRsn = data;
312 } 333 }
313 this.pickerShow = false; 334 this.pickerShow = false;
@@ -318,15 +339,15 @@ @@ -318,15 +339,15 @@
318 this.calendarShow = false; 339 this.calendarShow = false;
319 }, 340 },
320 dateConfirm(e) { 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 this.model.ignTime = time; 344 this.model.ignTime = time;
324 } 345 }
325 - if(this.type === 'gcwh'){ 346 + if (this.type === 'gcwh') {
326 this.model[this.currentName] = time; 347 this.model[this.currentName] = time;
327 // this.model.nonNcmpRsn = data; 348 // this.model.nonNcmpRsn = data;
328 } 349 }
329 - if(this.type === 'yywh'){ 350 + if (this.type === 'yywh') {
330 this.model[this.currentName] = time; 351 this.model[this.currentName] = time;
331 // this.model.gctNcmpRsn = data; 352 // this.model.gctNcmpRsn = data;
332 } 353 }
@@ -20,6 +20,7 @@ import { @@ -20,6 +20,7 @@ import {
20 dDingJudgeEnvPlatform 20 dDingJudgeEnvPlatform
21 } from 'utils/isDing.js' 21 } from 'utils/isDing.js'
22 22
  23 +import VConsole from '@/utils/vconsole.js'
23 import dayjs from '@/uni_modules/uview-ui/libs/util/dayjs.js'; 24 import dayjs from '@/uni_modules/uview-ui/libs/util/dayjs.js';
24 25
25 import { 26 import {
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 "disableHostCheck" : true, 83 "disableHostCheck" : true,
84 "proxy" : { 84 "proxy" : {
85 "/api" : { 85 "/api" : {
86 - "target" : "http://192.168.0.8:8001", 86 + "target" : "http://192.168.0.34:8001",
87 "changeOrigin" : true, 87 "changeOrigin" : true,
88 "secure" : true, 88 "secure" : true,
89 "pathRewrite" : { 89 "pathRewrite" : {
package-lock.json
@@ -2,6 +2,24 @@ @@ -2,6 +2,24 @@
2 "requires": true, 2 "requires": true,
3 "lockfileVersion": 1, 3 "lockfileVersion": 1,
4 "dependencies": { 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 "dingtalk-jsapi": { 23 "dingtalk-jsapi": {
6 "version": "3.0.29", 24 "version": "3.0.29",
7 "resolved": "https://registry.npmmirror.com/dingtalk-jsapi/-/dingtalk-jsapi-3.0.29.tgz", 25 "resolved": "https://registry.npmmirror.com/dingtalk-jsapi/-/dingtalk-jsapi-3.0.29.tgz",
@@ -15,10 +33,31 @@ @@ -15,10 +33,31 @@
15 "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz", 33 "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz",
16 "integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A==" 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 "promise-polyfill": { 41 "promise-polyfill": {
19 "version": "7.1.2", 42 "version": "7.1.2",
20 "resolved": "https://registry.npmmirror.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz", 43 "resolved": "https://registry.npmmirror.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz",
21 "integrity": "sha512-FuEc12/eKqqoRYIGBrUptCBRhobL19PS2U31vMNTfyck1FxPyMfgsXyW4Mav85y/ZN1hop3hOwRlUDok23oYfQ==" 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 }
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 }, 7 },
8 "dependencies": { 8 "dependencies": {
9 "dingtalk-jsapi": "^3.0.29", 9 "dingtalk-jsapi": "^3.0.29",
10 - "jsencrypt": "^3.3.2" 10 + "jsencrypt": "^3.3.2",
  11 + "vconsole": "^3.15.1"
11 } 12 }
12 } 13 }
pages/charge/constructionMaintenance/index.vue
1 <template> 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 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}" 7 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}"
8 :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" 8 :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}"
9 :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}"> 9 :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}">
@@ -14,177 +14,366 @@ @@ -14,177 +14,366 @@
14 <uv-drop-down-item name="type" type="2" label="是否立管" value="0"> 14 <uv-drop-down-item name="type" type="2" label="是否立管" value="0">
15 </uv-drop-down-item> 15 </uv-drop-down-item>
16 </uv-drop-down> 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 <view class="margin-top-sm"> 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 </view> 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 </view> 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 </view> --> 69 </view> -->
50 - </view> 70 + </view>
51 <u-loadmore :status="status" v-if="list.length > 0" /> 71 <u-loadmore :status="status" v-if="list.length > 0" />
52 <u-empty text="暂无数据" icon="/static/images/icon/nodata.png" v-else></u-empty> 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 </template> 85 </template>
57 86
58 <script> 87 <script>
59 import { 88 import {
  89 + getCompanyCascader,
60 getMcConstructionList 90 getMcConstructionList
61 } from '@/api/charge.js' 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 handleDetail(item) { 322 handleDetail(item) {
139 uni.navigateTo({ 323 uni.navigateTo({
140 url: '/pages/charge/constructionMaintenance/detail?objData=' + JSON.stringify(item) 324 url: '/pages/charge/constructionMaintenance/detail?objData=' + JSON.stringify(item)
141 }) 325 })
142 }, 326 },
143 - handleOpen(item,type){ 327 + handleOpen(item, type) {
144 this.IgnitionID = item.id; 328 this.IgnitionID = item.id;
145 this.btnType = type; 329 this.btnType = type;
146 this.$refs.popUpFillInRef.open(); 330 this.$refs.popUpFillInRef.open();
147 } 331 }
148 - }  
149 - } 332 + }
  333 + }
150 </script> 334 </script>
151 335
152 <style lang="scss" scoped> 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 </style> 379 </style>
pages/charge/ignitionMaintenance/detail.vue
@@ -73,7 +73,11 @@ @@ -73,7 +73,11 @@
73 name: "详细地址", 73 name: "详细地址",
74 value: "", 74 value: "",
75 key: "userDetailedAddress" 75 key: "userDetailedAddress"
76 - }, { 76 + },{
  77 + name: "用户编号",
  78 + value: "",
  79 + key: "userCode"
  80 + },{
77 name: "户名", 81 name: "户名",
78 value: "", 82 value: "",
79 key: "userName" 83 key: "userName"
@@ -84,7 +88,8 @@ @@ -84,7 +88,8 @@
84 }, { 88 }, {
85 name: "点火确认", 89 name: "点火确认",
86 value: "", 90 value: "",
87 - key: "ignCnfStatusCode" 91 + key: "ignCnfStatusCode",
  92 + dict:"sys_mc_ign_status"
88 }, { 93 }, {
89 name: "点火时间", 94 name: "点火时间",
90 value: "", 95 value: "",
pages/charge/ignitionMaintenance/index.vue
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <u-navbar :title="title" safeAreaInsetTop placeholder> 3 <u-navbar :title="title" safeAreaInsetTop placeholder>
4 <view slot="left" class="text-red"></view> 4 <view slot="left" class="text-red"></view>
5 </u-navbar> 5 </u-navbar>
6 - <view class=""> 6 + <!-- <view class="">
7 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}" 7 <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}"
8 :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" 8 :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}"
9 :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}"> 9 :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}">
@@ -12,6 +12,26 @@ @@ -12,6 +12,26 @@
12 <uv-drop-down-item name="type" type="2" label="点火确认" value="0"> 12 <uv-drop-down-item name="type" type="2" label="点火确认" value="0">
13 </uv-drop-down-item> 13 </uv-drop-down-item>
14 </uv-drop-down> 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 </view> 35 </view>
16 36
17 <view class="usuallyCard margin padding" v-if="list.length" v-for="(item,index) in list" :key="index"> 37 <view class="usuallyCard margin padding" v-if="list.length" v-for="(item,index) in list" :key="index">
@@ -41,7 +61,8 @@ @@ -41,7 +61,8 @@
41 <view class="margin-right" @click="handleDetail(item)"> 61 <view class="margin-right" @click="handleDetail(item)">
42 <u-button shape="circle">查看详情</u-button> 62 <u-button shape="circle">查看详情</u-button>
43 </view> 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 <u-button shape="circle" color="#CF000D">点火维护</u-button> 66 <u-button shape="circle" color="#CF000D">点火维护</u-button>
46 </view> 67 </view>
47 </view> 68 </view>
@@ -52,14 +73,25 @@ @@ -52,14 +73,25 @@
52 <u-loadmore :status="status" v-if="list.length > 0" /> 73 <u-loadmore :status="status" v-if="list.length > 0" />
53 <u-empty text="暂无数据" icon="/static/images/icon/nodata.png" v-else></u-empty> 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 </popUpFillIn> 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 <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> 88 <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar>
58 </view> 89 </view>
59 </template> 90 </template>
60 91
61 <script> 92 <script>
62 import { 93 import {
  94 + getCompanyCascader,
63 getMcIgnitionList, 95 getMcIgnitionList,
64 mcIgnitionMaintenance 96 mcIgnitionMaintenance
65 } from '@/api/charge.js' 97 } from '@/api/charge.js'
@@ -94,10 +126,41 @@ @@ -94,10 +126,41 @@
94 list: [], 126 list: [],
95 total: null, 127 total: null,
96 IgnitionID: 0, 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 computed: { 160 computed: {
100 - 161 + companyList() {
  162 + return [this.regionName, this.groupName, this.companyName];
  163 + }
101 }, 164 },
102 onReachBottom() { 165 onReachBottom() {
103 let allTotal = this.params.pageNum * this.params.pageSize 166 let allTotal = this.params.pageNum * this.params.pageSize
@@ -112,7 +175,11 @@ @@ -112,7 +175,11 @@
112 } 175 }
113 }, 176 },
114 onPullDownRefresh() { 177 onPullDownRefresh() {
115 - this.params.pageNum = 1; 178 + this.params = {
  179 + pageNum: 1,
  180 + pageSize: 10,
  181 + }
  182 + this.searchForm = {}
116 this.keyword = ""; 183 this.keyword = "";
117 this.initData(); 184 this.initData();
118 setTimeout(() => { 185 setTimeout(() => {
@@ -120,9 +187,13 @@ @@ -120,9 +187,13 @@
120 uni.stopPullDownRefresh(); 187 uni.stopPullDownRefresh();
121 }, 500); 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 methods: { 197 methods: {
127 async initData() { 198 async initData() {
128 let { 199 let {
@@ -140,6 +211,19 @@ @@ -140,6 +211,19 @@
140 console.log('list', JSON.parse(JSON.stringify(this.list))); 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 handleDetail(item) { 228 handleDetail(item) {
145 uni.navigateTo({ 229 uni.navigateTo({
@@ -147,9 +231,101 @@ @@ -147,9 +231,101 @@
147 }) 231 })
148 }, 232 },
149 handleOpen(item) { 233 handleOpen(item) {
  234 + console.log(item)
  235 + this.userCode = item.userCode;
150 this.IgnitionID = item.id; 236 this.IgnitionID = item.id;
151 this.$refs.popUpFillInRef.open(); 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 </script> 331 </script>
@@ -192,4 +368,9 @@ @@ -192,4 +368,9 @@
192 border: 1px solid #EFF1FD; 368 border: 1px solid #EFF1FD;
193 border-style: none none solid solid; 369 border-style: none none solid solid;
194 } 370 }
  371 +
  372 + .topSelectCss {
  373 + padding: 10px 20px;
  374 + background: #fff;
  375 + }
195 </style> 376 </style>
pages/charge/visitsAndFees/createaVisit.vue
@@ -20,8 +20,8 @@ @@ -20,8 +20,8 @@
20 <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom 20 <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
21 v-if="item.type === 'input'" :prop="item.key"> 21 v-if="item.type === 'input'" :prop="item.key">
22 <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" 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 <view class="" style="width: 40rpx;height: 40rpx;"></view> 25 <view class="" style="width: 40rpx;height: 40rpx;"></view>
26 </u-form-item> 26 </u-form-item>
27 <!-- 选择类型 --> 27 <!-- 选择类型 -->
@@ -105,8 +105,9 @@ @@ -105,8 +105,9 @@
105 <!-- 输入 --> 105 <!-- 输入 -->
106 <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom 106 <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
107 v-if="item.type === 'input' && item.show" :prop="item.key"> 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 <view class="" style="width: 40rpx;height: 40rpx;"></view> 111 <view class="" style="width: 40rpx;height: 40rpx;"></view>
111 </u-form-item> 112 </u-form-item>
112 <!-- 选择 --> 113 <!-- 选择 -->
@@ -139,8 +140,8 @@ @@ -139,8 +140,8 @@
139 <!-- 输入 --> 140 <!-- 输入 -->
140 <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom 141 <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
141 v-if="item.type === 'input' && item.show" :prop="item.key"> 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 <view class="" style="width: 40rpx;height: 40rpx;"></view> 145 <view class="" style="width: 40rpx;height: 40rpx;"></view>
145 </u-form-item> 146 </u-form-item>
146 <!-- 选择 --> 147 <!-- 选择 -->
@@ -178,8 +179,8 @@ @@ -178,8 +179,8 @@
178 <view slot="right" class="text-blue" @click="uploadAttachment">上传附件</view> 179 <view slot="right" class="text-blue" @click="uploadAttachment">上传附件</view>
179 </u-form-item> 180 </u-form-item>
180 <view class="bg-gray"> 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 {{item.fileName}} 184 {{item.fileName}}
184 </view> 185 </view>
185 <!-- <view class=""> 186 <!-- <view class="">
@@ -196,16 +197,19 @@ @@ -196,16 +197,19 @@
196 <u-button shape="circle" color="#CF000D">{{btnText}}</u-button> 197 <u-button shape="circle" color="#CF000D">{{btnText}}</u-button>
197 </view> 198 </view>
198 199
  200 + <!-- 字典选择 -->
199 <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="pickerShow = false" 201 <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="pickerShow = false"
200 @close="pickerShow = false" keyName="label" @confirm="confirm"></u-picker> 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 @cancel="gsShow = false" @close="gsShow = false" keyName="label" @confirm="gsConfirm" 206 @cancel="gsShow = false" @close="gsShow = false" keyName="label" @confirm="gsConfirm"
204 @change="changeHandler"></u-picker> 207 @change="changeHandler"></u-picker>
205 208
  209 + <!-- 时间选择 -->
206 <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm" 210 <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm"
207 @cancel="datetimeShow = false" @close="datetimeShow = false" mode="date"></u-datetime-picker> 211 @cancel="datetimeShow = false" @close="datetimeShow = false" mode="date"></u-datetime-picker>
208 - 212 + <!-- 省市区街道选择 -->
209 <uv-picker ref="regionsPicker" :columns="addressList" @confirm="regionConfirm" keyName="name" 213 <uv-picker ref="regionsPicker" :columns="addressList" @confirm="regionConfirm" keyName="name"
210 :loading="regionLoading" @change="regionChange"></uv-picker> 214 :loading="regionLoading" @change="regionChange"></uv-picker>
211 215
@@ -213,10 +217,12 @@ @@ -213,10 +217,12 @@
213 </template> 217 </template>
214 218
215 <script> 219 <script>
  220 + import * as dd from 'dingtalk-jsapi'
216 import cityData from '@/utils/cityOption' 221 import cityData from '@/utils/cityOption'
217 import chargeFile from '@/api/chargeFile' 222 import chargeFile from '@/api/chargeFile'
218 import config from '@/common/config.js' 223 import config from '@/common/config.js'
219 import { 224 import {
  225 + getByUuid,
220 getMcFileList, 226 getMcFileList,
221 getCurrentFiscalYear, 227 getCurrentFiscalYear,
222 getCompanyCascader, 228 getCompanyCascader,
@@ -224,7 +230,8 @@ @@ -224,7 +230,8 @@
224 getMcVisitUser, 230 getMcVisitUser,
225 addMcVisit, 231 addMcVisit,
226 editMcVisit, 232 editMcVisit,
227 - modification 233 + modification,
  234 + getDingtalkConfig
228 } from '@/api/charge.js' 235 } from '@/api/charge.js'
229 export default { 236 export default {
230 components: {}, 237 components: {},
@@ -312,6 +319,12 @@ @@ -312,6 +319,12 @@
312 required: true, 319 required: true,
313 message: '请填写联系电话', 320 message: '请填写联系电话',
314 trigger: ['blur', 'change'] 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 address: [{ 329 address: [{
317 required: true, 330 required: true,
@@ -352,6 +365,12 @@ @@ -352,6 +365,12 @@
352 required: true, 365 required: true,
353 message: '请输入决策人年龄', 366 message: '请输入决策人年龄',
354 trigger: ['blur', 'change'] 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 dmIncomeSrc: [{ 375 dmIncomeSrc: [{
357 required: true, 376 required: true,
@@ -362,31 +381,55 @@ @@ -362,31 +381,55 @@
362 required: true, 381 required: true,
363 message: '请填写决策人联系电话', 382 message: '请填写决策人联系电话',
364 trigger: ['blur', 'change'] 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 isCharged: [{ 391 isCharged: [{
367 required: true, 392 required: true,
368 message: '请选择是否收费', 393 message: '请选择是否收费',
369 trigger: ['blur', 'change'] 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 userIdCard: [{ 407 userIdCard: [{
377 required: true, 408 required: true,
378 message: '请填写身份证号', 409 message: '请填写身份证号',
379 trigger: ['blur', 'change'] 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 invoiceNo: [{ 418 invoiceNo: [{
382 required: true, 419 required: true,
383 message: '请填写票据单号', 420 message: '请填写票据单号',
384 - trigger: ['blur', 'change'] 421 + trigger: ['blur', 'change'],
385 }], 422 }],
386 chargeAmt: [{ 423 chargeAmt: [{
387 required: true, 424 required: true,
388 message: '请填写收费金额', 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 paymentMeth: [{ 434 paymentMeth: [{
392 required: true, 435 required: true,
@@ -481,7 +524,9 @@ @@ -481,7 +524,9 @@
481 placeholder: "请输入", 524 placeholder: "请输入",
482 type: "input", 525 type: "input",
483 required: true, 526 required: true,
484 - key: "userPhone" 527 + key: "userPhone",
  528 + mode: "number",
  529 + max: '11'
485 }, { 530 }, {
486 label: '省/市/区/街道', 531 label: '省/市/区/街道',
487 placeholder: "请选择", 532 placeholder: "请选择",
@@ -509,7 +554,7 @@ @@ -509,7 +554,7 @@
509 type: "select", 554 type: "select",
510 key: "isIntent", 555 key: "isIntent",
511 show: true, 556 show: true,
512 - dict: 'sys_cn_yn' 557 + dict: 'sys_mc_visit_intent'
513 }, { 558 }, {
514 label: '房屋情况', 559 label: '房屋情况',
515 placeholder: "请选择", 560 placeholder: "请选择",
@@ -611,6 +656,8 @@ @@ -611,6 +656,8 @@
611 type: "input", 656 type: "input",
612 key: "dmAge", 657 key: "dmAge",
613 show: true, 658 show: true,
  659 + mode: "number",
  660 + max: '3'
614 }, { 661 }, {
615 label: '决策人收入来源', 662 label: '决策人收入来源',
616 placeholder: "请选择", 663 placeholder: "请选择",
@@ -641,6 +688,8 @@ @@ -641,6 +688,8 @@
641 type: "input", 688 type: "input",
642 key: "userCode", 689 key: "userCode",
643 show: true, 690 show: true,
  691 + mode: "number",
  692 + max: '10'
644 }, { 693 }, {
645 label: '身份证号', 694 label: '身份证号',
646 placeholder: "请输入", 695 placeholder: "请输入",
@@ -655,6 +704,8 @@ @@ -655,6 +704,8 @@
655 type: "input", 704 type: "input",
656 key: "invoiceNo", 705 key: "invoiceNo",
657 show: true, 706 show: true,
  707 + mode: "number",
  708 + max: '10'
658 }, { 709 }, {
659 label: '收费金额', 710 label: '收费金额',
660 placeholder: "请输入", 711 placeholder: "请输入",
@@ -662,6 +713,8 @@ @@ -662,6 +713,8 @@
662 type: "input", 713 type: "input",
663 key: "chargeAmt", 714 key: "chargeAmt",
664 show: true, 715 show: true,
  716 + mode: "number",
  717 + max: '8'
665 }, { 718 }, {
666 label: '缴费方式', 719 label: '缴费方式',
667 placeholder: "请选择", 720 placeholder: "请选择",
@@ -695,6 +748,9 @@ @@ -695,6 +748,9 @@
695 computed: { 748 computed: {
696 addressList() { 749 addressList() {
697 return [this.provinces, this.city, this.district, this.street]; 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 onLoad(data) { 756 onLoad(data) {
@@ -746,6 +802,16 @@ @@ -746,6 +802,16 @@
746 item.show = false; 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 let uuid = this.model.attachmentFile; 815 let uuid = this.model.attachmentFile;
750 console.log(uuid); 816 console.log(uuid);
751 if (uuid) { 817 if (uuid) {
@@ -768,25 +834,93 @@ @@ -768,25 +834,93 @@
768 this.model.isVisited = '是'; 834 this.model.isVisited = '是';
769 this.model.hasDm = '是'; 835 this.model.hasDm = '是';
770 this.model.entryTime = this.$u.timeFormat(this.dataTimeValue, 'yyyy-mm-dd'); 836 this.model.entryTime = this.$u.timeFormat(this.dataTimeValue, 'yyyy-mm-dd');
  837 + // 获取缓存用的工作类型
  838 + this.model.jobNature = uni.getStorageSync('jobNature');
771 // 定位获取当前位置 839 // 定位获取当前位置
772 this.getLocaltion(); 840 this.getLocaltion();
773 // 查询财年 841 // 查询财年
774 await this.getCurrentFiscalYear() 842 await this.getCurrentFiscalYear()
775 await this.getCompanyCascader() 843 await this.getCompanyCascader()
776 let nickName = uni.getStorageSync("nickName"); 844 let nickName = uni.getStorageSync("nickName");
777 -  
778 this.$set(this.model, 'billingPersonName', nickName) 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 async getCurrentFiscalYear() { 925 async getCurrentFiscalYear() {
792 let fiscalYear = (await getCurrentFiscalYear()).data; 926 let fiscalYear = (await getCurrentFiscalYear()).data;
@@ -816,10 +950,10 @@ @@ -816,10 +950,10 @@
816 // 项目公司单独弹窗 950 // 项目公司单独弹窗
817 if (item.key === 'company') { 951 if (item.key === 'company') {
818 this.gsColumns = [this.regionName, this.groupName, this.companyName]; 952 this.gsColumns = [this.regionName, this.groupName, this.companyName];
819 - if(this.regionName.length){ 953 + if (this.regionName.length) {
820 this.gsName = `${this.regionName[0].label}`; 954 this.gsName = `${this.regionName[0].label}`;
821 this.gsShow = true; 955 this.gsShow = true;
822 - }else{ 956 + } else {
823 uni.$u.toast('未查询到项目公司'); 957 uni.$u.toast('未查询到项目公司');
824 } 958 }
825 return 959 return
@@ -856,6 +990,10 @@ @@ -856,6 +990,10 @@
856 vlgOrCmty: this.model.vlgOrCmty 990 vlgOrCmty: this.model.vlgOrCmty
857 } 991 }
858 const result = await getMcVisitUser(data); 992 const result = await getMcVisitUser(data);
  993 + if (!result.rows.length) {
  994 + uni.$u.toast('未查询相关用户');
  995 + return
  996 + }
859 let col = result.rows.map(item => ({ 997 let col = result.rows.map(item => ({
860 value: item.userName, 998 value: item.userName,
861 label: item.userName, 999 label: item.userName,
@@ -878,6 +1016,27 @@ @@ -878,6 +1016,27 @@
878 console.log(this.columns); 1016 console.log(this.columns);
879 // console.log("字典数组", dictArr); 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 handleSFSelect(item) { 1040 handleSFSelect(item) {
882 this.currentName = item.key; 1041 this.currentName = item.key;
883 let dict = item.dict; 1042 let dict = item.dict;
@@ -888,16 +1047,28 @@ @@ -888,16 +1047,28 @@
888 // 选择弹出层确认 1047 // 选择弹出层确认
889 confirm(e) { 1048 confirm(e) {
890 console.log("确认", e); 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 this.model[this.currentName] = e.value[0].value 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 this.model['userPhone'] = data.userPhone; 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 this.model['userProvince'] = data.province; 1072 this.model['userProvince'] = data.province;
902 this.model['userCity'] = data.city; 1073 this.model['userCity'] = data.city;
903 this.model['userDistrict'] = data.district; 1074 this.model['userDistrict'] = data.district;
@@ -916,22 +1087,41 @@ @@ -916,22 +1087,41 @@
916 value, 1087 value,
917 values, // values为当前变化列的数组内容 1088 values, // values为当前变化列的数组内容
918 index, 1089 index,
  1090 + indexs
919 // 微信小程序无法将picker实例传出来,只能通过ref操作 1091 // 微信小程序无法将picker实例传出来,只能通过ref操作
920 - picker = this.$refs.uPicker  
921 } = e 1092 } = e
922 console.log(e); 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 // picker为选择器this实例,变化第二列对应的选项 1116 // picker为选择器this实例,变化第二列对应的选项
928 - this.gsColumns = [this.regionName, data2, data3] 1117 + // this.gsColumns = [this.regionName, data2, data3]
929 console.log("选择后", this.gsColumns); 1118 console.log("选择后", this.gsColumns);
930 }, 1119 },
931 // 项目公司独立弹窗,防止共用报错 1120 // 项目公司独立弹窗,防止共用报错
932 gsConfirm(e) { 1121 gsConfirm(e) {
933 console.log("公司", e); 1122 console.log("公司", e);
934 if (this.currentName === 'company') { 1123 if (this.currentName === 'company') {
  1124 + this.emptyFill(1);
935 this.model[this.currentName] = `${e.value[2].label}`; 1125 this.model[this.currentName] = `${e.value[2].label}`;
936 this.model.regionName = e.value[0]?.value; 1126 this.model.regionName = e.value[0]?.value;
937 this.model.groupName = e.value[1]?.value; 1127 this.model.groupName = e.value[1]?.value;
@@ -997,13 +1187,11 @@ @@ -997,13 +1187,11 @@
997 // this.model.userDistrict = value[2].name; 1187 // this.model.userDistrict = value[2].name;
998 // this.model.userStreet = value[3].name; 1188 // this.model.userStreet = value[3].name;
999 const [userProvince, userCity, userDistrict, userStreet] = value.map(item => item.name); 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 bfChange(e) { 1197 bfChange(e) {
@@ -1089,7 +1277,7 @@ @@ -1089,7 +1277,7 @@
1089 message: '', 1277 message: '',
1090 uuid: result.uuid, 1278 uuid: result.uuid,
1091 url: result.url, 1279 url: result.url,
1092 - obj:result 1280 + obj: result
1093 })) 1281 }))
1094 fileListLen++ 1282 fileListLen++
1095 } 1283 }
@@ -1121,7 +1309,8 @@ @@ -1121,7 +1309,8 @@
1121 console.log("上传附件"); 1309 console.log("上传附件");
1122 uni.chooseFile({ 1310 uni.chooseFile({
1123 count: 1, //默认100 1311 count: 1, //默认100
1124 - extension: ['.doc', '.xlsx', '.docx'], 1312 + type: 'all',
  1313 + // extension: ['.doc', '.xlsx', '.docx'],
1125 success: async (res) => { 1314 success: async (res) => {
1126 let tempUrl = res.tempFilePaths[0] 1315 let tempUrl = res.tempFilePaths[0]
1127 console.log(res); 1316 console.log(res);
@@ -1138,8 +1327,12 @@ @@ -1138,8 +1327,12 @@
1138 this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N'; 1327 this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N';
1139 this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N'; 1328 this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N';
1140 this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N'; 1329 this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N';
  1330 + this.copyModel.entryTime = this.copyModel.entryTime + ' 00:00:00';
1141 // this.copyModel.attachmentFile = this.attachmentList.map(item => item.uuid).join(","); 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 handleConfirm() { 1337 handleConfirm() {
1145 this.model.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); 1338 this.model.fieldPhotoFile = this.fileList.map(item => item.uuid).join(",");
@@ -1157,6 +1350,7 @@ @@ -1157,6 +1350,7 @@
1157 console.log(result); 1350 console.log(result);
1158 if (result.code === 200) { 1351 if (result.code === 200) {
1159 uni.$u.toast('发起成功'); 1352 uni.$u.toast('发起成功');
  1353 + this.storingData();
1160 setTimeout(() => { 1354 setTimeout(() => {
1161 this.$goBack(); 1355 this.$goBack();
1162 }, 1000) 1356 }, 1000)
@@ -1181,6 +1375,7 @@ @@ -1181,6 +1375,7 @@
1181 console.log(result); 1375 console.log(result);
1182 if (result.code === 200) { 1376 if (result.code === 200) {
1183 uni.$u.toast('修改成功'); 1377 uni.$u.toast('修改成功');
  1378 + this.storingData();
1184 setTimeout(() => { 1379 setTimeout(() => {
1185 this.$goBack(); 1380 this.$goBack();
1186 }, 1000) 1381 }, 1000)
pages/charge/visitsAndFees/detail.vue
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 }, { 63 }, {
64 name: "收费人员", 64 name: "收费人员",
65 value: "", 65 value: "",
66 - key: "fiscalYear" 66 + key: "billingPersonName"
67 }, { 67 }, {
68 name: "兼职/全职", 68 name: "兼职/全职",
69 value: "— —", 69 value: "— —",
pages/charge/visitsAndFees/index.vue
@@ -26,11 +26,10 @@ @@ -26,11 +26,10 @@
26 <view class="text-lg"> 26 <view class="text-lg">
27 <span v-if="searchForm[item.name]" class="text-red"> 27 <span v-if="searchForm[item.name]" class="text-red">
28 {{searchForm[item.name]}} 28 {{searchForm[item.name]}}
29 - <span v-if="item.title=='财年'">  
30 - 财年 29 + <span v-if="item.name === 'year'" :class="isCN?'text-red':''">
31 </span> 30 </span>
32 </span> 31 </span>
33 - <span v-else>{{ item.title }}</span> 32 + <span v-else :class="isCN&&item.name === 'year'?'text-red':''">{{ item.title }}</span>
34 </view> 33 </view>
35 <view class="margin-left-xs" v-if="item.title == '财年'"> 34 <view class="margin-left-xs" v-if="item.title == '财年'">
36 <u-icon name="calendar-fill" size="25"></u-icon> 35 <u-icon name="calendar-fill" size="25"></u-icon>
@@ -155,12 +154,18 @@ @@ -155,12 +154,18 @@
155 </view> 154 </view>
156 </u-popup> 155 </u-popup>
157 <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> 156 <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar>
  157 + <!-- 字典下拉 -->
158 <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="selectCancel" 158 <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="selectCancel"
159 @close="selectCancel" keyName="label" @confirm="selectConfirm"></u-picker> 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 </view> 169 </view>
165 </template> 170 </template>
166 171
@@ -194,8 +199,12 @@ @@ -194,8 +199,12 @@
194 gsShow: false, 199 gsShow: false,
195 pickerShow: false, 200 pickerShow: false,
196 datetimeShow: false, 201 datetimeShow: false,
  202 + datetimeShowTwo: false,
  203 + gsName: "",
197 searchForm: { 204 searchForm: {
198 year: '', 205 year: '',
  206 + startFiscalYear: '',
  207 + finishFiscalYear: '',
199 companyCode: '', 208 companyCode: '',
200 status: '', 209 status: '',
201 type: '' 210 type: ''
@@ -239,6 +248,11 @@ @@ -239,6 +248,11 @@
239 pageSize: 10, 248 pageSize: 10,
240 userName: "", 249 userName: "",
241 isMyAuditing: "", 250 isMyAuditing: "",
  251 + companyCode: "",
  252 + statusCode: "",
  253 + ticketType: "",
  254 + startFiscalYear: "",
  255 + finishFiscalYear: ""
242 }, 256 },
243 status: "loadmore", 257 status: "loadmore",
244 list: [], 258 list: [],
@@ -266,10 +280,13 @@ @@ -266,10 +280,13 @@
266 zfShow: false, 280 zfShow: false,
267 zfRemarks: "", 281 zfRemarks: "",
268 ZfId: "", 282 ZfId: "",
  283 + isCN: false,
269 } 284 }
270 }, 285 },
271 computed: { 286 computed: {
272 - 287 + companyList() {
  288 + return [this.regionName, this.groupName, this.companyName];
  289 + }
273 }, 290 },
274 onReachBottom() { 291 onReachBottom() {
275 let allTotal = this.params.pageNum * this.params.pageSize 292 let allTotal = this.params.pageNum * this.params.pageSize
@@ -284,7 +301,12 @@ @@ -284,7 +301,12 @@
284 } 301 }
285 }, 302 },
286 onPullDownRefresh() { 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 this.keyword = ""; 310 this.keyword = "";
289 this.initData(); 311 this.initData();
290 setTimeout(() => { 312 setTimeout(() => {
@@ -292,11 +314,9 @@ @@ -292,11 +314,9 @@
292 uni.stopPullDownRefresh(); 314 uni.stopPullDownRefresh();
293 }, 500); 315 }, 500);
294 }, 316 },
295 - onLoad() {  
296 - this.getCompanyCascader();  
297 - },  
298 onShow() { 317 onShow() {
299 this.initData(); 318 this.initData();
  319 + this.getCompanyCascader();
300 }, 320 },
301 methods: { 321 methods: {
302 selectConfirm(e) { 322 selectConfirm(e) {
@@ -307,46 +327,106 @@ @@ -307,46 +327,106 @@
307 if (this.currentName === 'status') { 327 if (this.currentName === 'status') {
308 this.searchForm.status = dataLabel; 328 this.searchForm.status = dataLabel;
309 this.model.status = data; 329 this.model.status = data;
  330 + this.params.statusCode = data;
310 } else if (this.currentName == 'type') { 331 } else if (this.currentName == 'type') {
311 this.searchForm.type = dataLabel; 332 this.searchForm.type = dataLabel;
312 this.model.type = data; 333 this.model.type = data;
  334 + this.params.ticketType = data;
313 } 335 }
314 this.pickerShow = false; 336 this.pickerShow = false;
315 this.currentName = ''; 337 this.currentName = '';
  338 + this.initData()
316 }, 339 },
317 - selectCancel() { 340 + selectCancel(e) {
318 this.pickerShow = false; 341 this.pickerShow = false;
319 this.currentName = ''; 342 this.currentName = '';
320 }, 343 },
321 gsConfirm(e) { 344 gsConfirm(e) {
322 console.log("公司", e); 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 this.gsShow = false; 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 this.currentName = ''; 354 this.currentName = '';
332 }, 355 },
333 gsCancel() { 356 gsCancel() {
334 this.gsShow = false; 357 this.gsShow = false;
335 this.currentName = ''; 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 dateConfirm(e) { 397 dateConfirm(e) {
339 let time = this.$u.timeFormat(e.value, 'yyyy'); 398 let time = this.$u.timeFormat(e.value, 'yyyy');
340 console.log("选择时间", time); 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 this.datetimeShow = false; 403 this.datetimeShow = false;
  404 + this.datetimeShowTwo = true;
344 this.currentName = ''; 405 this.currentName = '';
345 }, 406 },
346 timeCancel() { 407 timeCancel() {
347 this.datetimeShow = false; 408 this.datetimeShow = false;
348 this.currentName = ''; 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 async getCompanyCascader() { 430 async getCompanyCascader() {
351 this.companyOption = (await getCompanyCascader()).data; 431 this.companyOption = (await getCompanyCascader()).data;
352 this.companyOption.forEach(item1 => { 432 this.companyOption.forEach(item1 => {
@@ -361,11 +441,13 @@ @@ -361,11 +441,13 @@
361 console.log("当前公司类", this.companyOption); 441 console.log("当前公司类", this.companyOption);
362 }, 442 },
363 async openPicker(data) { 443 async openPicker(data) {
  444 + console.log("下拉data", data)
364 this.currentName = data.key; 445 this.currentName = data.key;
365 console.log('打印data-===', data); 446 console.log('打印data-===', data);
366 if (data.type === 'select') { 447 if (data.type === 'select') {
367 if (data.key == 'company') { 448 if (data.key == 'company') {
368 this.gsColumns = [this.regionName, this.groupName, this.companyName]; 449 this.gsColumns = [this.regionName, this.groupName, this.companyName];
  450 + this.gsName = `${this.regionName[0].label}`;
369 this.gsShow = true; 451 this.gsShow = true;
370 } else { 452 } else {
371 let dict = data.dict; 453 let dict = data.dict;
@@ -373,7 +455,6 @@ @@ -373,7 +455,6 @@
373 this.columns = [dictArr]; 455 this.columns = [dictArr];
374 this.pickerShow = true; 456 this.pickerShow = true;
375 } 457 }
376 -  
377 } else { 458 } else {
378 console.log('打印data===', data); 459 console.log('打印data===', data);
379 this.datetimeShow = true; 460 this.datetimeShow = true;
@@ -426,13 +507,13 @@ @@ -426,13 +507,13 @@
426 const bgColorMap = { 507 const bgColorMap = {
427 '3': '#EFF1FD', 508 '3': '#EFF1FD',
428 '2': '#FFF6E6', 509 '2': '#FFF6E6',
429 - '1': '#E6F7F7', 510 + '1': '#CF000D',
430 '0': '#F5F5F7', 511 '0': '#F5F5F7',
431 }; 512 };
432 const textColorMap = { 513 const textColorMap = {
433 '3': '#5875EB', 514 '3': '#5875EB',
434 '2': '#FFA500', 515 '2': '#FFA500',
435 - '1': '#CF000D', 516 + '1': '#ffffff',
436 '0': '#999DB0', 517 '0': '#999DB0',
437 }; 518 };
438 519
pages/login/mobile.vue
@@ -63,8 +63,14 @@ @@ -63,8 +63,14 @@
63 </template> 63 </template>
64 64
65 <script> 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 import * as dd from 'dingtalk-jsapi' 74 import * as dd from 'dingtalk-jsapi'
69 export default { 75 export default {
70 data() { 76 data() {
@@ -110,9 +116,7 @@ @@ -110,9 +116,7 @@
110 onShow() { 116 onShow() {
111 this.getCode(); 117 this.getCode();
112 this.detectionEnvironment(); 118 this.detectionEnvironment();
113 - this.getLocalCache()  
114 - // console.log(this.$isDing);  
115 - // this.isDing = true; 119 + this.getLocalCache();
116 }, 120 },
117 onReady() { 121 onReady() {
118 // 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则 122 // 如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则
@@ -126,7 +130,8 @@ @@ -126,7 +130,8 @@
126 this.isDing = true; 130 this.isDing = true;
127 dd.ready(() => { 131 dd.ready(() => {
128 dd.runtime.permission.requestAuthCode({ 132 dd.runtime.permission.requestAuthCode({
129 - corpId: "dinge6053c157358448735c2f4657eb6378f", 133 + // corpId: "dinge6053c157358448735c2f4657eb6378f",
  134 + corpId: "dingf2f9115915afcb54a39a90f97fcb1e09",
130 onSuccess: (info) => { 135 onSuccess: (info) => {
131 that.$store.dispatch('Login', { 136 that.$store.dispatch('Login', {
132 type: 2, 137 type: 2,
@@ -168,7 +173,7 @@ @@ -168,7 +173,7 @@
168 if (!rememberMe) return; 173 if (!rememberMe) return;
169 const username = uni.getStorageSync('username') 174 const username = uni.getStorageSync('username')
170 const password = uni.getStorageSync('password') 175 const password = uni.getStorageSync('password')
171 - console.log("密码缓存",password); 176 + console.log("密码缓存", password);
172 this.formData = { 177 this.formData = {
173 username: username === undefined ? this.formData.username : username, 178 username: username === undefined ? this.formData.username : username,
174 password: password === undefined ? this.formData.password : decrypt(password), 179 password: password === undefined ? this.formData.password : decrypt(password),
@@ -219,7 +224,7 @@ @@ -219,7 +224,7 @@
219 }, 224 },
220 mobileLogin(data) { 225 mobileLogin(data) {
221 // return 226 // return
222 - console.log("登录信息",data); 227 + console.log("登录信息", data);
223 this.$store.dispatch('Login', { 228 this.$store.dispatch('Login', {
224 type: 0, 229 type: 0,
225 data: data 230 data: data
@@ -237,8 +242,8 @@ @@ -237,8 +242,8 @@
237 url: '/pages/login/workbench' 242 url: '/pages/login/workbench'
238 }) 243 })
239 }, 300) 244 }, 300)
240 - }).catch(error =>{  
241 - if(error.data.code === 500){ 245 + }).catch(error => {
  246 + if (error.data.code === 500) {
242 this.getCode(); 247 this.getCode();
243 } 248 }
244 }) 249 })
utils/vconsole.js 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +import Vconsole from 'vconsole'
  2 +const vConsole = new Vconsole()
  3 +export default vConsole
0 \ No newline at end of file 4 \ No newline at end of file