Commit c2963af2c6c786f0b527c45929e7d51b4189201f

Authored by 郭伟龙
1 parent bd29e382
Exists in charge

fix:修改bug

components/basisCellCard/basisCellCard.vue
... ... @@ -23,6 +23,7 @@
23 23 :height="'60px'"
24 24 :deletable = "false"
25 25 multiple
  26 + :disabled="true"
26 27 :maxCount="item.value.length"
27 28 ></u-upload>
28 29 </view>
... ...
components/popUpComponent/popUpComponent.vue
... ... @@ -71,8 +71,10 @@
71 71 if (this.publishStatus === 'PENDING_LEVEL_1_AUDIT') {
72 72 const result = await submitAuditOne(data);
73 73 if (result.code === 200) {
74   - that.$emit('getList');
75 74 uni.$u.toast(`${this.title}成功`)
  75 + setTimeout(()=>{
  76 + that.$emit('getList');
  77 + },300)
76 78 } else {
77 79 uni.$u.toast(result.msg)
78 80 }
... ... @@ -81,8 +83,10 @@
81 83 if (this.publishStatus === 'PENDING_LEVEL_2_AUDIT') {
82 84 const result = await submitAuditTwo(data);
83 85 if (result.code === 200) {
84   - that.$emit('getList');
85 86 uni.$u.toast(`${this.title}成功`)
  87 + setTimeout(()=>{
  88 + that.$emit('getList');
  89 + },300)
86 90 } else {
87 91 uni.$u.toast(result.msg)
88 92 }
... ...
components/popUpFillIn/popUpFillIn.vue
... ... @@ -28,7 +28,7 @@
28 28 </u-form-item>
29 29  
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="120">
32 32 <view class="flex justify-between margin-tb w100">
33 33 <u-radio-group activeColor="#CF000D" placement="row" v-model="radiovalueYYWH" @change="YYchange">
34 34 <u-radio class="margin-right" name="是">是</u-radio>
... ... @@ -58,7 +58,7 @@
58 58 </u-form-item>
59 59  
60 60 <!-- 工程维护 -->
61   - <u-form-item v-if="type==='gcwh' && gcShow" required label="市场派单时间" labelWidth="100" borderBottom>
  61 + <u-form-item v-if="type==='gcwh'" required label="市场派单时间" labelWidth="100" borderBottom>
62 62 <u-input v-model="model.assignmentTime" placeholder="请选择" disabled disabledColor="#fff"
63 63 border="none"></u-input>
64 64 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon>
... ... @@ -76,12 +76,12 @@
76 76 </u-form-item>
77 77  
78 78 <!-- 运营维护 -->
79   - <u-form-item v-if="type==='yywh' && yyShow" required label="市场派单时间" labelWidth="100" borderBottom>
  79 + <u-form-item v-if="type==='yywh'" required label="市场派单时间" labelWidth="100" borderBottom>
80 80 <u-input v-model="model.assignmentTime" placeholder="请选择" disabled disabledColor="#fff"
81 81 border="none"></u-input>
82 82 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('assignmentTime')"></u-icon>
83 83 </u-form-item>
84   - <u-form-item v-if="type==='yywh' && yyShow" required label="通气到到表前时间" labelWidth="100" borderBottom>
  84 + <u-form-item v-if="type==='yywh' && yyShow" required label="通气到到表前时间" labelWidth="130" borderBottom>
85 85 <u-input v-model="model.gctMtrrisTime" placeholder="请选择" disabled disabledColor="#fff"
86 86 border="none"></u-input>
87 87 <u-icon slot="right" name="calendar" size="20" @click="multipleChange('gctMtrrisTime')"></u-icon>
... ... @@ -130,12 +130,8 @@
130 130 type: String,
131 131 default: ""
132 132 },
133   - IgnitionID: {
134   - type: Number
135   - },
136   - userCode: {
137   - type: String,
138   - default: ""
  133 + itemData: {
  134 + type: Object
139 135 },
140 136 },
141 137 data() {
... ... @@ -163,7 +159,13 @@
163 159 },
164 160 methods: {
165 161 open() {
166   - this.model.userCode = this.userCode;
  162 + if (this.itemData.assignmentTime) {
  163 + this.model.assignmentTime = this.itemData.assignmentTime.slice(0, -9);
  164 + }
  165 + if (this.itemData.userCode) {
  166 + this.model.userCode = this.itemData.userCode;
  167 + }
  168 + this.model = {...this.model};
167 169 this.show = true;
168 170 },
169 171 close() {
... ... @@ -226,11 +228,11 @@
226 228 uni.$u.toast('选择市场派单时间');
227 229 return
228 230 }
229   - if (!this.model.gctMtrrisTime && this.radiovalueGCWH === '是') {
  231 + if (this.model.gctMtrrisTime === 'W' && this.radiovalueYYWH === '是') {
230 232 uni.$u.toast('请选择通气到表前时间');
231 233 return
232 234 }
233   - if (!this.model.gctNcmpRsn && this.radiovalueGCWH === '否') {
  235 + if (!this.model.gctNcmpRsn && this.radiovalueYYWH === '否') {
234 236 uni.$u.toast('请选择未完成原因');
235 237 return
236 238 }
... ... @@ -240,10 +242,10 @@
240 242 },
241 243 async submitDh() {
242 244 let data = {
243   - id: this.IgnitionID,
  245 + id: this.itemData.id,
244 246 ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N',
245 247 nIgnRsn: this.model.nIgnRsn,
246   - userCode:this.model.userCode,
  248 + userCode: this.model.userCode,
247 249 ignTime: this.radiovalueDHWH === '是' ? this.model.ignTime + ' 00:00:00' : ''
248 250 }
249 251 console.log(this.radiovalueGCWH);
... ... @@ -259,7 +261,7 @@
259 261 },
260 262 async submitGc() {
261 263 let data = {
262   - id: this.IgnitionID,
  264 + id: this.itemData.id,
263 265 isCompleted: this.radiovalueGCWH === '是' ? 'Y' : 'N',
264 266 assignmentTime: this.radiovalueGCWH === '是' ? this.model.assignmentTime + ' 00:00:00' : "",
265 267 completionTime: this.radiovalueGCWH === '是' ? this.model.completionTime + ' 00:00:00' : "",
... ... @@ -278,7 +280,7 @@
278 280 },
279 281 async submitYy() {
280 282 let data = {
281   - id: this.IgnitionID,
  283 + id: this.itemData.id,
282 284 gasConnMtrRis: this.radiovalueYYWH === '是' ? 'Y' : 'N',
283 285 assignmentTime: this.radiovalueYYWH === '是' ? this.model.assignmentTime + ' 00:00:00' : "",
284 286 gctMtrrisTime: this.radiovalueYYWH === '是' ? this.model.gctMtrrisTime + ' 00:00:00' : "",
... ... @@ -300,15 +302,17 @@
300 302 this.dhShow = true
301 303 } else {
302 304 this.dhShow = false;
303   - this.model = {}
  305 + // this.model = {}
304 306 }
305 307 },
306 308 GCchange(e) {
307 309 if (e === '是') {
308   - this.gcShow = true
  310 + this.gcShow = true;
  311 + this.model.nonNcmpRsn = "";
309 312 } else {
310 313 this.gcShow = false;
311   - this.model = {}
  314 + // this.model = {}
  315 + this.model.completionTime = "";
312 316 }
313 317 },
314 318 YYchange(e) {
... ... @@ -316,7 +320,7 @@
316 320 this.yyShow = true
317 321 } else {
318 322 this.yyShow = false;
319   - this.model = {}
  323 + // this.model = {}
320 324 }
321 325 },
322 326 multipleChange(name) {
... ...
pages/charge/constructionMaintenance/detail.vue
1 1 <template>
2 2 <view>
3   - <Navbar title="点火维护详情" canBack></Navbar>
  3 + <Navbar title="施工维护详情" canBack></Navbar>
4 4 <basisCellCard class="margin-sm" title="基本信息" :list="dataList" v-if="current === 0"></basisCellCard>
5 5 </view>
6 6 </template>
... ... @@ -100,7 +100,7 @@
100 100 name: "是否通气到表前/立管",
101 101 value: "",
102 102 key: "gasConnMtrRis",
103   - // dict:'sys_yes_no'
  103 + dict:'sys_yes_no'
104 104 }, {
105 105 name: "是否通气到表前/立管时间",
106 106 value: "",
... ... @@ -131,6 +131,11 @@
131 131 this.objData = JSON.parse(data.objData);
132 132 console.log('传递data', JSON.parse(JSON.stringify(this.objData)));
133 133 this.dataList = this.$assignValues(this.objData, this.dataList);
  134 + // 如果已点火则手动删除未点火原因
  135 + const hasIgnCnfStatusCodeY = this.dataList.some(item => item.key === 'isCompleted' && item.value === 'Y');
  136 + if (hasIgnCnfStatusCodeY) {
  137 + this.dataList = this.dataList.filter(item => item.key !== 'nonNcmpRsn' && item.key !== 'gctNcmpRsn');
  138 + }
134 139 }
135 140 },
136 141 methods: {
... ...
pages/charge/constructionMaintenance/index.vue
... ... @@ -59,14 +59,24 @@
59 59 </view>
60 60 </view>
61 61 <view class="flex justify-end margin-top">
62   - <view class="margin-right" @click="handleDetail(item)">
63   - <u-button shape="circle">查看详情</u-button>
  62 + <view class="margin-right-xs">
  63 + <u-button shape="circle" @click="handleDetail(item)">查看详情</u-button>
64 64 </view>
65   - <view class="margin-right" @click="handleOpen(item,'gcwh')" v-if="item.isCompleted === 'N' ">
66   - <u-button shape="circle" color="#CF000D">工程维护</u-button>
  65 + <view class="margin-right-xs" v-if="item.gasConnMtrRis =='W'">
  66 + <u-button :disabled="item.projectTypeCode == '0' || item.isCompleted!=='W'" shape="circle" color="#CF000D"
  67 + @click="handleOpen(item,'gcwh','工程维护')">工程维护</u-button>
67 68 </view>
68   - <view class="" @click="handleOpen(item,'yywh')" v-if="!item.gasConnMtrRis">
69   - <u-button shape="circle" color="#CF000D">运营维护</u-button>
  69 + <view class="margin-right-xs" v-if=" item.gasConnMtrRis !=='W'">
  70 + <u-button :disabled="item.projectTypeCode == '0' || item.isCompleted =='W'" shape="circle" color="#CF000D"
  71 + @click="handleOpen(item,'gcwh','工程变更')">工程变更</u-button>
  72 + </view>
  73 + <view class="margin-right-xs" v-if="item.gasConnMtrRis =='W'">
  74 + <u-button :disabled="item.projectTypeCode == '0'||item.isCompleted=='W' || item.gasConnMtrRis!=='W'"
  75 + shape="circle" color="#CF000D" @click="handleOpen(item,'yywh','运营维护')">运营维护</u-button>
  76 + </view>
  77 + <view class="margin-right-xs" v-if="item.gasConnMtrRis !=='W'">
  78 + <u-button :disabled="item.projectTypeCode == '0' || item.gasConnMtrRis=='W'" shape="circle" color="#CF000D"
  79 + @click="handleOpen(item,'yywh','运营变更')">运营变更</u-button>
70 80 </view>
71 81 </view>
72 82 <!-- <view class="nodeCss">
... ... @@ -75,7 +85,8 @@
75 85 </view>
76 86 <u-loadmore :status="status" v-if="list.length > 0" />
77 87 <u-empty text="暂无数据" icon="/static/images/icon/nodata.png" v-else></u-empty>
78   - <popUpFillIn :IgnitionID="IgnitionID" :type="btnType" title="工程维护" ref="popUpFillInRef" @getList="initData">
  88 + <popUpFillIn :itemData="itemData" :type="btnType" :title="title" ref="popUpFillInRef"
  89 + @getList="initData">
79 90 </popUpFillIn>
80 91  
81 92 <!-- 字典下拉 -->
... ... @@ -94,6 +105,7 @@
94 105 getCompanyCascader,
95 106 getMcConstructionList
96 107 } from '@/api/charge.js'
  108 + import * as dd from 'dingtalk-jsapi'
97 109 export default {
98 110 components: {},
99 111 props: {
... ... @@ -101,7 +113,7 @@
101 113 },
102 114 data() {
103 115 return {
104   - title: "施工维护",
  116 + title: "",
105 117 keyword: "",
106 118 actionStyle: {
107 119 'color': '#fff',
... ... @@ -122,7 +134,7 @@
122 134 status: "loadmore",
123 135 list: [],
124 136 total: null,
125   - IgnitionID: 0,
  137 + itemData: {},
126 138 searchForm: {
127 139 companyCode: "",
128 140 isCompleted: "",
... ... @@ -192,12 +204,12 @@
192 204 uni.stopPullDownRefresh();
193 205 }, 500);
194 206 },
195   - // onLoad() {
196   - // this.initData()
197   - // },
198   - onShow() {
199   - this.getCompanyCascader();
  207 + onLoad() {
200 208 this.initData();
  209 + this.getCompanyCascader();
  210 + },
  211 + onShow() {
  212 + // this.initData();
201 213 },
202 214 methods: {
203 215 async initData() {
... ... @@ -213,7 +225,7 @@
213 225 this.list = rows;
214 226 }
215 227 this.total = total;
216   - if(this.total < this.params.pageNum * this.params.pageSize){
  228 + if (this.total < this.params.pageNum * this.params.pageSize) {
217 229 this.status = "nomore"
218 230 }
219 231 console.log('list', JSON.parse(JSON.stringify(this.list)));
... ... @@ -334,8 +346,11 @@
334 346 url: '/pages/charge/constructionMaintenance/detail?objData=' + JSON.stringify(item)
335 347 })
336 348 },
337   - handleOpen(item, type) {
338   - this.IgnitionID = item.id;
  349 + handleOpen(item, type, name) {
  350 + console.log("item",item)
  351 + this.title = name;
  352 + this.itemData = item;
  353 + // this.IgnitionID = item.id;
339 354 this.btnType = type;
340 355 this.$refs.popUpFillInRef.open();
341 356 },
... ...
pages/charge/ignitionMaintenance/detail.vue
... ... @@ -89,7 +89,7 @@
89 89 name: "点火确认",
90 90 value: "",
91 91 key: "ignCnfStatusCode",
92   - dict:"sys_mc_ign_status"
  92 + dict:"sys_yes_no"
93 93 }, {
94 94 name: "点火时间",
95 95 value: "",
... ... @@ -119,6 +119,11 @@
119 119 this.objData = JSON.parse(data.objData);
120 120 console.log('传递data', JSON.parse(JSON.stringify(this.objData)));
121 121 this.dataList = this.$assignValues(this.objData, this.dataList);
  122 + // 如果已点火则手动删除未点火原因
  123 + const hasIgnCnfStatusCodeY = this.dataList.some(item => item.key === 'ignCnfStatusCode' && item.value === 'Y');
  124 + if (hasIgnCnfStatusCodeY) {
  125 + this.dataList = this.dataList.filter(item => item.key !== 'nIgnRsn');
  126 + }
122 127 }
123 128 },
124 129 methods: {
... ...
pages/charge/ignitionMaintenance/index.vue
... ... @@ -67,7 +67,7 @@
67 67 <u-button shape="circle">查看详情</u-button>
68 68 </view>
69 69 <view class="" @click="handleOpen(item)"
70   - v-if="item.statusCode !== 'MAINTENANCE_YES' && item.statusCode !== 'CANCEL'">
  70 + v-if="item.statusCode === 'MAINTENANCE'">
71 71 <u-button shape="circle" color="#CF000D">点火维护</u-button>
72 72 </view>
73 73 </view>
... ... @@ -78,7 +78,7 @@
78 78 <u-loadmore :status="status" v-if="list.length > 0" />
79 79 <u-empty text="暂无数据" icon="/static/images/icon/nodata.png" v-else></u-empty>
80 80  
81   - <popUpFillIn :IgnitionID="IgnitionID" :userCode="userCode" type="dhwh" title="点火维护" ref="popUpFillInRef"
  81 + <popUpFillIn :itemData="itemData" type="dhwh" title="点火维护" ref="popUpFillInRef"
82 82 @getList="initData">
83 83 </popUpFillIn>
84 84  
... ... @@ -100,6 +100,7 @@
100 100 getMcIgnitionList,
101 101 mcIgnitionMaintenance
102 102 } from '@/api/charge.js'
  103 + import * as dd from 'dingtalk-jsapi'
103 104 import popUpFillIn from '@/components/popUpFillIn/popUpFillIn.vue'
104 105 export default {
105 106 components: {
... ... @@ -159,7 +160,8 @@
159 160 key: 'status',
160 161 dict: 'sys_mc_ign_status'
161 162 },
162   - ]
  163 + ],
  164 + itemData:{},
163 165 }
164 166 },
165 167 computed: {
... ... @@ -193,12 +195,13 @@
193 195 }, 500);
194 196 },
195 197 onShow() {
  198 + // this.getCompanyCascader();
  199 + // this.initData();
  200 + },
  201 + onLoad() {
196 202 this.getCompanyCascader();
197 203 this.initData();
198 204 },
199   - // onLoad() {
200   - // this.initData()
201   - // },
202 205 methods: {
203 206 async initData() {
204 207 let {
... ... @@ -242,6 +245,7 @@
242 245 console.log(item)
243 246 this.userCode = item.userCode;
244 247 this.IgnitionID = item.id;
  248 + this.itemData = item;
245 249 this.$refs.popUpFillInRef.open();
246 250 },
247 251 async openPicker(data) {
... ...
pages/charge/visitsAndFees/createaVisit.vue
... ... @@ -28,7 +28,7 @@
28 28 <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
29 29 v-if="item.type === 'select'" :disabled="operationStatus ==='YD'" :prop="item.key">
30 30 <u-input v-model="model[item.key]" v-if="!item.dict"
31   - :disabled="operationStatus ==='YD' || item.key === 'address' || item.key ==='company'"
  31 + :disabled="operationStatus ==='YD' || item.key === 'address' || item.key ==='company' || item.disabled"
32 32 inputAlign="right" :placeholder="item.placeholder"
33 33 :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'" border="none"></u-input>
34 34 <view class="" v-else>{{getDictDataLabel(item.dict,model[item.key])}}</view>
... ... @@ -323,7 +323,7 @@
323 323 validator: (rule, value, callback) => {
324 324 return uni.$u.test.mobile(value);
325 325 },
326   - message: '手机号码不正确',
  326 + message: '联系电话不正确',
327 327 trigger: ['change', 'blur'],
328 328 }],
329 329 address: [{
... ... @@ -385,7 +385,7 @@
385 385 validator: (rule, value, callback) => {
386 386 return uni.$u.test.mobile(value);
387 387 },
388   - message: '联系电话不正确',
  388 + message: '决策人联系电话不正确',
389 389 trigger: ['change', 'blur'],
390 390 }],
391 391 isCharged: [{
... ... @@ -509,10 +509,11 @@
509 509 key: "company"
510 510 }, {
511 511 label: '村(小区)',
512   - placeholder: "请选择或输入",
  512 + placeholder: "请选择",
513 513 type: "select",
514 514 required: true,
515   - key: "vlgOrCmty"
  515 + key: "vlgOrCmty",
  516 + disabled:true
516 517 }, {
517 518 label: '户名',
518 519 placeholder: "请选择或输入",
... ... @@ -977,7 +978,8 @@
977 978 }
978 979 let col = result.data.map(item => ({
979 980 value: item.vlgOrCmty,
980   - label: item.vlgOrCmty
  981 + label: item.vlgOrCmty,
  982 + urbRurCls:item.urbRurCls
981 983 }));
982 984 this.columns = [col];
983 985 } else if (item.key === 'userName') {
... ... @@ -1049,7 +1051,8 @@
1049 1051 console.log("确认", e);
1050 1052 if (this.currentName === 'vlgOrCmty') {
1051 1053 this.emptyFill(2);
1052   - this.model[this.currentName] = e.value[0].value
  1054 + this.model[this.currentName] = e.value[0].value;
  1055 + this.model.urbRurCls = e.value[0].urbRurCls;
1053 1056 } else if (this.currentName === 'userName') {
1054 1057 this.emptyFill();
1055 1058 let values = e.values[0][0]
... ... @@ -1327,7 +1330,9 @@
1327 1330 this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N';
1328 1331 this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N';
1329 1332 this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N';
1330   - this.copyModel.entryTime = this.copyModel.entryTime + ' 00:00:00';
  1333 + if (!this.copyModel.entryTime.includes(' 00:00:00')) {
  1334 + this.copyModel.entryTime += ' 00:00:00';
  1335 + }
1331 1336 // this.copyModel.attachmentFile = this.attachmentList.map(item => item.uuid).join(",");
1332 1337 },
1333 1338 storingData() {
... ... @@ -1352,6 +1357,7 @@
1352 1357 uni.$u.toast('发起成功');
1353 1358 this.storingData();
1354 1359 setTimeout(() => {
  1360 + uni.$emit('update');
1355 1361 this.$goBack();
1356 1362 }, 1000)
1357 1363 }
... ... @@ -1377,6 +1383,7 @@
1377 1383 uni.$u.toast('修改成功');
1378 1384 this.storingData();
1379 1385 setTimeout(() => {
  1386 + uni.$emit('update');
1380 1387 this.$goBack();
1381 1388 }, 1000)
1382 1389 }
... ... @@ -1408,6 +1415,7 @@
1408 1415 if (result.code === 200) {
1409 1416 uni.$u.toast('异动成功');
1410 1417 setTimeout(() => {
  1418 + uni.$emit('update');
1411 1419 that.$goBack();
1412 1420 }, 1000)
1413 1421 } else {
... ...
pages/charge/visitsAndFees/detail.vue
... ... @@ -219,17 +219,22 @@
219 219 this.objData = JSON.parse(data.objData);
220 220 console.log('传递data', JSON.parse(JSON.stringify(this.objData)));
221 221 this.dataList = this.$assignValues(this.objData, this.dataList);
222   - await getByUuid(this.objData.fieldPhotoFile).then((res)=>{
223   - this.objData.fieldPhotoFile=[{
224   - type:'photoList',
225   - url:res.data.url,
226   - fileId:res.data.uuid
227   - }];
228   - })
  222 + if(this.objData.fieldPhotoFile){
  223 + await getByUuid(this.objData.fieldPhotoFile).then((res)=>{
  224 + this.objData.fieldPhotoFile=[{
  225 + type:'photoList',
  226 + url:res.data.url,
  227 + fileId:res.data.uuid
  228 + }];
  229 + })
  230 + }else{
  231 + this.objData.fieldPhotoFile = []
  232 + }
229 233 this.bfDataList = this.$assignValues(this.objData, this.bfDataList);
  234 + // console.log("拜访信息",this.bfDataList);
230 235 this.jcrDataList = this.$assignValues(this.objData, this.jcrDataList);
231 236 this.sfDataList = this.$assignValues(this.objData, this.sfDataList);
232   - console.log("收费信息", this.sfDataList);
  237 + // console.log("收费信息", this.sfDataList);
233 238 this.dataList.map(item => {
234 239 if (item.key === 'address') {
235 240 item.value =
... ...
pages/charge/visitsAndFees/index.vue
... ... @@ -108,12 +108,12 @@
108 108 <u-button shape="circle">更多操作</u-button>
109 109 </zb-popover>
110 110 </view>
111   - <view class="w25 margin-right-xs" @click="handleEdit(item)" v-if="editPermission(item)">
112   - <u-button shape="circle" color="#CF000D">修改</u-button>
113   - </view>
114 111 <view class="w25 margin-right-xs" @click="handleDetail(item)">
115 112 <u-button shape="circle">查看详情</u-button>
116 113 </view>
  114 + <view class="w25 margin-right-xs" @click="handleEdit(item)" v-if="editPermission(item)">
  115 + <u-button shape="circle" color="#CF000D">修改</u-button>
  116 + </view>
117 117 <view class="w22 margin-right-xs" @click="handleRefuse(item)" v-if="auditPermission(item)">
118 118 <u-button shape="circle">拒绝</u-button>
119 119 </view>
... ... @@ -179,6 +179,7 @@
179 179 getCompanyCascader,
180 180 cancelMcVisit
181 181 } from '@/api/charge.js'
  182 + import * as dd from 'dingtalk-jsapi'
182 183 import popUpComponent from '@/components/popUpComponent/popUpComponent.vue'
183 184 export default {
184 185 components: {
... ... @@ -314,10 +315,15 @@
314 315 uni.stopPullDownRefresh();
315 316 }, 500);
316 317 },
317   - onShow() {
  318 + onLoad() {
318 319 this.initData();
319 320 this.getCompanyCascader();
  321 + // 监听其他页面返回后刷新
  322 + uni.$on('update', function(data) {
  323 + this.initData();
  324 + })
320 325 },
  326 + onShow() {},
321 327 methods: {
322 328 selectConfirm(e) {
323 329 console.log('打印selectConfirm', e);
... ... @@ -412,7 +418,7 @@
412 418 let time = this.$u.timeFormat(e.value, 'yyyy');
413 419 console.log("选择时间", time);
414 420 // this.model[this.currentName] = time;
415   - if(time < this.params.startFiscalYear){
  421 + if (time < this.params.startFiscalYear) {
416 422 uni.$u.toast('结束财年需大于开始财年');
417 423 return;
418 424 }
... ... @@ -495,7 +501,8 @@
495 501 const {
496 502 statusCode
497 503 } = item;
498   - return statusCode === 'APPROVED' && this.$checkPermi(['schsf:mcVisit:modification'])
  504 + return statusCode === 'APPROVED' && this.$checkPermi(['schsf:mcVisit:modification']) && (item.ticketType ===
  505 + '2' || item.ticketType === '3')
499 506 },
500 507 // 作废权限
501 508 cancelPermission(item) {
... ... @@ -506,14 +513,14 @@
506 513 bfColorStatus(status, type) {
507 514 const bgColorMap = {
508 515 '3': '#EFF1FD',
509   - '2': '#FFF6E6',
510   - '1': '#CF000D',
  516 + '2': '#EFF1FD',
  517 + '1': '#FFF6E6',
511 518 '0': '#F5F5F7',
512 519 };
513 520 const textColorMap = {
514 521 '3': '#5875EB',
515   - '2': '#FFA500',
516   - '1': '#ffffff',
  522 + '2': '#5875EB',
  523 + '1': '#FFAD00',
517 524 '0': '#999DB0',
518 525 };
519 526  
... ... @@ -559,7 +566,7 @@
559 566 } else {
560 567 this.list = rows;
561 568 }
562   - if(this.total < this.params.pageNum * this.params.pageSize){
  569 + if (this.total < this.params.pageNum * this.params.pageSize) {
563 570 this.status = "nomore"
564 571 }
565 572 this.total = total;
... ... @@ -673,6 +680,7 @@
673 680 this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => {
674 681 //钉钉直接退出微应用
675 682 if (this.$isDing) {
  683 + console.log("退出钉钉")
676 684 dd.biz.navigation.close({
677 685 onSuccess: function(result) {
678 686 console.log(result, 'result')
... ... @@ -688,8 +696,8 @@
688 696 })
689 697 })
690 698 }
691   - }).catch(() => {
692   - console.log("取消");
  699 + }).catch((e) => {
  700 + console.log("取消", e);
693 701 });
694 702 }
695 703 }
... ...
pages/login/mobile.vue
... ... @@ -130,8 +130,8 @@
130 130 this.isDing = true;
131 131 dd.ready(() => {
132 132 dd.runtime.permission.requestAuthCode({
133   - // corpId: "dinge6053c157358448735c2f4657eb6378f",
134   - corpId: "dingf2f9115915afcb54a39a90f97fcb1e09",
  133 + corpId: "dinge6053c157358448735c2f4657eb6378f",
  134 + // corpId: "dingf2f9115915afcb54a39a90f97fcb1e09",
135 135 onSuccess: (info) => {
136 136 that.$store.dispatch('Login', {
137 137 type: 2,
... ... @@ -141,17 +141,16 @@
141 141 //获取全部字典信息 保存至store
142 142 that.$store.dispatch('loadDictDatas')
143 143 setTimeout(() => {
144   - uni.switchTab({
145   - url: '/pages/market/index'
146   - })
147   - // uni.navigateTo({
148   - // url: '/pages/market/total'
  144 + // uni.switchTab({
  145 + // url: '/pages/market/index'
149 146 // })
  147 + uni.navigateTo({
  148 + url: '/pages/login/workbench'
  149 + })
150 150 }, 300)
151 151 }).catch(err => {
152 152 // alert(JSON.stringify(err))
153   - console.log(err);
154   - // uni.$u.toast('非钉钉内部账号');
  153 + console.log(123,err);
155 154 setTimeout(() => {
156 155 that.isDing = false;
157 156 }, 500)
... ... @@ -159,10 +158,13 @@
159 158 },
160 159 onFail: (err) => {
161 160 that.isDing = false
162   - console.log(err);
  161 + // uni.$u.toast(err.errorMessage);
163 162 }
164 163 })
165 164 })
  165 + dd.error((e)=>{
  166 + console.log('ddError',e);
  167 + })
166 168 }
167 169 },
168 170 //记住账号密码
... ...
pages/login/workbench.vue
... ... @@ -7,7 +7,8 @@
7 7 <view class="text-xxl text-bold text-white">市场洞察平台</view>
8 8 <u-icon name="arrow-right" color="#fff"></u-icon>
9 9 </view>
10   - <view class="chargeCss margin-tb-xl padding flex justify-between align-center" v-if="validate()" @click="handleClick('charge')">
  10 + <view class="chargeCss margin-tb-xl padding flex justify-between align-center" v-if="validate()"
  11 + @click="handleClick('charge')">
11 12 <u-image width="60rpx" height="60rpx" src="/static/images/icon/charge.png" shape="circle"></u-image>
12 13 <view class="text-xxl text-bold text-white">市场化收费工具</view>
13 14 <u-icon name="arrow-right" color="#fff"></u-icon>
... ... @@ -31,25 +32,34 @@
31 32  
32 33 },
33 34 onLoad() {
34   -
  35 + if (!this.validate()) {
  36 + this.handleClick('insight');
  37 + // setTimeout(()=>{
  38 + // uni.switchTab({
  39 + // url: '/pages/market/index'
  40 + // })
  41 + // },500)
  42 + }
35 43 },
36 44 methods: {
37 45 // 验证是否需要显示工具菜单
38   - validate(){
39   - let toolPermissions = ['schsf:mcVisit:list','schsf:mcIgnition:list','schsf:mcConstruction:list']
  46 + validate() {
  47 + let toolPermissions = ['schsf:mcVisit:list', 'schsf:mcIgnition:list', 'schsf:mcConstruction:list']
40 48 console.log(this);
41 49 // 假设 this.$checkPermi 是一个返回布尔值的方法
42 50 let hasPermission = toolPermissions.some(permission => {
43   - return this.$checkPermi([permission]);
  51 + return this.$checkPermi([permission]);
44 52 });
45 53 return hasPermission
46 54 },
47 55 handleClick(workName) {
48 56 console.log(workName);
49   - this.$store.dispatch('setTab', {data: workName});
  57 + this.$store.dispatch('setTab', {
  58 + data: workName
  59 + });
50 60 let tabList = this.$store.state.tabbar.list
51 61 let urls = tabList[0].pagePath
52   - console.log("跳转",urls);
  62 + console.log("跳转", urls);
53 63 setTimeout(() => {
54 64 uni.switchTab({
55 65 url: `/${urls}`
... ...