apply-clients 3.0.4 → 3.0.5-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +1 -1
- package/package.json +4 -3
- package/src/App.vue +126 -15
- package/src/apply.js +152 -134
- package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
- package/src/bootstrap/less/bootstrap.less +1 -2
- package/src/bootstrap/less/standard.less +208 -0
- package/src/components/Util.js +4 -0
- package/src/components/app_apply/FieldExploration.vue +2 -2
- package/src/components/app_apply/Ventilation.vue +2 -2
- package/src/components/image/doc.jpg +0 -0
- package/src/components/image/excel.jpg +0 -0
- package/src/components/image/pdf.jpg +0 -0
- package/src/components/image//345/233/276/345/261/20212.png +0 -0
- package/src/components/image//345/233/276/345/261/20213.png +0 -0
- package/src/components/image//345/233/276/345/261/20216.png +0 -0
- package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
- package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
- package/src/components/image//346/244/255/345/234/2062.png +0 -0
- package/src/components/image//346/244/255/345/234/2065.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
- package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
- package/src/components/image//347/273/2044.png +0 -0
- package/src/components/image//347/273/2045.png +0 -0
- package/src/components/image//347/273/2046.png +0 -0
- package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
- package/src/components/product/Function/InstallFunction.vue +9 -5
- package/src/components/product/Function/InstallInfoSelect.vue +98 -69
- package/src/components/product/Function/Service/FunctionServiceControl.vue +47 -4
- package/src/components/product/Function/functions/AddContract.vue +161 -139
- package/src/components/product/Function/functions/BuyerMessage.vue +285 -137
- package/src/components/product/Function/functions/InstallFee.vue +1117 -912
- package/src/components/product/MaterialBatchList.vue +109 -0
- package/src/components/product/MaterialBatchManage.vue +34 -0
- package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
- package/src/components/product/Process/ExplorationSelect.vue +213 -73
- package/src/components/product/Process/ExplorationUser.vue +94 -39
- package/src/components/product/Process/MaterialUseList.vue +159 -0
- package/src/components/product/Process/ModifyUserFiles.vue +15 -5
- package/src/components/product/Process/ProcessInfo/history_control.vue +35 -6
- package/src/components/product/Process/Processes/ApplyUpload.vue +287 -0
- package/src/components/product/Process/Processes/CustomerCostPlan.vue +214 -0
- package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +499 -210
- package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
- package/src/components/product/Process/Processes/ProjectSettlement.vue +535 -24
- package/src/components/product/Process/Processes/ReceiveBatch.vue +301 -121
- package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
- package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +27 -14
- package/src/components/product/Process/Processes/Service/ServiceControl.vue +2561 -1104
- package/src/components/product/Process/Processes/Upload.vue +532 -0
- package/src/components/product/Process/ShowBackReason.vue +1 -1
- package/src/components/product/ServiceView.vue +825 -583
- package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
- package/src/components/product/Supervisory/SupervisoryControl.vue +79 -26
- package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
- package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
- package/src/components/product/VueUtils/Tree.vue +330 -0
- package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
- package/src/stores/ApplyLoadParams.js +1 -1
- package/src/stores/PagedListLogic.js +173 -0
- package/.npmignore +0 -12
- package/yarn.lock +0 -9008
|
@@ -2,40 +2,57 @@
|
|
|
2
2
|
<div class="d1">
|
|
3
3
|
<div class="left col-sm-12">
|
|
4
4
|
<criteria-paged :model="model" v-ref:cp>
|
|
5
|
-
<criteria partial='criteria' @condition-changed='search' v-ref:cri
|
|
5
|
+
<criteria partial='criteria' @condition-changed='search' v-ref:cri
|
|
6
|
+
style="padding: 20px;background-color: #f6f6f6;">
|
|
6
7
|
<form novalidate class="" partial>
|
|
7
8
|
<div class="col-sm-12">
|
|
8
|
-
<div class="col-sm-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<input type="text" class="form-control" placeholder='报建编号' v-model="model.f_apply_num"
|
|
15
|
-
v-on:keyup.enter="search"
|
|
16
|
-
condition="f_apply_num like '{}%'">
|
|
9
|
+
<div class="form-group col-sm-4">
|
|
10
|
+
<label class=" col-sm-6" style="padding-top: 8px">联系人/项目名称/用户名称:</label>
|
|
11
|
+
<div class="col-sm-6">
|
|
12
|
+
<input type="text" class="form-control" v-model="model.f_user_name"
|
|
13
|
+
condition=" (f_user_name like '%{}%' or f_entry_name like '%{}%' or f_company_name like '%{}%') " placeholder='三选一输入'>
|
|
14
|
+
</div>
|
|
17
15
|
</div>
|
|
18
16
|
<div class="col-sm-1">
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
<!--<label class="col-sm-6">合同编号</label>-->
|
|
18
|
+
<div class="col-sm-12">
|
|
19
|
+
<input type="text" class="form-control" placeholder='合同编号' v-model="model.f_contract_number"
|
|
20
|
+
v-on:keyup.enter="search"
|
|
21
|
+
condition="f_contract_number like '%{}%'">
|
|
22
|
+
</div>
|
|
22
23
|
</div>
|
|
23
24
|
<div class="col-sm-1">
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
<!--<label class="col-sm-6">用户地址</label>-->
|
|
26
|
+
<div class="col-sm-12">
|
|
27
|
+
<input type="text" class="form-control" placeholder='用户地址' v-model="model.f_address"
|
|
28
|
+
v-on:keyup.enter="search"
|
|
29
|
+
condition="f_address like '%{}%'">
|
|
30
|
+
</div>
|
|
27
31
|
</div>
|
|
28
32
|
<div class="col-sm-1">
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
<!--<label class="col-sm-6"> 报建类型:</label>-->
|
|
34
|
+
<div class="col-sm-12" v-if="!this.$login.f.f_fengongsi.includes('中燃')">
|
|
35
|
+
<v-select :width ="'100%'" style="width: 100%" :options="$parent.$parent.applytype" placeholder='报建类型' condition="f_apply_type like '%{}%'"
|
|
36
|
+
v-model="model.f_apply_type" :value.sync="model.f_apply_type" close-on-select>
|
|
37
|
+
</v-select>
|
|
38
|
+
</div>
|
|
32
39
|
</div>
|
|
33
|
-
<div class="col-sm-
|
|
40
|
+
<div class="col-sm-2">
|
|
41
|
+
<label class="col-sm-6">办理环节:</label>
|
|
42
|
+
<div class="col-sm-6">
|
|
43
|
+
<v-select :width ="'90%'" @change="$dispatch('setQueryCondition',model)" :options="$parent.$parent.defnames"
|
|
44
|
+
condition="defname = '{}'" placeholder='办理环节'
|
|
45
|
+
v-model="model.defname" :value.sync="model.defname" close-on-select>
|
|
46
|
+
</v-select>
|
|
47
|
+
</div>
|
|
34
48
|
</div>
|
|
35
49
|
<div class="col-sm-1">
|
|
50
|
+
<input type="text" class="form-control" placeholder='经办人' v-model="model.f_survey_name"
|
|
51
|
+
v-on:keyup.enter="search"
|
|
52
|
+
condition=" (f_apply_kefu_employee like '%{}%' or f_survey_name like '%{}%') ">
|
|
36
53
|
</div>
|
|
37
54
|
<div class="col-sm-1">
|
|
38
|
-
<button class="btn btn-primary btn-sm
|
|
55
|
+
<button class="btn btn-primary btn-sm" type="button" @click="search(),$parent.$parent.close()">
|
|
39
56
|
<span class="glyphicon glyphicon-search"></span>查询
|
|
40
57
|
</button>
|
|
41
58
|
</div>
|
|
@@ -52,10 +69,11 @@
|
|
|
52
69
|
<nobr>当前状态</nobr>
|
|
53
70
|
</th>
|
|
54
71
|
<th>
|
|
55
|
-
<nobr
|
|
72
|
+
<nobr>当前办理人</nobr>
|
|
56
73
|
</th>
|
|
74
|
+
<th><nobr>联系人/项目名称/用户名称</nobr></th>
|
|
57
75
|
<th>
|
|
58
|
-
<nobr
|
|
76
|
+
<nobr>合同编号</nobr>
|
|
59
77
|
</th>
|
|
60
78
|
<th>
|
|
61
79
|
<nobr>用户类型</nobr>
|
|
@@ -79,34 +97,37 @@
|
|
|
79
97
|
</template>
|
|
80
98
|
<template partial='body'>
|
|
81
99
|
<tr>
|
|
82
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
100
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
83
101
|
<nobr>{{$index+1}}</nobr>
|
|
84
102
|
</td>
|
|
85
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
103
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
86
104
|
<nobr>{{row.f_sub_state}}</nobr>
|
|
87
105
|
</td>
|
|
88
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
89
|
-
<nobr>{{row.
|
|
106
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
107
|
+
<nobr>{{row.applysite}}</nobr>
|
|
108
|
+
</td>
|
|
109
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
110
|
+
<nobr>{{row.f_user_name}}/{{row.f_entry_name}}/{{row.f_company_name}}</nobr>
|
|
90
111
|
</td>
|
|
91
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
92
|
-
<nobr>{{row.
|
|
112
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
113
|
+
<nobr>{{row.f_contract_number}}</nobr>
|
|
93
114
|
</td>
|
|
94
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
115
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
95
116
|
<nobr>{{row.f_user_type}}</nobr>
|
|
96
117
|
</td>
|
|
97
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
118
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
98
119
|
<nobr>{{row.f_phone}}</nobr>
|
|
99
120
|
</td>
|
|
100
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
121
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
101
122
|
<nobr>{{row.f_address}}</nobr>
|
|
102
123
|
</td>
|
|
103
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
124
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
104
125
|
<nobr>{{row.defname}}</nobr>
|
|
105
126
|
</td>
|
|
106
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
127
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
107
128
|
<nobr>{{row.f_apply_type}}</nobr>
|
|
108
129
|
</td>
|
|
109
|
-
<td @click="$parent.$parent.$parent.check(row)">
|
|
130
|
+
<td @click="$parent.$parent.$parent.check(row)" style="text-align: center;">
|
|
110
131
|
<nobr>{{row.f_apply_date}}</nobr>
|
|
111
132
|
</td>
|
|
112
133
|
</tr>
|
|
@@ -118,28 +139,148 @@
|
|
|
118
139
|
</template>
|
|
119
140
|
<script>
|
|
120
141
|
import AppData from '../../../stores/AppData.js'
|
|
121
|
-
import
|
|
122
|
-
PagedList
|
|
123
|
-
} from 'vue-client'
|
|
142
|
+
import PagedListLogic from '../../../stores/PagedListLogic'
|
|
124
143
|
import getNowDate from '../../getNowDate.js'
|
|
144
|
+
import {HttpResetClass} from 'vue-client'
|
|
125
145
|
|
|
126
146
|
export default {
|
|
127
147
|
title: '勘探详情',
|
|
128
148
|
data() {
|
|
129
149
|
return {
|
|
130
|
-
|
|
150
|
+
applytype: this.$appdata.getParam('报建类型'),
|
|
151
|
+
model: new PagedListLogic('rs/sql/supervisory', 20, {
|
|
131
152
|
data: {
|
|
132
153
|
id: `${this.$login.f.name}`,
|
|
133
154
|
fengongsi: `${this.$login.f.f_fengongsi}`
|
|
134
155
|
}
|
|
135
156
|
}),
|
|
157
|
+
users:[],
|
|
158
|
+
defnames:[],
|
|
136
159
|
condition: '',
|
|
137
160
|
select: ''
|
|
138
161
|
}
|
|
139
162
|
},
|
|
140
|
-
ready() {
|
|
163
|
+
async ready() {
|
|
164
|
+
let http3 = new HttpResetClass()
|
|
165
|
+
http3.load('POST', 'rs/sql/getDefnamesForActivityins', {data:{}}, {
|
|
166
|
+
resolveMsg: null,
|
|
167
|
+
rejectMsg: null
|
|
168
|
+
}).then((res)=>{
|
|
169
|
+
// 先获取所有流程环节
|
|
170
|
+
this.defnames = [{label: '全部', value: ''}]
|
|
171
|
+
for(let i=0;i<res.data.length;i++){
|
|
172
|
+
this.defnames.push({label:res.data[i].defname,value:res.data[i].defname})
|
|
173
|
+
}
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
let http = new HttpResetClass()
|
|
177
|
+
let data = {
|
|
178
|
+
columnname: 'id,name',
|
|
179
|
+
tablename: 't_user',
|
|
180
|
+
condition: '1=1'
|
|
181
|
+
}
|
|
182
|
+
let res = await http.load('POST','rs/sql/singleTable',{data:data}, {
|
|
183
|
+
resolveMsg: null,
|
|
184
|
+
rejectMsg: '获取人员失败'
|
|
185
|
+
})
|
|
186
|
+
this.users = res.data
|
|
141
187
|
this.$refs.cp.$refs.cri.search()
|
|
142
188
|
},
|
|
189
|
+
events: {
|
|
190
|
+
async dataGrid() {
|
|
191
|
+
// //获取购货方信息
|
|
192
|
+
// let data = {
|
|
193
|
+
// tablename: 't_user',
|
|
194
|
+
// condition: `1=1`
|
|
195
|
+
// }
|
|
196
|
+
// let buyerinfos = await this.$resetpost('rs/sql/singleTable', {data: data}, {
|
|
197
|
+
// resolveMsg: null,
|
|
198
|
+
// rejectMsg: '获取user失败'
|
|
199
|
+
// })
|
|
200
|
+
// let users = buyerinfos.data
|
|
201
|
+
if (!this.$refs.cp.$refs.grid.model.rows) return
|
|
202
|
+
let rows = this.$refs.cp.$refs.grid.model.rows
|
|
203
|
+
for (let i = 0; i < rows.length; i++) {
|
|
204
|
+
let expe = rows[i].actorexpression
|
|
205
|
+
if(expe.includes('getChildren')||expe.includes('getChildByName')){//{source:'this.getParentByType($organization$).getChildByName($客户服务部门$).getChildByName($客户服务部负责人$).getChildren()','userid':'12290'
|
|
206
|
+
let arr = expe.split('$')
|
|
207
|
+
this.$refs.cp.$refs.grid.model.rows[i].applysite = arr[arr.length - 2]
|
|
208
|
+
}else{ //{source: 'this', userid: '12290'}
|
|
209
|
+
let arr = expe.split('\'')
|
|
210
|
+
let userid = arr[arr.length - 2]
|
|
211
|
+
for(let j =0;j<this.users.length;j++){
|
|
212
|
+
if(this.users[j].id == userid){
|
|
213
|
+
this.$refs.cp.$refs.grid.model.rows[i].applysite = this.users[j].name
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
//
|
|
221
|
+
// if (expe.indexOf("'this'") == -1) {
|
|
222
|
+
// let arr = expe.split('$')
|
|
223
|
+
// this.$refs.cp.$refs.grid.model.rows[i].applysite = arr[arr.length - 2]
|
|
224
|
+
// } else if (rows[i].f_survey_name && typeof rows[i].f_survey_name == 'string' && rows[i].f_survey_name.includes("\"")) {
|
|
225
|
+
// // 如果是属于工程技术部的就给工程技术部
|
|
226
|
+
// let flag = ''
|
|
227
|
+
// let str = this.$appdata.getSingleValue("客户服务部")
|
|
228
|
+
// let str2 = this.$appdata.getSingleValue("工程技术部")
|
|
229
|
+
// let arr = str.split(",")
|
|
230
|
+
// let arr2 = str2.split(",")
|
|
231
|
+
// for (let p = 0; p < arr.length; p++) {
|
|
232
|
+
// if (arr[p] == rows[i].f_apply_type) {
|
|
233
|
+
// flag = '客户服务部'
|
|
234
|
+
// console.log(rows[i].f_apply_num, flag)
|
|
235
|
+
// break
|
|
236
|
+
// }
|
|
237
|
+
// }
|
|
238
|
+
// for (let p = 0; p < arr2.length; p++) {
|
|
239
|
+
// if (arr2[p] == rows[i].f_apply_type) {
|
|
240
|
+
// flag = '工程技术部'
|
|
241
|
+
// console.log(rows[i].f_apply_num, flag)
|
|
242
|
+
// break
|
|
243
|
+
// }
|
|
244
|
+
// }
|
|
245
|
+
//
|
|
246
|
+
// if (flag == '工程技术部') {
|
|
247
|
+
// let js = JSON.parse(rows[i].f_survey_name)
|
|
248
|
+
// this.$refs.cp.$refs.grid.model.rows[i].applysite = js.name
|
|
249
|
+
// } else if (flag == '客户服务部') {
|
|
250
|
+
// let rows2 = this.$refs.cp.$refs.grid.model.rows
|
|
251
|
+
// for (let i = 0; i < rows2.length; i++) {
|
|
252
|
+
// if (!this.$refs.cp.$refs.grid.model.rows[i].applysite) {
|
|
253
|
+
// if (rows2[i].f_apply_kefu_employee) {
|
|
254
|
+
// if (rows2[i].f_apply_kefu_employee.startsWith("{")) {
|
|
255
|
+
// let obj = JSON.parse(rows2[i].f_apply_kefu_employee)
|
|
256
|
+
// this.$refs.cp.$refs.grid.model.rows[i].applysite = obj.name
|
|
257
|
+
// } else {
|
|
258
|
+
// this.$refs.cp.$refs.grid.model.rows[i].applysite = rows2[i].f_apply_kefu_employee
|
|
259
|
+
// }
|
|
260
|
+
// }
|
|
261
|
+
// }
|
|
262
|
+
// }
|
|
263
|
+
// }
|
|
264
|
+
// }
|
|
265
|
+
// let numReg = /^[0-9]+$/
|
|
266
|
+
// let numRe = new RegExp(numReg)
|
|
267
|
+
// if (numRe.test(this.$refs.cp.$refs.grid.model.rows[i].applysite)) {
|
|
268
|
+
// let querydata = {
|
|
269
|
+
// tablename: 't_user',
|
|
270
|
+
// condition: `id = ${this.$refs.cp.$refs.grid.model.rows[i].applysite}`
|
|
271
|
+
// }
|
|
272
|
+
// let http = new HttpResetClass()
|
|
273
|
+
// http.load('POST','rs/sql/singleTable', {data: querydata}, {
|
|
274
|
+
// resolveMsg: null,
|
|
275
|
+
// rejectMsg: '获取人员失败'
|
|
276
|
+
// }).then((res)=>{
|
|
277
|
+
// this.$refs.cp.$refs.grid.model.rows[i].applysite = res.data[0].name
|
|
278
|
+
// })
|
|
279
|
+
// }
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
}
|
|
283
|
+
},
|
|
143
284
|
methods: {
|
|
144
285
|
generateUUID() {
|
|
145
286
|
var d = new Date().getTime()
|
|
@@ -151,6 +292,7 @@
|
|
|
151
292
|
return uuid
|
|
152
293
|
},
|
|
153
294
|
check(val) {
|
|
295
|
+
console.log("val:" + JSON.stringify(val))
|
|
154
296
|
this.$dispatch('check', val)
|
|
155
297
|
},
|
|
156
298
|
close() {
|
|
@@ -186,5 +328,4 @@
|
|
|
186
328
|
background-color: #6666ff;
|
|
187
329
|
}
|
|
188
330
|
|
|
189
|
-
|
|
190
331
|
</style>
|
|
@@ -35,9 +35,11 @@
|
|
|
35
35
|
check(actorexpression){
|
|
36
36
|
let array = this.$login.f.rolesnames.split(',')
|
|
37
37
|
for(let i=0;i<array.length;i++){
|
|
38
|
-
if(actorexpression.includes(array[i])){
|
|
38
|
+
if(array[i] && actorexpression.includes(array[i])){
|
|
39
39
|
return true
|
|
40
|
-
}else if(actorexpression.includes(this.$login.f.
|
|
40
|
+
}else if(actorexpression.includes(this.$login.f.id)){ // P(张三) // 张三
|
|
41
|
+
return true
|
|
42
|
+
}else if(array[i]=='报装流程监控'){
|
|
41
43
|
return true
|
|
42
44
|
}
|
|
43
45
|
}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="treemx" class="tree fonte" v-if="refreshed" style="overflow-x: scroll;max-height: 80vh" >
|
|
3
|
+
<ul v-for='(rootindex,item) in menulist' :key="item.id">
|
|
4
|
+
<!-- 没有子集 -->
|
|
5
|
+
<li v-if='!item._child'>
|
|
6
|
+
<div class="treeItem" @click="selected(item)">
|
|
7
|
+
<a href="#">{{item.catename}}</a>
|
|
8
|
+
<div class="liright">
|
|
9
|
+
<span :class="item.enabled_text == '启用'?'bgYes':'bgNo'">{{item.enabled_text}}</span>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</li>
|
|
13
|
+
<!-- 有子集 -->
|
|
14
|
+
<li v-if='item._child'>
|
|
15
|
+
<div class="onechild treeItem" >
|
|
16
|
+
<a href="#" @click.native='toggleChildren(rootindex)'>{{item.expanded?'▼ ':'►'}}{{item.catename}}</a>
|
|
17
|
+
<div class="liright">
|
|
18
|
+
<span :class="item.enabled_text == '启用'?'bgYes':'bgNo'">{{item.enabled_text}}</span>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<ul v-show='item.expanded' class="childs" style="overflow-x: auto;">
|
|
22
|
+
<li v-for='(parentindex,child) in item._child' :key="child.id" >
|
|
23
|
+
<!-- 没有子集 -->
|
|
24
|
+
<div class="twochild treeItem marginL60" v-if="!child._child" @click="selected(child,rootindex)"><a href="#">{{child.catename}}</a>
|
|
25
|
+
<div class="liright">
|
|
26
|
+
<span :class="child.enabled_text == '启用'?'bgYes':'bgNo'">{{child.enabled_text}}</span>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<!-- 有子集 -->
|
|
30
|
+
<div class="twochild marginL60" v-if="child._child">
|
|
31
|
+
<div class="treeItem" >
|
|
32
|
+
<a href="#" @click.native='toggleChildren(rootindex,parentindex)'>{{child.expanded?'▼ ':'►'}}{{child.catename}}</a>
|
|
33
|
+
<div class="liright">
|
|
34
|
+
<span :class="child.enabled_text == '启用'?'bgYes':'bgNo'">{{child.enabled_text}}</span>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<ul v-show='child.expanded'>
|
|
39
|
+
<!-- 遍历第三层 -->
|
|
40
|
+
<li class="threechild" v-for="(childIndex,child1) in child._child" :key="child1.id" style="overflow-x: auto;">
|
|
41
|
+
<div class="treeItem marginL60">
|
|
42
|
+
<a href="#" @click.native="add(rootindex,parentindex,childIndex)">{{child1.catename}} <span v-if="child1.count">数量:{{child1.count}}</span></a>
|
|
43
|
+
</div>
|
|
44
|
+
</li>
|
|
45
|
+
</ul>
|
|
46
|
+
</div>
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
|
+
</li>
|
|
50
|
+
|
|
51
|
+
</ul>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<modal :show.sync="addshow2" v-ref:modal backdrop="false">
|
|
55
|
+
<header slot="modal-header" class="modal-header">
|
|
56
|
+
<button type="button" class="close" @click="closeadd"><span>×</span></button>
|
|
57
|
+
<h4 class="modal-title">数量</h4>
|
|
58
|
+
</header>
|
|
59
|
+
<article slot="modal-body" class="modal-body">
|
|
60
|
+
<input class="form-control" style="background-color: #f7fbff;"
|
|
61
|
+
type="number"
|
|
62
|
+
v-model="inputvalue"
|
|
63
|
+
:value="inputvalue"
|
|
64
|
+
/>
|
|
65
|
+
</article>
|
|
66
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
67
|
+
<!--<button type="button" class="btn btn-default" @click='addclose'>取消</button>-->
|
|
68
|
+
<button type="button" class="btn btn-success" @click='addconfirm2'>确认</button>
|
|
69
|
+
</footer>
|
|
70
|
+
</modal>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script>
|
|
74
|
+
export default {
|
|
75
|
+
title: 'new',
|
|
76
|
+
props: {
|
|
77
|
+
menulist: {
|
|
78
|
+
type: Array,
|
|
79
|
+
default: []
|
|
80
|
+
},
|
|
81
|
+
scrolltop:{
|
|
82
|
+
default:0
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
rootindex:null,
|
|
88
|
+
parentindex:null,
|
|
89
|
+
childIndex:null,
|
|
90
|
+
inputvalue:null,
|
|
91
|
+
addshow2:false,
|
|
92
|
+
refreshed:true, //强制刷新
|
|
93
|
+
menulist: [{
|
|
94
|
+
catename: '水果',
|
|
95
|
+
expanded: false,
|
|
96
|
+
_child: [{
|
|
97
|
+
catename: '苹果',
|
|
98
|
+
}, {
|
|
99
|
+
catename: '荔枝'
|
|
100
|
+
}, {
|
|
101
|
+
catename: '葡萄'
|
|
102
|
+
}, {
|
|
103
|
+
catename: '火龙果',
|
|
104
|
+
expanded: false,
|
|
105
|
+
_child: [
|
|
106
|
+
{
|
|
107
|
+
id: 0,
|
|
108
|
+
catename: '白心',
|
|
109
|
+
}, {
|
|
110
|
+
id: 1,
|
|
111
|
+
catename: '红心',
|
|
112
|
+
},
|
|
113
|
+
]
|
|
114
|
+
}]
|
|
115
|
+
}]
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
ready(){
|
|
119
|
+
this.updatecrollTop(this.scrolltop)
|
|
120
|
+
},
|
|
121
|
+
methods: {
|
|
122
|
+
updatecrollTop(hight){
|
|
123
|
+
console.log("scrollTop",hight)
|
|
124
|
+
let doc = document.getElementById("treemx")
|
|
125
|
+
doc.scrollTop = 0
|
|
126
|
+
doc.scrollTop = hight
|
|
127
|
+
// document.getElementById("treemx").scrollTop = hight
|
|
128
|
+
// document.documentElement.scrollTop = hight
|
|
129
|
+
// window.pageYOffset = hight
|
|
130
|
+
// document.body.scrollTop = hight
|
|
131
|
+
},
|
|
132
|
+
closeadd(){
|
|
133
|
+
this.rootindex = null
|
|
134
|
+
this.parentindex = null
|
|
135
|
+
this.childIndex = null
|
|
136
|
+
this.inputvalue = null
|
|
137
|
+
this.addshow2 = false
|
|
138
|
+
},
|
|
139
|
+
addconfirm2(){
|
|
140
|
+
this.menulist[this.rootindex]._child[this.parentindex]._child[this.childIndex].count = this.inputvalue
|
|
141
|
+
this.$dispatch('menulistSelected', this.menulist[this.rootindex]._child[this.parentindex]._child[this.childIndex],this.rootindex,this.parentindex)
|
|
142
|
+
this.closeadd()
|
|
143
|
+
},
|
|
144
|
+
add(rootindex,parentindex,childIndex){
|
|
145
|
+
this.rootindex = rootindex
|
|
146
|
+
this.parentindex = parentindex
|
|
147
|
+
this.childIndex = childIndex
|
|
148
|
+
this.addshow2 = true
|
|
149
|
+
},
|
|
150
|
+
selectedFormat(rootindex,parentindex,childIndex){
|
|
151
|
+
if(this.menulist[rootindex]._child[parentindex]._child[childIndex].showButton == undefined){
|
|
152
|
+
this.menulist[rootindex]._child[parentindex]._child[childIndex].showButton = false
|
|
153
|
+
}
|
|
154
|
+
this.menulist[rootindex]._child[parentindex]._child[childIndex].showButton = !this.menulist[rootindex]._child[parentindex]._child[childIndex].showButton
|
|
155
|
+
// this.refreshed = false
|
|
156
|
+
// this.$nextTick(()=>{
|
|
157
|
+
// this.refreshed = true
|
|
158
|
+
// })
|
|
159
|
+
},
|
|
160
|
+
selectedCount(rootindex,parentindex,childIndex){
|
|
161
|
+
this.menulist[rootindex]._child[parentindex]._child[childIndex].expanded = true
|
|
162
|
+
},
|
|
163
|
+
inputCount(item,parentindex,childIndex){
|
|
164
|
+
console.log('count',item.count)
|
|
165
|
+
this.$dispatch('menulistSelected', item,val1,val2)
|
|
166
|
+
},
|
|
167
|
+
selected(item,val1,val2) {
|
|
168
|
+
console.log('item', item)
|
|
169
|
+
this.$dispatch('menulistSelected', item,val1,val2)
|
|
170
|
+
},
|
|
171
|
+
toggleChildren(rootindex,parentindex) {
|
|
172
|
+
if(parentindex!=undefined){
|
|
173
|
+
this.menulist[rootindex]._child[parentindex].expanded = !this.menulist[rootindex]._child[parentindex].expanded
|
|
174
|
+
// this.refreshed = false
|
|
175
|
+
// this.$nextTick(()=>{
|
|
176
|
+
// this.refreshed = true
|
|
177
|
+
// })
|
|
178
|
+
}else if(rootindex!=undefined) {
|
|
179
|
+
this.menulist[rootindex].expanded = !this.menulist[rootindex].expanded
|
|
180
|
+
}
|
|
181
|
+
this.$dispatch('updateTree')
|
|
182
|
+
|
|
183
|
+
},
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</script>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
<style scoped>
|
|
190
|
+
|
|
191
|
+
ul {
|
|
192
|
+
display: block;
|
|
193
|
+
list-style-type: disc;
|
|
194
|
+
margin-block-start: 1em;
|
|
195
|
+
margin-block-end: 1em;
|
|
196
|
+
margin-inline-start: 0px;
|
|
197
|
+
margin-inline-end: 0px;
|
|
198
|
+
padding-inline-start: 40px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.addressBox {
|
|
202
|
+
position: fixed;
|
|
203
|
+
bottom: 0;
|
|
204
|
+
left: 0;
|
|
205
|
+
width: 100%;
|
|
206
|
+
height: 5.1rem;
|
|
207
|
+
z-index: 9;
|
|
208
|
+
background: #f5f5f5;
|
|
209
|
+
display: block !important;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
span:focus {
|
|
213
|
+
background-color: silver;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
a {
|
|
217
|
+
font-size: 20px;
|
|
218
|
+
text-decoration: none;
|
|
219
|
+
color: black;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
a:hover {
|
|
223
|
+
font-size: 20px;
|
|
224
|
+
text-decoration: none;
|
|
225
|
+
color: deepskyblue;
|
|
226
|
+
/*background-color: silver;*/
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.addressBox ul {
|
|
230
|
+
width: 33%;
|
|
231
|
+
height: 5.1rem;
|
|
232
|
+
background: #E6E6E6;
|
|
233
|
+
overflow-y: scroll;
|
|
234
|
+
overflow-x: auto;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.addressBox li {
|
|
238
|
+
height: 0.62rem;
|
|
239
|
+
font: normal 0.26rem/0.62rem "微软雅黑";
|
|
240
|
+
color: #666;
|
|
241
|
+
text-align: center;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.cityBox {
|
|
245
|
+
position: absolute;
|
|
246
|
+
top: 0;
|
|
247
|
+
left: 33%;
|
|
248
|
+
width: 100%;
|
|
249
|
+
height: 5.1rem;
|
|
250
|
+
display: none;
|
|
251
|
+
overflow-y: scroll;
|
|
252
|
+
z-index: 19;
|
|
253
|
+
background: #E6E6E6;
|
|
254
|
+
-webkit-overflow-scrolling: touch;
|
|
255
|
+
overflow-x: auto;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.cityBox ul {
|
|
259
|
+
width: 100%;
|
|
260
|
+
height: 5.1rem;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.cityBox li {
|
|
264
|
+
padding-left: 0.17rem;
|
|
265
|
+
text-align: left;
|
|
266
|
+
border-bottom: 0.01rem solid #e6e6e6;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.areaBox {
|
|
270
|
+
position: absolute;
|
|
271
|
+
top: 0;
|
|
272
|
+
left: 33%;
|
|
273
|
+
width: 33%;
|
|
274
|
+
height: 5.1rem;
|
|
275
|
+
display: none;
|
|
276
|
+
overflow-y: scroll;
|
|
277
|
+
z-index: 9999;
|
|
278
|
+
-webkit-overflow-scrolling: touch;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/*模态框*/
|
|
282
|
+
.model {
|
|
283
|
+
position: absolute;
|
|
284
|
+
top: 0%;
|
|
285
|
+
left: 0%;
|
|
286
|
+
background: rgba(0, 0, 0, 0.3);
|
|
287
|
+
width: 100%;
|
|
288
|
+
height: 100%;
|
|
289
|
+
position: fixed;
|
|
290
|
+
z-index: 9999;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.model-content {
|
|
294
|
+
position: absolute;
|
|
295
|
+
left: 0;
|
|
296
|
+
right: 0;
|
|
297
|
+
bottom: 0;
|
|
298
|
+
border-radius: .15rem;
|
|
299
|
+
margin: auto;
|
|
300
|
+
background-color: #ffffff;
|
|
301
|
+
text-align: center;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
input {
|
|
305
|
+
font-size: 0.32rem;
|
|
306
|
+
width: 100%;
|
|
307
|
+
text-align: center;
|
|
308
|
+
margin-top: .3rem;
|
|
309
|
+
border: 1px solid #ccc;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/*点击省份,出现城市*/
|
|
313
|
+
.addressBox .active {
|
|
314
|
+
background: #f5f5f5;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.addressBox .active .cityBox {
|
|
318
|
+
display: block;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/*点击城市,出现区域*/
|
|
322
|
+
.cityBox .active {
|
|
323
|
+
background: #f5f5f5;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.cityBox .active .areaBox {
|
|
327
|
+
display: block;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
</style>
|