apply-clients 5.0.35-7 → 5.0.35-73
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/.eslintrc.js +16 -16
- package/package.json +3 -3
- package/src/AndroidApp.vue +28 -28
- package/src/android.js +1 -1
- package/src/apply.js +14 -1
- package/src/components/app_apply/ApplyDownList.vue +168 -168
- package/src/components/app_apply/ApplyInfo.vue +56 -56
- package/src/components/app_apply/ApplyListUpload.vue +268 -268
- package/src/components/app_apply/ApplyToDoList.vue +2582 -4
- package/src/components/app_apply/Gongcheng.vue +3614 -0
- package/src/components/app_apply/OneToMany.vue +194 -0
- package/src/components/app_apply/PlaceControler.vue +299 -256
- package/src/components/app_apply/ServiceControl.vue +410 -15
- package/src/components/app_apply/ServiceView.vue +383 -383
- package/src/components/app_apply/ezhou/FeiMinYongV.vue +109 -109
- package/src/components/app_apply/ezhou/FeiMinYongVV.vue +100 -100
- package/src/components/app_apply/ezhou/MinYong.vue +92 -92
- package/src/components/app_apply/ezhou/ServiceView.vue +396 -208
- package/src/components/image/doc.jpg +0 -0
- package/src/components/image/dwg.png +0 -0
- package/src/components/image/dxf.png +0 -0
- package/src/components/image/excel.jpg +0 -0
- package/src/components/image/pdf.jpg +0 -0
- package/src/components/product/Common/ApplyValidateBill.vue +13 -6
- package/src/components/product/Common/PrintBill.vue +7 -6
- package/src/components/product/EngineeringManagement/EngineerUpload.vue +304 -0
- package/src/components/product/EngineeringManagement/EngineeringManagement.vue +137 -0
- package/src/components/product/EngineeringManagement/EngineeringSelect.vue +588 -0
- package/src/components/product/EngineeringSupervisory/EngineeringApplyStopInfo.vue +281 -0
- package/src/components/product/EngineeringSupervisory/EngineeringSupervisoryControl.vue +130 -0
- package/src/components/product/EngineeringSupervisory/EngineeringSupervisoryList.vue +350 -0
- package/src/components/product/Function/InstallInfoSelect.vue +255 -254
- package/src/components/product/Function/Service/FunctionServiceControl.vue +37 -1
- package/src/components/product/Function/functions/ApplyUpload.vue +556 -0
- package/src/components/product/Function/functions/BuyerMessage.vue +512 -512
- package/src/components/product/Function/functions/InstallFee.vue +570 -345
- package/src/components/product/Process/ExplorationSelect.vue +640 -636
- package/src/components/product/Process/Processes/CustomerRecordMessage.vue +2 -5
- package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +123 -37
- package/src/components/product/Process/Processes/Service/PaperTicketBill.vue +85 -0
- package/src/components/product/Process/Processes/Service/ServiceControl.vue +2150 -1808
- package/src/components/product/ServiceView.vue +16 -6
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +53 -6
- package/src/components/product/Supervisory/SupervisoryList.vue +350 -349
- package/src/components/product/applyReport/ApplyReport.vue +205 -0
- package/src/components/product/applyReport/PrintApplyReport.vue +116 -0
- package/src/components/product/stopInfo/ApplyStopInfo.vue +281 -280
- package/src/ezhouAndroid.js +13 -10
- package/src/index.js +8 -8
- package/src/main.js +32 -32
- package/src/plugins/commonService.js +11 -7
|
@@ -1,383 +1,383 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="auto select-overspread">
|
|
3
|
-
<div v-if="data.back_reason" class="panel panel-info">
|
|
4
|
-
<span style="color: red"> 请注意被退回原因为:{{data.back_reason}}</span>
|
|
5
|
-
</div>
|
|
6
|
-
<validator name="v">
|
|
7
|
-
<form class="form-horizontal">
|
|
8
|
-
<div class="col-sm-11 form-group">
|
|
9
|
-
<div v-for="(index,item) in data.fields">
|
|
10
|
-
<!--input-->
|
|
11
|
-
<div v-if="item.type==='input'" v-show="!item.hidden" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
|
|
12
|
-
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
13
|
-
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
|
|
14
|
-
<input class="form-control"
|
|
15
|
-
:type="item.type"
|
|
16
|
-
v-model="data.fields[index].value"
|
|
17
|
-
:placeholder="item.placeholder"
|
|
18
|
-
:value="data.fields[index].value"
|
|
19
|
-
:readonly="item.readonly"
|
|
20
|
-
:disable="item.disable"
|
|
21
|
-
@change="disabled_check(data.fields[index].required,data.fields[index].value)"
|
|
22
|
-
@blur ="check_disable"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<!--input-->
|
|
27
|
-
<div v-if="item.type==='number'" v-show="!item.hidden" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
|
|
28
|
-
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
29
|
-
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
|
|
30
|
-
<input class="form-control"
|
|
31
|
-
:type="item.type"
|
|
32
|
-
v-model="data.fields[index].value"
|
|
33
|
-
:placeholder="item.placeholder"
|
|
34
|
-
:value="data.fields[index].value"
|
|
35
|
-
:readonly="item.readonly"
|
|
36
|
-
:disable="item.disable"
|
|
37
|
-
@change="disabled_check(data.fields[index].required,data.fields[index].value)"
|
|
38
|
-
@blur ="check_disable"
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<!--时间datepicker-->
|
|
44
|
-
<div v-if="item.type==='datepicker'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-xs-12 form-group']">
|
|
45
|
-
<label style="margin-top: 0.7em" :class="item.label_bootstraped?item.label_bootstraped +' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
46
|
-
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
|
|
47
|
-
<datepicker
|
|
48
|
-
:placeholder="item.placeholder"
|
|
49
|
-
:value.sync="data.fields[index].value"
|
|
50
|
-
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
51
|
-
v-model="data.fields[index].value"
|
|
52
|
-
:width="'100%'"
|
|
53
|
-
class="form-control"
|
|
54
|
-
:readonly="item.readonly"
|
|
55
|
-
:disabled="item.disabled"
|
|
56
|
-
@blur ="check_disable"
|
|
57
|
-
:show-reset-button="reset">
|
|
58
|
-
</datepicker>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<!--textarea-->
|
|
64
|
-
<div v-if="item.type==='textarea'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
|
|
65
|
-
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
|
|
66
|
-
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-10'">
|
|
67
|
-
<textarea
|
|
68
|
-
:readonly="item.readonly"
|
|
69
|
-
:disabled="item.disabled"
|
|
70
|
-
class="form-control"
|
|
71
|
-
:rows="item.rows"
|
|
72
|
-
v-model="data.fields[index].value"
|
|
73
|
-
@change="disabled_check(data.fields[index].required,data.fields[index].value)"
|
|
74
|
-
@blur ="check_disable"
|
|
75
|
-
>
|
|
76
|
-
</textarea>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<!--radio-->
|
|
81
|
-
<div v-if="item.type==='radio'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
|
|
82
|
-
<label v-if="item.label" :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
|
|
83
|
-
<div class="col-xs-12">
|
|
84
|
-
<div :class="item.value_bootstraped?item.value_bootstraped:item.items.length%2 == 0?'col-xs-5': 'col-xs-3'" v-for="(index2,row) in item.items">
|
|
85
|
-
<label style="margin-top: 0.7em" for="row.label" :class="item.items.length%2 == 0?'col-xs-4': 'col-xs-2'">{{row.label}}</label>
|
|
86
|
-
<input @blur ="check_disable" :class="item.items.length%2 == 0?'col-xs-1': 'col-xs-1'" :readonly="item.readonly" :disabled="item.disabled" style="margin-top: 10px" type="radio" :name="index" :id="row.label" v-bind:value="data.fields[index].items[index2].value" v-model="data.fields[index].value">
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<!--select-->
|
|
92
|
-
<div v-if="item.type==='select'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
|
|
93
|
-
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
94
|
-
<v-select :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'" @blur ="check_disable" @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)" :readonly="item.readonly" :disable="item.disabled" :value.sync="data.fields[index].value" v-model="data.fields[index].value"
|
|
95
|
-
:options='item.options' :valueSingle="true"></v-select>
|
|
96
|
-
|
|
97
|
-
</div>
|
|
98
|
-
|
|
99
|
-
<!--checkbox-->
|
|
100
|
-
<div v-if="item.type==='checkbox'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
|
|
101
|
-
<label v-if="item.label" :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
|
|
102
|
-
<div style="margin-top: 0.7em" :class="item.value_bootstraped?item.value_bootstraped:'control-label col-sm-2'" v-for="(index2,row) in item.items">
|
|
103
|
-
<label class="font-size form-group col-sm-6">{{row.label}}</label>
|
|
104
|
-
<input :readonly="item.readonly" :disabled="item.disabled" type="checkbox" class="col-sm-6" :id="row.label" v-model="data.fields[index].items[index2].value">
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div class="col-sm-11 form-group">
|
|
112
|
-
<div class="form-group col-sm-6">
|
|
113
|
-
<label class=" col-sm-4 control-label">分公司:</label>
|
|
114
|
-
<div class="col-sm-5">
|
|
115
|
-
<input class="form-control" type="text" v-model="model.f_filiale" disabled>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
<div class="col-sm-6 form-group">
|
|
119
|
-
<label class="control-label col-sm-6">部门:</label>
|
|
120
|
-
<div class="col-sm-5">
|
|
121
|
-
<input type="text" class="form-control" disabled v-model="model.f_parentname"/>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
<div class="col-sm-11 form-group">
|
|
126
|
-
<div class="col-sm-6 form-group">
|
|
127
|
-
<label class="control-label col-sm-4">操作日期:</label>
|
|
128
|
-
<div class="col-sm-5">
|
|
129
|
-
<input type="text" class="form-control" disabled v-model="model.f_operate_date"/>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="col-sm-6 form-group">
|
|
133
|
-
<label class="control-label col-sm-6">操作人:</label>
|
|
134
|
-
<div class="col-sm-5">
|
|
135
|
-
<input type="text" class="form-control" disabled v-model="model.f_operator"/>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
|
|
140
|
-
</form>
|
|
141
|
-
</validator>
|
|
142
|
-
<div class="from-group col-xs-12">
|
|
143
|
-
<center>
|
|
144
|
-
<div v-for="(index,button) in data.buttons" :class="[data.buttons.length==4?'col-xs-3':'',data.buttons.length==3?'col-xs-4':'',data.buttons.length==2?'col-xs-6':'']">
|
|
145
|
-
<!-- 按钮组 -->
|
|
146
|
-
<button :disabled="(button.button_name==='提交'||button.button_name==='下发')&&disable_button"
|
|
147
|
-
type="button" @click="clicked(index,button)" style="border-radius:5px; "
|
|
148
|
-
:class="[(button.button_name==='提交'||button.button_name==='下发')&&disable_button?'btn btn-default':'btn btn-primary',data.buttons.length==4 ? 'col-xs-2 col-xs-offset-1':'',data.buttons.length==3 ? 'col-xs-2 col-xs-offset-2':'',data.buttons.length==2 ? 'col-xs-4 col-xs-offset-2':'']">
|
|
149
|
-
{{button.button_name}}
|
|
150
|
-
</button>
|
|
151
|
-
</div>
|
|
152
|
-
</center>
|
|
153
|
-
</div>
|
|
154
|
-
<div class="form-group col-xs-12" style="height: 10px;width: 100%"></div>
|
|
155
|
-
<!-- 模态框 -->
|
|
156
|
-
<modal v-if="showmodal" :show.sync="showmodal" v-ref:modal backdrop="false">
|
|
157
|
-
<header slot="modal-header" class="modal-header">
|
|
158
|
-
<button type="button" class="close" @click="closemodal"><span>×</span></button>
|
|
159
|
-
<h4 class="modal-title">{{model.button.button_name}}</h4>
|
|
160
|
-
</header>
|
|
161
|
-
<article slot="modal-body" class="modal-body">
|
|
162
|
-
<div class="col-sm-12" v-for="(index,button_field) in data.buttons[model.button.button_index].button_fields">
|
|
163
|
-
<label class="control-label col-sm-3" style="margin-top: 10px">{{button_field.label}}:</label>
|
|
164
|
-
<div class="col-sm-7">
|
|
165
|
-
<!--select-->
|
|
166
|
-
<input-select v-if="button_field.type=='select'" :value.sync="data.buttons[model.button.button_index].button_fields[index].value" v-model="data.buttons[model.button.button_index].button_fields[index].value"
|
|
167
|
-
:options='button_field.options'></input-select>
|
|
168
|
-
<!-- input -->
|
|
169
|
-
<input v-else type="text" class="form-control" v-model="data.buttons[model.button.button_index].button_fields[index].value"/>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
</article>
|
|
173
|
-
<footer slot="modal-footer" style="border-top:none" class="modal-footer">
|
|
174
|
-
<button v-show="showmodal" type="button" class="btn btn-primary" @click='acknowledge'>确认</button>
|
|
175
|
-
</footer>
|
|
176
|
-
</modal>
|
|
177
|
-
</div>
|
|
178
|
-
</template>
|
|
179
|
-
<script>
|
|
180
|
-
|
|
181
|
-
// Date格式化
|
|
182
|
-
Date.prototype.Format = function (fmt) {
|
|
183
|
-
var o = {
|
|
184
|
-
"M+": this.getMonth() + 1, //月份
|
|
185
|
-
"d+": this.getDate(), //日
|
|
186
|
-
"H+": this.getHours(), //小时
|
|
187
|
-
"m+": this.getMinutes(), //分
|
|
188
|
-
"s+": this.getSeconds(), //秒
|
|
189
|
-
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|
190
|
-
"S": this.getMilliseconds() //毫秒
|
|
191
|
-
};
|
|
192
|
-
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
193
|
-
for (var k in o)
|
|
194
|
-
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
195
|
-
return fmt;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
import Vue from 'vue'
|
|
199
|
-
|
|
200
|
-
export default {
|
|
201
|
-
title: '报建业务通用组件',
|
|
202
|
-
props: ['data'],
|
|
203
|
-
data () {
|
|
204
|
-
return {
|
|
205
|
-
model:{
|
|
206
|
-
button:{
|
|
207
|
-
button_name:null,
|
|
208
|
-
button_index:null
|
|
209
|
-
},
|
|
210
|
-
f_filiale:null,
|
|
211
|
-
f_parentname:null,
|
|
212
|
-
f_operate_date:null,
|
|
213
|
-
f_operator:null
|
|
214
|
-
},
|
|
215
|
-
data:null,
|
|
216
|
-
showmodal:false,
|
|
217
|
-
disable_button:true
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
created(){
|
|
221
|
-
// 初始化数据
|
|
222
|
-
this.initializtion()
|
|
223
|
-
},
|
|
224
|
-
methods: {
|
|
225
|
-
// 初始化数据
|
|
226
|
-
initializtion(){
|
|
227
|
-
console.log('进入serviceview的initializtion方法')
|
|
228
|
-
console.log(JSON.stringify(this.data))
|
|
229
|
-
// let temp = this.data
|
|
230
|
-
// let temp = JSON.parse()
|
|
231
|
-
// this.data = temp
|
|
232
|
-
// datepicker 没有值给当时值
|
|
233
|
-
if(this.data.fields){
|
|
234
|
-
for(let i=0;i<this.data.fields.length;i++){
|
|
235
|
-
if(this.data.fields[i].type==='datepicker'&&!this.data.fields[i].value){
|
|
236
|
-
this.data.fields[i].value=new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (this.data.filiale) {
|
|
242
|
-
this.model.f_filiale = this.data.f_filiale
|
|
243
|
-
} else if (Vue.user.orgs) {
|
|
244
|
-
this.model.f_filiale = Vue.user.orgs
|
|
245
|
-
} else {
|
|
246
|
-
this.model.f_filiale = Vue.user.f_fengongsi
|
|
247
|
-
}
|
|
248
|
-
if (this.data.f_parentname) {
|
|
249
|
-
this.model.f_parentname = this.data.f_parentname
|
|
250
|
-
} else if (Vue.user.f_department_name) {
|
|
251
|
-
this.model.f_parentname = Vue.user.f_department_name
|
|
252
|
-
} else {
|
|
253
|
-
this.model.f_parentname = Vue.user.f_parentname
|
|
254
|
-
}
|
|
255
|
-
if (this.data.operate_date) {
|
|
256
|
-
this.model.f_operate_date = this.data.operate_date
|
|
257
|
-
} else {
|
|
258
|
-
this.model.f_operate_date = new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
259
|
-
}
|
|
260
|
-
if (this.data.operator) {
|
|
261
|
-
this.model.f_operator = this.data.operator
|
|
262
|
-
} else {
|
|
263
|
-
this.model.f_operator = Vue.user.name
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
// 模态框点击确定按钮
|
|
267
|
-
acknowledge(){
|
|
268
|
-
for(let i=0;i<this.data.buttons[this.model.button.button_index].button_fields.length;i++){
|
|
269
|
-
this.model.button.button_fields[this.data.buttons[this.model.button.button_index].button_fields[i].field] = this.data.buttons[this.model.button.button_index].button_fields[i].value
|
|
270
|
-
}
|
|
271
|
-
this.showmodal=false
|
|
272
|
-
this.$dispatch('button',this.model)
|
|
273
|
-
},
|
|
274
|
-
// 关闭模态框
|
|
275
|
-
closemodal(){
|
|
276
|
-
this.showmodal=false
|
|
277
|
-
},
|
|
278
|
-
// 点击按钮
|
|
279
|
-
clicked(index,button){
|
|
280
|
-
console.log(`点击了按钮index:${index}+button:${JSON.stringify(button)}`);
|
|
281
|
-
// 组织model.fields数据
|
|
282
|
-
let modeldatas = {}
|
|
283
|
-
for(let i=0;i<this.data.fields.length;i++){
|
|
284
|
-
// checkbox特殊处理
|
|
285
|
-
if(this.data.fields[i].type==='checkbox'){
|
|
286
|
-
for(let j=0;j<this.data.fields[i].items.length;j++){
|
|
287
|
-
modeldatas[this.data.fields[i].items[j].field]=this.data.fields[i].items[j].value
|
|
288
|
-
}
|
|
289
|
-
}else{
|
|
290
|
-
modeldatas[this.data.fields[i].field]=this.data.fields[i].value
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
modeldatas.f_process_id = this.data.f_process_id
|
|
294
|
-
modeldatas.f_filiale = this.model.f_filiale
|
|
295
|
-
modeldatas.f_parentname = this.model.f_parentname
|
|
296
|
-
modeldatas.f_operator = this.model.f_operator
|
|
297
|
-
modeldatas.f_operate_date = this.model.f_operate_date
|
|
298
|
-
this.model = null
|
|
299
|
-
this.model = modeldatas
|
|
300
|
-
// 初始化model.button数据
|
|
301
|
-
let buttondatas = {
|
|
302
|
-
button_fields:{}
|
|
303
|
-
}
|
|
304
|
-
buttondatas.button_name=button.button_name
|
|
305
|
-
buttondatas.button_index=index
|
|
306
|
-
if(button.button_fields){
|
|
307
|
-
for(let i=0;i<button.button_fields.length;i++){
|
|
308
|
-
buttondatas.button_fields[button.button_fields[i].field]=button.button_fields[i].value
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
this.model.button =buttondatas
|
|
312
|
-
|
|
313
|
-
if(button.button_name==='退回'){
|
|
314
|
-
this.showmodal=true
|
|
315
|
-
}else if(button.button_name==='下发'){
|
|
316
|
-
this.showmodal=true
|
|
317
|
-
}else{
|
|
318
|
-
this.$dispatch('button',this.model)
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
// 级联操作预留
|
|
322
|
-
select_change(index){
|
|
323
|
-
this.$dispatch('select_cascade',index)
|
|
324
|
-
},
|
|
325
|
-
// 检测按钮的disable
|
|
326
|
-
disabled_check(required,value){
|
|
327
|
-
console.log("被检测到的值是什么")
|
|
328
|
-
console.log(required)
|
|
329
|
-
console.log(value)
|
|
330
|
-
if(required&&value){
|
|
331
|
-
this.disable_button = false
|
|
332
|
-
|
|
333
|
-
let fields = this.data.fields
|
|
334
|
-
let flag = false
|
|
335
|
-
for(let i = 0;i<fields.length;i++){
|
|
336
|
-
if(fields[i].type!=='checkbox'&&fields[i].required&&!fields[i].value){
|
|
337
|
-
flag = true
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
this.disable_button = flag
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
},
|
|
344
|
-
watch:{
|
|
345
|
-
'data.operate_date'(){
|
|
346
|
-
if(this.data.filiale){
|
|
347
|
-
this.model.f_filiale = this.data.filiale
|
|
348
|
-
}else{
|
|
349
|
-
this.model.f_filiale = Vue.user.f_parentname
|
|
350
|
-
}
|
|
351
|
-
if(this.data.f_parentname){
|
|
352
|
-
this.model.f_parentname = this.data.f_parentname
|
|
353
|
-
}else{
|
|
354
|
-
this.model.f_parentname = Vue.user.f_parentname
|
|
355
|
-
}
|
|
356
|
-
if(this.data.operate_date){
|
|
357
|
-
this.model.f_operate_date = this.data.operate_date
|
|
358
|
-
}else{
|
|
359
|
-
this.model.f_operate_date = new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
360
|
-
}
|
|
361
|
-
if(this.data.operator){
|
|
362
|
-
this.model.f_operator = this.data.operator
|
|
363
|
-
}else{
|
|
364
|
-
this.model.f_operator = Vue.user.name
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
deep:true
|
|
368
|
-
},
|
|
369
|
-
computed: {
|
|
370
|
-
// 输入后按钮检测
|
|
371
|
-
check_disable: function (){
|
|
372
|
-
let fields = this.data.fields
|
|
373
|
-
let flag = false
|
|
374
|
-
for(let i = 0;i<fields.length;i++){
|
|
375
|
-
if(fields[i].type!=='checkbox'&&fields[i].required&&!fields[i].value){
|
|
376
|
-
flag = true
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
this.disable_button = flag
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto select-overspread">
|
|
3
|
+
<div v-if="data.back_reason" class="panel panel-info">
|
|
4
|
+
<span style="color: red"> 请注意被退回原因为:{{data.back_reason}}</span>
|
|
5
|
+
</div>
|
|
6
|
+
<validator name="v">
|
|
7
|
+
<form class="form-horizontal">
|
|
8
|
+
<div class="col-sm-11 form-group">
|
|
9
|
+
<div v-for="(index,item) in data.fields">
|
|
10
|
+
<!--input-->
|
|
11
|
+
<div v-if="item.type==='input'" v-show="!item.hidden" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
|
|
12
|
+
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
13
|
+
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
|
|
14
|
+
<input class="form-control"
|
|
15
|
+
:type="item.type"
|
|
16
|
+
v-model="data.fields[index].value"
|
|
17
|
+
:placeholder="item.placeholder"
|
|
18
|
+
:value="data.fields[index].value"
|
|
19
|
+
:readonly="item.readonly"
|
|
20
|
+
:disable="item.disable"
|
|
21
|
+
@change="disabled_check(data.fields[index].required,data.fields[index].value)"
|
|
22
|
+
@blur ="check_disable"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<!--input-->
|
|
27
|
+
<div v-if="item.type==='number'" v-show="!item.hidden" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
|
|
28
|
+
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
29
|
+
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
|
|
30
|
+
<input class="form-control"
|
|
31
|
+
:type="item.type"
|
|
32
|
+
v-model="data.fields[index].value"
|
|
33
|
+
:placeholder="item.placeholder"
|
|
34
|
+
:value="data.fields[index].value"
|
|
35
|
+
:readonly="item.readonly"
|
|
36
|
+
:disable="item.disable"
|
|
37
|
+
@change="disabled_check(data.fields[index].required,data.fields[index].value)"
|
|
38
|
+
@blur ="check_disable"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!--时间datepicker-->
|
|
44
|
+
<div v-if="item.type==='datepicker'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-xs-12 form-group']">
|
|
45
|
+
<label style="margin-top: 0.7em" :class="item.label_bootstraped?item.label_bootstraped +' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
46
|
+
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
|
|
47
|
+
<datepicker
|
|
48
|
+
:placeholder="item.placeholder"
|
|
49
|
+
:value.sync="data.fields[index].value"
|
|
50
|
+
:format="'yyyy-MM-dd HH:mm:ss'"
|
|
51
|
+
v-model="data.fields[index].value"
|
|
52
|
+
:width="'100%'"
|
|
53
|
+
class="form-control"
|
|
54
|
+
:readonly="item.readonly"
|
|
55
|
+
:disabled="item.disabled"
|
|
56
|
+
@blur ="check_disable"
|
|
57
|
+
:show-reset-button="reset">
|
|
58
|
+
</datepicker>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<!--textarea-->
|
|
64
|
+
<div v-if="item.type==='textarea'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
|
|
65
|
+
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
|
|
66
|
+
<div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-10'">
|
|
67
|
+
<textarea
|
|
68
|
+
:readonly="item.readonly"
|
|
69
|
+
:disabled="item.disabled"
|
|
70
|
+
class="form-control"
|
|
71
|
+
:rows="item.rows"
|
|
72
|
+
v-model="data.fields[index].value"
|
|
73
|
+
@change="disabled_check(data.fields[index].required,data.fields[index].value)"
|
|
74
|
+
@blur ="check_disable"
|
|
75
|
+
>
|
|
76
|
+
</textarea>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
|
|
80
|
+
<!--radio-->
|
|
81
|
+
<div v-if="item.type==='radio'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
|
|
82
|
+
<label v-if="item.label" :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
|
|
83
|
+
<div class="col-xs-12">
|
|
84
|
+
<div :class="item.value_bootstraped?item.value_bootstraped:item.items.length%2 == 0?'col-xs-5': 'col-xs-3'" v-for="(index2,row) in item.items">
|
|
85
|
+
<label style="margin-top: 0.7em" for="row.label" :class="item.items.length%2 == 0?'col-xs-4': 'col-xs-2'">{{row.label}}</label>
|
|
86
|
+
<input @blur ="check_disable" :class="item.items.length%2 == 0?'col-xs-1': 'col-xs-1'" :readonly="item.readonly" :disabled="item.disabled" style="margin-top: 10px" type="radio" :name="index" :id="row.label" v-bind:value="data.fields[index].items[index2].value" v-model="data.fields[index].value">
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<!--select-->
|
|
92
|
+
<div v-if="item.type==='select'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
|
|
93
|
+
<label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
|
|
94
|
+
<v-select :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'" @blur ="check_disable" @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)" :readonly="item.readonly" :disable="item.disabled" :value.sync="data.fields[index].value" v-model="data.fields[index].value"
|
|
95
|
+
:options='item.options' :valueSingle="true"></v-select>
|
|
96
|
+
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<!--checkbox-->
|
|
100
|
+
<div v-if="item.type==='checkbox'" :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
|
|
101
|
+
<label v-if="item.label" :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
|
|
102
|
+
<div style="margin-top: 0.7em" :class="item.value_bootstraped?item.value_bootstraped:'control-label col-sm-2'" v-for="(index2,row) in item.items">
|
|
103
|
+
<label class="font-size form-group col-sm-6">{{row.label}}</label>
|
|
104
|
+
<input :readonly="item.readonly" :disabled="item.disabled" type="checkbox" class="col-sm-6" :id="row.label" v-model="data.fields[index].items[index2].value">
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="col-sm-11 form-group">
|
|
112
|
+
<div class="form-group col-sm-6">
|
|
113
|
+
<label class=" col-sm-4 control-label">分公司:</label>
|
|
114
|
+
<div class="col-sm-5">
|
|
115
|
+
<input class="form-control" type="text" v-model="model.f_filiale" disabled>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="col-sm-6 form-group">
|
|
119
|
+
<label class="control-label col-sm-6">部门:</label>
|
|
120
|
+
<div class="col-sm-5">
|
|
121
|
+
<input type="text" class="form-control" disabled v-model="model.f_parentname"/>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="col-sm-11 form-group">
|
|
126
|
+
<div class="col-sm-6 form-group">
|
|
127
|
+
<label class="control-label col-sm-4">操作日期:</label>
|
|
128
|
+
<div class="col-sm-5">
|
|
129
|
+
<input type="text" class="form-control" disabled v-model="model.f_operate_date"/>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="col-sm-6 form-group">
|
|
133
|
+
<label class="control-label col-sm-6">操作人:</label>
|
|
134
|
+
<div class="col-sm-5">
|
|
135
|
+
<input type="text" class="form-control" disabled v-model="model.f_operator"/>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
</form>
|
|
141
|
+
</validator>
|
|
142
|
+
<div class="from-group col-xs-12">
|
|
143
|
+
<center>
|
|
144
|
+
<div v-for="(index,button) in data.buttons" :class="[data.buttons.length==4?'col-xs-3':'',data.buttons.length==3?'col-xs-4':'',data.buttons.length==2?'col-xs-6':'']">
|
|
145
|
+
<!-- 按钮组 -->
|
|
146
|
+
<button :disabled="(button.button_name==='提交'||button.button_name==='下发')&&disable_button"
|
|
147
|
+
type="button" @click="clicked(index,button)" style="border-radius:5px; "
|
|
148
|
+
:class="[(button.button_name==='提交'||button.button_name==='下发')&&disable_button?'btn btn-default':'btn btn-primary',data.buttons.length==4 ? 'col-xs-2 col-xs-offset-1':'',data.buttons.length==3 ? 'col-xs-2 col-xs-offset-2':'',data.buttons.length==2 ? 'col-xs-4 col-xs-offset-2':'']">
|
|
149
|
+
{{button.button_name}}
|
|
150
|
+
</button>
|
|
151
|
+
</div>
|
|
152
|
+
</center>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="form-group col-xs-12" style="height: 10px;width: 100%"></div>
|
|
155
|
+
<!-- 模态框 -->
|
|
156
|
+
<modal v-if="showmodal" :show.sync="showmodal" v-ref:modal backdrop="false">
|
|
157
|
+
<header slot="modal-header" class="modal-header">
|
|
158
|
+
<button type="button" class="close" @click="closemodal"><span>×</span></button>
|
|
159
|
+
<h4 class="modal-title">{{model.button.button_name}}</h4>
|
|
160
|
+
</header>
|
|
161
|
+
<article slot="modal-body" class="modal-body">
|
|
162
|
+
<div class="col-sm-12" v-for="(index,button_field) in data.buttons[model.button.button_index].button_fields">
|
|
163
|
+
<label class="control-label col-sm-3" style="margin-top: 10px">{{button_field.label}}:</label>
|
|
164
|
+
<div class="col-sm-7">
|
|
165
|
+
<!--select-->
|
|
166
|
+
<input-select v-if="button_field.type=='select'" :value.sync="data.buttons[model.button.button_index].button_fields[index].value" v-model="data.buttons[model.button.button_index].button_fields[index].value"
|
|
167
|
+
:options='button_field.options'></input-select>
|
|
168
|
+
<!-- input -->
|
|
169
|
+
<input v-else type="text" class="form-control" v-model="data.buttons[model.button.button_index].button_fields[index].value"/>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</article>
|
|
173
|
+
<footer slot="modal-footer" style="border-top:none" class="modal-footer">
|
|
174
|
+
<button v-show="showmodal" type="button" class="btn btn-primary" @click='acknowledge'>确认</button>
|
|
175
|
+
</footer>
|
|
176
|
+
</modal>
|
|
177
|
+
</div>
|
|
178
|
+
</template>
|
|
179
|
+
<script>
|
|
180
|
+
|
|
181
|
+
// Date格式化
|
|
182
|
+
Date.prototype.Format = function (fmt) {
|
|
183
|
+
var o = {
|
|
184
|
+
"M+": this.getMonth() + 1, //月份
|
|
185
|
+
"d+": this.getDate(), //日
|
|
186
|
+
"H+": this.getHours(), //小时
|
|
187
|
+
"m+": this.getMinutes(), //分
|
|
188
|
+
"s+": this.getSeconds(), //秒
|
|
189
|
+
"q+": Math.floor((this.getMonth() + 3) / 3), //季度
|
|
190
|
+
"S": this.getMilliseconds() //毫秒
|
|
191
|
+
};
|
|
192
|
+
if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
|
193
|
+
for (var k in o)
|
|
194
|
+
if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
|
|
195
|
+
return fmt;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
import Vue from 'vue'
|
|
199
|
+
|
|
200
|
+
export default {
|
|
201
|
+
title: '报建业务通用组件',
|
|
202
|
+
props: ['data'],
|
|
203
|
+
data () {
|
|
204
|
+
return {
|
|
205
|
+
model:{
|
|
206
|
+
button:{
|
|
207
|
+
button_name:null,
|
|
208
|
+
button_index:null
|
|
209
|
+
},
|
|
210
|
+
f_filiale:null,
|
|
211
|
+
f_parentname:null,
|
|
212
|
+
f_operate_date:null,
|
|
213
|
+
f_operator:null
|
|
214
|
+
},
|
|
215
|
+
data:null,
|
|
216
|
+
showmodal:false,
|
|
217
|
+
disable_button:true
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
created(){
|
|
221
|
+
// 初始化数据
|
|
222
|
+
this.initializtion()
|
|
223
|
+
},
|
|
224
|
+
methods: {
|
|
225
|
+
// 初始化数据
|
|
226
|
+
initializtion(){
|
|
227
|
+
console.log('进入serviceview的initializtion方法')
|
|
228
|
+
console.log(JSON.stringify(this.data))
|
|
229
|
+
// let temp = this.data
|
|
230
|
+
// let temp = JSON.parse()
|
|
231
|
+
// this.data = temp
|
|
232
|
+
// datepicker 没有值给当时值
|
|
233
|
+
if(this.data.fields){
|
|
234
|
+
for(let i=0;i<this.data.fields.length;i++){
|
|
235
|
+
if(this.data.fields[i].type==='datepicker'&&!this.data.fields[i].value){
|
|
236
|
+
this.data.fields[i].value=new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (this.data.filiale) {
|
|
242
|
+
this.model.f_filiale = this.data.f_filiale
|
|
243
|
+
} else if (Vue.user.orgs) {
|
|
244
|
+
this.model.f_filiale = Vue.user.orgs
|
|
245
|
+
} else {
|
|
246
|
+
this.model.f_filiale = Vue.user.f_fengongsi
|
|
247
|
+
}
|
|
248
|
+
if (this.data.f_parentname) {
|
|
249
|
+
this.model.f_parentname = this.data.f_parentname
|
|
250
|
+
} else if (Vue.user.f_department_name) {
|
|
251
|
+
this.model.f_parentname = Vue.user.f_department_name
|
|
252
|
+
} else {
|
|
253
|
+
this.model.f_parentname = Vue.user.f_parentname
|
|
254
|
+
}
|
|
255
|
+
if (this.data.operate_date) {
|
|
256
|
+
this.model.f_operate_date = this.data.operate_date
|
|
257
|
+
} else {
|
|
258
|
+
this.model.f_operate_date = new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
259
|
+
}
|
|
260
|
+
if (this.data.operator) {
|
|
261
|
+
this.model.f_operator = this.data.operator
|
|
262
|
+
} else {
|
|
263
|
+
this.model.f_operator = Vue.user.name
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
// 模态框点击确定按钮
|
|
267
|
+
acknowledge(){
|
|
268
|
+
for(let i=0;i<this.data.buttons[this.model.button.button_index].button_fields.length;i++){
|
|
269
|
+
this.model.button.button_fields[this.data.buttons[this.model.button.button_index].button_fields[i].field] = this.data.buttons[this.model.button.button_index].button_fields[i].value
|
|
270
|
+
}
|
|
271
|
+
this.showmodal=false
|
|
272
|
+
this.$dispatch('button',this.model)
|
|
273
|
+
},
|
|
274
|
+
// 关闭模态框
|
|
275
|
+
closemodal(){
|
|
276
|
+
this.showmodal=false
|
|
277
|
+
},
|
|
278
|
+
// 点击按钮
|
|
279
|
+
clicked(index,button){
|
|
280
|
+
console.log(`点击了按钮index:${index}+button:${JSON.stringify(button)}`);
|
|
281
|
+
// 组织model.fields数据
|
|
282
|
+
let modeldatas = {}
|
|
283
|
+
for(let i=0;i<this.data.fields.length;i++){
|
|
284
|
+
// checkbox特殊处理
|
|
285
|
+
if(this.data.fields[i].type==='checkbox'){
|
|
286
|
+
for(let j=0;j<this.data.fields[i].items.length;j++){
|
|
287
|
+
modeldatas[this.data.fields[i].items[j].field]=this.data.fields[i].items[j].value
|
|
288
|
+
}
|
|
289
|
+
}else{
|
|
290
|
+
modeldatas[this.data.fields[i].field]=this.data.fields[i].value
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
modeldatas.f_process_id = this.data.f_process_id
|
|
294
|
+
modeldatas.f_filiale = this.model.f_filiale
|
|
295
|
+
modeldatas.f_parentname = this.model.f_parentname
|
|
296
|
+
modeldatas.f_operator = this.model.f_operator
|
|
297
|
+
modeldatas.f_operate_date = this.model.f_operate_date
|
|
298
|
+
this.model = null
|
|
299
|
+
this.model = modeldatas
|
|
300
|
+
// 初始化model.button数据
|
|
301
|
+
let buttondatas = {
|
|
302
|
+
button_fields:{}
|
|
303
|
+
}
|
|
304
|
+
buttondatas.button_name=button.button_name
|
|
305
|
+
buttondatas.button_index=index
|
|
306
|
+
if(button.button_fields){
|
|
307
|
+
for(let i=0;i<button.button_fields.length;i++){
|
|
308
|
+
buttondatas.button_fields[button.button_fields[i].field]=button.button_fields[i].value
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
this.model.button =buttondatas
|
|
312
|
+
|
|
313
|
+
if(button.button_name==='退回'){
|
|
314
|
+
this.showmodal=true
|
|
315
|
+
}else if(button.button_name==='下发'){
|
|
316
|
+
this.showmodal=true
|
|
317
|
+
}else{
|
|
318
|
+
this.$dispatch('button',this.model)
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
// 级联操作预留
|
|
322
|
+
select_change(index){
|
|
323
|
+
this.$dispatch('select_cascade',index)
|
|
324
|
+
},
|
|
325
|
+
// 检测按钮的disable
|
|
326
|
+
disabled_check(required,value){
|
|
327
|
+
console.log("被检测到的值是什么")
|
|
328
|
+
console.log(required)
|
|
329
|
+
console.log(value)
|
|
330
|
+
if(required&&value){
|
|
331
|
+
this.disable_button = false
|
|
332
|
+
|
|
333
|
+
let fields = this.data.fields
|
|
334
|
+
let flag = false
|
|
335
|
+
for(let i = 0;i<fields.length;i++){
|
|
336
|
+
if(fields[i].type!=='checkbox'&&fields[i].required&&!fields[i].value){
|
|
337
|
+
flag = true
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
this.disable_button = flag
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
watch:{
|
|
345
|
+
'data.operate_date'(){
|
|
346
|
+
if(this.data.filiale){
|
|
347
|
+
this.model.f_filiale = this.data.filiale
|
|
348
|
+
}else{
|
|
349
|
+
this.model.f_filiale = Vue.user.f_parentname
|
|
350
|
+
}
|
|
351
|
+
if(this.data.f_parentname){
|
|
352
|
+
this.model.f_parentname = this.data.f_parentname
|
|
353
|
+
}else{
|
|
354
|
+
this.model.f_parentname = Vue.user.f_parentname
|
|
355
|
+
}
|
|
356
|
+
if(this.data.operate_date){
|
|
357
|
+
this.model.f_operate_date = this.data.operate_date
|
|
358
|
+
}else{
|
|
359
|
+
this.model.f_operate_date = new Date().Format("yyyy-MM-dd HH:mm:ss")
|
|
360
|
+
}
|
|
361
|
+
if(this.data.operator){
|
|
362
|
+
this.model.f_operator = this.data.operator
|
|
363
|
+
}else{
|
|
364
|
+
this.model.f_operator = Vue.user.name
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
deep:true
|
|
368
|
+
},
|
|
369
|
+
computed: {
|
|
370
|
+
// 输入后按钮检测
|
|
371
|
+
check_disable: function (){
|
|
372
|
+
let fields = this.data.fields
|
|
373
|
+
let flag = false
|
|
374
|
+
for(let i = 0;i<fields.length;i++){
|
|
375
|
+
if(fields[i].type!=='checkbox'&&fields[i].required&&!fields[i].value){
|
|
376
|
+
flag = true
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
this.disable_button = flag
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
</script>
|