Commit c2963af2c6c786f0b527c45929e7d51b4189201f

Authored by 郭伟龙
1 parent bd29e382
Exists in charge

fix:修改bug

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