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 | <script> | 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 | </script> | 30 | </script> |
29 | 31 | ||
30 | <style lang="scss"> | 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 | </style> | 40 | </style> |
api/charge.js
@@ -21,15 +21,24 @@ export const getVlgOrCmty = params => http.get('/schsf/mcBasicCmty/vlgOrCmty', { | @@ -21,15 +21,24 @@ export const getVlgOrCmty = params => http.get('/schsf/mcBasicCmty/vlgOrCmty', { | ||
21 | /* 查询用户 */ | 21 | /* 查询用户 */ |
22 | export const getMcVisitUser = params => http.get('/schsf/mcVisitUser/list', { params }) | 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 | export const getStatusNodeUserList = id => http.get(`/schsf/mcVisit/statusNodeUserList/${id}`) | 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,17 +22,34 @@ | ||
22 | </template> | 22 | </template> |
23 | 23 | ||
24 | <script> | 24 | <script> |
25 | + import { | ||
26 | + submitAuditOne, | ||
27 | + submitAuditTwo, | ||
28 | + submitModificationOne, | ||
29 | + submitModificationTwo | ||
30 | + } from '@/api/charge.js' | ||
25 | export default { | 31 | export default { |
26 | name: "popUpComponent", | 32 | name: "popUpComponent", |
27 | props: { | 33 | props: { |
28 | title: { | 34 | title: { |
29 | type: String, | 35 | type: String, |
30 | default: "同意" | 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 | data() { | 50 | data() { |
34 | return { | 51 | return { |
35 | - textarea:"", | 52 | + textarea: "", |
36 | show: false, | 53 | show: false, |
37 | }; | 54 | }; |
38 | }, | 55 | }, |
@@ -43,8 +60,74 @@ | @@ -43,8 +60,74 @@ | ||
43 | close() { | 60 | close() { |
44 | this.show = false; | 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 | this.show = false; | 131 | this.show = false; |
49 | this.textarea = ""; | 132 | this.textarea = ""; |
50 | } | 133 | } |
components/popUpFillIn/popUpFillIn.vue
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | <!-- 点火维护 --> | 11 | <!-- 点火维护 --> |
12 | <u-form-item v-if="type==='dhwh'" required label="是否已点火" labelWidth="100"> | 12 | <u-form-item v-if="type==='dhwh'" required label="是否已点火" labelWidth="100"> |
13 | <view class="flex justify-between margin-tb w100"> | 13 | <view class="flex justify-between margin-tb w100"> |
14 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueDHWH"> | 14 | + <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueDHWH" @change="DHchange"> |
15 | <u-radio class="margin-right" name="是">是</u-radio> | 15 | <u-radio class="margin-right" name="是">是</u-radio> |
16 | <u-radio name="否">否</u-radio> | 16 | <u-radio name="否">否</u-radio> |
17 | </u-radio-group> | 17 | </u-radio-group> |
@@ -20,33 +20,35 @@ | @@ -20,33 +20,35 @@ | ||
20 | <!-- 工程维护 --> | 20 | <!-- 工程维护 --> |
21 | <u-form-item v-if="type==='gcwh'" required label="是否竣工" labelWidth="100"> | 21 | <u-form-item v-if="type==='gcwh'" required label="是否竣工" labelWidth="100"> |
22 | <view class="flex justify-between margin-tb w100"> | 22 | <view class="flex justify-between margin-tb w100"> |
23 | - <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueGCWH"> | 23 | + <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueGCWH" @change="GCchange"> |
24 | <u-radio class="margin-right" name="是">是</u-radio> | 24 | <u-radio class="margin-right" name="是">是</u-radio> |
25 | <u-radio name="否">否</u-radio> | 25 | <u-radio name="否">否</u-radio> |
26 | </u-radio-group> | 26 | </u-radio-group> |
27 | </view> | 27 | </view> |
28 | </u-form-item> | 28 | </u-form-item> |
29 | <view class="usuallyCard padding margin-bottom-sm"> | 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 | </view> | 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 | </u-form-item> | 38 | </u-form-item> |
38 | <u-form-item v-if="type==='dhwh'" required label="未点火原因" labelWidth="100" borderBottom> | 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 | </u-form-item> | 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 | <u-input v-model="model.time" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | 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 | </u-form-item> | 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 | <u-input v-model="model.time" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | 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 | </u-form-item> | 52 | </u-form-item> |
51 | <u-form-item v-if="type==='gcwh'" required label="未竣工原因" labelWidth="100" borderBottom> | 53 | <u-form-item v-if="type==='gcwh'" required label="未竣工原因" labelWidth="100" borderBottom> |
52 | <u-input v-model="model.reason" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> | 54 | <u-input v-model="model.reason" placeholder="请选择" disabled disabledColor="#fff" border="none"></u-input> |
@@ -65,11 +67,18 @@ | @@ -65,11 +67,18 @@ | ||
65 | </view> | 67 | </view> |
66 | </u-form> | 68 | </u-form> |
67 | </u-popup> | 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 | </view> | 75 | </view> |
70 | </template> | 76 | </template> |
71 | 77 | ||
72 | <script> | 78 | <script> |
79 | + import { | ||
80 | + mcIgnitionMaintenance | ||
81 | + } from "@/api/charge.js" | ||
73 | export default { | 82 | export default { |
74 | name: "popUpComponent", | 83 | name: "popUpComponent", |
75 | props: { | 84 | props: { |
@@ -81,17 +90,27 @@ | @@ -81,17 +90,27 @@ | ||
81 | type: String, | 90 | type: String, |
82 | default: "" | 91 | default: "" |
83 | }, | 92 | }, |
93 | + IgnitionID: { | ||
94 | + type: Number | ||
95 | + }, | ||
84 | }, | 96 | }, |
85 | data() { | 97 | data() { |
86 | return { | 98 | return { |
87 | show: false, | 99 | show: false, |
88 | calendarShow: false, | 100 | calendarShow: false, |
101 | + datetimeShow: false, | ||
102 | + dataTimeValue: Number(new Date()), | ||
89 | radiovalueDHWH: "", | 103 | radiovalueDHWH: "", |
90 | - radiovalueGCWH:"", | 104 | + radiovalueGCWH: "", |
91 | model: { | 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 | methods: { | 116 | methods: { |
@@ -101,16 +120,99 @@ | @@ -101,16 +120,99 @@ | ||
101 | close() { | 120 | close() { |
102 | this.show = false; | 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 | this.show = false; | 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 | confirmCalender(e) { | 206 | confirmCalender(e) { |
110 | console.log(e); | 207 | console.log(e); |
111 | - this.model.time = e[0]; | 208 | + this.model.ignTime = e[0]; |
112 | this.calendarShow = false; | 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 | closeCalender() { | 216 | closeCalender() { |
115 | this.calendarShow = false; | 217 | this.calendarShow = false; |
116 | }, | 218 | }, |
pages.json
@@ -94,6 +94,14 @@ | @@ -94,6 +94,14 @@ | ||
94 | "path": "pages/charge/ignitionMaintenance/index", | 94 | "path": "pages/charge/ignitionMaintenance/index", |
95 | "style": { | 95 | "style": { |
96 | "navigationBarTitleText": "点火维护", | 96 | "navigationBarTitleText": "点火维护", |
97 | + "navigationStyle": "custom", | ||
98 | + "enablePullDownRefresh": true | ||
99 | + } | ||
100 | + }, | ||
101 | + { | ||
102 | + "path": "pages/charge/ignitionMaintenance/detail", | ||
103 | + "style": { | ||
104 | + "navigationBarTitleText": "点火维护详情", | ||
97 | "navigationStyle": "custom" | 105 | "navigationStyle": "custom" |
98 | } | 106 | } |
99 | }, | 107 | }, |
@@ -101,6 +109,14 @@ | @@ -101,6 +109,14 @@ | ||
101 | "path": "pages/charge/constructionMaintenance/index", | 109 | "path": "pages/charge/constructionMaintenance/index", |
102 | "style": { | 110 | "style": { |
103 | "navigationBarTitleText": "施工维护", | 111 | "navigationBarTitleText": "施工维护", |
112 | + "navigationStyle": "custom", | ||
113 | + "enablePullDownRefresh": true | ||
114 | + } | ||
115 | + }, | ||
116 | + { | ||
117 | + "path": "pages/charge/constructionMaintenance/detail", | ||
118 | + "style": { | ||
119 | + "navigationBarTitleText": "施工维护详情", | ||
104 | "navigationStyle": "custom" | 120 | "navigationStyle": "custom" |
105 | } | 121 | } |
106 | } | 122 | } |
@@ -0,0 +1,181 @@ | @@ -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,28 +16,28 @@ | ||
16 | </uv-drop-down> | 16 | </uv-drop-down> |
17 | </view> | 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 | <view class="flex flex-direction"> | 20 | <view class="flex flex-direction"> |
21 | <view class="flex justify-between"> | 21 | <view class="flex justify-between"> |
22 | <view class=""> | 22 | <view class=""> |
23 | - <text class="text-grey margin-right-xs">项目公司:</text>咸宁中燃城镇燃气有限公司 | 23 | + <text class="text-grey margin-right-xs">项目公司:</text>{{item.companyName || '--'}} |
24 | </view> | 24 | </view> |
25 | <view class="flex"> | 25 | <view class="flex"> |
26 | <u-tag bgColor="#EFF1FD" borderColor="#fff" color="#5875EE" size="mini" text="待审批"></u-tag> | 26 | <u-tag bgColor="#EFF1FD" borderColor="#fff" color="#5875EE" size="mini" text="待审批"></u-tag> |
27 | </view> | 27 | </view> |
28 | </view> | 28 | </view> |
29 | <view class="margin-top-sm"> | 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 | </view> | 31 | </view> |
32 | <view class="margin-top-sm"> | 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 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
36 | <view class="flex justify-end margin-top"> | 36 | <view class="flex justify-end margin-top"> |
37 | - <view class="margin-right" @click="handleDetail"> | 37 | + <view class="margin-right" @click="handleDetail(item)"> |
38 | <u-button shape="circle">查看详情</u-button> | 38 | <u-button shape="circle">查看详情</u-button> |
39 | </view> | 39 | </view> |
40 | - <view class="" @click="handleOpen"> | 40 | + <view class="" @click="handleOpen(item)"> |
41 | <u-button shape="circle" color="#CF000D">工程维护</u-button> | 41 | <u-button shape="circle" color="#CF000D">工程维护</u-button> |
42 | </view> | 42 | </view> |
43 | </view> | 43 | </view> |
@@ -45,12 +45,17 @@ | @@ -45,12 +45,17 @@ | ||
45 | 当前审批节点:项目公司_市场负责人 | 45 | 当前审批节点:项目公司_市场负责人 |
46 | </view> --> | 46 | </view> --> |
47 | </view> | 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 | <popUpFillIn :type="btnType" title="工程维护" ref="popUpFillInRef"></popUpFillIn> | 50 | <popUpFillIn :type="btnType" title="工程维护" ref="popUpFillInRef"></popUpFillIn> |
49 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> | 51 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> |
50 | </view> | 52 | </view> |
51 | </template> | 53 | </template> |
52 | 54 | ||
53 | <script> | 55 | <script> |
56 | + import { | ||
57 | + getMcConstructionList | ||
58 | + } from '@/api/charge.js' | ||
54 | export default { | 59 | export default { |
55 | components: {}, | 60 | components: {}, |
56 | props: { | 61 | props: { |
@@ -69,30 +74,68 @@ | @@ -69,30 +74,68 @@ | ||
69 | 'line-height': '25px', | 74 | 'line-height': '25px', |
70 | }, | 75 | }, |
71 | btnType:"gcwh", | 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 | computed: { | 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 | onLoad() { | 113 | onLoad() { |
82 | - | 114 | + this.initData() |
83 | }, | 115 | }, |
84 | methods: { | 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 | handleOpen(){ | 139 | handleOpen(){ |
97 | this.$refs.popUpFillInRef.open(); | 140 | this.$refs.popUpFillInRef.open(); |
98 | } | 141 | } |
@@ -0,0 +1,169 @@ | @@ -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 | <template> | 1 | <template> |
2 | - <view class="app-container"> | ||
3 | - <u-navbar :title="title" safeAreaInsetTop placeholder> | ||
4 | - <view slot="left" class="text-red"></view> | ||
5 | - </u-navbar> | ||
6 | - <view class=""> | ||
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 | <view class="margin-top-sm"> | 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 | </view> | 35 | </view> |
30 | - <view class="margin-top-sm"> | ||
31 | - <text class="text-grey margin-right-xs">户名:</text>张三 | ||
32 | - </view> | ||
33 | <view class="margin-top-sm"> | 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 | </view> | 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 | </view> --> | 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 | </template> | 59 | </template> |
56 | 60 | ||
57 | <script> | 61 | <script> |
62 | + import { | ||
63 | + getMcIgnitionList, | ||
64 | + mcIgnitionMaintenance | ||
65 | + } from '@/api/charge.js' | ||
58 | import popUpFillIn from '@/components/popUpFillIn/popUpFillIn.vue' | 66 | import popUpFillIn from '@/components/popUpFillIn/popUpFillIn.vue' |
59 | - export default { | ||
60 | - components: { | 67 | + export default { |
68 | + components: { | ||
61 | popUpFillIn | 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 | this.$refs.popUpFillInRef.open(); | 151 | this.$refs.popUpFillInRef.open(); |
104 | } | 152 | } |
105 | - } | ||
106 | - } | 153 | + } |
154 | + } | ||
107 | </script> | 155 | </script> |
108 | 156 | ||
109 | <style lang="scss" scoped> | 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 | </style> | 195 | </style> |
pages/charge/visitsAndFees/createaVisit.vue
1 | <template> | 1 | <template> |
2 | <view class="container"> | 2 | <view class="container"> |
3 | <Navbar :title="title" canBack></Navbar> | 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 | <view class="usuallyCard padding margin-sm"> | 5 | <view class="usuallyCard padding margin-sm"> |
6 | <view class="text-lg padding-tb"> | 6 | <view class="text-lg padding-tb"> |
7 | 基本信息 | 7 | 基本信息 |
@@ -10,23 +10,26 @@ | @@ -10,23 +10,26 @@ | ||
10 | <!-- 日期选择 --> | 10 | <!-- 日期选择 --> |
11 | <view class="" v-for="(item,index) in basisData" :key="index"> | 11 | <view class="" v-for="(item,index) in basisData" :key="index"> |
12 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 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 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | 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 | <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> | 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 | </u-form-item> | 18 | </u-form-item> |
18 | <!-- 输入类型 --> | 19 | <!-- 输入类型 --> |
19 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 20 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
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 | border="none"></u-input> | 24 | border="none"></u-input> |
23 | <view class="" style="width: 40rpx;height: 40rpx;"></view> | 25 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
24 | </u-form-item> | 26 | </u-form-item> |
25 | <!-- 选择类型 --> | 27 | <!-- 选择类型 --> |
26 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 28 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
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 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> | 33 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> |
31 | </u-form-item> | 34 | </u-form-item> |
32 | </view> | 35 | </view> |
@@ -41,38 +44,39 @@ | @@ -41,38 +44,39 @@ | ||
41 | <view class="" v-for="(item,index) in visitData" :key="index"> | 44 | <view class="" v-for="(item,index) in visitData" :key="index"> |
42 | <!-- 单选 --> | 45 | <!-- 单选 --> |
43 | <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom | 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 | <u-radio class="margin-right" name="是">是</u-radio> | 50 | <u-radio class="margin-right" name="是">是</u-radio> |
47 | <u-radio name="否">否</u-radio> | 51 | <u-radio name="否">否</u-radio> |
48 | </u-radio-group> | 52 | </u-radio-group> |
49 | </u-form-item> | 53 | </u-form-item> |
50 | <!-- 日期 --> | 54 | <!-- 日期 --> |
51 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 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 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | 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 | <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon> | 59 | <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon> |
56 | </u-form-item> | 60 | </u-form-item> |
57 | <!-- 输入 --> | 61 | <!-- 输入 --> |
58 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 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 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | 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 | <view class="" style="width: 40rpx;height: 40rpx;"></view> | 66 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
63 | </u-form-item> | 67 | </u-form-item> |
64 | <!-- 选择 --> | 68 | <!-- 选择 --> |
65 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 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 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> | 73 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> |
70 | </u-form-item> | 74 | </u-form-item> |
71 | <!-- 文件 --> | 75 | <!-- 文件 --> |
72 | <u-form-item :required="item.required" :label="item.label" labelWidth="75%" borderBottom | 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 | <u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="10" | 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 | </u-form-item> | 80 | </u-form-item> |
77 | </view> | 81 | </view> |
78 | </view> | 82 | </view> |
@@ -86,24 +90,25 @@ | @@ -86,24 +90,25 @@ | ||
86 | <view class="" v-for="(item,index) in decisionMakersData" :key="index"> | 90 | <view class="" v-for="(item,index) in decisionMakersData" :key="index"> |
87 | <!-- 单选 --> | 91 | <!-- 单选 --> |
88 | <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom | 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 | <u-radio class="margin-right" name="是">是</u-radio> | 96 | <u-radio class="margin-right" name="是">是</u-radio> |
92 | <u-radio name="否">否</u-radio> | 97 | <u-radio name="否">否</u-radio> |
93 | </u-radio-group> | 98 | </u-radio-group> |
94 | </u-form-item> | 99 | </u-form-item> |
95 | <!-- 输入 --> | 100 | <!-- 输入 --> |
96 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom | 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 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | 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 | <view class="" style="width: 40rpx;height: 40rpx;"></view> | 105 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
101 | </u-form-item> | 106 | </u-form-item> |
102 | <!-- 选择 --> | 107 | <!-- 选择 --> |
103 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom | 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 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> | 112 | <u-icon slot="right" name="arrow-down" size="20" @click="handleSelect(item)"></u-icon> |
108 | </u-form-item> | 113 | </u-form-item> |
109 | </view> | 114 | </view> |
@@ -118,25 +123,25 @@ | @@ -118,25 +123,25 @@ | ||
118 | <view class="" v-for="(item,index) in chargeData" :key="index"> | 123 | <view class="" v-for="(item,index) in chargeData" :key="index"> |
119 | <!-- 单选 --> | 124 | <!-- 单选 --> |
120 | <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom | 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 | <u-radio class="margin-right" name="是">是</u-radio> | 128 | <u-radio class="margin-right" name="是">是</u-radio> |
124 | <u-radio name="否">否</u-radio> | 129 | <u-radio name="否">否</u-radio> |
125 | </u-radio-group> | 130 | </u-radio-group> |
126 | </u-form-item> | 131 | </u-form-item> |
127 | <!-- 输入 --> | 132 | <!-- 输入 --> |
128 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom | 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 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | 135 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" |
131 | border="none"></u-input> | 136 | border="none"></u-input> |
132 | <view class="" style="width: 40rpx;height: 40rpx;"></view> | 137 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
133 | </u-form-item> | 138 | </u-form-item> |
134 | <!-- 选择 --> | 139 | <!-- 选择 --> |
135 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom | 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 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled | 142 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabled |
138 | disabledColor="#fff" border="none"></u-input> | 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 | </u-form-item> | 145 | </u-form-item> |
141 | </view> | 146 | </view> |
142 | </view> | 147 | </view> |
@@ -159,18 +164,18 @@ | @@ -159,18 +164,18 @@ | ||
159 | <view class="" v-if="item.type === 'attachment'"> | 164 | <view class="" v-if="item.type === 'attachment'"> |
160 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom | 165 | <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom |
161 | v-if="item.type === 'attachment'"> | 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 | <view slot="right" class="text-blue" @click="uploadAttachment">上传附件</view> | 169 | <view slot="right" class="text-blue" @click="uploadAttachment">上传附件</view> |
165 | </u-form-item> | 170 | </u-form-item> |
166 | <view class="bg-gray"> | 171 | <view class="bg-gray"> |
167 | - <view class="flex justify-between"> | 172 | + <view class="flex justify-between flex-direction" v-if="attachmentList.length"> |
168 | <view class="padding" v-for="(item,index) in attachmentList" :key="index"> | 173 | <view class="padding" v-for="(item,index) in attachmentList" :key="index"> |
169 | {{item.fileName}} | 174 | {{item.fileName}} |
170 | </view> | 175 | </view> |
171 | - <view class=""> | 176 | + <!-- <view class=""> |
172 | 查看 | 177 | 查看 |
173 | - </view> | 178 | + </view> --> |
174 | </view> | 179 | </view> |
175 | </view> | 180 | </view> |
176 | </view> | 181 | </view> |
@@ -179,14 +184,17 @@ | @@ -179,14 +184,17 @@ | ||
179 | </view> | 184 | </view> |
180 | </u-form> | 185 | </u-form> |
181 | <view class="fixedBtnCss" @click="handleConfirm"> | 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 | </view> | 188 | </view> |
184 | 189 | ||
185 | <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="pickerShow = false" | 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 | </view> | 198 | </view> |
191 | </template> | 199 | </template> |
192 | 200 | ||
@@ -194,8 +202,14 @@ | @@ -194,8 +202,14 @@ | ||
194 | import chargeFile from '@/api/chargeFile' | 202 | import chargeFile from '@/api/chargeFile' |
195 | import config from '@/common/config.js' | 203 | import config from '@/common/config.js' |
196 | import { | 204 | import { |
205 | + getMcFileList, | ||
197 | getCurrentFiscalYear, | 206 | getCurrentFiscalYear, |
198 | - getCompanyCascader | 207 | + getCompanyCascader, |
208 | + getVlgOrCmty, | ||
209 | + getMcVisitUser, | ||
210 | + addMcVisit, | ||
211 | + editMcVisit, | ||
212 | + modification | ||
199 | } from '@/api/charge.js' | 213 | } from '@/api/charge.js' |
200 | export default { | 214 | export default { |
201 | components: {}, | 215 | components: {}, |
@@ -205,16 +219,177 @@ | @@ -205,16 +219,177 @@ | ||
205 | data() { | 219 | data() { |
206 | return { | 220 | return { |
207 | title: "创建拜访/收费", | 221 | title: "创建拜访/收费", |
222 | + btnText: '立即发起', | ||
223 | + operationStatus: '', | ||
208 | model: { | 224 | model: { |
209 | fiscalYear: "", | 225 | fiscalYear: "", |
226 | + billingPersonName: "", | ||
210 | jobNature: "", | 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 | copyModel: {}, | 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 | pickerShow: false, | 387 | pickerShow: false, |
388 | + gsShow: false, | ||
215 | datetimeShow: false, | 389 | datetimeShow: false, |
216 | dataTimeValue: Number(new Date()), | 390 | dataTimeValue: Number(new Date()), |
217 | columns: [], | 391 | columns: [], |
392 | + gsColumns: [], | ||
218 | regionName: [], | 393 | regionName: [], |
219 | groupName: [], | 394 | groupName: [], |
220 | companyName: [], | 395 | companyName: [], |
@@ -222,14 +397,14 @@ | @@ -222,14 +397,14 @@ | ||
222 | currentName: "", //弹窗后赋值name | 397 | currentName: "", //弹窗后赋值name |
223 | companyOption: [], | 398 | companyOption: [], |
224 | fileList: [], | 399 | fileList: [], |
225 | - attachmentList:[], | 400 | + attachmentList: [], |
226 | // 基本信息 | 401 | // 基本信息 |
227 | basisData: [{ | 402 | basisData: [{ |
228 | label: '财年', | 403 | label: '财年', |
229 | placeholder: "请选择财年", | 404 | placeholder: "请选择财年", |
230 | type: "date", | 405 | type: "date", |
231 | required: true, | 406 | required: true, |
232 | - key: "fiscalYear" | 407 | + key: "fiscalYear", |
233 | }, { | 408 | }, { |
234 | label: '收费人员', | 409 | label: '收费人员', |
235 | placeholder: "请输入", | 410 | placeholder: "请输入", |
@@ -250,25 +425,11 @@ | @@ -250,25 +425,11 @@ | ||
250 | required: true, | 425 | required: true, |
251 | key: "entryTime" | 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 | placeholder: "请选择", | 429 | placeholder: "请选择", |
269 | type: "select", | 430 | type: "select", |
270 | required: true, | 431 | required: true, |
271 | - key: "companyName" | 432 | + key: "company" |
272 | }, { | 433 | }, { |
273 | label: '村(小区)', | 434 | label: '村(小区)', |
274 | placeholder: "请选择", | 435 | placeholder: "请选择", |
@@ -306,141 +467,164 @@ | @@ -306,141 +467,164 @@ | ||
306 | type: "radio", | 467 | type: "radio", |
307 | required: true, | 468 | required: true, |
308 | key: "isVisited", | 469 | key: "isVisited", |
470 | + show: true, | ||
309 | }, { | 471 | }, { |
310 | label: '是否有意向', | 472 | label: '是否有意向', |
311 | // placeholder: "请选择", | 473 | // placeholder: "请选择", |
312 | required: true, | 474 | required: true, |
313 | type: "radio", | 475 | type: "radio", |
314 | - key: "isIntent" | 476 | + key: "isIntent", |
477 | + show: true, | ||
315 | }, { | 478 | }, { |
316 | label: '房屋情况', | 479 | label: '房屋情况', |
317 | placeholder: "请选择", | 480 | placeholder: "请选择", |
318 | required: true, | 481 | required: true, |
319 | type: "select", | 482 | type: "select", |
320 | key: "houseCondition", | 483 | key: "houseCondition", |
321 | - dict: "sys_mc_visit_house" | 484 | + dict: "sys_mc_visit_house", |
485 | + show: true, | ||
322 | }, { | 486 | }, { |
323 | label: '现用做饭能源', | 487 | label: '现用做饭能源', |
324 | placeholder: "请选择", | 488 | placeholder: "请选择", |
325 | required: true, | 489 | required: true, |
326 | type: "select", | 490 | type: "select", |
327 | key: "currentCookingEnergy", | 491 | key: "currentCookingEnergy", |
328 | - dict: "sys_mc_visit_energy" | 492 | + dict: "sys_mc_visit_energy", |
493 | + show: true, | ||
329 | }, { | 494 | }, { |
330 | label: '现用取暖能源', | 495 | label: '现用取暖能源', |
331 | placeholder: "请选择", | 496 | placeholder: "请选择", |
332 | type: "select", | 497 | type: "select", |
333 | key: "currentHeatingEnergy", | 498 | key: "currentHeatingEnergy", |
334 | - dict: "sys_mc_visit_energy" | 499 | + dict: "sys_mc_visit_energy", |
500 | + show: true, | ||
335 | }, { | 501 | }, { |
336 | label: '家庭人口情况', | 502 | label: '家庭人口情况', |
337 | placeholder: "请选择", | 503 | placeholder: "请选择", |
338 | type: "select", | 504 | type: "select", |
339 | key: "familyMembers", | 505 | key: "familyMembers", |
340 | - dict: "sys_mc_visit_members" | 506 | + dict: "sys_mc_visit_members", |
507 | + show: true, | ||
341 | }, { | 508 | }, { |
342 | label: '电冰箱', | 509 | label: '电冰箱', |
343 | placeholder: "请选择", | 510 | placeholder: "请选择", |
344 | type: "select", | 511 | type: "select", |
345 | key: "fridgeStatus", | 512 | key: "fridgeStatus", |
346 | - dict: 'sys_mc_visit_appliance_status' | 513 | + dict: 'sys_mc_visit_appliance_status', |
514 | + show: true, | ||
347 | }, { | 515 | }, { |
348 | label: '空调', | 516 | label: '空调', |
349 | placeholder: "请选择", | 517 | placeholder: "请选择", |
350 | type: "select", | 518 | type: "select", |
351 | key: "acStatus", | 519 | key: "acStatus", |
352 | - dict: 'sys_mc_visit_appliance_status' | 520 | + dict: 'sys_mc_visit_appliance_status', |
521 | + show: true, | ||
353 | }, { | 522 | }, { |
354 | label: '电视', | 523 | label: '电视', |
355 | placeholder: "请选择", | 524 | placeholder: "请选择", |
356 | type: "select", | 525 | type: "select", |
357 | key: "tvStatus", | 526 | key: "tvStatus", |
358 | - dict: 'sys_mc_visit_appliance_status' | 527 | + dict: 'sys_mc_visit_appliance_status', |
528 | + show: true, | ||
359 | }, { | 529 | }, { |
360 | label: '洗衣机', | 530 | label: '洗衣机', |
361 | placeholder: "请选择", | 531 | placeholder: "请选择", |
362 | type: "select", | 532 | type: "select", |
363 | key: "washerStatus", | 533 | key: "washerStatus", |
364 | - dict: 'sys_mc_visit_appliance_status' | 534 | + dict: 'sys_mc_visit_appliance_status', |
535 | + show: true, | ||
365 | }, { | 536 | }, { |
366 | label: '热水器', | 537 | label: '热水器', |
367 | placeholder: "请选择", | 538 | placeholder: "请选择", |
368 | type: "select", | 539 | type: "select", |
369 | key: "waterHeaterStatus", | 540 | key: "waterHeaterStatus", |
370 | - dict: 'sys_mc_visit_appliance_status' | 541 | + dict: 'sys_mc_visit_appliance_status', |
542 | + show: true, | ||
371 | }, { | 543 | }, { |
372 | label: '光伏', | 544 | label: '光伏', |
373 | placeholder: "请选择", | 545 | placeholder: "请选择", |
374 | type: "select", | 546 | type: "select", |
375 | key: "pvSystemStatus", | 547 | key: "pvSystemStatus", |
376 | - dict: 'sys_mc_visit_appliance_status' | 548 | + dict: 'sys_mc_visit_appliance_status', |
549 | + show: true, | ||
377 | }, { | 550 | }, { |
378 | label: '当前地址', | 551 | label: '当前地址', |
379 | placeholder: "请输入", | 552 | placeholder: "请输入", |
380 | type: "input", | 553 | type: "input", |
381 | - key: "visitDetailedAddress" | 554 | + key: "visitDetailedAddress", |
555 | + show: true, | ||
382 | }, { | 556 | }, { |
383 | label: '上传图片', | 557 | label: '上传图片', |
384 | placeholder: "请选择", | 558 | placeholder: "请选择", |
385 | type: "file", | 559 | type: "file", |
386 | - key: 'fieldPhotoFile' | 560 | + key: 'fieldPhotoFile', |
561 | + show: true, | ||
387 | }], | 562 | }], |
388 | // 决策人信息 | 563 | // 决策人信息 |
389 | decisionMakersData: [{ | 564 | decisionMakersData: [{ |
390 | label: '是否获取决策人信息', | 565 | label: '是否获取决策人信息', |
391 | type: "radio", | 566 | type: "radio", |
392 | required: true, | 567 | required: true, |
393 | - key: "hasDm" | 568 | + key: "hasDm", |
569 | + show: true, | ||
394 | }, { | 570 | }, { |
395 | label: '决策人年龄', | 571 | label: '决策人年龄', |
396 | placeholder: "请输入", | 572 | placeholder: "请输入", |
397 | required: true, | 573 | required: true, |
398 | type: "input", | 574 | type: "input", |
399 | - key: "dmAge" | 575 | + key: "dmAge", |
576 | + show: true, | ||
400 | }, { | 577 | }, { |
401 | label: '决策人收入来源', | 578 | label: '决策人收入来源', |
402 | placeholder: "请选择", | 579 | placeholder: "请选择", |
403 | required: true, | 580 | required: true, |
404 | type: "select", | 581 | type: "select", |
405 | key: "dmIncomeSrc", | 582 | key: "dmIncomeSrc", |
406 | - dict: 'sys_mc_visit_dm_income' | 583 | + dict: 'sys_mc_visit_dm_income', |
584 | + show: true, | ||
407 | }, { | 585 | }, { |
408 | label: '决策人联系方式', | 586 | label: '决策人联系方式', |
409 | placeholder: "请输入", | 587 | placeholder: "请输入", |
410 | required: true, | 588 | required: true, |
411 | type: "input", | 589 | type: "input", |
412 | - key: "dmPhone" | 590 | + key: "dmPhone", |
591 | + show: true, | ||
413 | }], | 592 | }], |
414 | // 收费信息 | 593 | // 收费信息 |
415 | chargeData: [{ | 594 | chargeData: [{ |
416 | label: '本次是否收费', | 595 | label: '本次是否收费', |
417 | type: "radio", | 596 | type: "radio", |
418 | required: true, | 597 | required: true, |
419 | - key: "isCharged" | 598 | + key: "isCharged", |
599 | + show: true, | ||
420 | }, { | 600 | }, { |
421 | label: '用户编号', | 601 | label: '用户编号', |
422 | placeholder: "请输入", | 602 | placeholder: "请输入", |
423 | required: true, | 603 | required: true, |
424 | type: "input", | 604 | type: "input", |
425 | - key: "userCode" | 605 | + key: "userCode", |
606 | + show: true, | ||
426 | }, { | 607 | }, { |
427 | label: '身份证号', | 608 | label: '身份证号', |
428 | placeholder: "请输入", | 609 | placeholder: "请输入", |
429 | required: true, | 610 | required: true, |
430 | type: "input", | 611 | type: "input", |
431 | - key: "userIdCard" | 612 | + key: "userIdCard", |
613 | + show: true, | ||
432 | }, { | 614 | }, { |
433 | label: '票据单号', | 615 | label: '票据单号', |
434 | placeholder: "请输入", | 616 | placeholder: "请输入", |
435 | required: true, | 617 | required: true, |
436 | type: "input", | 618 | type: "input", |
437 | - key: "invoiceNo" | 619 | + key: "invoiceNo", |
620 | + show: true, | ||
438 | }, { | 621 | }, { |
439 | label: '收费金额', | 622 | label: '收费金额', |
440 | placeholder: "请输入", | 623 | placeholder: "请输入", |
441 | required: true, | 624 | required: true, |
442 | type: "input", | 625 | type: "input", |
443 | - key: "chargeAmt" | 626 | + key: "chargeAmt", |
627 | + show: true, | ||
444 | }, { | 628 | }, { |
445 | label: '缴费方式', | 629 | label: '缴费方式', |
446 | placeholder: "请选择", | 630 | placeholder: "请选择", |
@@ -448,13 +632,15 @@ | @@ -448,13 +632,15 @@ | ||
448 | type: "select", | 632 | type: "select", |
449 | key: "paymentMeth", | 633 | key: "paymentMeth", |
450 | dict: 'sys_mc_payment_meth', | 634 | dict: 'sys_mc_payment_meth', |
635 | + show: true, | ||
451 | }, { | 636 | }, { |
452 | label: '收费类型', | 637 | label: '收费类型', |
453 | placeholder: "请选择", | 638 | placeholder: "请选择", |
454 | required: true, | 639 | required: true, |
455 | type: "select", | 640 | type: "select", |
456 | key: "chargeType", | 641 | key: "chargeType", |
457 | - dict: "sys_mc_charge_type" | 642 | + dict: "sys_mc_charge_type", |
643 | + show: true, | ||
458 | }], | 644 | }], |
459 | // 其他信息 | 645 | // 其他信息 |
460 | otherData: [{ | 646 | otherData: [{ |
@@ -472,64 +658,261 @@ | @@ -472,64 +658,261 @@ | ||
472 | computed: { | 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 | this.init() | 683 | this.init() |
477 | }, | 684 | }, |
478 | methods: { | 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 | async init() { | 725 | async init() { |
480 | console.log(this.$store); | 726 | console.log(this.$store); |
481 | // 查询财年 | 727 | // 查询财年 |
482 | await this.getCurrentFiscalYear() | 728 | await this.getCurrentFiscalYear() |
483 | await this.getCompanyCascader() | 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 | async getCurrentFiscalYear() { | 734 | async getCurrentFiscalYear() { |
487 | - this.model.fiscalYear = (await getCurrentFiscalYear()).data; | 735 | + let fiscalYear = (await getCurrentFiscalYear()).data; |
736 | + this.$set(this.model, 'fiscalYear', fiscalYear); | ||
488 | console.log("当前财年", this.model.fiscalYear); | 737 | console.log("当前财年", this.model.fiscalYear); |
489 | }, | 738 | }, |
490 | async getCompanyCascader() { | 739 | async getCompanyCascader() { |
491 | this.companyOption = (await getCompanyCascader()).data; | 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 | console.log("当前公司类", this.companyOption); | 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 | console.log(item); | 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 | console.log("数据", this.columns); | 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 | } else { | 798 | } else { |
516 | let dict = item.dict; | 799 | let dict = item.dict; |
517 | let dictArr = this.getDictDatas(dict); | 800 | let dictArr = this.getDictDatas(dict); |
518 | - this.currentName = item.key; | ||
519 | this.columns = [dictArr]; | 801 | this.columns = [dictArr]; |
520 | } | 802 | } |
521 | this.pickerShow = true; | 803 | this.pickerShow = true; |
522 | console.log(this.columns); | 804 | console.log(this.columns); |
523 | // console.log("字典数组", dictArr); | 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 | confirm(e) { | 833 | confirm(e) { |
527 | console.log("确认", e); | 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 | this.pickerShow = false; | 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 | handleDateTime(item) { | 909 | handleDateTime(item) { |
910 | + if (this.operationStatus === 'YD') { | ||
911 | + return | ||
912 | + } | ||
913 | + if (item.key === 'fiscalYear') { | ||
914 | + return | ||
915 | + } | ||
533 | this.currentName = item.key; | 916 | this.currentName = item.key; |
534 | this.datetimeShow = true; | 917 | this.datetimeShow = true; |
535 | console.log(item); | 918 | console.log(item); |
@@ -541,22 +924,6 @@ | @@ -541,22 +924,6 @@ | ||
541 | this.model[this.currentName] = time; | 924 | this.model[this.currentName] = time; |
542 | this.datetimeShow = false; | 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 | deletePic(event) { | 928 | deletePic(event) { |
562 | this.fileList.splice(event.index, 1) | 929 | this.fileList.splice(event.index, 1) |
@@ -612,31 +979,108 @@ | @@ -612,31 +979,108 @@ | ||
612 | console.log("上传附件"); | 979 | console.log("上传附件"); |
613 | uni.chooseFile({ | 980 | uni.chooseFile({ |
614 | count: 1, //默认100 | 981 | count: 1, //默认100 |
615 | - extension:['.doc','.xlsx','.docx'], | ||
616 | - success:async (res)=> { | 982 | + extension: ['.doc', '.xlsx', '.docx'], |
983 | + success: async (res) => { | ||
617 | let tempUrl = res.tempFilePaths[0] | 984 | let tempUrl = res.tempFilePaths[0] |
618 | console.log(res); | 985 | console.log(res); |
619 | const result = await chargeFile.uploadFile(tempUrl); | 986 | const result = await chargeFile.uploadFile(tempUrl); |
620 | this.attachmentList.push(result); | 987 | this.attachmentList.push(result); |
621 | console.log(result); | 988 | console.log(result); |
622 | - } | 989 | + } |
623 | }); | 990 | }); |
624 | }, | 991 | }, |
625 | // 重构提交数据,不影响表单数据 | 992 | // 重构提交数据,不影响表单数据 |
626 | copyMethods() { | 993 | copyMethods() { |
627 | this.copyModel.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); | 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 | handleConfirm() { | 1002 | handleConfirm() { |
631 | - this.copyModel = this.model; | 1003 | + this.copyModel = { |
1004 | + ...this.model | ||
1005 | + }; | ||
632 | this.copyMethods(); | 1006 | this.copyMethods(); |
633 | console.log('提交数据', JSON.parse(JSON.stringify(this.copyModel))); | 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 | </script> | 1086 | </script> |
pages/charge/visitsAndFees/index.vue
@@ -68,7 +68,7 @@ | @@ -68,7 +68,7 @@ | ||
68 | <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover"> | 68 | <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover"> |
69 | <view slot="content" class="popoverCss"> | 69 | <view slot="content" class="popoverCss"> |
70 | <view class="" v-if="item.statusCode === 'APPROVED' && item.publishStatus === 'APPROVED'"> | 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 | <u-line></u-line> | 72 | <u-line></u-line> |
73 | </view> | 73 | </view> |
74 | <view class=""> | 74 | <view class=""> |
@@ -80,7 +80,7 @@ | @@ -80,7 +80,7 @@ | ||
80 | <u-line></u-line> | 80 | <u-line></u-line> |
81 | </view> | 81 | </view> |
82 | <view class="" v-if="item.statusCode === 'APPROVED' && item.publishStatus === 'APPROVED'"> | 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 | <u-line></u-line> | 84 | <u-line></u-line> |
85 | </view> | 85 | </view> |
86 | </view> | 86 | </view> |
@@ -93,10 +93,10 @@ | @@ -93,10 +93,10 @@ | ||
93 | <view class="margin-left-sm" @click="handleDetail(item)"> | 93 | <view class="margin-left-sm" @click="handleDetail(item)"> |
94 | <u-button shape="circle">查看详情</u-button> | 94 | <u-button shape="circle">查看详情</u-button> |
95 | </view> | 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 | <u-button shape="circle">拒绝</u-button> | 97 | <u-button shape="circle">拒绝</u-button> |
98 | </view> | 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 | <u-button shape="circle" color="#CF000D">同意</u-button> | 100 | <u-button shape="circle" color="#CF000D">同意</u-button> |
101 | </view> | 101 | </view> |
102 | </view> | 102 | </view> |
@@ -110,14 +110,40 @@ | @@ -110,14 +110,40 @@ | ||
110 | <view class="fixBtnCss" @click="createaVisit"> | 110 | <view class="fixBtnCss" @click="createaVisit"> |
111 | <u-icon name="plus" color="#fff" size="30"></u-icon> | 111 | <u-icon name="plus" color="#fff" size="30"></u-icon> |
112 | </view> | 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 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> | 135 | <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> |
115 | </view> | 136 | </view> |
116 | </template> | 137 | </template> |
117 | 138 | ||
118 | <script> | 139 | <script> |
119 | import { | 140 | import { |
120 | - getMcVisitList | 141 | + getMcVisitList, |
142 | + submitAuditOne, | ||
143 | + submitAuditTwo, | ||
144 | + submitModificationOne, | ||
145 | + submitModificationTwo, | ||
146 | + cancelMcVisit | ||
121 | } from '@/api/charge.js' | 147 | } from '@/api/charge.js' |
122 | import popUpComponent from '@/components/popUpComponent/popUpComponent.vue' | 148 | import popUpComponent from '@/components/popUpComponent/popUpComponent.vue' |
123 | export default { | 149 | export default { |
@@ -154,7 +180,13 @@ | @@ -154,7 +180,13 @@ | ||
154 | approval: [{ | 180 | approval: [{ |
155 | name: "待我审批" | 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 | computed: { | 192 | computed: { |
@@ -182,6 +214,9 @@ | @@ -182,6 +214,9 @@ | ||
182 | }, 500); | 214 | }, 500); |
183 | }, | 215 | }, |
184 | onLoad() { | 216 | onLoad() { |
217 | + // this.initData(); | ||
218 | + }, | ||
219 | + onShow(){ | ||
185 | this.initData(); | 220 | this.initData(); |
186 | }, | 221 | }, |
187 | methods: { | 222 | methods: { |
@@ -249,52 +284,92 @@ | @@ -249,52 +284,92 @@ | ||
249 | }, | 284 | }, |
250 | checkboxChange(e) { | 285 | checkboxChange(e) { |
251 | console.log(e); | 286 | console.log(e); |
252 | - if(e.length){ | 287 | + if (e.length) { |
253 | this.params.isMyAuditing = "Y"; | 288 | this.params.isMyAuditing = "Y"; |
254 | - }else{ | 289 | + } else { |
255 | this.params.isMyAuditing = "其他"; | 290 | this.params.isMyAuditing = "其他"; |
256 | } | 291 | } |
257 | this.initData(); | 292 | this.initData(); |
258 | }, | 293 | }, |
259 | - // 修改 | ||
260 | - handleEdit(item){ | ||
261 | - | ||
262 | - }, | ||
263 | handleDetail(item) { | 294 | handleDetail(item) { |
264 | uni.navigateTo({ | 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 | this.titles = "拒绝"; | 301 | this.titles = "拒绝"; |
302 | + this.publishStatus = item.publishStatus; | ||
303 | + this.modificationStatus = item.modificationStatus; | ||
304 | + this.publishID = item.id; | ||
271 | this.$refs.popUpComponentRef.open(); | 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 | this.titles = "同意"; | 313 | this.titles = "同意"; |
276 | this.$refs.popUpComponentRef.open(); | 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 | createaVisit() { | 324 | createaVisit() { |
280 | uni.navigateTo({ | 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 | let id = item.id; | 338 | let id = item.id; |
287 | uni.navigateTo({ | 339 | uni.navigateTo({ |
288 | url: `/pages/charge/visitsAndFees/processFlow?id=${id}&type=cllc` | 340 | url: `/pages/charge/visitsAndFees/processFlow?id=${id}&type=cllc` |
289 | }) | 341 | }) |
290 | }, | 342 | }, |
291 | // 异动流程 | 343 | // 异动流程 |
292 | - changeFlow(item){ | 344 | + changeFlow(item) { |
293 | let id = item.id; | 345 | let id = item.id; |
294 | uni.navigateTo({ | 346 | uni.navigateTo({ |
295 | url: `/pages/charge/visitsAndFees/processFlow?id=${id}&type=ydlc` | 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 | loginOut() { | 373 | loginOut() { |
299 | this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => { | 374 | this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => { |
300 | //钉钉直接退出微应用 | 375 | //钉钉直接退出微应用 |
store/mudules/tabBar.js
@@ -23,6 +23,8 @@ const tabbar = { | @@ -23,6 +23,8 @@ const tabbar = { | ||
23 | data | 23 | data |
24 | }) { | 24 | }) { |
25 | console.log(tabBars); | 25 | console.log(tabBars); |
26 | + console.log(111,data); | ||
27 | + uni.setStorageSync('tabName',data); | ||
26 | commit('SET_USER_TAB', data) | 28 | commit('SET_USER_TAB', data) |
27 | } | 29 | } |
28 | } | 30 | } |