Commit d2dbe43ffe3855f4795356edaa61f1d283b74186
1 parent
7dec0b9a
Exists in
charge
feat:点火施工维护
Showing
12 changed files
with
1528 additions
and
354 deletions
Show diff stats
App.vue
1 | 1 | <script> |
2 | -export default { | |
3 | - onLaunch: function () { | |
4 | - console.log('App Launch') | |
5 | - // #ifdef H5 | |
6 | - //在页面加载时读取sessionStorage里的状态信息 | |
7 | - if (sessionStorage.getItem('store')) { | |
8 | - this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store')))) | |
2 | + export default { | |
3 | + onLaunch: function() { | |
4 | + console.log('App Launch') | |
5 | + if (this.$store.getters.accessToken) { | |
6 | + this.$store.dispatch('loadDictDatas') | |
7 | + } | |
8 | + // #ifdef H5 | |
9 | + //在页面加载时读取sessionStorage里的状态信息 | |
10 | + if (sessionStorage.getItem('store')) { | |
11 | + this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store')))) | |
12 | + } | |
13 | + //在页面刷新时将vuex里的信息保存到sessionStorage里 | |
14 | + window.addEventListener('beforeunload', () => { | |
15 | + sessionStorage.setItem('store', JSON.stringify(this.$store.state)) | |
16 | + }) | |
17 | + // #endif | |
18 | + }, | |
19 | + onShow: function() { | |
20 | + console.log(this); | |
21 | + let workName = uni.getStorageSync('tabName'); | |
22 | + this.$store.dispatch('setTab', {data: workName}); | |
23 | + uni.hideTabBar(); | |
24 | + console.log('App Show') | |
25 | + }, | |
26 | + onHide: function() { | |
27 | + console.log('App Hide') | |
9 | 28 | } |
10 | - //在页面刷新时将vuex里的信息保存到sessionStorage里 | |
11 | - window.addEventListener('beforeunload', () => { | |
12 | - sessionStorage.setItem('store', JSON.stringify(this.$store.state)) | |
13 | - }) | |
14 | - // #endif | |
15 | - }, | |
16 | - onShow: function () { | |
17 | - console.log(this); | |
18 | - uni.hideTabBar(); | |
19 | - if(this.$store.getters.accessToken){ | |
20 | - this.$store.dispatch('loadDictDatas') | |
21 | - } | |
22 | - console.log('App Show') | |
23 | - }, | |
24 | - onHide: function () { | |
25 | - console.log('App Hide') | |
26 | 29 | } |
27 | -} | |
28 | 30 | </script> |
29 | 31 | |
30 | 32 | <style lang="scss"> |
31 | -/** 引入全局基本样式 */ | |
32 | -@import 'styles/base.scss'; | |
33 | -/* 引入 uView 基础样式 */ | |
34 | -@import '@/uni_modules/uview-ui/index.scss'; | |
35 | -/*每个页面公共scss */ | |
36 | -@import 'app.scss'; | |
37 | -@import '@/static/scss/index.scss' | |
33 | + /** 引入全局基本样式 */ | |
34 | + @import 'styles/base.scss'; | |
35 | + /* 引入 uView 基础样式 */ | |
36 | + @import '@/uni_modules/uview-ui/index.scss'; | |
37 | + /*每个页面公共scss */ | |
38 | + @import 'app.scss'; | |
39 | + @import '@/static/scss/index.scss' | |
38 | 40 | </style> | ... | ... |
api/charge.js
... | ... | @@ -21,15 +21,24 @@ export const getVlgOrCmty = params => http.get('/schsf/mcBasicCmty/vlgOrCmty', { |
21 | 21 | /* 查询用户 */ |
22 | 22 | export const getMcVisitUser = params => http.get('/schsf/mcVisitUser/list', { params }) |
23 | 23 | /* 发布一级审核 */ |
24 | -export const submitAuditOne = data => http.post('/schsf/mcVisit/ticket/submitAuditOne', { data }) | |
24 | +export const submitAuditOne = data => http.post('/schsf/mcVisit/ticket/submitAuditOne', data ) | |
25 | 25 | /* 发布二级审核 */ |
26 | -export const submitAuditTwo = data => http.post('/schsf/mcVisit/ticket/submitAuditTwo', { data }) | |
26 | +export const submitAuditTwo = data => http.post('/schsf/mcVisit/ticket/submitAuditTwo', data ) | |
27 | 27 | /* 发起异动 */ |
28 | -export const modification = data => http.post('/schsf/mcVisit/modification', { data }) | |
28 | +export const modification = data => http.post('/schsf/mcVisit/modification', data ) | |
29 | 29 | /* 异动一级审批 */ |
30 | -export const submitModificationOne = data => http.post('/schsf/mcVisit/modification/submitAuditOne', { data }) | |
30 | +export const submitModificationOne = data => http.post('/schsf/mcVisit/modification/submitAuditOne', data ) | |
31 | 31 | /* 异动二级审批 */ |
32 | -export const submitModificationTwo = data => http.post('/schsf/mcVisit/modification/submitAuditTwo', { data }) | |
32 | +export const submitModificationTwo = data => http.post('/schsf/mcVisit/modification/submitAuditTwo', data ) | |
33 | 33 | /* 查询节点处理人 */ |
34 | 34 | export const getStatusNodeUserList = id => http.get(`/schsf/mcVisit/statusNodeUserList/${id}`) |
35 | - | |
35 | +/* 点火维护查询列表 */ | |
36 | +export const getMcIgnitionList = params => http.get('/schsf/mcIgnition/list', { params }) | |
37 | +/* 点火维护 */ | |
38 | +export const mcIgnitionMaintenance = data => http.post('/schsf/mcIgnition/maintenance', data ) | |
39 | +/* 施工列表 */ | |
40 | +export const getMcConstructionList = params => http.get('/schsf/mcConstruction/list', {params} ) | |
41 | +/* 工程维护 */ | |
42 | +export const mcConstructionEngineering = data => http.post('/schsf/mcConstruction/engineering', data ) | |
43 | +/* 运营维护 */ | |
44 | +export const mcConstructionOperation = data => http.post('/schsf/mcConstruction/operations', data ) | ... | ... |
components/popUpComponent/popUpComponent.vue
... | ... | @@ -22,17 +22,34 @@ |
22 | 22 | </template> |
23 | 23 | |
24 | 24 | <script> |
25 | + import { | |
26 | + submitAuditOne, | |
27 | + submitAuditTwo, | |
28 | + submitModificationOne, | |
29 | + submitModificationTwo | |
30 | + } from '@/api/charge.js' | |
25 | 31 | export default { |
26 | 32 | name: "popUpComponent", |
27 | 33 | props: { |
28 | 34 | title: { |
29 | 35 | type: String, |
30 | 36 | default: "同意" |
37 | + }, | |
38 | + publishID: { | |
39 | + type: Number, | |
40 | + }, | |
41 | + publishStatus: { | |
42 | + type: String, | |
43 | + default: "" | |
44 | + }, | |
45 | + modificationStatus: { | |
46 | + type: String, | |
47 | + default: "" | |
31 | 48 | } |
32 | 49 | }, |
33 | 50 | data() { |
34 | 51 | return { |
35 | - textarea:"", | |
52 | + textarea: "", | |
36 | 53 | show: false, |
37 | 54 | }; |
38 | 55 | }, |
... | ... | @@ -43,8 +60,74 @@ |
43 | 60 | close() { |
44 | 61 | this.show = false; |
45 | 62 | }, |
46 | - confirm(){ | |
47 | - console.log(this.textarea); | |
63 | + async confirm() { | |
64 | + let that = this; | |
65 | + let data = { | |
66 | + "id": this.publishID, | |
67 | + "status": this.title === '同意' ? 'Y' : 'N', | |
68 | + "remarks": this.textarea | |
69 | + } | |
70 | + console.log("审批状态", this.publishStatus); | |
71 | + if (this.publishStatus === 'PENDING_LEVEL_1_AUDIT') { | |
72 | + const result = await submitAuditOne(data); | |
73 | + if (result.code === 200) { | |
74 | + that.$emit('getList'); | |
75 | + uni.$u.toast(`${this.title}成功`) | |
76 | + } else { | |
77 | + uni.$u.toast(result.msg) | |
78 | + } | |
79 | + } | |
80 | + | |
81 | + if (this.publishStatus === 'PENDING_LEVEL_2_AUDIT') { | |
82 | + const result = await submitAuditTwo(data); | |
83 | + if (result.code === 200) { | |
84 | + that.$emit('getList'); | |
85 | + uni.$u.toast(`${this.title}成功`) | |
86 | + } else { | |
87 | + uni.$u.toast(result.msg) | |
88 | + } | |
89 | + } | |
90 | + | |
91 | + if (this.publishStatus === 'PENDING_LEVEL_1_AUDIT') { | |
92 | + const result = await submitAuditOne(data); | |
93 | + if (result.code === 200) { | |
94 | + that.$emit('getList'); | |
95 | + uni.$u.toast(`${this.title}成功`) | |
96 | + } else { | |
97 | + uni.$u.toast(result.msg) | |
98 | + } | |
99 | + } | |
100 | + | |
101 | + if (this.publishStatus === 'PENDING_LEVEL_2_AUDIT') { | |
102 | + const result = await submitAuditTwo(data); | |
103 | + if (result.code === 200) { | |
104 | + that.$emit('getList'); | |
105 | + uni.$u.toast(`${this.title}成功`) | |
106 | + } else { | |
107 | + uni.$u.toast(result.msg) | |
108 | + } | |
109 | + } | |
110 | + | |
111 | + if (this.publishStatus === 'APPROVED' && this.modificationStatus === 'PENDING_LEVEL_1_AUDIT') { | |
112 | + const result = await submitModificationOne(data); | |
113 | + if (result.code === 200) { | |
114 | + that.$emit('getList'); | |
115 | + uni.$u.toast(`${this.title}成功`) | |
116 | + } else { | |
117 | + uni.$u.toast(result.msg) | |
118 | + } | |
119 | + } | |
120 | + | |
121 | + if (this.publishStatus === 'APPROVED' && this.modificationStatus === 'PENDING_LEVEL_2_AUDIT') { | |
122 | + const result = await submitModificationTwo(data); | |
123 | + if (result.code === 200) { | |
124 | + that.$emit('getList'); | |
125 | + uni.$u.toast(`${this.title}成功`) | |
126 | + } else { | |
127 | + uni.$u.toast(result.msg) | |
128 | + } | |
129 | + } | |
130 | + console.log("审批data", data); | |
48 | 131 | this.show = false; |
49 | 132 | this.textarea = ""; |
50 | 133 | } | ... | ... |
components/popUpFillIn/popUpFillIn.vue
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | <!-- 点火维护 --> |
12 | 12 | <u-form-item v-if="type==='dhwh'" required label="是否已点火" labelWidth="100"> |
13 | 13 | <view class="flex justify-between margin-tb w100"> |
14 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueDHWH"> | |
14 | + <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueDHWH" @change="DHchange"> | |
15 | 15 | <u-radio class="margin-right" name="是">是</u-radio> |
16 | 16 | <u-radio name="否">否</u-radio> |
17 | 17 | </u-radio-group> |
... | ... | @@ -20,33 +20,35 @@ |
20 | 20 | <!-- 工程维护 --> |
21 | 21 | <u-form-item v-if="type==='gcwh'" required label="是否竣工" labelWidth="100"> |
22 | 22 | <view class="flex justify-between margin-tb w100"> |
23 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueGCWH"> | |
23 | + <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueGCWH" @change="GCchange"> | |
24 | 24 | <u-radio class="margin-right" name="是">是</u-radio> |
25 | 25 | <u-radio name="否">否</u-radio> |
26 | 26 | </u-radio-group> |
27 | 27 | </view> |
28 | 28 | </u-form-item> |
29 | 29 | <view class="usuallyCard padding margin-bottom-sm"> |
30 | - <view class="margin-tb text-lg"> | |
30 | + <view class="margin-tb text-lg" v-if="dhShow && gcShow"> | |
31 | 31 | 基本维护 |
32 | 32 | </view> |
33 | 33 | <!-- 点火维护 --> |
34 | - <u-form-item v-if="type==='dhwh'" required label="点火时间" labelWidth="100" borderBottom> | |
35 | - <u-input v-model="model.time" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
36 | - <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon> | |
34 | + <u-form-item v-if="type==='dhwh' && dhShow" required label="点火时间" labelWidth="100" borderBottom> | |
35 | + <u-input v-model="model.ignTime" placeholder="请选择" disabled disabledColor="#fff" | |
36 | + border="none"></u-input> | |
37 | + <u-icon slot="right" name="calendar" size="20" @click="datetimeShow = true"></u-icon> | |
37 | 38 | </u-form-item> |
38 | 39 | <u-form-item v-if="type==='dhwh'" required label="未点火原因" labelWidth="100" borderBottom> |
39 | - <u-input v-model="model.reason" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | |
40 | - <u-icon slot="right" name="arrow-down" size="20"></u-icon> | |
40 | + <u-input v-model="model.nIgnRsn" placeholder="请选择" disabled disabledColor="#fff" | |
41 | + border="none"></u-input> | |
42 | + <u-icon slot="right" name="arrow-down" size="20" @click="handleIgnition"></u-icon> | |
41 | 43 | </u-form-item> |
42 | 44 | <!-- 工程维护 --> |
43 | - <u-form-item v-if="type==='gcwh'" required label="市场派单时间" labelWidth="100" borderBottom> | |
45 | + <u-form-item v-if="type==='gcwh' && gcShow" required label="市场派单时间" labelWidth="100" borderBottom> | |
44 | 46 | <u-input v-model="model.time" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> |
45 | - <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon> | |
47 | + <u-icon slot="right" name="calendar" size="20" @click="datetimeShow = true"></u-icon> | |
46 | 48 | </u-form-item> |
47 | - <u-form-item v-if="type==='gcwh'" required label="竣工时间" labelWidth="100" borderBottom> | |
49 | + <u-form-item v-if="type==='gcwh' && gcShow" required label="竣工时间" labelWidth="100" borderBottom> | |
48 | 50 | <u-input v-model="model.time" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> |
49 | - <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon> | |
51 | + <u-icon slot="right" name="calendar" size="20" @click="datetimeShow = true"></u-icon> | |
50 | 52 | </u-form-item> |
51 | 53 | <u-form-item v-if="type==='gcwh'" required label="未竣工原因" labelWidth="100" borderBottom> |
52 | 54 | <u-input v-model="model.reason" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> |
... | ... | @@ -65,11 +67,18 @@ |
65 | 67 | </view> |
66 | 68 | </u-form> |
67 | 69 | </u-popup> |
68 | - <u-calendar :show="calendarShow" @close="closeCalender" @confirm="confirmCalender"></u-calendar> | |
70 | + <u-picker :show="pickerShow" :columns="columns" keyName="label" @close="pickerShow = false" closeOnClickOverlay | |
71 | + @cancel="pickerShow = false" @confirm="pickerConfirm"></u-picker> | |
72 | + <!-- <u-calendar :show="calendarShow" @close="closeCalender" @confirm="confirmCalender"></u-calendar> --> | |
73 | + <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm" | |
74 | + @cancel="datetimeShow = false" @close="datetimeShow = false" mode="datetime"></u-datetime-picker> | |
69 | 75 | </view> |
70 | 76 | </template> |
71 | 77 | |
72 | 78 | <script> |
79 | + import { | |
80 | + mcIgnitionMaintenance | |
81 | + } from "@/api/charge.js" | |
73 | 82 | export default { |
74 | 83 | name: "popUpComponent", |
75 | 84 | props: { |
... | ... | @@ -81,17 +90,27 @@ |
81 | 90 | type: String, |
82 | 91 | default: "" |
83 | 92 | }, |
93 | + IgnitionID: { | |
94 | + type: Number | |
95 | + }, | |
84 | 96 | }, |
85 | 97 | data() { |
86 | 98 | return { |
87 | 99 | show: false, |
88 | 100 | calendarShow: false, |
101 | + datetimeShow: false, | |
102 | + dataTimeValue: Number(new Date()), | |
89 | 103 | radiovalueDHWH: "", |
90 | - radiovalueGCWH:"", | |
104 | + radiovalueGCWH: "", | |
91 | 105 | model: { |
92 | - time: "" | |
106 | + ignTime: "", | |
107 | + nIgnRsn: "" | |
93 | 108 | }, |
94 | - rules: {} | |
109 | + rules: {}, | |
110 | + pickerShow: false, | |
111 | + columns: [], | |
112 | + dhShow: true, | |
113 | + gcShow: true, | |
95 | 114 | }; |
96 | 115 | }, |
97 | 116 | methods: { |
... | ... | @@ -101,16 +120,99 @@ |
101 | 120 | close() { |
102 | 121 | this.show = false; |
103 | 122 | }, |
104 | - confirm() { | |
105 | - console.log(this.textarea); | |
123 | + handleIgnition() { | |
124 | + let dict = 'sys_mc_ignition_rsn'; | |
125 | + let dictArr = this.getDictDatas(dict); | |
126 | + this.columns = [dictArr]; | |
127 | + console.log("未点火原因", this.columns); | |
128 | + this.pickerShow = true; | |
129 | + }, | |
130 | + async confirm() { | |
131 | + console.log(this.radiovalueDHWH); | |
132 | + if (this.type === 'dhwh') { | |
133 | + if (!this.radiovalueDHWH) { | |
134 | + uni.$u.toast('请选择是否点火'); | |
135 | + return | |
136 | + } | |
137 | + if (!this.model.ignTime && this.radiovalueDHWH === '是') { | |
138 | + uni.$u.toast('请选择点火时间'); | |
139 | + return | |
140 | + } | |
141 | + if (!this.model.nIgnRsn) { | |
142 | + uni.$u.toast('请选择未点火原因'); | |
143 | + return | |
144 | + } | |
145 | + let data = { | |
146 | + id: this.IgnitionID, | |
147 | + ignCnfStatusCode: this.radiovalueDHWH === '是' ? 'Y' : 'N', | |
148 | + nIgnRsn: this.model.nIgnRsn, | |
149 | + ignTime: this.model.ignTime | |
150 | + } | |
151 | + console.log(this.radiovalueGCWH); | |
152 | + console.log("点火数据", data); | |
153 | + const result = await mcIgnitionMaintenance(data); | |
154 | + if (result.code === 200) { | |
155 | + uni.$u.toast('提交成功'); | |
156 | + this.$emit('getList'); | |
157 | + } else { | |
158 | + uni.$u.toast(result.msg) | |
159 | + } | |
160 | + } | |
161 | + | |
162 | + if (this.type === 'gcwh') { | |
163 | + if (!this.radiovalueGCWH) { | |
164 | + uni.$u.toast('请选择是否竣工'); | |
165 | + return | |
166 | + } | |
167 | + // let data = { | |
168 | + // id: this.IgnitionID, | |
169 | + // ignCnfStatusCode: this.radiovalueGCWH === '是' ? 'Y' : 'N', | |
170 | + // nIgnRsn: this.model.nIgnRsn, | |
171 | + // ignTime: this.model.ignTime | |
172 | + // } | |
173 | + // console.log(this.radiovalueGCWH); | |
174 | + // console.log("点火数据", data); | |
175 | + // const result = await mcIgnitionMaintenance(data); | |
176 | + // if (result.code === 200) { | |
177 | + // uni.$u.toast('提交成功'); | |
178 | + // this.$emit('getList'); | |
179 | + // } else { | |
180 | + // uni.$u.toast(result.msg) | |
181 | + // } | |
182 | + } | |
106 | 183 | this.show = false; |
107 | - this.textarea = ""; | |
184 | + }, | |
185 | + DHchange(e) { | |
186 | + console.log(e); | |
187 | + if (e === '是') { | |
188 | + this.dhShow = true | |
189 | + } else { | |
190 | + this.dhShow = false | |
191 | + } | |
192 | + }, | |
193 | + GCchange(e) { | |
194 | + if (e === '是') { | |
195 | + this.gcShow = true | |
196 | + } else { | |
197 | + this.gcShow = false | |
198 | + } | |
199 | + }, | |
200 | + pickerConfirm(e) { | |
201 | + console.log(e); | |
202 | + let data = e.value[0].value; | |
203 | + this.model.nIgnRsn = data; | |
204 | + this.pickerShow = false; | |
108 | 205 | }, |
109 | 206 | confirmCalender(e) { |
110 | 207 | console.log(e); |
111 | - this.model.time = e[0]; | |
208 | + this.model.ignTime = e[0]; | |
112 | 209 | this.calendarShow = false; |
113 | 210 | }, |
211 | + dateConfirm(e) { | |
212 | + let time = this.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss'); | |
213 | + this.model.ignTime = time; | |
214 | + this.datetimeShow = false; | |
215 | + }, | |
114 | 216 | closeCalender() { |
115 | 217 | this.calendarShow = false; |
116 | 218 | }, | ... | ... |
pages.json
... | ... | @@ -94,6 +94,14 @@ |
94 | 94 | "path": "pages/charge/ignitionMaintenance/index", |
95 | 95 | "style": { |
96 | 96 | "navigationBarTitleText": "点火维护", |
97 | + "navigationStyle": "custom", | |
98 | + "enablePullDownRefresh": true | |
99 | + } | |
100 | + }, | |
101 | + { | |
102 | + "path": "pages/charge/ignitionMaintenance/detail", | |
103 | + "style": { | |
104 | + "navigationBarTitleText": "点火维护详情", | |
97 | 105 | "navigationStyle": "custom" |
98 | 106 | } |
99 | 107 | }, |
... | ... | @@ -101,6 +109,14 @@ |
101 | 109 | "path": "pages/charge/constructionMaintenance/index", |
102 | 110 | "style": { |
103 | 111 | "navigationBarTitleText": "施工维护", |
112 | + "navigationStyle": "custom", | |
113 | + "enablePullDownRefresh": true | |
114 | + } | |
115 | + }, | |
116 | + { | |
117 | + "path": "pages/charge/constructionMaintenance/detail", | |
118 | + "style": { | |
119 | + "navigationBarTitleText": "施工维护详情", | |
104 | 120 | "navigationStyle": "custom" |
105 | 121 | } |
106 | 122 | } | ... | ... |
... | ... | @@ -0,0 +1,181 @@ |
1 | +<template> | |
2 | + <view> | |
3 | + <Navbar title="点火维护详情" canBack></Navbar> | |
4 | + <basisCellCard class="margin-sm" title="基本信息" :list="dataList" v-if="current === 0"></basisCellCard> | |
5 | + </view> | |
6 | +</template> | |
7 | + | |
8 | +<script> | |
9 | + import { | |
10 | + getMcFileList | |
11 | + } from '@/api/charge.js' | |
12 | + import basisCellCard from '@/components/basisCellCard/basisCellCard.vue' | |
13 | + export default { | |
14 | + components: { | |
15 | + basisCellCard, | |
16 | + }, | |
17 | + props: { | |
18 | + | |
19 | + }, | |
20 | + data() { | |
21 | + return { | |
22 | + current: 0, | |
23 | + list: [{ | |
24 | + name: '基本信息', | |
25 | + }, { | |
26 | + name: '拜访信息', | |
27 | + }, { | |
28 | + name: '决策人信息' | |
29 | + }, { | |
30 | + name: '收费信息' | |
31 | + }], | |
32 | + itemStyle: { | |
33 | + padding: '0', | |
34 | + marginBottom: '5px', | |
35 | + fontSize: '12rpx', | |
36 | + width: '25%', | |
37 | + height: '30px', | |
38 | + }, | |
39 | + objData: {}, | |
40 | + dataList: [{ | |
41 | + name: "区域", | |
42 | + value: "", | |
43 | + key: "regionName" | |
44 | + }, { | |
45 | + name: "经管集团", | |
46 | + value: "", | |
47 | + key: "groupName" | |
48 | + }, { | |
49 | + name: "省", | |
50 | + value: "", | |
51 | + key: "province" | |
52 | + }, { | |
53 | + name: "市", | |
54 | + value: "", | |
55 | + key: "city" | |
56 | + }, { | |
57 | + name: "县/区", | |
58 | + value: "", | |
59 | + key: "district" | |
60 | + }, { | |
61 | + name: "乡镇/街道", | |
62 | + value: "", | |
63 | + key: "street" | |
64 | + }, { | |
65 | + name: "村(小区)", | |
66 | + value: "", | |
67 | + key: "vlgOrCmty" | |
68 | + }, { | |
69 | + name: "城乡分类", | |
70 | + value: "", | |
71 | + key: "urbRurCls" | |
72 | + }, { | |
73 | + name: "项目类型", | |
74 | + value: "", | |
75 | + key: "projectTypeName" | |
76 | + }, { | |
77 | + name: "市场派单时间", | |
78 | + value: "", | |
79 | + key: "assignmentTime" | |
80 | + }, { | |
81 | + name: "是否竣工", | |
82 | + value: "", | |
83 | + key: "isCompleted" | |
84 | + }, { | |
85 | + name: "竣工时间", | |
86 | + value: "", | |
87 | + key: "completionTime" | |
88 | + }, { | |
89 | + name: "未竣工原因", | |
90 | + value: "", | |
91 | + key: "nonNcmpRsn" | |
92 | + }, { | |
93 | + name: "工程负责人", | |
94 | + value: "", | |
95 | + key: "projectPersonName" | |
96 | + }, { | |
97 | + name: "是否通气到表前/立管", | |
98 | + value: "", | |
99 | + key: "gasConnMtrRis" | |
100 | + }, { | |
101 | + name: "是否通气到表前/立管时间", | |
102 | + value: "", | |
103 | + key: "gctMtrrisTime" | |
104 | + }, { | |
105 | + name: "未完成原因", | |
106 | + value: "", | |
107 | + key: "gctNcmpRsn" | |
108 | + }, { | |
109 | + name: "运营负责人", | |
110 | + value: "", | |
111 | + key: "operatePersonName" | |
112 | + }, { | |
113 | + name: "更新时间", | |
114 | + value: "", | |
115 | + key: "updateTime" | |
116 | + }], | |
117 | + fileList: [] | |
118 | + } | |
119 | + }, | |
120 | + computed: { | |
121 | + | |
122 | + }, | |
123 | + onLoad(data) { | |
124 | + if (data.objData) { | |
125 | + this.objData = JSON.parse(data.objData); | |
126 | + console.log('传递data', JSON.parse(JSON.stringify(this.objData))); | |
127 | + this.dataList = this.$assignValues(this.objData, this.dataList); | |
128 | + } | |
129 | + }, | |
130 | + methods: { | |
131 | + } | |
132 | + } | |
133 | +</script> | |
134 | + | |
135 | +<style lang="scss" scoped> | |
136 | + .attachmentCss { | |
137 | + margin-top: 38rpx; | |
138 | + padding: 20rpx; | |
139 | + border-radius: 10px; | |
140 | + background-color: #f8f9fd; | |
141 | + box-sizing: border-box; | |
142 | + } | |
143 | + | |
144 | + .flexCss { | |
145 | + display: flex; | |
146 | + justify-content: space-between; | |
147 | + align-items: center; | |
148 | + margin: 32rpx 0; | |
149 | + } | |
150 | + | |
151 | + .leftCss { | |
152 | + display: flex; | |
153 | + justify-content: flex-start; | |
154 | + align-items: center; | |
155 | + } | |
156 | + | |
157 | + .textCss { | |
158 | + width: 466rpx; | |
159 | + height: 35rpx; | |
160 | + margin: 0 4px; | |
161 | + background-color: rgba(255, 255, 255, 0); | |
162 | + box-sizing: border-box; | |
163 | + font-family: '苹方 中等', '苹方', sans-serif; | |
164 | + color: #999db0; | |
165 | + text-align: left; | |
166 | + line-height: normal; | |
167 | + font-size: 26rpx; | |
168 | + } | |
169 | + | |
170 | + .rightCss { | |
171 | + width: 60rpx; | |
172 | + height: 35rpx; | |
173 | + display: flex; | |
174 | + background-color: rgba(255, 255, 255, 0); | |
175 | + box-sizing: border-box; | |
176 | + font-family: '苹方 中等', '苹方', sans-serif; | |
177 | + color: #ff5630; | |
178 | + text-align: left; | |
179 | + font-size: 26rpx; | |
180 | + } | |
181 | +</style> | ... | ... |
pages/charge/constructionMaintenance/index.vue
... | ... | @@ -16,28 +16,28 @@ |
16 | 16 | </uv-drop-down> |
17 | 17 | </view> |
18 | 18 | |
19 | - <view class="usuallyCard margin padding"> | |
19 | + <view class="usuallyCard margin padding" v-if="list.length" v-for="(item,index) in list" :key="index"> | |
20 | 20 | <view class="flex flex-direction"> |
21 | 21 | <view class="flex justify-between"> |
22 | 22 | <view class=""> |
23 | - <text class="text-grey margin-right-xs">项目公司:</text>咸宁中燃城镇燃气有限公司 | |
23 | + <text class="text-grey margin-right-xs">项目公司:</text>{{item.companyName || '--'}} | |
24 | 24 | </view> |
25 | 25 | <view class="flex"> |
26 | 26 | <u-tag bgColor="#EFF1FD" borderColor="#fff" color="#5875EE" size="mini" text="待审批"></u-tag> |
27 | 27 | </view> |
28 | 28 | </view> |
29 | 29 | <view class="margin-top-sm"> |
30 | - <text class="text-grey margin-right-xs">村(小区):</text>南湖壹号 | |
30 | + <text class="text-grey margin-right-xs">村(小区):</text>{{item.vlgOrCmty || '--'}} | |
31 | 31 | </view> |
32 | 32 | <view class="margin-top-sm"> |
33 | - <text class="text-grey margin-right-xs">项目类型:</text>扫雷行动项目(市政中压已覆盖) | |
33 | + <text class="text-grey margin-right-xs">项目类型:</text>{{item.projectTypeName || '--'}} | |
34 | 34 | </view> |
35 | 35 | </view> |
36 | 36 | <view class="flex justify-end margin-top"> |
37 | - <view class="margin-right" @click="handleDetail"> | |
37 | + <view class="margin-right" @click="handleDetail(item)"> | |
38 | 38 | <u-button shape="circle">查看详情</u-button> |
39 | 39 | </view> |
40 | - <view class="" @click="handleOpen"> | |
40 | + <view class="" @click="handleOpen(item)"> | |
41 | 41 | <u-button shape="circle" color="#CF000D">工程维护</u-button> |
42 | 42 | </view> |
43 | 43 | </view> |
... | ... | @@ -45,12 +45,17 @@ |
45 | 45 | 当前审批节点:项目公司_市场负责人 |
46 | 46 | </view> --> |
47 | 47 | </view> |
48 | + <u-loadmore :status="status" v-if="list.length > 0" /> | |
49 | + <u-empty text="暂无资讯" icon="/static/images/icon/nodata.png" v-else></u-empty> | |
48 | 50 | <popUpFillIn :type="btnType" title="工程维护" ref="popUpFillInRef"></popUpFillIn> |
49 | 51 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> |
50 | 52 | </view> |
51 | 53 | </template> |
52 | 54 | |
53 | 55 | <script> |
56 | + import { | |
57 | + getMcConstructionList | |
58 | + } from '@/api/charge.js' | |
54 | 59 | export default { |
55 | 60 | components: {}, |
56 | 61 | props: { |
... | ... | @@ -69,30 +74,68 @@ |
69 | 74 | 'line-height': '25px', |
70 | 75 | }, |
71 | 76 | btnType:"gcwh", |
72 | - approvalValue: [], | |
73 | - approval: [{ | |
74 | - name: "待我审批" | |
75 | - }] | |
77 | + params: { | |
78 | + pageNum: 1, | |
79 | + pageSize: 10, | |
80 | + companyCode: "", | |
81 | + isCompleted: "", | |
82 | + gasConnMtrRis: "" | |
83 | + }, | |
84 | + status: "loadmore", | |
85 | + list: [], | |
86 | + total: null, | |
76 | 87 | } |
77 | 88 | }, |
78 | 89 | computed: { |
79 | 90 | |
80 | 91 | }, |
92 | + onReachBottom() { | |
93 | + let allTotal = this.params.pageNum * this.params.pageSize | |
94 | + if (allTotal < this.total) { | |
95 | + //当前条数小于总条数 则增加请求页数 | |
96 | + this.params.pageNum++; | |
97 | + this.status = 'loading'; | |
98 | + this.initData() //调用加载数据方法 | |
99 | + } else { | |
100 | + this.status = "nomore" | |
101 | + // console.log('已加载全部数据') | |
102 | + } | |
103 | + }, | |
104 | + onPullDownRefresh() { | |
105 | + this.params.pageNum = 1; | |
106 | + this.keyword = ""; | |
107 | + this.initData(); | |
108 | + setTimeout(() => { | |
109 | + //结束下拉刷新 | |
110 | + uni.stopPullDownRefresh(); | |
111 | + }, 500); | |
112 | + }, | |
81 | 113 | onLoad() { |
82 | - | |
114 | + this.initData() | |
83 | 115 | }, |
84 | 116 | methods: { |
85 | - onSearch(e) { | |
86 | - console.log("搜索", e); | |
87 | - }, | |
88 | - checkboxChange(e) { | |
89 | - console.log(e); | |
90 | - }, | |
91 | - handleDetail() { | |
92 | - uni.navigateTo({ | |
93 | - url: '/pages/visitsAndFees/detail' | |
94 | - }) | |
117 | + async initData() { | |
118 | + let { | |
119 | + code, | |
120 | + rows, | |
121 | + total | |
122 | + } = await getMcConstructionList(this.params); | |
123 | + if (code === 200) { | |
124 | + if (this.params.pageNum > 1) { | |
125 | + this.list = [...this.list, ...rows] | |
126 | + } else { | |
127 | + this.list = rows; | |
128 | + } | |
129 | + this.total = total; | |
130 | + console.log('list', JSON.parse(JSON.stringify(this.list))); | |
131 | + } | |
95 | 132 | }, |
133 | + // 查看详情 | |
134 | + handleDetail(item) { | |
135 | + uni.navigateTo({ | |
136 | + url: '/pages/charge/constructionMaintenance/detail?objData=' + JSON.stringify(item) | |
137 | + }) | |
138 | + }, | |
96 | 139 | handleOpen(){ |
97 | 140 | this.$refs.popUpFillInRef.open(); |
98 | 141 | } | ... | ... |
... | ... | @@ -0,0 +1,169 @@ |
1 | +<template> | |
2 | + <view> | |
3 | + <Navbar title="点火维护详情" canBack></Navbar> | |
4 | + <basisCellCard class="margin-sm" title="基本信息" :list="dataList" v-if="current === 0"></basisCellCard> | |
5 | + </view> | |
6 | +</template> | |
7 | + | |
8 | +<script> | |
9 | + import { | |
10 | + getMcFileList | |
11 | + } from '@/api/charge.js' | |
12 | + import basisCellCard from '@/components/basisCellCard/basisCellCard.vue' | |
13 | + export default { | |
14 | + components: { | |
15 | + basisCellCard, | |
16 | + }, | |
17 | + props: { | |
18 | + | |
19 | + }, | |
20 | + data() { | |
21 | + return { | |
22 | + current: 0, | |
23 | + list: [{ | |
24 | + name: '基本信息', | |
25 | + }, { | |
26 | + name: '拜访信息', | |
27 | + }, { | |
28 | + name: '决策人信息' | |
29 | + }, { | |
30 | + name: '收费信息' | |
31 | + }], | |
32 | + itemStyle: { | |
33 | + padding: '0', | |
34 | + marginBottom: '5px', | |
35 | + fontSize: '12rpx', | |
36 | + width: '25%', | |
37 | + height: '30px', | |
38 | + }, | |
39 | + objData: {}, | |
40 | + dataList: [{ | |
41 | + name: "区域", | |
42 | + value: "", | |
43 | + key: "regionName" | |
44 | + }, { | |
45 | + name: "经管集团", | |
46 | + value: "", | |
47 | + key: "groupName" | |
48 | + }, { | |
49 | + name: "省", | |
50 | + value: "", | |
51 | + key: "userProvince" | |
52 | + }, { | |
53 | + name: "市", | |
54 | + value: "", | |
55 | + key: "userCity" | |
56 | + }, { | |
57 | + name: "县/区", | |
58 | + value: "", | |
59 | + key: "userDistrict" | |
60 | + }, { | |
61 | + name: "乡镇/街道", | |
62 | + value: "", | |
63 | + key: "userStreet" | |
64 | + }, { | |
65 | + name: "村(小区)", | |
66 | + value: "", | |
67 | + key: "vlgOrCmty" | |
68 | + }, { | |
69 | + name: "城乡分类", | |
70 | + value: "", | |
71 | + key: "urbRurCls" | |
72 | + }, { | |
73 | + name: "详细地址", | |
74 | + value: "", | |
75 | + key: "userDetailedAddress" | |
76 | + }, { | |
77 | + name: "户名", | |
78 | + value: "", | |
79 | + key: "userName" | |
80 | + }, { | |
81 | + name: "联系电话", | |
82 | + value: "", | |
83 | + key: "userPhone" | |
84 | + }, { | |
85 | + name: "点火确认", | |
86 | + value: "", | |
87 | + key: "ignCnfStatusCode" | |
88 | + }, { | |
89 | + name: "点火时间", | |
90 | + value: "", | |
91 | + key: "ignTime" | |
92 | + }, { | |
93 | + name: "未点火原因", | |
94 | + value: "", | |
95 | + key: "nIgnRsn" | |
96 | + }, { | |
97 | + name: "负责人", | |
98 | + value: "", | |
99 | + key: "cnfPersonName" | |
100 | + }, { | |
101 | + name: "更新时间", | |
102 | + value: "", | |
103 | + key: "updateTime" | |
104 | + }], | |
105 | + fileList: [] | |
106 | + } | |
107 | + }, | |
108 | + computed: { | |
109 | + | |
110 | + }, | |
111 | + onLoad(data) { | |
112 | + if (data.objData) { | |
113 | + this.objData = JSON.parse(data.objData); | |
114 | + console.log('传递data', JSON.parse(JSON.stringify(this.objData))); | |
115 | + this.dataList = this.$assignValues(this.objData, this.dataList); | |
116 | + } | |
117 | + }, | |
118 | + methods: { | |
119 | + } | |
120 | + } | |
121 | +</script> | |
122 | + | |
123 | +<style lang="scss" scoped> | |
124 | + .attachmentCss { | |
125 | + margin-top: 38rpx; | |
126 | + padding: 20rpx; | |
127 | + border-radius: 10px; | |
128 | + background-color: #f8f9fd; | |
129 | + box-sizing: border-box; | |
130 | + } | |
131 | + | |
132 | + .flexCss { | |
133 | + display: flex; | |
134 | + justify-content: space-between; | |
135 | + align-items: center; | |
136 | + margin: 32rpx 0; | |
137 | + } | |
138 | + | |
139 | + .leftCss { | |
140 | + display: flex; | |
141 | + justify-content: flex-start; | |
142 | + align-items: center; | |
143 | + } | |
144 | + | |
145 | + .textCss { | |
146 | + width: 466rpx; | |
147 | + height: 35rpx; | |
148 | + margin: 0 4px; | |
149 | + background-color: rgba(255, 255, 255, 0); | |
150 | + box-sizing: border-box; | |
151 | + font-family: '苹方 中等', '苹方', sans-serif; | |
152 | + color: #999db0; | |
153 | + text-align: left; | |
154 | + line-height: normal; | |
155 | + font-size: 26rpx; | |
156 | + } | |
157 | + | |
158 | + .rightCss { | |
159 | + width: 60rpx; | |
160 | + height: 35rpx; | |
161 | + display: flex; | |
162 | + background-color: rgba(255, 255, 255, 0); | |
163 | + box-sizing: border-box; | |
164 | + font-family: '苹方 中等', '苹方', sans-serif; | |
165 | + color: #ff5630; | |
166 | + text-align: left; | |
167 | + font-size: 26rpx; | |
168 | + } | |
169 | +</style> | ... | ... |
pages/charge/ignitionMaintenance/index.vue
1 | 1 | <template> |
2 | - <view class="app-container"> | |
3 | - <u-navbar :title="title" safeAreaInsetTop placeholder> | |
4 | - <view slot="left" class="text-red"></view> | |
5 | - </u-navbar> | |
6 | - <view class=""> | |
7 | - <uv-drop-down ref="dropDown" sign="dropDown_1" :customStyle="{'justifyContent':'space-around'}" | |
8 | - :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" | |
9 | - :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}"> | |
10 | - <uv-drop-down-item name="type" type="2" label="项目公司" value="0"> | |
11 | - </uv-drop-down-item> | |
12 | - <uv-drop-down-item name="type" type="2" label="点火确认" value="0"> | |
13 | - </uv-drop-down-item> | |
14 | - </uv-drop-down> | |
15 | - </view> | |
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'}" | |
8 | + :extra-icon="{name:'arrow-down-fill',color:'#666',size:'26rpx'}" | |
9 | + :extra-active-icon="{name:'arrow-up-fill',color:'#3c9cff',size:'26rpx'}"> | |
10 | + <uv-drop-down-item name="type" type="2" label="项目公司" value="0"> | |
11 | + </uv-drop-down-item> | |
12 | + <uv-drop-down-item name="type" type="2" label="点火确认" value="0"> | |
13 | + </uv-drop-down-item> | |
14 | + </uv-drop-down> | |
15 | + </view> | |
16 | 16 | |
17 | - <view class="usuallyCard margin padding"> | |
18 | - <view class="flex flex-direction"> | |
19 | - <view class="flex justify-between"> | |
20 | - <view class=""> | |
21 | - <text class="text-grey margin-right-xs">项目公司:</text>咸宁中燃城镇燃气有限公司 | |
22 | - </view> | |
23 | - <view class="flex"> | |
24 | - <u-tag bgColor="#EFF1FD" borderColor="#fff" color="#5875EE" size="mini" text="待审批"></u-tag> | |
25 | - </view> | |
26 | - </view> | |
17 | + <view class="usuallyCard margin padding" v-if="list.length" v-for="(item,index) in list" :key="index"> | |
18 | + <view class="flex flex-direction"> | |
19 | + <view class="flex justify-between"> | |
20 | + <view class=""> | |
21 | + <text class="text-grey margin-right-xs">项目公司:</text>{{item.companyName || '--'}} | |
22 | + </view> | |
23 | + <view class="flex"> | |
24 | + <u-tag bgColor="#EFF1FD" borderColor="#fff" color="#5875EE" size="mini" :text="item.statusName"></u-tag> | |
25 | + </view> | |
26 | + </view> | |
27 | + <view class="margin-top-sm"> | |
28 | + <text class="text-grey margin-right-xs">用户编号:</text>{{item.userCode || '--'}} | |
29 | + </view> | |
30 | + <view class="margin-top-sm"> | |
31 | + <text class="text-grey margin-right-xs">户名:</text>{{item.userName || '--'}} | |
32 | + </view> | |
27 | 33 | <view class="margin-top-sm"> |
28 | - <text class="text-grey margin-right-xs">用户编号:</text>20240423112758317528770 | |
34 | + <text class="text-grey margin-right-xs">地址:</text>{{item.userDetailedAddress || '--'}} | |
29 | 35 | </view> |
30 | - <view class="margin-top-sm"> | |
31 | - <text class="text-grey margin-right-xs">户名:</text>张三 | |
32 | - </view> | |
33 | 36 | <view class="margin-top-sm"> |
34 | - <text class="text-grey margin-right-xs">地址:</text>中建·南湖壹号三栋一单元(1206室) | |
37 | + <text class="text-grey margin-right-xs">点火时间:</text>{{item.ignTime || '--'}} | |
35 | 38 | </view> |
36 | - <view class="margin-top-sm"> | |
37 | - <text class="text-grey margin-right-xs">点火时间:</text>— — | |
38 | - </view> | |
39 | - </view> | |
40 | - <view class="flex justify-end margin-top"> | |
41 | - <view class="margin-right" @click="handleDetail"> | |
42 | - <u-button shape="circle">查看详情</u-button> | |
43 | - </view> | |
44 | - <view class="" @click="handleOpen"> | |
45 | - <u-button shape="circle" color="#CF000D">点火维护</u-button> | |
46 | - </view> | |
47 | - </view> | |
48 | - <!-- <view class="nodeCss"> | |
39 | + </view> | |
40 | + <view class="flex justify-end margin-top"> | |
41 | + <view class="margin-right" @click="handleDetail(item)"> | |
42 | + <u-button shape="circle">查看详情</u-button> | |
43 | + </view> | |
44 | + <view class="" @click="handleOpen(item)"> | |
45 | + <u-button shape="circle" color="#CF000D">点火维护</u-button> | |
46 | + </view> | |
47 | + </view> | |
48 | + <!-- <view class="nodeCss"> | |
49 | 49 | 当前审批节点:项目公司_市场负责人 |
50 | 50 | </view> --> |
51 | - </view> | |
52 | - <popUpFillIn type="dhwh" title="点火维护" ref="popUpFillInRef"></popUpFillIn> | |
53 | - <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> | |
54 | - </view> | |
51 | + </view> | |
52 | + <u-loadmore :status="status" v-if="list.length > 0" /> | |
53 | + <u-empty text="暂无资讯" icon="/static/images/icon/nodata.png" v-else></u-empty> | |
54 | + | |
55 | + <popUpFillIn :IgnitionID="IgnitionID" type="dhwh" title="点火维护" ref="popUpFillInRef" @getList="initData"> | |
56 | + </popUpFillIn> | |
57 | + <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> | |
58 | + </view> | |
55 | 59 | </template> |
56 | 60 | |
57 | 61 | <script> |
62 | + import { | |
63 | + getMcIgnitionList, | |
64 | + mcIgnitionMaintenance | |
65 | + } from '@/api/charge.js' | |
58 | 66 | import popUpFillIn from '@/components/popUpFillIn/popUpFillIn.vue' |
59 | - export default { | |
60 | - components: { | |
67 | + export default { | |
68 | + components: { | |
61 | 69 | popUpFillIn |
62 | 70 | }, |
63 | - props: { | |
64 | - | |
65 | - }, | |
66 | - data() { | |
67 | - return { | |
68 | - title: "点火维护", | |
69 | - keyword: "", | |
70 | - actionStyle: { | |
71 | - 'color': '#fff', | |
72 | - 'background': '#EC1E19', | |
73 | - 'borderRadius': "15px", | |
74 | - 'width': '60px', | |
75 | - 'height': '25px', | |
76 | - 'line-height': '25px', | |
77 | - }, | |
78 | - approvalValue: [], | |
79 | - approval: [{ | |
80 | - name: "待我审批" | |
81 | - }] | |
82 | - } | |
83 | - }, | |
84 | - computed: { | |
71 | + props: { | |
85 | 72 | |
86 | - }, | |
87 | - onLoad() { | |
73 | + }, | |
74 | + data() { | |
75 | + return { | |
76 | + title: "点火维护", | |
77 | + keyword: "", | |
78 | + actionStyle: { | |
79 | + 'color': '#fff', | |
80 | + 'background': '#EC1E19', | |
81 | + 'borderRadius': "15px", | |
82 | + 'width': '60px', | |
83 | + 'height': '25px', | |
84 | + 'line-height': '25px', | |
85 | + }, | |
86 | + params: { | |
87 | + pageNum: 1, | |
88 | + pageSize: 10, | |
89 | + companyCode: "", | |
90 | + statusCode: "", | |
91 | + userDetailedAddress: "" | |
92 | + }, | |
93 | + status: "loadmore", | |
94 | + list: [], | |
95 | + total: null, | |
96 | + IgnitionID: 0, | |
97 | + } | |
98 | + }, | |
99 | + computed: { | |
88 | 100 | |
89 | - }, | |
90 | - methods: { | |
91 | - onSearch(e) { | |
92 | - console.log("搜索", e); | |
93 | - }, | |
94 | - checkboxChange(e) { | |
95 | - console.log(e); | |
96 | - }, | |
97 | - handleDetail() { | |
98 | - uni.navigateTo({ | |
99 | - url: '/pages/visitsAndFees/detail' | |
100 | - }) | |
101 | - }, | |
102 | - handleOpen(){ | |
101 | + }, | |
102 | + onReachBottom() { | |
103 | + let allTotal = this.params.pageNum * this.params.pageSize | |
104 | + if (allTotal < this.total) { | |
105 | + //当前条数小于总条数 则增加请求页数 | |
106 | + this.params.pageNum++; | |
107 | + this.status = 'loading'; | |
108 | + this.initData() //调用加载数据方法 | |
109 | + } else { | |
110 | + this.status = "nomore" | |
111 | + // console.log('已加载全部数据') | |
112 | + } | |
113 | + }, | |
114 | + onPullDownRefresh() { | |
115 | + this.params.pageNum = 1; | |
116 | + this.keyword = ""; | |
117 | + this.initData(); | |
118 | + setTimeout(() => { | |
119 | + //结束下拉刷新 | |
120 | + uni.stopPullDownRefresh(); | |
121 | + }, 500); | |
122 | + }, | |
123 | + onLoad() { | |
124 | + this.initData() | |
125 | + }, | |
126 | + methods: { | |
127 | + async initData() { | |
128 | + let { | |
129 | + code, | |
130 | + rows, | |
131 | + total | |
132 | + } = await getMcIgnitionList(this.params); | |
133 | + if (code === 200) { | |
134 | + if (this.params.pageNum > 1) { | |
135 | + this.list = [...this.list, ...rows] | |
136 | + } else { | |
137 | + this.list = rows; | |
138 | + } | |
139 | + this.total = total; | |
140 | + console.log('list', JSON.parse(JSON.stringify(this.list))); | |
141 | + } | |
142 | + }, | |
143 | + // 查看详情 | |
144 | + handleDetail(item) { | |
145 | + uni.navigateTo({ | |
146 | + url: '/pages/charge/ignitionMaintenance/detail?objData=' + JSON.stringify(item) | |
147 | + }) | |
148 | + }, | |
149 | + handleOpen(item) { | |
150 | + this.IgnitionID = item.id; | |
103 | 151 | this.$refs.popUpFillInRef.open(); |
104 | 152 | } |
105 | - } | |
106 | - } | |
153 | + } | |
154 | + } | |
107 | 155 | </script> |
108 | 156 | |
109 | 157 | <style lang="scss" scoped> |
110 | - /deep/.u-search__content { | |
111 | - width: 70vw; | |
112 | - padding-right: 140rpx; | |
113 | - } | |
158 | + /deep/.u-search__content { | |
159 | + width: 70vw; | |
160 | + padding-right: 140rpx; | |
161 | + } | |
114 | 162 | |
115 | - /deep/.u-search__action { | |
116 | - position: absolute; | |
117 | - left: 50%; | |
118 | - } | |
163 | + /deep/.u-search__action { | |
164 | + position: absolute; | |
165 | + left: 50%; | |
166 | + } | |
119 | 167 | |
120 | - .nodeCss { | |
121 | - position: relative; | |
122 | - display: flex; | |
123 | - justify-content: center; | |
124 | - align-items: center; | |
125 | - margin: 25rpx auto; | |
126 | - border-radius: 20rpx; | |
127 | - width: 95%; | |
128 | - height: 80rpx; | |
129 | - background: #EFF1FD; | |
130 | - color: #5875EB; | |
131 | - text-align: center; | |
132 | - } | |
168 | + .nodeCss { | |
169 | + position: relative; | |
170 | + display: flex; | |
171 | + justify-content: center; | |
172 | + align-items: center; | |
173 | + margin: 25rpx auto; | |
174 | + border-radius: 20rpx; | |
175 | + width: 95%; | |
176 | + height: 80rpx; | |
177 | + background: #EFF1FD; | |
178 | + color: #5875EB; | |
179 | + text-align: center; | |
180 | + } | |
133 | 181 | |
134 | 182 | |
135 | - .nodeCss::after { | |
136 | - content: ''; | |
137 | - position: absolute; | |
138 | - top: 0%; | |
139 | - right: 25rpx; | |
140 | - transform: translate(-50%, -50%) rotate(45deg); | |
141 | - width: 10px; | |
142 | - height: 10px; | |
143 | - background: #EFF1FD; | |
144 | - border: 1px solid #EFF1FD; | |
145 | - border-style: none none solid solid; | |
146 | - } | |
183 | + .nodeCss::after { | |
184 | + content: ''; | |
185 | + position: absolute; | |
186 | + top: 0%; | |
187 | + right: 25rpx; | |
188 | + transform: translate(-50%, -50%) rotate(45deg); | |
189 | + width: 10px; | |
190 | + height: 10px; | |
191 | + background: #EFF1FD; | |
192 | + border: 1px solid #EFF1FD; | |
193 | + border-style: none none solid solid; | |
194 | + } | |
147 | 195 | </style> | ... | ... |
pages/charge/visitsAndFees/createaVisit.vue
1 | 1 | <template> |
2 | 2 | <view class="container"> |
3 | 3 | <Navbar :title="title" canBack></Navbar> |
4 | - <u-form labelPosition="left" :model="model" :rules="rules" ref="uForm"> | |
4 | + <u-form labelPosition="left" :model="model" :rules="rules" ref="uForm" errorType="toast"> | |
5 | 5 | <view class="usuallyCard padding margin-sm"> |
6 | 6 | <view class="text-lg padding-tb"> |
7 | 7 | 基本信息 |
... | ... | @@ -10,23 +10,26 @@ |
10 | 10 | <!-- 日期选择 --> |
11 | 11 | <view class="" v-for="(item,index) in basisData" :key="index"> |
12 | 12 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
13 | - v-if="item.type === 'date'"> | |
13 | + v-if="item.type === 'date'" :prop="item.key"> | |
14 | 14 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled |
15 | - disabledColor="#fff" border="none"></u-input> | |
15 | + border="none" :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'"></u-input> | |
16 | 16 | <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> |
17 | + <!-- <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> --> | |
17 | 18 | </u-form-item> |
18 | 19 | <!-- 输入类型 --> |
19 | 20 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
20 | - v-if="item.type === 'input'"> | |
21 | - <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | |
21 | + v-if="item.type === 'input'" :prop="item.key"> | |
22 | + <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" | |
23 | + :disabled="operationStatus ==='YD'" :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'" | |
22 | 24 | border="none"></u-input> |
23 | 25 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
24 | 26 | </u-form-item> |
25 | 27 | <!-- 选择类型 --> |
26 | 28 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
27 | - v-if="item.type === 'select'"> | |
28 | - <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | |
29 | - disabledColor="#fff" border="none"></u-input> | |
29 | + v-if="item.type === 'select'" :disabled="operationStatus ==='YD'" :prop="item.key"> | |
30 | + <u-input v-model="model[item.key]" :disabled="operationStatus ==='YD'" inputAlign="right" | |
31 | + :placeholder="item.placeholder" :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'" | |
32 | + border="none"></u-input> | |
30 | 33 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> |
31 | 34 | </u-form-item> |
32 | 35 | </view> |
... | ... | @@ -41,38 +44,39 @@ |
41 | 44 | <view class="" v-for="(item,index) in visitData" :key="index"> |
42 | 45 | <!-- 单选 --> |
43 | 46 | <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom |
44 | - v-if="item.type === 'radio'"> | |
45 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="model[item.key]"> | |
47 | + v-if="item.type === 'radio' && item.show" :prop="item.key"> | |
48 | + <u-radio-group activeColor="#EA5504" placement="row" v-model="model[item.key]" @change="bfChange" | |
49 | + :disabled="operationStatus ==='YD'"> | |
46 | 50 | <u-radio class="margin-right" name="是">是</u-radio> |
47 | 51 | <u-radio name="否">否</u-radio> |
48 | 52 | </u-radio-group> |
49 | 53 | </u-form-item> |
50 | 54 | <!-- 日期 --> |
51 | 55 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
52 | - v-if="item.type === 'date'"> | |
56 | + v-if="item.type === 'date' && item.show" :prop="item.key"> | |
53 | 57 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled |
54 | - disabledColor="#fff" border="none"></u-input> | |
58 | + :disabled="operationStatus ==='YD'" disabledColor="#fff" border="none"></u-input> | |
55 | 59 | <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon> |
56 | 60 | </u-form-item> |
57 | 61 | <!-- 输入 --> |
58 | 62 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
59 | - v-if="item.type === 'input'"> | |
63 | + v-if="item.type === 'input' && item.show" :prop="item.key"> | |
60 | 64 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" |
61 | - border="none"></u-input> | |
65 | + :disabled="operationStatus ==='YD'" border="none"></u-input> | |
62 | 66 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
63 | 67 | </u-form-item> |
64 | 68 | <!-- 选择 --> |
65 | 69 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
66 | - v-if="item.type === 'select'"> | |
67 | - <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | |
68 | - disabledColor="#fff" border="none"></u-input> | |
70 | + v-if="item.type === 'select' && item.show" :prop="item.key"> | |
71 | + <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | |
72 | + :disabled="operationStatus ==='YD'" border="none"></u-input> | |
69 | 73 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> |
70 | 74 | </u-form-item> |
71 | 75 | <!-- 文件 --> |
72 | 76 | <u-form-item :required="item.required" :label="item.label" labelWidth="75%" borderBottom |
73 | - v-if="item.type === 'file'"> | |
77 | + v-if="item.type === 'file' && item.show" :prop="item.key"> | |
74 | 78 | <u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="10" |
75 | - width="100rpx" height="100rpx"></u-upload> | |
79 | + :disabled="operationStatus ==='YD'" width="100rpx" height="100rpx"></u-upload> | |
76 | 80 | </u-form-item> |
77 | 81 | </view> |
78 | 82 | </view> |
... | ... | @@ -86,24 +90,25 @@ |
86 | 90 | <view class="" v-for="(item,index) in decisionMakersData" :key="index"> |
87 | 91 | <!-- 单选 --> |
88 | 92 | <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom |
89 | - v-if="item.type === 'radio'"> | |
90 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="model[item.key]"> | |
93 | + v-if="item.type === 'radio' && item.show" :prop="item.key"> | |
94 | + <u-radio-group activeColor="#EA5504" placement="row" v-model="model[item.key]" @change="jcrChange" | |
95 | + :disabled="operationStatus ==='YD'"> | |
91 | 96 | <u-radio class="margin-right" name="是">是</u-radio> |
92 | 97 | <u-radio name="否">否</u-radio> |
93 | 98 | </u-radio-group> |
94 | 99 | </u-form-item> |
95 | 100 | <!-- 输入 --> |
96 | 101 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
97 | - v-if="item.type === 'input'"> | |
102 | + v-if="item.type === 'input' && item.show" :prop="item.key"> | |
98 | 103 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" |
99 | - border="none"></u-input> | |
104 | + :disabled="operationStatus ==='YD'" border="none"></u-input> | |
100 | 105 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
101 | 106 | </u-form-item> |
102 | 107 | <!-- 选择 --> |
103 | 108 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
104 | - v-if="item.type === 'select'"> | |
105 | - <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | |
106 | - disabledColor="#fff" border="none"></u-input> | |
109 | + v-if="item.type === 'select' && item.show" :prop="item.key"> | |
110 | + <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | |
111 | + :disabled="operationStatus ==='YD'" border="none"></u-input> | |
107 | 112 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> |
108 | 113 | </u-form-item> |
109 | 114 | </view> |
... | ... | @@ -118,25 +123,25 @@ |
118 | 123 | <view class="" v-for="(item,index) in chargeData" :key="index"> |
119 | 124 | <!-- 单选 --> |
120 | 125 | <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom |
121 | - v-if="item.type === 'radio'"> | |
122 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="model.bf"> | |
126 | + v-if="item.type === 'radio' && item.show" :prop="item.key"> | |
127 | + <u-radio-group activeColor="#EA5504" placement="row" v-model="model[item.key]" @change="sfChange"> | |
123 | 128 | <u-radio class="margin-right" name="是">是</u-radio> |
124 | 129 | <u-radio name="否">否</u-radio> |
125 | 130 | </u-radio-group> |
126 | 131 | </u-form-item> |
127 | 132 | <!-- 输入 --> |
128 | 133 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
129 | - v-if="item.type === 'input'"> | |
134 | + v-if="item.type === 'input' && item.show" :prop="item.key"> | |
130 | 135 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" |
131 | 136 | border="none"></u-input> |
132 | 137 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
133 | 138 | </u-form-item> |
134 | 139 | <!-- 选择 --> |
135 | 140 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
136 | - v-if="item.type === 'select'"> | |
141 | + v-if="item.type === 'select' && item.show" :prop="item.key"> | |
137 | 142 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled |
138 | 143 | disabledColor="#fff" border="none"></u-input> |
139 | - <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> | |
144 | + <u-icon slot="right" name="arrow-down" size="20" @click="handleSFSelect(item)"></u-icon> | |
140 | 145 | </u-form-item> |
141 | 146 | </view> |
142 | 147 | </view> |
... | ... | @@ -159,18 +164,18 @@ |
159 | 164 | <view class="" v-if="item.type === 'attachment'"> |
160 | 165 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
161 | 166 | v-if="item.type === 'attachment'"> |
162 | - <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | |
163 | - disabledColor="#fff" border="none"></u-input> | |
167 | + <!-- <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | |
168 | + disabledColor="#fff" border="none"></u-input> --> | |
164 | 169 | <view slot="right" class="text-blue" @click="uploadAttachment">上传附件</view> |
165 | 170 | </u-form-item> |
166 | 171 | <view class="bg-gray"> |
167 | - <view class="flex justify-between"> | |
172 | + <view class="flex justify-between flex-direction" v-if="attachmentList.length"> | |
168 | 173 | <view class="padding" v-for="(item,index) in attachmentList" :key="index"> |
169 | 174 | {{item.fileName}} |
170 | 175 | </view> |
171 | - <view class=""> | |
176 | + <!-- <view class=""> | |
172 | 177 | 查看 |
173 | - </view> | |
178 | + </view> --> | |
174 | 179 | </view> |
175 | 180 | </view> |
176 | 181 | </view> |
... | ... | @@ -179,14 +184,17 @@ |
179 | 184 | </view> |
180 | 185 | </u-form> |
181 | 186 | <view class="fixedBtnCss" @click="handleConfirm"> |
182 | - <u-button shape="circle" color="#CF000D">立即发起</u-button> | |
187 | + <u-button shape="circle" color="#CF000D">{{btnText}}</u-button> | |
183 | 188 | </view> |
184 | 189 | |
185 | 190 | <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="pickerShow = false" |
186 | - @close="pickerShow = false" keyName="label" @confirm="confirm" @change="changeHandler"></u-picker> | |
191 | + @close="pickerShow = false" keyName="label" @confirm="confirm"></u-picker> | |
192 | + | |
193 | + <u-picker :show="gsShow" ref="gsPicker" closeOnClickOverlay :columns="gsColumns" @cancel="gsShow = false" | |
194 | + @close="gsShow = false" keyName="label" @confirm="gsConfirm" @change="changeHandler"></u-picker> | |
187 | 195 | |
188 | - <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" @confirm="dateConfirm" | |
189 | - mode="datetime"></u-datetime-picker> | |
196 | + <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm" | |
197 | + @cancel="datetimeShow = false" @close="datetimeShow = false" mode="datetime"></u-datetime-picker> | |
190 | 198 | </view> |
191 | 199 | </template> |
192 | 200 | |
... | ... | @@ -194,8 +202,14 @@ |
194 | 202 | import chargeFile from '@/api/chargeFile' |
195 | 203 | import config from '@/common/config.js' |
196 | 204 | import { |
205 | + getMcFileList, | |
197 | 206 | getCurrentFiscalYear, |
198 | - getCompanyCascader | |
207 | + getCompanyCascader, | |
208 | + getVlgOrCmty, | |
209 | + getMcVisitUser, | |
210 | + addMcVisit, | |
211 | + editMcVisit, | |
212 | + modification | |
199 | 213 | } from '@/api/charge.js' |
200 | 214 | export default { |
201 | 215 | components: {}, |
... | ... | @@ -205,16 +219,177 @@ |
205 | 219 | data() { |
206 | 220 | return { |
207 | 221 | title: "创建拜访/收费", |
222 | + btnText: '立即发起', | |
223 | + operationStatus: '', | |
208 | 224 | model: { |
209 | 225 | fiscalYear: "", |
226 | + billingPersonName: "", | |
210 | 227 | jobNature: "", |
228 | + entryTime: "", | |
229 | + company: "", | |
230 | + vlgOrCmty: "", | |
231 | + userName: "", | |
232 | + userPhone: "", | |
233 | + companyCode: "", | |
234 | + address: "", | |
235 | + userDetailedAddress: "", | |
236 | + isVisited: "", | |
237 | + isIntent: "", | |
238 | + houseCondition: "", | |
239 | + currentCookingEnergy: "", | |
240 | + currentHeatingEnergy: "", | |
241 | + familyMembers: "", | |
242 | + fridgeStatus: "", | |
243 | + acStatus: "", | |
244 | + tvStatus: "", | |
245 | + washerStatus: "", | |
246 | + waterHeaterStatus: "", | |
247 | + pvSystemStatus: "", | |
248 | + visitDetailedAddress: "", | |
249 | + fieldPhotoFile: "", | |
250 | + hasDm: "", | |
251 | + dmAge: "", | |
252 | + dmIncomeSrc: "", | |
253 | + dmPhone: "", | |
254 | + isCharged: "", | |
255 | + userCode: "", | |
256 | + userIdCard: "", | |
257 | + invoiceNo: "", | |
258 | + chargeAmt: "", | |
259 | + paymentMeth: "", | |
260 | + chargeType: "", | |
261 | + remark: "", | |
262 | + attachmentFile: "", | |
211 | 263 | }, |
212 | 264 | copyModel: {}, |
213 | - rules: {}, | |
265 | + rules: { | |
266 | + billingPersonName: [{ | |
267 | + required: true, | |
268 | + message: '请输入收费人员', | |
269 | + trigger: ['blur', 'change'] | |
270 | + }], | |
271 | + jobNature: [{ | |
272 | + required: true, | |
273 | + message: '请选择工作性质', | |
274 | + trigger: ['blur', 'change'] | |
275 | + }], | |
276 | + entryTime: [{ | |
277 | + required: true, | |
278 | + message: '请选择入户时间', | |
279 | + trigger: ['blur', 'change'] | |
280 | + }], | |
281 | + company: [{ | |
282 | + required: true, | |
283 | + message: '请选择项目公司', | |
284 | + trigger: ['blur', 'change'] | |
285 | + }], | |
286 | + vlgOrCmty: [{ | |
287 | + required: true, | |
288 | + message: '请选择村(小区)', | |
289 | + trigger: ['blur', 'change'] | |
290 | + }], | |
291 | + userName: [{ | |
292 | + required: true, | |
293 | + message: '请选择户名', | |
294 | + trigger: ['blur', 'change'] | |
295 | + }], | |
296 | + userPhone: [{ | |
297 | + required: true, | |
298 | + message: '请填写联系电话', | |
299 | + trigger: ['blur', 'change'] | |
300 | + }], | |
301 | + address: [{ | |
302 | + required: true, | |
303 | + message: '请输入省市区街道', | |
304 | + trigger: ['blur', 'change'] | |
305 | + }], | |
306 | + userDetailedAddress: [{ | |
307 | + required: true, | |
308 | + message: '请填写详细地址', | |
309 | + trigger: ['blur', 'change'] | |
310 | + }], | |
311 | + isVisited: [{ | |
312 | + required: true, | |
313 | + message: '请选择是否拜访', | |
314 | + trigger: ['blur', 'change'] | |
315 | + }], | |
316 | + isIntent: [{ | |
317 | + required: true, | |
318 | + message: '请选择是否有意向', | |
319 | + trigger: ['blur', 'change'] | |
320 | + }], | |
321 | + houseCondition: [{ | |
322 | + required: true, | |
323 | + message: '请选择房屋情况', | |
324 | + trigger: ['blur', 'change'] | |
325 | + }], | |
326 | + currentCookingEnergy: [{ | |
327 | + required: true, | |
328 | + message: '请选择做饭能源', | |
329 | + trigger: ['blur', 'change'] | |
330 | + }], | |
331 | + hasDm: [{ | |
332 | + required: true, | |
333 | + message: '请选择是否决策人信息', | |
334 | + trigger: ['blur', 'change'] | |
335 | + }], | |
336 | + dmAge: [{ | |
337 | + required: true, | |
338 | + message: '请输入决策人年龄', | |
339 | + trigger: ['blur', 'change'] | |
340 | + }], | |
341 | + dmIncomeSrc: [{ | |
342 | + required: true, | |
343 | + message: '选择收入来源', | |
344 | + trigger: ['blur', 'change'] | |
345 | + }], | |
346 | + dmPhone: [{ | |
347 | + required: true, | |
348 | + message: '请填写决策人联系电话', | |
349 | + trigger: ['blur', 'change'] | |
350 | + }], | |
351 | + isCharged: [{ | |
352 | + required: true, | |
353 | + message: '请选择是否收费', | |
354 | + trigger: ['blur', 'change'] | |
355 | + }], | |
356 | + userCode: [{ | |
357 | + required: true, | |
358 | + message: '请填写用户编号', | |
359 | + trigger: ['blur', 'change'] | |
360 | + }], | |
361 | + userIdCard: [{ | |
362 | + required: true, | |
363 | + message: '请填写身份证号', | |
364 | + trigger: ['blur', 'change'] | |
365 | + }], | |
366 | + invoiceNo: [{ | |
367 | + required: true, | |
368 | + message: '请填写票据单号', | |
369 | + trigger: ['blur', 'change'] | |
370 | + }], | |
371 | + chargeAmt: [{ | |
372 | + required: true, | |
373 | + message: '请填写收费金额', | |
374 | + trigger: ['blur', 'change'] | |
375 | + }], | |
376 | + paymentMeth: [{ | |
377 | + required: true, | |
378 | + message: '请选择缴费方式', | |
379 | + trigger: ['blur', 'change'] | |
380 | + }], | |
381 | + chargeType: [{ | |
382 | + required: true, | |
383 | + message: '请选择收费类型', | |
384 | + trigger: ['blur', 'change'] | |
385 | + }], | |
386 | + }, | |
214 | 387 | pickerShow: false, |
388 | + gsShow: false, | |
215 | 389 | datetimeShow: false, |
216 | 390 | dataTimeValue: Number(new Date()), |
217 | 391 | columns: [], |
392 | + gsColumns: [], | |
218 | 393 | regionName: [], |
219 | 394 | groupName: [], |
220 | 395 | companyName: [], |
... | ... | @@ -222,14 +397,14 @@ |
222 | 397 | currentName: "", //弹窗后赋值name |
223 | 398 | companyOption: [], |
224 | 399 | fileList: [], |
225 | - attachmentList:[], | |
400 | + attachmentList: [], | |
226 | 401 | // 基本信息 |
227 | 402 | basisData: [{ |
228 | 403 | label: '财年', |
229 | 404 | placeholder: "请选择财年", |
230 | 405 | type: "date", |
231 | 406 | required: true, |
232 | - key: "fiscalYear" | |
407 | + key: "fiscalYear", | |
233 | 408 | }, { |
234 | 409 | label: '收费人员', |
235 | 410 | placeholder: "请输入", |
... | ... | @@ -250,25 +425,11 @@ |
250 | 425 | required: true, |
251 | 426 | key: "entryTime" |
252 | 427 | }, { |
253 | - label: '区域', | |
254 | - placeholder: "请选择", | |
255 | - type: "select", | |
256 | - required: true, | |
257 | - key: "regionName" | |
258 | - }, | |
259 | - { | |
260 | - label: '集团', | |
261 | - placeholder: "请选择", | |
262 | - type: "select", | |
263 | - required: true, | |
264 | - key: "groupName" | |
265 | - }, | |
266 | - { | |
267 | - label: '公司', | |
428 | + label: '项目公司', | |
268 | 429 | placeholder: "请选择", |
269 | 430 | type: "select", |
270 | 431 | required: true, |
271 | - key: "companyName" | |
432 | + key: "company" | |
272 | 433 | }, { |
273 | 434 | label: '村(小区)', |
274 | 435 | placeholder: "请选择", |
... | ... | @@ -306,141 +467,164 @@ |
306 | 467 | type: "radio", |
307 | 468 | required: true, |
308 | 469 | key: "isVisited", |
470 | + show: true, | |
309 | 471 | }, { |
310 | 472 | label: '是否有意向', |
311 | 473 | // placeholder: "请选择", |
312 | 474 | required: true, |
313 | 475 | type: "radio", |
314 | - key: "isIntent" | |
476 | + key: "isIntent", | |
477 | + show: true, | |
315 | 478 | }, { |
316 | 479 | label: '房屋情况', |
317 | 480 | placeholder: "请选择", |
318 | 481 | required: true, |
319 | 482 | type: "select", |
320 | 483 | key: "houseCondition", |
321 | - dict: "sys_mc_visit_house" | |
484 | + dict: "sys_mc_visit_house", | |
485 | + show: true, | |
322 | 486 | }, { |
323 | 487 | label: '现用做饭能源', |
324 | 488 | placeholder: "请选择", |
325 | 489 | required: true, |
326 | 490 | type: "select", |
327 | 491 | key: "currentCookingEnergy", |
328 | - dict: "sys_mc_visit_energy" | |
492 | + dict: "sys_mc_visit_energy", | |
493 | + show: true, | |
329 | 494 | }, { |
330 | 495 | label: '现用取暖能源', |
331 | 496 | placeholder: "请选择", |
332 | 497 | type: "select", |
333 | 498 | key: "currentHeatingEnergy", |
334 | - dict: "sys_mc_visit_energy" | |
499 | + dict: "sys_mc_visit_energy", | |
500 | + show: true, | |
335 | 501 | }, { |
336 | 502 | label: '家庭人口情况', |
337 | 503 | placeholder: "请选择", |
338 | 504 | type: "select", |
339 | 505 | key: "familyMembers", |
340 | - dict: "sys_mc_visit_members" | |
506 | + dict: "sys_mc_visit_members", | |
507 | + show: true, | |
341 | 508 | }, { |
342 | 509 | label: '电冰箱', |
343 | 510 | placeholder: "请选择", |
344 | 511 | type: "select", |
345 | 512 | key: "fridgeStatus", |
346 | - dict: 'sys_mc_visit_appliance_status' | |
513 | + dict: 'sys_mc_visit_appliance_status', | |
514 | + show: true, | |
347 | 515 | }, { |
348 | 516 | label: '空调', |
349 | 517 | placeholder: "请选择", |
350 | 518 | type: "select", |
351 | 519 | key: "acStatus", |
352 | - dict: 'sys_mc_visit_appliance_status' | |
520 | + dict: 'sys_mc_visit_appliance_status', | |
521 | + show: true, | |
353 | 522 | }, { |
354 | 523 | label: '电视', |
355 | 524 | placeholder: "请选择", |
356 | 525 | type: "select", |
357 | 526 | key: "tvStatus", |
358 | - dict: 'sys_mc_visit_appliance_status' | |
527 | + dict: 'sys_mc_visit_appliance_status', | |
528 | + show: true, | |
359 | 529 | }, { |
360 | 530 | label: '洗衣机', |
361 | 531 | placeholder: "请选择", |
362 | 532 | type: "select", |
363 | 533 | key: "washerStatus", |
364 | - dict: 'sys_mc_visit_appliance_status' | |
534 | + dict: 'sys_mc_visit_appliance_status', | |
535 | + show: true, | |
365 | 536 | }, { |
366 | 537 | label: '热水器', |
367 | 538 | placeholder: "请选择", |
368 | 539 | type: "select", |
369 | 540 | key: "waterHeaterStatus", |
370 | - dict: 'sys_mc_visit_appliance_status' | |
541 | + dict: 'sys_mc_visit_appliance_status', | |
542 | + show: true, | |
371 | 543 | }, { |
372 | 544 | label: '光伏', |
373 | 545 | placeholder: "请选择", |
374 | 546 | type: "select", |
375 | 547 | key: "pvSystemStatus", |
376 | - dict: 'sys_mc_visit_appliance_status' | |
548 | + dict: 'sys_mc_visit_appliance_status', | |
549 | + show: true, | |
377 | 550 | }, { |
378 | 551 | label: '当前地址', |
379 | 552 | placeholder: "请输入", |
380 | 553 | type: "input", |
381 | - key: "visitDetailedAddress" | |
554 | + key: "visitDetailedAddress", | |
555 | + show: true, | |
382 | 556 | }, { |
383 | 557 | label: '上传图片', |
384 | 558 | placeholder: "请选择", |
385 | 559 | type: "file", |
386 | - key: 'fieldPhotoFile' | |
560 | + key: 'fieldPhotoFile', | |
561 | + show: true, | |
387 | 562 | }], |
388 | 563 | // 决策人信息 |
389 | 564 | decisionMakersData: [{ |
390 | 565 | label: '是否获取决策人信息', |
391 | 566 | type: "radio", |
392 | 567 | required: true, |
393 | - key: "hasDm" | |
568 | + key: "hasDm", | |
569 | + show: true, | |
394 | 570 | }, { |
395 | 571 | label: '决策人年龄', |
396 | 572 | placeholder: "请输入", |
397 | 573 | required: true, |
398 | 574 | type: "input", |
399 | - key: "dmAge" | |
575 | + key: "dmAge", | |
576 | + show: true, | |
400 | 577 | }, { |
401 | 578 | label: '决策人收入来源', |
402 | 579 | placeholder: "请选择", |
403 | 580 | required: true, |
404 | 581 | type: "select", |
405 | 582 | key: "dmIncomeSrc", |
406 | - dict: 'sys_mc_visit_dm_income' | |
583 | + dict: 'sys_mc_visit_dm_income', | |
584 | + show: true, | |
407 | 585 | }, { |
408 | 586 | label: '决策人联系方式', |
409 | 587 | placeholder: "请输入", |
410 | 588 | required: true, |
411 | 589 | type: "input", |
412 | - key: "dmPhone" | |
590 | + key: "dmPhone", | |
591 | + show: true, | |
413 | 592 | }], |
414 | 593 | // 收费信息 |
415 | 594 | chargeData: [{ |
416 | 595 | label: '本次是否收费', |
417 | 596 | type: "radio", |
418 | 597 | required: true, |
419 | - key: "isCharged" | |
598 | + key: "isCharged", | |
599 | + show: true, | |
420 | 600 | }, { |
421 | 601 | label: '用户编号', |
422 | 602 | placeholder: "请输入", |
423 | 603 | required: true, |
424 | 604 | type: "input", |
425 | - key: "userCode" | |
605 | + key: "userCode", | |
606 | + show: true, | |
426 | 607 | }, { |
427 | 608 | label: '身份证号', |
428 | 609 | placeholder: "请输入", |
429 | 610 | required: true, |
430 | 611 | type: "input", |
431 | - key: "userIdCard" | |
612 | + key: "userIdCard", | |
613 | + show: true, | |
432 | 614 | }, { |
433 | 615 | label: '票据单号', |
434 | 616 | placeholder: "请输入", |
435 | 617 | required: true, |
436 | 618 | type: "input", |
437 | - key: "invoiceNo" | |
619 | + key: "invoiceNo", | |
620 | + show: true, | |
438 | 621 | }, { |
439 | 622 | label: '收费金额', |
440 | 623 | placeholder: "请输入", |
441 | 624 | required: true, |
442 | 625 | type: "input", |
443 | - key: "chargeAmt" | |
626 | + key: "chargeAmt", | |
627 | + show: true, | |
444 | 628 | }, { |
445 | 629 | label: '缴费方式', |
446 | 630 | placeholder: "请选择", |
... | ... | @@ -448,13 +632,15 @@ |
448 | 632 | type: "select", |
449 | 633 | key: "paymentMeth", |
450 | 634 | dict: 'sys_mc_payment_meth', |
635 | + show: true, | |
451 | 636 | }, { |
452 | 637 | label: '收费类型', |
453 | 638 | placeholder: "请选择", |
454 | 639 | required: true, |
455 | 640 | type: "select", |
456 | 641 | key: "chargeType", |
457 | - dict: "sys_mc_charge_type" | |
642 | + dict: "sys_mc_charge_type", | |
643 | + show: true, | |
458 | 644 | }], |
459 | 645 | // 其他信息 |
460 | 646 | otherData: [{ |
... | ... | @@ -472,64 +658,261 @@ |
472 | 658 | computed: { |
473 | 659 | |
474 | 660 | }, |
475 | - onLoad() { | |
661 | + onLoad(data) { | |
662 | + console.log(data); | |
663 | + if (data.objData) { | |
664 | + let obj = JSON.parse(data.objData); | |
665 | + this.model = { | |
666 | + ...obj | |
667 | + }; | |
668 | + this.fillInData(); | |
669 | + } | |
670 | + if (data.operation) { | |
671 | + if (data.operation === 'yd') { | |
672 | + console.log('异动数据', JSON.parse(JSON.stringify(this.model))); | |
673 | + this.btnText = "发起异动"; | |
674 | + this.operationStatus = "YD" //异动 | |
675 | + } else if (data.operation === 'edit') { | |
676 | + this.btnText = "修改"; | |
677 | + console.log('修改数据', JSON.parse(JSON.stringify(this.model))); | |
678 | + this.operationStatus = "BJ" //编辑 | |
679 | + } else { | |
680 | + this.operationStatus = "TJ" //添加 | |
681 | + } | |
682 | + } | |
476 | 683 | this.init() |
477 | 684 | }, |
478 | 685 | methods: { |
686 | + // 编辑或异动需要填充数据 | |
687 | + async fillInData() { | |
688 | + this.model.company = `${this.model.userProvince}` | |
689 | + this.model.address = | |
690 | + `${this.model.userProvince}${this.model.userCity}${this.model.userDistrict}${this.model.userStreet}` | |
691 | + this.model.isCharged = this.model.isCharged === 'Y' ? '是' : '否'; | |
692 | + this.model.isIntent = this.model.isIntent === 'Y' ? '是' : '否'; | |
693 | + this.model.isVisited = this.model.isVisited === 'Y' ? '是' : '否'; | |
694 | + this.model.hasDm = this.model.hasDm === 'Y' ? '是' : '否'; | |
695 | + if (this.model.isCharged === '否') { | |
696 | + this.chargeData.slice(1).map(item => { | |
697 | + item.show = false; | |
698 | + }) | |
699 | + } | |
700 | + if (this.model.isVisited === '否') { | |
701 | + this.visitData.slice(1).map(item => { | |
702 | + item.show = false; | |
703 | + }) | |
704 | + } | |
705 | + if (this.model.hasDm === '否') { | |
706 | + this.decisionMakersData.slice(1).map(item => { | |
707 | + item.show = false; | |
708 | + }) | |
709 | + } | |
710 | + let uuid = this.model.attachmentFile; | |
711 | + console.log(uuid); | |
712 | + if (uuid) { | |
713 | + let uuids = uuid.split(","); | |
714 | + let data = { | |
715 | + uuids: uuids | |
716 | + } | |
717 | + getMcFileList(data).then(res => { | |
718 | + if (res.code === 200) { | |
719 | + this.attachmentList = res.data | |
720 | + } | |
721 | + }) | |
722 | + } | |
723 | + | |
724 | + }, | |
479 | 725 | async init() { |
480 | 726 | console.log(this.$store); |
481 | 727 | // 查询财年 |
482 | 728 | await this.getCurrentFiscalYear() |
483 | 729 | await this.getCompanyCascader() |
484 | - this.model.billingPersonName = uni.getStorageSync("nickName"); | |
730 | + let nickName = uni.getStorageSync("nickName"); | |
731 | + this.$set(this.model, 'billingPersonName', nickName) | |
732 | + // console.log(this.model.billingPersonName); | |
485 | 733 | }, |
486 | 734 | async getCurrentFiscalYear() { |
487 | - this.model.fiscalYear = (await getCurrentFiscalYear()).data; | |
735 | + let fiscalYear = (await getCurrentFiscalYear()).data; | |
736 | + this.$set(this.model, 'fiscalYear', fiscalYear); | |
488 | 737 | console.log("当前财年", this.model.fiscalYear); |
489 | 738 | }, |
490 | 739 | async getCompanyCascader() { |
491 | 740 | this.companyOption = (await getCompanyCascader()).data; |
741 | + this.companyOption.forEach(item1 => { | |
742 | + this.regionName.push(item1); | |
743 | + item1.children.forEach(item2 => { | |
744 | + this.groupName.push(item2); | |
745 | + item2.children.forEach(item3 => { | |
746 | + this.companyName.push(item3); | |
747 | + }); | |
748 | + }); | |
749 | + }); | |
492 | 750 | console.log("当前公司类", this.companyOption); |
493 | 751 | }, |
494 | 752 | // 选择弹出层 |
495 | - handleSelect(item) { | |
753 | + async handleSelect(item) { | |
754 | + if (this.operationStatus === 'YD') { | |
755 | + return | |
756 | + } | |
496 | 757 | console.log(item); |
497 | - if (item.key === 'companyCode') { | |
498 | - this.companyOption.forEach(item1 => { | |
499 | - // console.log(111,item1); | |
500 | - this.regionName.push(item1); | |
501 | - item1.children.forEach(item2 => { | |
502 | - // console.log(222,item2); | |
503 | - this.groupName.push(item2); | |
504 | - item2.children.forEach(item3 => { | |
505 | - // console.log(333,item3); | |
506 | - this.companyName.push(item3); | |
507 | - }); | |
508 | - }); | |
509 | - }); | |
510 | - // console.log("data1", data1); | |
511 | - // console.log("data2", data2); | |
512 | - // console.log("data3", data3); | |
513 | - this.columns = [this.regionName, this.groupName, this.companyName]; | |
758 | + this.currentName = item.key; | |
759 | + if (item.key === 'company') { | |
760 | + this.gsColumns = [this.regionName, this.groupName, this.companyName]; | |
761 | + this.gsShow = true; | |
762 | + return | |
514 | 763 | console.log("数据", this.columns); |
764 | + } else if (item.key === 'vlgOrCmty') { | |
765 | + if (!this.model.company) { | |
766 | + uni.$u.toast('请先选择项目公司'); | |
767 | + return | |
768 | + } | |
769 | + let data = { | |
770 | + fiscalYear: this.model.fiscalYear, | |
771 | + regionName: this.model.regionName, | |
772 | + groupName: this.model.groupName, | |
773 | + companyName: this.model.companyName, | |
774 | + companyCode: this.model.companyCode | |
775 | + } | |
776 | + const result = await getVlgOrCmty(data); | |
777 | + let col = result.data.map(item => ({ | |
778 | + value: item.vlgOrCmty, | |
779 | + label: item.vlgOrCmty | |
780 | + })); | |
781 | + this.columns = [col]; | |
782 | + } else if (item.key === 'userName') { | |
783 | + if (!this.model.vlgOrCmty) { | |
784 | + uni.$u.toast('请先选择村(小区)'); | |
785 | + return | |
786 | + } | |
787 | + let data = { | |
788 | + companyCode: this.model.companyCode, | |
789 | + vlgOrCmty: this.model.vlgOrCmty | |
790 | + } | |
791 | + const result = await getMcVisitUser(data); | |
792 | + let col = result.rows.map(item => ({ | |
793 | + value: item.userName, | |
794 | + label: item.userName, | |
795 | + obj: item | |
796 | + })); | |
797 | + this.columns = [col]; | |
515 | 798 | } else { |
516 | 799 | let dict = item.dict; |
517 | 800 | let dictArr = this.getDictDatas(dict); |
518 | - this.currentName = item.key; | |
519 | 801 | this.columns = [dictArr]; |
520 | 802 | } |
521 | 803 | this.pickerShow = true; |
522 | 804 | console.log(this.columns); |
523 | 805 | // console.log("字典数组", dictArr); |
524 | 806 | }, |
807 | + handleSFSelect(item) { | |
808 | + this.currentName = item.key; | |
809 | + let dict = item.dict; | |
810 | + let dictArr = this.getDictDatas(dict); | |
811 | + this.columns = [dictArr]; | |
812 | + this.pickerShow = true; | |
813 | + }, | |
814 | + changeHandler(e) { | |
815 | + console.log(this.currentName); | |
816 | + const { | |
817 | + columnIndex, | |
818 | + value, | |
819 | + values, // values为当前变化列的数组内容 | |
820 | + index, | |
821 | + // 微信小程序无法将picker实例传出来,只能通过ref操作 | |
822 | + picker = this.$refs.uPicker | |
823 | + } = e | |
824 | + console.log(e); | |
825 | + // 当第一列值发生变化时,变化第二列(后一列)对应的选项 | |
826 | + let data2 = value[0].children; | |
827 | + let data3 = data2[0].children; | |
828 | + // picker为选择器this实例,变化第二列对应的选项 | |
829 | + this.gsColumns = [this.regionName, data2, data3] | |
830 | + console.log("选择后", this.gsColumns); | |
831 | + }, | |
525 | 832 | // 选择弹出层确认 |
526 | 833 | confirm(e) { |
527 | 834 | console.log("确认", e); |
528 | - this.model[this.currentName] = e.value[0].value; | |
835 | + if (this.currentName === 'company') { | |
836 | + this.model[this.currentName] = `${e.value[2].label}`; | |
837 | + this.model.regionName = e.value[0]?.value; | |
838 | + this.model.groupName = e.value[1]?.value; | |
839 | + this.model.companyName = e.value[2]?.label; | |
840 | + this.model.companyCode = e.value[2]?.value; | |
841 | + } else if (this.currentName === 'userName') { | |
842 | + let data = e.value[0].obj | |
843 | + this.model[this.currentName] = e.value[0].value | |
844 | + this.model['userPhone'] = data.userPhone; | |
845 | + this.model['userProvince'] = data.province; | |
846 | + this.model['userCity'] = data.city; | |
847 | + this.model['userDistrict'] = data.district; | |
848 | + this.model['userStreet'] = data.street; | |
849 | + this.model['userDetailedAddress'] = data.detailedAddress; | |
850 | + this.model['address'] = `${data.province}${data.city}${data.district}${data.street}`; | |
851 | + } else { | |
852 | + this.model[this.currentName] = e.value[0].value | |
853 | + } | |
529 | 854 | this.pickerShow = false; |
530 | 855 | }, |
856 | + // 项目公司独立弹窗,防止共用报错 | |
857 | + gsConfirm(e) { | |
858 | + console.log("公司", e); | |
859 | + if (this.currentName === 'company') { | |
860 | + this.model[this.currentName] = `${e.value[2].label}`; | |
861 | + this.model.regionName = e.value[0]?.value; | |
862 | + this.model.groupName = e.value[1]?.value; | |
863 | + this.model.companyName = e.value[2]?.label; | |
864 | + this.model.companyCode = e.value[2]?.value; | |
865 | + } | |
866 | + this.gsShow = false; | |
867 | + }, | |
868 | + // 拜访单选 | |
869 | + bfChange(e) { | |
870 | + console.log(e); | |
871 | + if (e === '否') { | |
872 | + this.visitData.slice(1).map(item => { | |
873 | + item.show = false; | |
874 | + }) | |
875 | + } else { | |
876 | + this.visitData.map(item => { | |
877 | + item.show = true; | |
878 | + }) | |
879 | + } | |
880 | + }, | |
881 | + // 决策人单选 | |
882 | + jcrChange(e) { | |
883 | + if (e === '否') { | |
884 | + this.decisionMakersData.slice(1).map(item => { | |
885 | + item.show = false; | |
886 | + }) | |
887 | + } else { | |
888 | + this.decisionMakersData.map(item => { | |
889 | + item.show = true; | |
890 | + }) | |
891 | + } | |
892 | + }, | |
893 | + sfChange(e) { | |
894 | + if (e === '否') { | |
895 | + this.chargeData.slice(1).map(item => { | |
896 | + item.show = false; | |
897 | + }) | |
898 | + } else { | |
899 | + this.chargeData.map(item => { | |
900 | + item.show = true; | |
901 | + }) | |
902 | + } | |
903 | + }, | |
904 | + // 查询小区 | |
905 | + async getVlgOrCmty() { | |
906 | + console.log("查询小区数据", this.columns); | |
907 | + }, | |
531 | 908 | // 选择时间弹出层 |
532 | 909 | handleDateTime(item) { |
910 | + if (this.operationStatus === 'YD') { | |
911 | + return | |
912 | + } | |
913 | + if (item.key === 'fiscalYear') { | |
914 | + return | |
915 | + } | |
533 | 916 | this.currentName = item.key; |
534 | 917 | this.datetimeShow = true; |
535 | 918 | console.log(item); |
... | ... | @@ -541,22 +924,6 @@ |
541 | 924 | this.model[this.currentName] = time; |
542 | 925 | this.datetimeShow = false; |
543 | 926 | }, |
544 | - changeHandler(e) { | |
545 | - console.log(e); | |
546 | - const { | |
547 | - columnIndex, | |
548 | - value, | |
549 | - values, // values为当前变化列的数组内容 | |
550 | - index, | |
551 | - // 微信小程序无法将picker实例传出来,只能通过ref操作 | |
552 | - picker = this.$refs.uPicker | |
553 | - } = e | |
554 | - // 当第一列值发生变化时,变化第二列(后一列)对应的选项 | |
555 | - // if (columnIndex === 0) { | |
556 | - // // picker为选择器this实例,变化第二列对应的选项 | |
557 | - // picker.setColumnValues(1, this.groupName[index]) | |
558 | - // } | |
559 | - }, | |
560 | 927 | // 删除图片 |
561 | 928 | deletePic(event) { |
562 | 929 | this.fileList.splice(event.index, 1) |
... | ... | @@ -612,31 +979,108 @@ |
612 | 979 | console.log("上传附件"); |
613 | 980 | uni.chooseFile({ |
614 | 981 | count: 1, //默认100 |
615 | - extension:['.doc','.xlsx','.docx'], | |
616 | - success:async (res)=> { | |
982 | + extension: ['.doc', '.xlsx', '.docx'], | |
983 | + success: async (res) => { | |
617 | 984 | let tempUrl = res.tempFilePaths[0] |
618 | 985 | console.log(res); |
619 | 986 | const result = await chargeFile.uploadFile(tempUrl); |
620 | 987 | this.attachmentList.push(result); |
621 | 988 | console.log(result); |
622 | - } | |
989 | + } | |
623 | 990 | }); |
624 | 991 | }, |
625 | 992 | // 重构提交数据,不影响表单数据 |
626 | 993 | copyMethods() { |
627 | 994 | this.copyModel.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); |
995 | + this.copyModel.isCharged = this.copyModel.isCharged === '是' ? 'Y' : 'N'; | |
996 | + this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N'; | |
997 | + this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N'; | |
998 | + this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N'; | |
999 | + this.copyModel.attachmentFile = this.attachmentList.map(item => item.uuid).join(","); | |
628 | 1000 | }, |
629 | - // 发起拜访 | |
1001 | + // 发起拜访或异动或者修改 | |
630 | 1002 | handleConfirm() { |
631 | - this.copyModel = this.model; | |
1003 | + this.copyModel = { | |
1004 | + ...this.model | |
1005 | + }; | |
632 | 1006 | this.copyMethods(); |
633 | 1007 | console.log('提交数据', JSON.parse(JSON.stringify(this.copyModel))); |
634 | - this.$modal.confirm('确认发起当前这条记录?', '温馨提示').then(() => { | |
635 | - console.log('确定'); | |
636 | - }).catch(() => { | |
637 | - console.log("取消"); | |
638 | - }); | |
639 | - } | |
1008 | + // 提交 | |
1009 | + if (this.operationStatus === 'TJ') { | |
1010 | + this.$refs.uForm.validate().then(res => { | |
1011 | + this.$modal.confirm('确认发起当前这条记录?', '温馨提示').then(async () => { | |
1012 | + const result = await addMcVisit(this.copyModel); | |
1013 | + console.log(result); | |
1014 | + if (result.code === 200) { | |
1015 | + uni.$u.toast('发起成功'); | |
1016 | + setTimeout(() => { | |
1017 | + this.$goBack(); | |
1018 | + }, 1000) | |
1019 | + } | |
1020 | + }).catch(() => {}); | |
1021 | + // uni.$u.toast('校验通过') | |
1022 | + }).catch(errors => { | |
1023 | + console.log('校验失败', errors); | |
1024 | + // uni.$u.toast('校验失败') | |
1025 | + }) | |
1026 | + } else if (this.operationStatus === 'YD') { | |
1027 | + this.handleYDConfirm(); | |
1028 | + } else if (this.operationStatus === 'BJ') { | |
1029 | + this.handleEditConfirm(); | |
1030 | + } | |
1031 | + }, | |
1032 | + // 编辑提交 | |
1033 | + handleEditConfirm() { | |
1034 | + this.$refs.uForm.validate().then(res => { | |
1035 | + this.$modal.confirm('确认修改这条记录?', '温馨提示').then(async () => { | |
1036 | + const result = await editMcVisit(this.copyModel); | |
1037 | + console.log(result); | |
1038 | + if (result.code === 200) { | |
1039 | + uni.$u.toast('修改成功'); | |
1040 | + setTimeout(() => { | |
1041 | + this.$goBack(); | |
1042 | + }, 1000) | |
1043 | + } | |
1044 | + }).catch(() => {}); | |
1045 | + // uni.$u.toast('校验通过') | |
1046 | + }).catch(errors => { | |
1047 | + console.log('校验失败', errors); | |
1048 | + // uni.$u.toast('校验失败') | |
1049 | + }) | |
1050 | + }, | |
1051 | + // 提交异动 | |
1052 | + async handleYDConfirm() { | |
1053 | + let that = this; | |
1054 | + that.$refs.uForm.validate().then(res => { | |
1055 | + that.$modal.confirm('确认发起异动?', '温馨提示').then(async () => { | |
1056 | + let data = { | |
1057 | + id: 60, | |
1058 | + userIdCard: that.copyModel.userIdCard, | |
1059 | + invoiceNo: that.copyModel.invoiceNo, | |
1060 | + chargeAmt: that.copyModel.chargeAmt, | |
1061 | + paymentMeth: that.copyModel.paymentMeth, | |
1062 | + chargeType: that.copyModel.chargeType, | |
1063 | + remark: that.copyModel.remark, | |
1064 | + attachmentFile: that.copyModel.attachmentFile | |
1065 | + } | |
1066 | + console.log("异动数据", data); | |
1067 | + const result = await modification(data); | |
1068 | + console.log(result); | |
1069 | + if (result.code === 200) { | |
1070 | + uni.$u.toast('异动成功'); | |
1071 | + setTimeout(() => { | |
1072 | + that.$goBack(); | |
1073 | + }, 1000) | |
1074 | + } else { | |
1075 | + uni.$u.toast(result.msg); | |
1076 | + } | |
1077 | + }).catch(() => {}); | |
1078 | + // uni.$u.toast('校验通过') | |
1079 | + }).catch(errors => { | |
1080 | + console.log('校验失败', errors); | |
1081 | + // uni.$u.toast('校验失败') | |
1082 | + }) | |
1083 | + }, | |
640 | 1084 | } |
641 | 1085 | } |
642 | 1086 | </script> | ... | ... |
pages/charge/visitsAndFees/index.vue
... | ... | @@ -68,7 +68,7 @@ |
68 | 68 | <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover"> |
69 | 69 | <view slot="content" class="popoverCss"> |
70 | 70 | <view class="" v-if="item.statusCode === 'APPROVED' && item.publishStatus === 'APPROVED'"> |
71 | - <view class="margin-tb-xs">数据异动</view> | |
71 | + <view class="margin-tb-xs" @click="dataChange(item)">数据异动</view> | |
72 | 72 | <u-line></u-line> |
73 | 73 | </view> |
74 | 74 | <view class=""> |
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | <u-line></u-line> |
81 | 81 | </view> |
82 | 82 | <view class="" v-if="item.statusCode === 'APPROVED' && item.publishStatus === 'APPROVED'"> |
83 | - <view class="margin-tb-xs text-center">作废</view> | |
83 | + <view class="margin-tb-xs text-center" @click="giveUpVoid(item)">作废</view> | |
84 | 84 | <u-line></u-line> |
85 | 85 | </view> |
86 | 86 | </view> |
... | ... | @@ -93,10 +93,10 @@ |
93 | 93 | <view class="margin-left-sm" @click="handleDetail(item)"> |
94 | 94 | <u-button shape="circle">查看详情</u-button> |
95 | 95 | </view> |
96 | - <view class="margin-left-sm" @click="handleRefuse" v-if="item.statusCode === 'APPROVE'"> | |
96 | + <view class="margin-left-sm" @click="handleRefuse(item)" v-if="item.statusCode === 'APPROVE'"> | |
97 | 97 | <u-button shape="circle">拒绝</u-button> |
98 | 98 | </view> |
99 | - <view class="margin-left-sm" @click="handleAgree" v-if="item.statusCode === 'APPROVE'"> | |
99 | + <view class="margin-left-sm" @click="handleAgree(item)" v-if="item.statusCode === 'APPROVE'"> | |
100 | 100 | <u-button shape="circle" color="#CF000D">同意</u-button> |
101 | 101 | </view> |
102 | 102 | </view> |
... | ... | @@ -110,14 +110,40 @@ |
110 | 110 | <view class="fixBtnCss" @click="createaVisit"> |
111 | 111 | <u-icon name="plus" color="#fff" size="30"></u-icon> |
112 | 112 | </view> |
113 | - <popUpComponent :title="titles" ref="popUpComponentRef"></popUpComponent> | |
113 | + <popUpComponent :title="titles" :modificationStatus="modificationStatus" :publishID="publishID" :publishStatus="publishStatus" ref="popUpComponentRef" | |
114 | + @getList="initData"> | |
115 | + </popUpComponent> | |
116 | + <u-popup ref="bhPopup"></u-popup> | |
117 | + <u-popup ref="bhPopup" :show="zfShow"> | |
118 | + <view class="popCss"> | |
119 | + <view class="padding-top text-lg text-center"> | |
120 | + 作废 | |
121 | + </view> | |
122 | + <view class="padding"> | |
123 | + <u-textarea v-model="zfRemarks" placeholder="请简单描述原因"></u-textarea> | |
124 | + </view> | |
125 | + <view class="flex justify-between"> | |
126 | + <view class="w50" @click="zfShow = false"> | |
127 | + <u-button>取消</u-button> | |
128 | + </view> | |
129 | + <view class="w50" @click="zfConfirm"> | |
130 | + <u-button :customStyle="{color:'#CF000D'}">确定</u-button> | |
131 | + </view> | |
132 | + </view> | |
133 | + </view> | |
134 | + </u-popup> | |
114 | 135 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> |
115 | 136 | </view> |
116 | 137 | </template> |
117 | 138 | |
118 | 139 | <script> |
119 | 140 | import { |
120 | - getMcVisitList | |
141 | + getMcVisitList, | |
142 | + submitAuditOne, | |
143 | + submitAuditTwo, | |
144 | + submitModificationOne, | |
145 | + submitModificationTwo, | |
146 | + cancelMcVisit | |
121 | 147 | } from '@/api/charge.js' |
122 | 148 | import popUpComponent from '@/components/popUpComponent/popUpComponent.vue' |
123 | 149 | export default { |
... | ... | @@ -154,7 +180,13 @@ |
154 | 180 | approval: [{ |
155 | 181 | name: "待我审批" |
156 | 182 | }], |
157 | - titles: '同意' | |
183 | + titles: '同意', | |
184 | + publishStatus: "", | |
185 | + modificationStatus:"", | |
186 | + publishID: 0, | |
187 | + zfShow: false, | |
188 | + zfRemarks: "", | |
189 | + ZfId: "", | |
158 | 190 | } |
159 | 191 | }, |
160 | 192 | computed: { |
... | ... | @@ -182,6 +214,9 @@ |
182 | 214 | }, 500); |
183 | 215 | }, |
184 | 216 | onLoad() { |
217 | + // this.initData(); | |
218 | + }, | |
219 | + onShow(){ | |
185 | 220 | this.initData(); |
186 | 221 | }, |
187 | 222 | methods: { |
... | ... | @@ -249,52 +284,92 @@ |
249 | 284 | }, |
250 | 285 | checkboxChange(e) { |
251 | 286 | console.log(e); |
252 | - if(e.length){ | |
287 | + if (e.length) { | |
253 | 288 | this.params.isMyAuditing = "Y"; |
254 | - }else{ | |
289 | + } else { | |
255 | 290 | this.params.isMyAuditing = "其他"; |
256 | 291 | } |
257 | 292 | this.initData(); |
258 | 293 | }, |
259 | - // 修改 | |
260 | - handleEdit(item){ | |
261 | - | |
262 | - }, | |
263 | 294 | handleDetail(item) { |
264 | 295 | uni.navigateTo({ |
265 | - url: '/pages/charge/visitsAndFees/detail?objData='+JSON.stringify(item) | |
296 | + url: '/pages/charge/visitsAndFees/detail?objData=' + JSON.stringify(item) | |
266 | 297 | }) |
267 | 298 | }, |
268 | 299 | // 拒绝按钮 |
269 | - handleRefuse() { | |
300 | + handleRefuse(item) { | |
270 | 301 | this.titles = "拒绝"; |
302 | + this.publishStatus = item.publishStatus; | |
303 | + this.modificationStatus = item.modificationStatus; | |
304 | + this.publishID = item.id; | |
271 | 305 | this.$refs.popUpComponentRef.open(); |
272 | 306 | }, |
273 | 307 | // 同意按钮 |
274 | - handleAgree() { | |
308 | + handleAgree(item) { | |
309 | + console.log(item); | |
310 | + this.publishStatus = item.publishStatus; | |
311 | + this.publishID = item.id; | |
312 | + this.modificationStatus = item.modificationStatus; | |
275 | 313 | this.titles = "同意"; |
276 | 314 | this.$refs.popUpComponentRef.open(); |
277 | 315 | }, |
316 | + // 修改 | |
317 | + handleEdit(item) { | |
318 | + let obj = JSON.stringify(item) | |
319 | + uni.navigateTo({ | |
320 | + url: `/pages/charge/visitsAndFees/createaVisit?objData=${obj}&operation=edit` | |
321 | + }) | |
322 | + }, | |
278 | 323 | //创建拜访/收费 |
279 | 324 | createaVisit() { |
280 | 325 | uni.navigateTo({ |
281 | - url: '/pages/charge/visitsAndFees/createaVisit' | |
326 | + url: '/pages/charge/visitsAndFees/createaVisit?operation=add' | |
327 | + }) | |
328 | + }, | |
329 | + // 数据异动 | |
330 | + dataChange(item) { | |
331 | + let obj = JSON.stringify(item) | |
332 | + uni.navigateTo({ | |
333 | + url: `/pages/charge/visitsAndFees/createaVisit?objData=${obj}&operation=yd` | |
282 | 334 | }) |
283 | 335 | }, |
284 | 336 | // 处理流程 |
285 | - processFlow(item){ | |
337 | + processFlow(item) { | |
286 | 338 | let id = item.id; |
287 | 339 | uni.navigateTo({ |
288 | 340 | url: `/pages/charge/visitsAndFees/processFlow?id=${id}&type=cllc` |
289 | 341 | }) |
290 | 342 | }, |
291 | 343 | // 异动流程 |
292 | - changeFlow(item){ | |
344 | + changeFlow(item) { | |
293 | 345 | let id = item.id; |
294 | 346 | uni.navigateTo({ |
295 | 347 | url: `/pages/charge/visitsAndFees/processFlow?id=${id}&type=ydlc` |
296 | 348 | }) |
297 | 349 | }, |
350 | + // 作废 | |
351 | + giveUpVoid(item) { | |
352 | + console.log("作废", item); | |
353 | + this.ZfId = item.id; | |
354 | + this.zfShow = true; | |
355 | + }, | |
356 | + // 作废确定 | |
357 | + async zfConfirm(e) { | |
358 | + console.log(e); | |
359 | + let data = { | |
360 | + id: this.ZfId, | |
361 | + remarks: this.zfRemarks | |
362 | + } | |
363 | + console.log("作废数据", data); | |
364 | + const result = await cancelMcVisit(data); | |
365 | + if (result.code === 200) { | |
366 | + uni.$u.toast('作废成功') | |
367 | + } else { | |
368 | + uni.$u.toast(result.msg) | |
369 | + } | |
370 | + this.initData(); | |
371 | + this.zfShow = false | |
372 | + }, | |
298 | 373 | loginOut() { |
299 | 374 | this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => { |
300 | 375 | //钉钉直接退出微应用 | ... | ... |