apply-clients 4.1.10-11 → 4.1.10-weinan

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.
Files changed (70) hide show
  1. package/index.html +30 -21
  2. package/package.json +10 -7
  3. package/src/AndroidApp.vue +1 -1
  4. package/src/apply.js +16 -7
  5. package/src/applyAndroid.js +43 -50
  6. package/src/components/Table.js +13 -13
  7. package/src/components/app_apply/AppChargeManagement.vue +622 -0
  8. package/src/components/app_apply/ApplyInfo.vue +56 -56
  9. package/src/components/app_apply/ApplyToDoList.vue +144 -165
  10. package/src/components/app_apply/FieldExploration.vue +3 -3
  11. package/src/components/app_apply/PlaceControler.vue +255 -258
  12. package/src/components/app_apply/ServiceControl.vue +289 -267
  13. package/src/components/app_apply/ServiceView.vue +363 -355
  14. package/src/components/app_apply/ToolsPage.vue +1 -1
  15. package/src/components/app_apply/Ventilation.vue +10 -10
  16. package/src/components/app_apply/materialshoufei.vue +184 -0
  17. package/src/components/product/ApplyCharge/ApplyChargeList.vue +251 -251
  18. package/src/components/product/Function/InstallFunction.vue +120 -95
  19. package/src/components/product/Function/InstallInfoSelect.vue +268 -206
  20. package/src/components/product/Function/Service/FunctionServiceControl.vue +206 -386
  21. package/src/components/product/Function/StopApplyCrrdList.vue +1 -1
  22. package/src/components/product/Function/functions/StopInstall.vue +7 -1
  23. package/src/components/product/Process/ExplorationSelect.vue +377 -501
  24. package/src/components/product/Process/ExplorationUser.vue +100 -133
  25. package/src/components/product/Process/Processes/InstallationDetails.vue +276 -246
  26. package/src/components/product/Process/Processes/UserFireInfo.vue +409 -0
  27. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +1458 -99
  28. package/src/components/product/Process/Processes/addressAndUserinfoManagementPro.vue +1221 -0
  29. package/src/components/product/Process/Processes/chargeManagement.vue +545 -552
  30. package/src/components/product/Process/Processes/devicesDetails.vue +834 -0
  31. package/src/components/product/Process/Processes/materialshoufei.vue +182 -0
  32. package/src/components/product/Process/Processes/printCharge.vue +12 -8
  33. package/src/components/product/Process/Processes/recordcancel.vue +50 -0
  34. package/src/components/product/Process/Processes/selectUserinfo.vue +199 -0
  35. package/src/components/product/Process/Processes/splitMaterial.vue +358 -0
  36. package/src/components/product/Process/Service/ServiceControl.vue +1236 -726
  37. package/src/components/product/Process/ShowBackReason.vue +21 -6
  38. package/src/components/product/ServiceView.vue +557 -575
  39. package/src/components/product/Stop/StopApply.vue +101 -0
  40. package/src/components/product/Stop/StopApplyList.vue +257 -0
  41. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +150 -210
  42. package/src/components/product/Supervisory/SupervisoryControl.vue +124 -173
  43. package/src/components/product/Supervisory/SupervisoryList.vue +191 -310
  44. package/src/components/product/Supervisory/SupervisoryhCart.vue +76 -99
  45. package/src/components/product/Test.vue +8 -4
  46. package/src/components/product/VueUtils/ApplyUpload.vue +4 -4
  47. package/src/components/product/VueUtils/ToolsPage.vue +1 -1
  48. package/src/main.js +25 -32
  49. package/static/images/lefticon//347/237/251/345/275/2421183.png +0 -0
  50. package/src/components/app_apply/android/ExplorationSelectApp.vue +0 -404
  51. package/src/components/app_apply/android/ExplorationUserApp.vue +0 -189
  52. package/src/components/app_apply/android/ServiceControlApp.vue +0 -714
  53. package/src/components/app_apply/android/ServiceViewApp.vue +0 -736
  54. package/src/components/product/Function/OrderCenter/Step.vue +0 -153
  55. package/src/components/product/Function/OrderCenter/download.png +0 -0
  56. package/src/components/product/Function/OrderCenter/orderApplyDispose.vue +0 -203
  57. package/src/components/product/Function/OrderCenter/orderCenter.vue +0 -41
  58. package/src/components/product/Function/OrderCenter/orderList.vue +0 -265
  59. package/src/components/product/Function/functions/InstallFee.vue +0 -1047
  60. package/src/components/product/Function/functions/PrestoreFee.vue +0 -630
  61. package/src/components/product/Procedures/ProceduresDataGrid.vue +0 -1022
  62. package/src/components/product/Process/ModifyUserFiles.vue +0 -452
  63. package/src/components/product/Process/ProcessInfo/history_control.vue +0 -135
  64. package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +0 -1073
  65. package/src/components/product/Process/Processes/CustomerRecordMessage.vue +0 -949
  66. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +0 -203
  67. package/src/components/product/Process/Processes/Service/GasStop.vue +0 -96
  68. package/src/components/product/Process/Processes/Service/ServiceControl.vue +0 -2569
  69. package/src/components/product/ReportForm/WaterReport.vue +0 -359
  70. package/src/components/product/VueUtils/rightview/InstallCardList2.vue +0 -261
@@ -1,119 +1,138 @@
1
1
  <template>
2
- <div class="auto select-overspread" v-if="refresh">
3
- <div class="panel panel-info" v-if="!data.titlehidden">
4
- <div class="panel-heading">
5
- <h3 class="panel-title">
6
- <span>{{data.title}}</span>
7
- </h3>
8
- </div>
9
- </div>
2
+ <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
10
3
  <validator name="v">
11
4
  <form class="form-horizontal">
12
- <div class="col-sm-12 form-group">
13
- <div v-for="(index,item) in data.fields">
5
+ <div class="form-group">
6
+ <div v-for="(index,item) in data.fields" style="">
14
7
  <!--input-->
15
- <div :style="item.style? item.style+';height: 34px;':'height: 34px;'"
8
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
16
9
  v-if="item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email'"
17
10
  v-show="!item.hidden"
18
- :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']">
19
- <label :style="item.label_style? item.label_style:''"
20
- :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':item.label_style?'':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
21
- <div :style="item.value_style? item.value_style:''"
22
- :class="item.value_bootstraped?item.value_bootstraped:item.value_style?'':'col-sm-6'">
23
- <input class="form-control" style="background-color: #f7fbff;"
11
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
12
+ <label :style="item.label_style ? item.label_style : ''"
13
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
14
+ <div :style="item.value_style ? item.value_style:''"
15
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
16
+ <input class="form-control input_view" style=""
24
17
  :type="item.type"
25
18
  v-model="data.fields[index].value"
26
19
  :placeholder="item.placeholder"
27
20
  :value="data.fields[index].value"
28
21
  :readonly="item.readonly"
29
22
  :disabled="item.disabled"
30
- @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)"
31
- @blur="select_change(index),check_disable"
23
+ @change="onchange(index)"
24
+ @blur="onblur(index)"
25
+ @input="oninput(index)"
32
26
  />
33
27
  <span
34
- v-if="data.fields[index].error&&data.fields[index].error.msg&&data.fields[index].error.flag"
35
- style="color: red">{{data.fields[index].error.msg}}</span>
28
+ v-if="item.error&&item.error.msg&&item.error.flag"
29
+ style="color: red">{{item.error.msg}}</span>
36
30
  </div>
37
31
  </div>
38
32
  <!--时间datepicker-->
39
- <div :style="item.style? item.style+';height: 34px;':'height: 34px;'" v-if="item.type==='datepicker'"
33
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
34
+ v-if="item.type==='datepicker'"
40
35
  v-show="!item.hidden"
41
- :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']">
36
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
42
37
  <label
43
- :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':'control-label control-label-justify col-sm-6'">{{item.label}}</label>
44
- <div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
38
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
39
+ <div :style="item.value_style ? item.value_style:''"
40
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
45
41
  <datepicker
46
- @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)"
47
- @blur="select_change(index),check_disable"
42
+ @change="onchange(index)"
43
+ @blur="onblur(index)"
48
44
  :placeholder="item.placeholder"
49
45
  :value.sync="data.fields[index].value"
50
- :format="'yyyy-MM-dd'"
46
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
51
47
  v-model="data.fields[index].value"
52
- :readonly="showadd_fields.fields[index].readonly"
48
+ :readonly="item.readonly"
53
49
  :disabled="item.disabled"
54
50
  :show-reset-button="reset">
55
51
  </datepicker>
56
52
  </div>
57
53
  <span
58
- v-if="showadd_fields.fields[index].error&&showadd_fields.fields[index].error.msg&&showadd_fields.fields[index].error.flag"
59
- style="color: red">{{showadd_fields.fields[index].error.msg}}</span>
54
+ v-if="item.error&&item.error.msg&&item.error.flag"
55
+ style="color: red">{{item.error.msg}}</span>
60
56
  </div>
61
57
 
62
58
  <!--textarea-->
63
- <div :style="item.style? item.style:'height: 34px;'" v-if="item.type==='textarea'" v-show="!item.hidden"
64
- :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 :style="item.label_style? item.label_style:''"
66
- :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':item.label_style?'':'control-label-justify control-label col-sm-3'">{{item.label}}</label>
67
- <div :style="item.value_style? item.value_style:''"
68
- :class="item.value_bootstraped?item.value_bootstraped:item.value_style?'':'col-sm-10'">
59
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
60
+ v-if="item.type==='textarea'" v-show="!item.hidden"
61
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
62
+ <label :style="item.label_style ? item.label_style : ''"
63
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
64
+ <div :style="item.value_style ? item.value_style:''"
65
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
69
66
  <textarea
70
67
  :readonly="item.readonly"
71
68
  :disabled="item.disabled"
72
- class="form-control"
73
- style="background-color: #f7fbff;"
69
+ class="form-control input_view"
70
+ style="width: 100%;height: 100%"
74
71
  :rows="item.rows"
75
72
  v-model="data.fields[index].value"
76
- @change="disabled_check(data.fields[index].required,data.fields[index].value)"
77
- @blur="check_disable"
73
+ :value="data.fields[index].value"
74
+ @change="onchange(index)"
75
+ @blur="onblur(index)"
76
+ @input="oninput(index)"
78
77
  >
79
78
  </textarea>
80
79
  </div>
80
+ <span
81
+ v-if="item.error&&item.error.msg&&item.error.flag"
82
+ style="color: red">{{item.error.msg}}</span>
81
83
  </div>
82
84
 
83
85
  <!--radio-->
84
- <div v-if="item.type==='radio'"
85
- :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']">
86
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
87
+ v-if="item.type==='radio'"
88
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
86
89
  <label v-if="item.label"
87
90
  :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':'control-label-justify control-label col-sm-2'">{{item.label}}</label>
88
91
  <div
92
+ :style="item.value_style ? item.value_style:''"
89
93
  :class="item.value_bootstraped?item.value_bootstraped:item.items.length%2 == 0?'col-sm-5': 'col-sm-3'"
90
94
  v-for="(index2,row) in item.items">
91
- <label for="row.label"
95
+ <label :for="row.label"
92
96
  :class="item.items.length%2 == 0?'col-sm-3 control-label': 'col-sm-2 control-label'">{{row.label}}</label>
93
- <input @blur="check_disable"
97
+ <input @blur="onblur(index)"
94
98
  :class="item.items.length%2 == 0?'col-sm-3 control-label': 'col-sm-2 control-label'"
95
99
  :readonly="item.readonly" :disabled="item.disabled" style="margin-top: 10px" type="radio"
96
100
  :name="index" :id="row.label" v-bind:value="data.fields[index].items[index2].value"
97
101
  v-model="data.fields[index].value">
98
102
  </div>
103
+ <span
104
+ v-if="item.error&&item.error.msg&&item.error.flag"
105
+ style="color: red">{{item.error.msg}}</span>
99
106
  </div>
100
107
 
101
108
  <!--select-->
102
- <div style="height: 34px" v-if="item.type==='select'" v-show="!item.hidden"
103
- :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']">
109
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
110
+ v-if="item.type==='select'" v-show="!item.hidden"
111
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
104
112
  <label
105
- :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
106
- <input-select :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'" @blur="check_disable"
107
- @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)"
108
- :readonly="item.readonly" :disabled="item.disabled" :value.sync="data.fields[index].value"
109
- v-model="data.fields[index].value"
110
- :options='data.fields[index].options' :valueSingle="true"></input-select>
111
-
113
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
114
+ <div :style="item.value_style ? item.value_style:''"
115
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
116
+ <input-select
117
+ class="select select_list"
118
+ @blur="onblur(index)"
119
+ @change="onchange(index)"
120
+ :readonly="item.readonly"
121
+ :disable="item.disabled"
122
+ :value.sync="data.fields[index].value"
123
+ v-model="data.fields[index].value"
124
+ :options='data.fields[index].options'
125
+ :valueSingle="true"></input-select>
126
+ </div>
127
+ <span
128
+ v-if="item.error&&item.error.msg&&item.error.flag"
129
+ style="color: red">{{item.error.msg}}</span>
112
130
  </div>
113
131
 
114
132
  <!--checkbox-->
115
- <div v-if="item.type==='checkbox'"
116
- :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']">
133
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
134
+ v-if="item.type==='checkbox'"
135
+ :class="[item.required&&!(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
117
136
  <label v-if="item.label"
118
137
  :class="item.label_bootstraped?item.label_bootstraped+' control-label ':'control-label col-sm-2'">{{item.label}}</label>
119
138
  <div style="margin-top: 6px"
@@ -121,100 +140,172 @@
121
140
  v-for="(index2,row) in item.items">
122
141
  <label class="font-size form-group col-sm-6">{{row.label}}</label>
123
142
  <input :readonly="item.readonly" :disabled="item.disabled" type="checkbox" class="col-sm-6"
124
- :id="row.label" v-model="data.fields[index].items[index2].value">
143
+ :id="row.label" v-model="data.fields[index].items[index2].value" @blur="onblur(index)" >
125
144
  </div>
126
145
  </div>
127
146
  </div>
128
- <!-- onetomany -->
129
- <div class="col-sm-12" v-for="(i,datagrid) in data.onetomany">
130
- <h5 v-show="datagrid.title" style="text-align: center;color: darkcyan;background-color: #00A3F0">
131
- {{datagrid.title}}</h5>
132
- <table v-show="!datagrid.hidden" class="table table-bordered table-striped table-hover">
133
- <tr style="background-color: #00A3F0">
134
- <th style="text-align: center;border-color: #00A3F0"><font color="white">序号</font></th>
135
- <th v-for="labels in datagrid.fields" style="text-align: center;border-color: #00A3F0">
136
- <nobr><font color="white">{{labels.label}}</font></nobr>
137
- </th>
138
- <th style="text-align: center;border-color: #00A3F0;padding: 0px">
139
- <button type="button" @click="$dispatch('add',i)" class="btn btn-warning"
140
- v-if="!data.onetomany[i].nopower && showprint">
141
- +
142
- </button>
143
- </th>
144
- </tr>
145
- <tr v-for="(j,row) in model.rows[i]">
146
- <td style="text-align: center">{{$index+1}}</td>
147
- <td v-for="key in surBodyData[i]" style="text-align: center">
148
- {{row[key]}}
149
- </td>
150
- <td style="text-align: center">
151
- <a href="#" @click="delete(i,j)" v-if="!data.onetomany[i].nopower">删除</a>
152
- </td>
153
- </tr>
154
- </table>
155
- </div>
156
147
  </div>
148
+ <!-- onetomany -->
149
+ <div class="" v-for="(i,item) in data.onetomany" style="overflow:auto;width:100%">
150
+ <table v-show="!item.hidden" class="table table-bordered table-striped table-hover" style="white-space:nowrap">
151
+ <tr>
152
+ <th>序号</th>
153
+ <th v-for="field in item.fields" v-if="!field.displayPosition || field.displayPosition === '*' || field.displayPosition === 'list'">
154
+ <nobr>{{field.label}}</nobr>
155
+ </th>
156
+ <th v-if="!item.hiddenOperate">
157
+ <button type="button" @click="add(i)" class="btn btn-info"
158
+ v-if="showprint && !item.addHidden">
159
+ <span v-if="item.addText === 'default' || !item.addText" class="glyphicon glyphicon-plus" aria-hidden="true"></span>
160
+ <span v-else :style="item.addStyle">{{item.addText}}</span>
161
+ </button>
162
+ </th>
163
+ </tr>
164
+ <tr v-for="(j,row) in item.rows" style="">
165
+ <td style="text-align: center">{{$index+1}}</td>
166
+ <td v-for="key in item.fields" v-if="!key.displayPosition || key.displayPosition === '*' || key.displayPosition === 'list'" style="text-align: center">
167
+ {{row[key.field]}}
168
+ </td>
169
+ <td style="text-align: center" v-if="!item.hiddenOperate">
170
+ <span @click="update(i,j)" v-if="showprint && !item.updateHidden">
171
+ <span v-if="item.updateText === 'default' || !item.updateText" class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
172
+ <span v-else :style="item.updateStyle">{{item.updateText}}</span>
173
+ </span>
174
+ <span @click="delete(i,j)" v-if="showprint && !item.deleteHidden" style="margin-left: 10px">
175
+ <span v-if="item.deleteText === 'default' || !item.deleteText" class="glyphicon glyphicon-trash" aria-hidden="true"></span>
176
+ <span v-else :style="item.deleteStyle">{{item.deleteText}}</span>
177
+ </span>
178
+ </td>
179
+ </tr>
180
+ </table>
181
+ </div>
182
+
183
+ <div v-for="(i,item) in data.components">
184
+ <component :is="item.name" :selectdata="data" :mark="item.mark" ></component>
185
+ </div>
186
+
187
+ <!--自定义组件-->
188
+ <slot></slot>
189
+ <!--公司等属性-->
157
190
  <div class="col-sm-12 form-group text-center" style="padding-top:8px">
158
- <div class="form-group col-sm-3" align="content-center">
159
- <label class=" col-sm-4 control-label">所属公司:</label>
160
- <div class="col-sm-8">
161
- <input class="form-control" type="text" v-model="model.f_filiale" disabled>
191
+ <div class="col-sm-3 form-group center-block">
192
+ <label class="col-sm-5">所属公司:</label>
193
+ <div class="col-sm-6" style="text-align: left">
194
+ {{model.f_filiale}}
162
195
  </div>
163
196
  </div>
164
- <!-- <div class="col-sm-1 form-group center-block">-->
165
- <!-- </div>-->
166
- <div class="col-sm-2 form-group" style="margin-left: 50px">
167
- <label class="control-label col-sm-4">部门:</label>
168
- <div class="col-sm-8">
169
- <input type="text" class="form-control" disabled v-model="model.f_parentname"/>
197
+ <div class="col-sm-3 form-group center-block">
198
+ <label class="col-sm-5">部门:</label>
199
+ <div class="col-sm-6" style="text-align: left">
200
+ {{model.f_parentname}}
170
201
  </div>
171
202
  </div>
172
- <!-- <div class="col-sm-1 form-group center-block">-->
173
- <!-- </div>-->
174
- <div class="col-sm-2 form-group" style="margin-left: 50px">
175
- <label class="control-label col-sm-6">操作人:</label>
176
- <div class="col-sm-6 ">
177
- <input type="text" class="form-control" disabled v-model="model.f_operator"/>
203
+ <div class="col-sm-3 form-group center-block">
204
+ <label class="col-sm-5">操作人:</label>
205
+ <div class="col-sm-6 " style="text-align: left">
206
+ {{model.f_operator}}
178
207
  </div>
179
208
  </div>
180
- <!-- <div class="col-sm-1 form-group center-block">-->
181
- <!-- </div>-->
182
- <div class="col-sm-2 form-group" style="margin-left: 50px">
183
- <label class="control-label col-sm-5">操作日期:</label>
184
- <div class="col-sm-7">
185
- <input type="text" class="form-control" disabled v-model="model.f_operate_date"/>
209
+ <div class="col-sm-3 form-group center-block">
210
+ <label class="col-sm-5">操作日期:</label>
211
+ <div class="col-sm-6" style="text-align: left">
212
+ {{model.f_operate_date}}
186
213
  </div>
187
214
  </div>
188
215
  </div>
216
+
189
217
  </form>
190
218
  </validator>
191
- <div class="from-group col-sm-11">
219
+
220
+ <!-- 按钮组 -->
221
+ <div class="from-group col-sm-12" style="margin-top: 20px;height: 100px">
192
222
  <center>
193
223
  <!-- 按钮组 -->
194
224
  <button v-for="(index,button) in data.buttons"
195
225
  :disabled="(button.button_name==='提交'||button.button_name==='下发')&&disable_button" type="button"
196
226
  @click="clicked(index,button)"
197
227
  :class="(button.button_name==='提交'||button.button_name==='下发')&&disable_button?'btn btn-default':'btn btn-primary'"
198
- style="width:80px; margin-left:50px;">
228
+ v-if="!button.hidden"
229
+ style="min-width:100px; margin-right:50px;">
199
230
  {{button.button_name}}
200
231
  </button>
201
232
  </center>
202
233
  </div>
234
+
235
+ <!-- onetomany模态框 -->
236
+ <modal v-if="show" :show.sync="show" backdrop="false" :large="modalSize === 'large' ? true : false" :small="modalSize === 'small' ? true : false">
237
+ <header slot="modal-header" class="modal-header">
238
+ <button type="button" class="close" @click="closemodal(modeltitle)"><span>&times;</span></button>
239
+ <span class="modal-title"><font
240
+ size="3">{{modeltitle}}</font></span>
241
+ </header>
242
+ <article slot="modal-body" class="modal-body clearfix">
243
+ <div
244
+ :class="[item.required&&!(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped:'col-sm-12']"
245
+ v-for="(index,item) in data.onetomany[onetomany_index].fields" v-if="!item.displayPosition || item.displayPosition === '*' || item.displayPosition === 'from'">
246
+ <label v-show="!item.hidden" :class="item.label_bootstraped ? item.label_bootstraped + ' control-label' : 'control-label col-sm-3'" style="margin-top: 10px">{{item.label}}:</label>
247
+ <div :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-7'" v-show="!item.hidden">
248
+ <!--时间datepicker-->
249
+ <datepicker
250
+ v-if="item.type=='datepicker'"
251
+ @change="onchange_modal(index)"
252
+ @blur="onblur_modal(index)"
253
+ :placeholder="item.placeholder"
254
+ :value.sync="data.onetomany[onetomany_index].fields[index].value"
255
+ :format="'yyyy-MM-dd'"
256
+ v-model="data.onetomany[onetomany_index].fields[index].value"
257
+ :readonly="item.readonly"
258
+ :disabled="item.disabled"
259
+ :show-reset-button="reset">
260
+ </datepicker>
261
+ <!--select-->
262
+ <input-select
263
+ @change="onchange_modal(index)"
264
+ v-if="item.type=='select'"
265
+ @blur="onblur_modal(index)"
266
+ :value.sync="data.onetomany[onetomany_index].fields[index].value"
267
+ v-model="data.onetomany[onetomany_index].fields[index].value"
268
+ :options='data.onetomany[onetomany_index].fields[index].options'>
269
+ </input-select>
270
+ <!-- input -->
271
+ <input v-if="item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email'"
272
+ class="form-control"
273
+ :type="item.type"
274
+ v-model="data.onetomany[onetomany_index].fields[index].value"
275
+ :placeholder="item.placeholder"
276
+ :value="data.onetomany[onetomany_index].fields[index].value"
277
+ :readonly="item.readonly"
278
+ :disabled="item.disabled"
279
+ @change="onchange_modal(index)"
280
+ @blur="onblur_modal(index)"
281
+ @input="oninput_modal(index)"
282
+ />
283
+ </div>
284
+ </div>
285
+ </article>
286
+ <footer slot="modal-footer" class="modal-footer">
287
+ <button :class="disable_button_onetomany?'btn btn-default':'btn btn-primary'"
288
+ :disabled="disable_button_onetomany" type="button" @click="confirm_modal(modeltitle)">
289
+ 确认
290
+ </button>
291
+ </footer>
292
+ </modal>
293
+
203
294
  <!-- 按钮模态框 -->
204
- <modal v-if="showmodal" :show.sync="showmodal" v-ref:modal backdrop="false">
295
+ <modal v-if="showbutmodal" :show.sync="showbutmodal" v-ref:modal backdrop="false">
205
296
  <header slot="modal-header" class="modal-header">
206
- <button type="button" class="close" @click="closemodal"><span>&times;</span></button>
297
+ <button type="button" class="close" @click="closemodal('but')"><span>&times;</span></button>
207
298
  <h4 class="modal-title">{{model.button.button_name}}</h4>
208
299
  </header>
209
300
  <article slot="modal-body" class="modal-body">
210
- <div class="col-sm-12" v-for="(index,button_field) in data.buttons[model.button.button_index].button_fields">
211
- <label class="control-label col-sm-3" style="margin-top: 10px">{{button_field.label}}:</label>
301
+ <div class="col-sm-12" v-for="(index,button) in data.buttons[model.button.button_index].button_fields">
302
+ <label class="control-label col-sm-3" style="margin-top: 10px">{{button.label}}:</label>
212
303
  <div class="col-sm-7">
213
304
  <!--select-->
214
- <input-select v-if="button_field.type=='select'"
305
+ <input-select v-if="button.type=='select'"
215
306
  :value.sync="data.buttons[model.button.button_index].button_fields[index].value"
216
307
  v-model="data.buttons[model.button.button_index].button_fields[index].value"
217
- :options='button_field.options'></input-select>
308
+ :options='button.options'></input-select>
218
309
  <!-- input -->
219
310
  <input v-else type="text" class="form-control"
220
311
  v-model="data.buttons[model.button.button_index].button_fields[index].value"/>
@@ -222,101 +313,30 @@
222
313
  </div>
223
314
  </article>
224
315
  <footer slot="modal-footer" style="border-top:none" class="modal-footer">
225
- <button v-show="showmodal" type="button" class="btn btn-primary" @click='acknowledge'>确认</button>
316
+ <button type="button" class="btn btn-primary" :disabled="disable_button_but" @click='confirm_but_modal()'>确认</button>
226
317
  </footer>
227
318
  </modal>
228
-
229
-
230
- <!-- onetomany新增模态框 -->
231
- <div class="auto onetomanymodal"
232
- style="z-index:8888;box-shadow: 0px 0px 100px 10px grey;position: fixed;"
233
- v-if="showadd">
234
-
235
- <div class="auto">
236
-
237
- <div style="padding-top: 15px;padding-left: 15px;padding-right: 15px;">
238
- <button type="button" class="close" @click="closemodal(modeltitle)"><span>&times;</span></button>
239
- <span class="modal-title" style="border-bottom: 1px solid #e5e5e5;"><font
240
- size="3">{{modeltitle}}</font></span>
241
- </div>
242
-            
243
- <div style="padding-top: 15px;border-top: 0px solid #e5e5e5;border-bottom: 0px solid #e5e5e5;">
244
- <div class="col-sm-12" v-for="(index,showadd_field) in showadd_fields.fields" v-if="refresh_modal">
245
- <label v-show="!showadd_field.hidden" class="control-label col-sm-3" style="margin-top: 10px">{{showadd_field.label}}:</label>
246
- <div class="col-sm-7" v-show="!showadd_field.hidden">
247
- <!--时间datepicker-->
248
- <div v-if="showadd_field.type=='datepicker'"
249
- :class="[showadd_fields[index].required&&!(showadd_fields.fields[index].value) ? 'has-error' : '']">
250
- <div>
251
- <datepicker
252
- @change="select_change_modal(index),disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
253
- @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
254
- :placeholder="showadd_field.placeholder"
255
- :value.sync="showadd_fields.fields[index].value"
256
- :format="'yyyy-MM-dd'"
257
- v-model="showadd_fields.fields[index].value"
258
- :readonly="showadd_fields.fields[index].readonly"
259
- :disabled="showadd_fields.fields[index].disabled"
260
- :show-reset-button="reset">
261
- </datepicker>
262
- </div>
263
- </div>
264
- <!--select-->
265
- <input-select
266
- @change="select_change_modal(index),disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
267
- v-if="showadd_field.type=='select'"
268
- @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
269
- :mouseout="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
270
- :value.sync="showadd_fields.fields[index].value"
271
- v-model="showadd_fields.fields[index].value"
272
- :options='showadd_fields.fields[index].options'>
273
- </input-select>
274
- <!-- input -->
275
- <input :type="showadd_field.type"
276
- @change="select_change_modal(index),check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
277
- v-if="(showadd_field.type=='input'||showadd_field.type=='number')&&!showadd_field.hidden"
278
- @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
279
- :mouseout="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
280
- :readonly="showadd_field.readonly" class="form-control"
281
- v-model="showadd_fields.fields[index].value"
282
- :value.sync="showadd_fields[index].value"/>
283
- <span
284
- v-if="showadd_fields.fields[index].error&&showadd_fields.fields[index].error.msg&&showadd_fields.fields[index].error.flag"
285
- style="color: red">{{showadd_fields.fields[index].error.msg}}</span>
286
- </div>
287
- </div>
288
- </div>
289
-
290
- <div style="padding-top: 15px;padding-left: 15px;padding-right: 15px;text-align: right;">
291
- <button :class="disable_button_modal?'btn btn-default':'btn btn-primary'" v-show="showadd"
292
- :disabled="disable_button_modal" type="button" @click="acknowledge(modeltitle)">
293
- 确认
294
- </button>
295
- </div>
296
-
297
- </div>
298
-  
299
- </div>
300
-
301
319
  </div>
302
320
  </template>
303
321
  <script>
304
322
  import Vue from 'vue'
323
+ import {HttpResetClass, PagedList} from "vue-client";
305
324
  // Date格式化
306
325
  Date.prototype.Format = function (fmt) {
307
326
  var o = {
308
- "M+": this.getMonth() + 1, //月份
309
- "d+": this.getDate(), //日
310
- "H+": this.getHours(), //小时
311
- "m+": this.getMinutes(), //分
312
- "s+": this.getSeconds(), //秒
313
- "q+": Math.floor((this.getMonth() + 3) / 3), //季度
314
- "S": this.getMilliseconds() //毫秒
315
- };
316
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
317
- for (var k in o)
318
- if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
319
- return fmt;
327
+ 'M+': this.getMonth() + 1, // 月份
328
+ 'd+': this.getDate(), // 日
329
+ 'H+': this.getHours(), // 小时
330
+ 'm+': this.getMinutes(), // 分
331
+ 's+': this.getSeconds(), // 秒
332
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
333
+ 'S': this.getMilliseconds() // 毫秒
334
+ }
335
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
336
+ for (var k in o) {
337
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
338
+ }
339
+ return fmt
320
340
  }
321
341
 
322
342
  export default {
@@ -332,248 +352,154 @@
332
352
  },
333
353
  data() {
334
354
  return {
335
- data: {
336
- onetomany: {
337
- fields: []
338
- }
339
- },
340
- surBodyData: [],
341
- refresh: true, // 控制重新渲染
342
- model: {
343
- rows: [],
344
- button: {
345
- button_name: null,
346
- button_index: null
347
- },
348
- f_filiale: null,
349
- f_parentname: null,
350
- f_operate_date: null,
351
- f_operator: null
352
- },
353
- showadd: false, // onetomany 新增模态框
354
- showadd_fields: [], // onetomany 新增模态框的字段配置
355
- data: null,
356
- modeltitle: '',
357
- tempid: null,
358
- showadd_index: null,
359
- showmodal: false,
360
- disable_button: true,
361
- disable_button_modal: true,
362
- refresh_modal: true
355
+ model: {}, // 公司等属性
356
+ disable_button: true, // 控制按钮禁用
357
+ show: false, // 控制onetomany模态框
358
+ disable_button_onetomany: true, // 控制onetomany模态框按钮
359
+ onetomany_index: null, // 当前选择的下标
360
+ update_onetomany_index: null, // 当前需要修改的下标
361
+ modeltitle: null, // 模态框标题
362
+ modalSize: null, // 模态框大小
363
+ showbutmodal: false,
364
+ showcheck: false,
365
+ back: '',
363
366
  }
364
367
  },
368
+ ready() {
369
+ console.log("7777777")
370
+ console.log(this.data)
371
+ },
372
+ watch: {
373
+ deep: true,
374
+ },
365
375
  created() {
366
376
  // 初始化数据
367
377
  this.initializtion()
368
- },
369
- events: {
370
- async 'add'(index) {
371
- let templet = new Object()
372
- templet = this.data.onetomany[index]
373
- let count = 0
374
- for (let j = 0; j < templet.fields.length; j++) {
375
- templet.fields[j].value = ''
376
- if (templet.fields[j].type == 'datepicker') {
377
- templet.fields[j].value = new Date().Format("yyyy-MM-dd")
378
- }
379
- if (templet.fields[j].required) {
380
- count++
381
- }
382
- }
383
- if (count == 0) {
384
- this.disable_button_modal = false
385
- }
386
- this.modeltitle = '新增'
387
- this.showadd_fields = templet
388
- this.showadd_index = index
389
- this.showadd = true
390
- }
378
+ this.$dispatch('initializtionView')
379
+
380
+ this.disableButton()
391
381
  },
392
382
  methods: {
393
- // 获取组件中的数据
394
- getmodel() {
383
+ // 按钮模态框确定
384
+ confirm_but_modal() {
385
+ for (const item of this.data.buttons[this.model.button.button_index].button_fields) {
386
+ this.model.button.button_fields[item.field] = item.value
387
+ }
388
+ this.showbutmodal = false
389
+ this.disable_button_but = true
390
+ this.$dispatch('button', this.model)
391
+ },
392
+ // 点击按钮组按钮
393
+ async clicked(index, button) {
394
+ this.disable_button = true
395
+ console.log("this.data")
396
+ console.log(this.data)
397
+ console.log(button)
395
398
  // 组织model.fields数据
396
- let modeldatas = {}
397
- for (let i = 0; i < this.data.fields.length; i++) {
399
+ for (const item of this.data.fields) {
398
400
  // checkbox特殊处理
399
- if (this.data.fields[i].type === 'checkbox') {
400
- for (let j = 0; j < this.data.fields[i].items.length; j++) {
401
- modeldatas[this.data.fields[i].items[j].field] = this.data.fields[i].items[j].value
401
+ if (item.type === 'checkbox') {
402
+ for (let j = 0; j < item.items.length; j++) {
403
+ this.model[item.items[j].field] = item.items[j].value
402
404
  }
403
405
  } else {
404
- modeldatas[this.data.fields[i].field] = this.data.fields[i].value
406
+ this.model[item.field] = item.value
405
407
  }
406
408
  }
407
- modeldatas.f_process_id = this.data.f_process_id
408
- modeldatas.f_filiale = this.model.f_filiale
409
- modeldatas.f_parentname = this.model.f_parentname
410
- modeldatas.f_operator = this.model.f_operator
411
- modeldatas.f_operate_date = this.model.f_operate_date
412
- return modeldatas
413
- },
414
- // 修改
415
- revise(index, index2) {
416
- this.showadd_fields = []
417
- let templet = new Object()
418
- templet = this.data.onetomany[index]
419
- for (let j = 0; j < templet.fields.length; j++) {
420
- if (templet.fields[j].type == 'input') {
421
- templet[j] = {}
422
- templet[j].value = this.model.rows[index][index2][templet.fields[j].field]
423
- templet.fields[j].value = this.model.rows[index][index2][templet.fields[j].field]
424
- } else {
425
- templet.fields[j].value = this.model.rows[index][index2][templet.fields[j].field]
426
- if (templet.fields[j].type == 'datepicker') {
427
- templet.fields[j].value = new Date().Format("yyyy-MM-dd")
428
- }
429
- }
430
- }
431
- this.tempid = this.model.rows[index][index2].id
432
- this.modeltitle = '修改'
433
- this.showadd_fields = templet
434
- this.showadd_index = index
435
- this.showadd = true
436
- },
437
- // 检测模态框按钮的disable
438
- disabled_check_modal(required, value) {
439
- if (required && value) {
440
- this.disable_button_modal = false
441
-
442
- let fields = this.showadd_fields.fields
443
- let flag = false
444
- for (let i = 0; i < fields.length; i++) {
445
- if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
446
- flag = true
447
- }
448
- }
449
- this.disable_button_modal = flag
409
+ this.model.f_process_id = this.data.f_process_id
410
+
411
+ // 初始化model.button数据
412
+ let buttondatas = {
413
+ button_fields: {}
450
414
  }
451
- },
452
- // 检测模态框按钮的disable,反向检查
453
- check_disable_modal() {
454
- let fields = this.showadd_fields.fields
455
- let flag = false
456
- for (let i = 0; i < fields.length; i++) {
457
- if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
458
- flag = true
415
+ buttondatas.button_name = button.button_name
416
+ buttondatas.button_index = index
417
+ if (button.button_fields) {
418
+ for (const item of button.button_fields) {
419
+ buttondatas.button_fields[item.field] = item.value
459
420
  }
460
421
  }
461
- let count = 0
462
- for (let i = 0; i < fields.length; i++) {
463
- if (fields[i].type !== 'checkbox' && !fields[i].required) {
464
- count++
422
+ this.model.button = buttondatas
423
+ this.model.title = this.data.title
424
+ this.model.fields = this.data.fields
425
+ this.model.onetomany = this.data.onetomany
426
+ if (this.data.defname === '通气点火') {
427
+ if (this.data.processname === '工商户报建流程' || this.data.processname === '开发商集体报建流程') {
428
+ let http = new HttpResetClass()
429
+ let condition = `f_blobid = '${this.data.f_process_id}'`
430
+ let res = await http.load('POST', 'rs/sql/singleTable', {
431
+ data: {
432
+ tablename: 't_files',
433
+ condition: condition
434
+ }
435
+ }, {resolveMsg: null, rejectMsg: null})
436
+ console.log("res_________________")
437
+ console.log(res)
438
+ if (res.data.length === 0) {
439
+ this.$showMessage("未上传图纸")
440
+ return
441
+ }
465
442
  }
466
443
  }
467
- if (count == 0) {
468
- flag = false
469
- }
470
- this.disable_button_modal = flag
471
- },
472
- // 模态框监听
473
- select_change_modal(index) {
474
- if (this.showadd_fields.fields[index].value) {
475
- this.showadd_fields[index] = {}
476
- this.showadd_fields[index].value = this.showadd_fields.fields[index].value
477
- } else if (this.showadd_fields[index] && this.showadd_fields[index].value) {
478
- this.showadd_fields.fields[index].value = this.showadd_fields[index].value
479
- }
480
- this.refresh_modal = false
481
- this.$nextTick(() => {
482
- this.refresh_modal = true
483
- })
484
- this.$dispatch('select_cascade_modal', this.showadd_index, index)
485
- if (this.showadd_fields.fields[index].type == 'datepicker' || this.showadd_fields.fields[index].error) {
486
- this.$dispatch('modal_error_check', this.showadd_index, index)
444
+ // if (this.data.defname === '合同签订') {
445
+ // console.log("ddddd",this.data)
446
+ // }
447
+ // if (this.data.defname === '竣工验收') {
448
+ // // if (this.data.processname !== '工商户报建流程') {
449
+ // // let t=this.selecteddd
450
+ // // let diff = this.all.filter(function (val) {
451
+ // // return t.indexOf(val) === -1
452
+ // // })
453
+ // // console.log("diff", diff)
454
+ // // for(let index = 0;index < diff.length; index++){
455
+ // // let data = {
456
+ // // code:diff[index].f_userinfo_code
457
+ // // }
458
+ // // console.log("code", data.code)
459
+ // // let http = new HttpResetClass()
460
+ // // http.load('POST', 'rs/logic/batchcheck', {data:data}, {resolveMsg: null, rejectMsg: null})
461
+ // //
462
+ // // }
463
+ // // }
464
+ // }
465
+ if (button.button_name === '退回') {
466
+ this.showbutmodal = true
467
+ } else if (button.button_name === '下发') {
468
+ this.showbutmodal = true
469
+ } else if (button.button_name === '验收') {
470
+ this.showbutmodal = true
471
+ } else if (button.event) {
472
+ this.$dispatch(button.event)
473
+ } else {
474
+ this.$dispatch('button', this.model)
487
475
  }
488
476
  },
489
- // 更新showadd模态框
490
- update_showadd_fields_value(index, value) {
491
- this.showadd_fields.fields[index].value = value
492
- this.showadd_fields[index] = {}
493
- this.showadd_fields[index].value = value
494
- },
495
- // 清理showadd模态框
496
- clear_showadd_fields_value(index) {
497
- this.showadd_fields.fields[index].value = ''
498
- this.showadd_fields[index].value = ''
499
- },
500
- // 删除
501
- delete(i, j) {
502
- this.$showMessage("您确定要删除这条记录吗?", ['confirm']).then((res) => {
503
- if (res == 'confirm') {
504
- this.$dispatch('onetomanydelete', i, j)
505
- }
506
- })
507
- },
508
- // 强制刷新
509
- update() {
510
- this.refresh = false
511
- this.$nextTick(() => {
512
- this.refresh = true
513
- })
514
- this.initializtion()
515
- },
516
477
  // 初始化数据
517
478
  initializtion() {
518
- let fields = this.data.fields
519
- let flag = false
520
- for (let i = 0; i < fields.length; i++) {
521
- if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
522
- flag = true
523
- }
524
- }
525
- let count = 0
526
- for (let i = 0; i < fields.length; i++) {
527
- if (fields[i].type !== 'checkbox' && !fields[i].required) {
528
- count++
529
- }
530
- }
531
- if (count = 0) {
532
- flag = false
533
- }
534
- this.disable_button = flag
535
-
536
- this.model.rows = []
537
- this.surBodyData = []
538
- if (this.data.onetomany && this.data.onetomany.length > 0) {
539
- for (let i = 0; i < this.data.onetomany.length; i++) {
540
- let temp = []
541
- for (let j = 0; j < this.data.onetomany[i].fields.length; j++) {
542
- temp.push(this.data.onetomany[i].fields[j].field)
543
- }
544
- this.surBodyData.push(temp)
545
- }
546
- for (let i = 0; i < this.data.onetomany.length; i++) {
547
- if (this.data.onetomany[i].rows) {
548
- this.model.rows.push(this.data.onetomany[i].rows)
549
- }
550
- }
479
+ // 是否禁用按钮
480
+ this.disableButton()
551
481
 
552
- }
553
482
  // datepicker 没有值给当时值
554
- if (this.data.fields && this.data.fields.length > 0) {
555
- for (let i = 0; i < this.data.fields.length; i++) {
556
- if (this.data.fields[i].type === 'datepicker' && !this.data.fields[i].value) {
557
- this.data.fields[i].value = new Date().Format("yyyy-MM-dd")
558
- }
483
+ for (const item of this.data.fields) {
484
+ if (item.type === 'datepicker' && !item.value) {
485
+ item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
559
486
  }
560
- } else {
561
- this.disable_button = false
562
487
  }
488
+ // 公司等属性初始化
563
489
  if (this.data.filiale) {
564
490
  this.model.f_filiale = this.data.filiale
565
491
  } else {
566
- this.model.f_filiale = this.$login.f.f_fengongsi
492
+ this.model.f_filiale = this.$login.f.orgs
567
493
  }
568
494
  if (this.data.f_parentname) {
569
495
  this.model.f_parentname = this.data.f_parentname
570
496
  } else {
571
- this.model.f_parentname = this.$login.f.f_parentname
497
+ this.model.f_parentname = this.$login.f.f_department_name
572
498
  }
573
499
  if (this.data.operate_date) {
574
500
  this.model.f_operate_date = this.data.operate_date
575
501
  } else {
576
- this.model.f_operate_date = new Date().Format("yyyy-MM-dd")
502
+ this.model.f_operate_date = new Date().Format('yyyy-MM-dd')
577
503
  }
578
504
  if (this.data.operator) {
579
505
  this.model.f_operator = this.data.operator
@@ -581,207 +507,277 @@
581
507
  this.model.f_operator = this.$login.f.name
582
508
  }
583
509
  },
584
- // 模态框点击确定按钮
585
- acknowledge(val) {
586
- if (val == '新增') {
587
- let temp = {}
588
- for (let i = 0; i < this.showadd_fields.fields.length; i++) {
589
- if (this.showadd_fields.fields[i].value) {
590
- temp[this.showadd_fields.fields[i].field] = this.showadd_fields.fields[i].value
591
- } else if (this.showadd_fields && this.showadd_fields[i] && this.showadd_fields[i].value) {
592
- temp[this.showadd_fields.fields[i].field] = this.showadd_fields[i].value
510
+ // 是否禁用按钮
511
+ disableButton() {
512
+ let fields = this.data.fields
513
+
514
+ let flag = false
515
+ for (const item of fields) {
516
+ if (item.type !== 'checkbox' && item.required && !item.value) {
517
+ if (item.value === 0) {
518
+ flag = false
519
+ } else {
520
+ flag = true
593
521
  }
594
522
  }
595
- this.model.rows[this.showadd_index].push(temp)
596
- this.$dispatch('confirm', this.data.onetomany[this.showadd_index].tables, temp, this.showadd_index, this.model.rows[this.showadd_index].length - 1)
597
- this.showadd_fields = null
598
- this.showadd_index = null
599
- this.closemodal(val)
600
- } else {
601
- for (let i = 0; i < this.data.buttons[this.model.button.button_index].button_fields.length; i++) {
602
- 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
603
- }
604
- this.showmodal = false
605
- this.$dispatch('button', this.model)
606
- }
607
- },
608
- // 关闭模态框
609
- closemodal(val) {
610
- if (this.showadd_fields && this.showadd_fields.fields && this.showadd_fields.fields.length) {
611
- for (let i = 0; i < this.showadd_fields.fields.length; i++) {
612
- if (this.showadd_fields[i] && this.showadd_fields[i].value) {
613
- this.showadd_fields[i].value = ''
614
- }
615
- if (this.showadd_fields.fields[i] && this.showadd_fields.fields[i].value) {
616
- this.showadd_fields.fields[i].value = ''
617
- }
523
+ // 任何选择框只要是否都不能提交
524
+ if (item.type === 'select' && (item.value === '否' || item.value === '未开工') && item.disabledButton) {
525
+ flag = true
618
526
  }
619
527
  }
620
528
 
621
- if (val != '新增' || val != '修改' || val != '删除') {
622
- this.disable_button = false
623
- }
624
- this.showmodal = false
625
- if (val == '新增') {
626
- this.showadd = false
627
- }
628
- this.showadd_fields = null
629
- this.disable_button_modal = true
630
- this.modeltitle = null
631
- this.tempid = null
632
- },
633
- // 点击按钮
634
- clicked(index, button) {
635
- // onetomany 处理
636
- // if(this.data.onetomany&&this.data.onetomany.fields.length>0){
637
- // let temp = {}
638
- // temp['tables'] = this.data.onetomany.tables
639
- // temp['rows'] = this.model.rows
640
- // this.$dispatch('onetomanyevent',temp)
641
- // }
642
- this.disable_button = true
643
- console.log(`点击了按钮index:${index}+button:${JSON.stringify(button)}`);
644
- // 组织model.fields数据
645
- let modeldatas = {}
646
- for (let i = 0; i < this.data.fields.length; i++) {
647
- // checkbox特殊处理
648
- if (this.data.fields[i].type === 'checkbox') {
649
- for (let j = 0; j < this.data.fields[i].items.length; j++) {
650
- modeldatas[this.data.fields[i].items[j].field] = this.data.fields[i].items[j].value
651
- }
652
- } else {
653
- modeldatas[this.data.fields[i].field] = this.data.fields[i].value
529
+ let count = 0
530
+ for (const item of fields) {
531
+ if (item.type !== 'checkbox' && item.required) {
532
+ count++
654
533
  }
655
534
  }
656
- modeldatas.f_process_id = this.data.f_process_id
657
- modeldatas.f_filiale = this.model.f_filiale
658
- modeldatas.f_parentname = this.model.f_parentname
659
- modeldatas.f_operator = this.model.f_operator
660
- modeldatas.f_operate_date = this.model.f_operate_date
661
- this.model = null
662
- this.model = modeldatas
663
- // 初始化model.button数据
664
- let buttondatas = {
665
- button_fields: {}
666
- }
667
- if (button.button_event) {
668
- buttondatas.button_event = button.button_event
535
+ if (count === 0) {
536
+ flag = false
669
537
  }
670
- if (button.button_node) {
671
- buttondatas.button_node = button.button_node
538
+
539
+ this.disable_button = flag
540
+ },
541
+ // 失去焦点触发,无论值是否发生变化
542
+ onblur(index) {
543
+ // 是否禁用按钮
544
+ this.disableButton()
545
+
546
+ this.$dispatch('onblur', index)
547
+ // 如果有错误信息提示走错误信息判断处理
548
+
549
+ if (this.data.fields[index].error && this.data.fields[index].type === 'datepicker') {
550
+ this.$dispatch('error_check', index)
672
551
  }
673
- if (button.button_person) {
674
- buttondatas.button_person = button.button_person
552
+ },
553
+ // 失去焦点且值最终发生变化触发
554
+ onchange(index) {
555
+ // 是否禁用按钮
556
+ this.disableButton()
557
+
558
+ // this.data.fields[index].value = this.data.fields[index].value.trim()
559
+
560
+ if (this.data.fields[index].prefix && this.data.fields[index].value !== '') {
561
+ this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
675
562
  }
676
- buttondatas.button_name = button.button_name
677
- buttondatas.button_index = index
678
- if (button.button_fields) {
679
- for (let i = 0; i < button.button_fields.length; i++) {
680
- buttondatas.button_fields[button.button_fields[i].field] = button.button_fields[i].value
681
- }
563
+
564
+ this.data[this.data.fields[index].field] = this.data.fields[index].value
565
+
566
+ if (this.data.fields[index].onchange) {
567
+ this.$dispatch(this.data.fields[index].onchange, index)
682
568
  }
683
- this.model.button = buttondatas
684
- if (button.button_name === '退回') {
685
- this.showmodal = true
686
- } else if (button.button_name === '下发') {
687
- this.showmodal = true
688
- } else {
689
- this.$dispatch('button', this.model)
569
+ this.$dispatch('onchange', index)
570
+
571
+ // 如果有错误信息提示走错误信息判断处理
572
+ if (this.data.fields[index].error && this.data.fields[index].type === 'datepicker') {
573
+ this.$dispatch('error_check', index)
690
574
  }
691
575
  },
692
- // 监听
693
- select_change(index) {
694
- this.$dispatch('select_cascade', index)
576
+ oninput(index) {
577
+ // 是否禁用按钮
578
+ this.disableButton()
579
+
580
+ this.$dispatch('oninput', index)
581
+
695
582
  // 如果有错误信息提示走错误信息判断处理
696
- if (this.data.fields[index].error || this.data.fields[index].type == 'datepicker') {
583
+ if (this.data.fields[index].error && this.data.fields[index].type === 'datepicker') {
697
584
  this.$dispatch('error_check', index)
698
585
  }
699
586
  },
700
- // 检测按钮的disable
701
- disabled_check(required, value) {
702
- if (required && value) {
703
- this.disable_button = false
704
-
705
- let fields = this.data.fields
706
- let flag = false
707
- for (let i = 0; i < fields.length; i++) {
708
- if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
709
- flag = true
710
- }
587
+ // 模态框确认按钮
588
+ confirm_modal(title) {
589
+ if (title === '新增') {
590
+ if (this.data.onetomany[this.onetomany_index].addEvent === 'default' || !this.data.onetomany[this.onetomany_index].addEvent) {
591
+ this.$dispatch('onetomanyadd', this.onetomany_index)
592
+ } else {
593
+ this.$dispatch(this.data.onetomany[this.onetomany_index].addEvent, this.onetomany_index)
711
594
  }
712
- this.disable_button = flag
713
- }
714
- }
715
- },
716
- watch: {
717
- 'data.operate_date'() {
718
- if (this.data.filiale) {
719
- this.model.f_filiale = this.data.filiale
720
595
  } else {
721
- this.model.f_filiale = this.$login.f.f_fengongsi
596
+ if (this.data.onetomany[this.onetomany_index].updateEvent === 'default' || !this.data.onetomany[this.onetomany_index].updateEvent) {
597
+ this.$dispatch('onetomanyupdate', this.onetomany_index, this.update_onetomany_index)
598
+ } else {
599
+ this.$dispatch(this.data.onetomany[this.onetomany_index].updateEvent, this.onetomany_index, this.update_onetomany_index)
600
+ }
722
601
  }
723
- if (this.data.f_parentname) {
724
- this.model.f_parentname = this.data.f_parentname
725
- } else {
726
- this.model.f_parentname = this.$login.f.f_parentname
602
+
603
+ this.closemodal()
604
+ },
605
+ // 删除
606
+ delete(i, j) {
607
+ this.$showMessage((this.data.onetomany[i].deleteMessage === 'default' || !this.data.onetomany[i].deleteMessage) ? '您确定要删除这条记录吗?' : this.data.onetomany[i].deleteMessage, ['confirm']).then((res) => {
608
+ if (res === 'confirm') {
609
+ if (this.data.onetomany[i].deleteEvent === 'default' || !this.data.onetomany[i].deleteEvent) {
610
+ this.$dispatch('onetomanydelete', i, j)
611
+ } else {
612
+ this.$dispatch(this.data.onetomany[i].deleteEvent, i, j)
613
+ }
614
+ }
615
+ })
616
+ },
617
+ // 修改
618
+ update(i, j) {
619
+ let onetomany = this.data.onetomany[i]
620
+ let item = this.data.onetomany[i].rows[j]
621
+ let count = 0
622
+ for (let k = 0; k < onetomany.fields.length; k++) {
623
+ // 防止初始化的时候没有value
624
+ Vue.set(this.data.onetomany[i].fields[k], 'value', item[this.data.onetomany[i].fields[k].field])
625
+
626
+ if (onetomany.fields[j].required) {
627
+ count++
628
+ }
727
629
  }
728
- if (this.data.operate_date) {
729
- this.model.f_operate_date = this.data.operate_date
730
- } else {
731
- this.model.f_operate_date = new Date().Format("yyyy-MM-dd")
630
+ if (count === 0) {
631
+ this.disable_button_onetomany = false
732
632
  }
733
- if (this.data.operator) {
734
- this.model.f_operator = this.data.operator
735
- } else {
736
- this.model.f_operator = this.$login.f.name
633
+ this.modeltitle = '修改'
634
+ this.modalSize = this.data.onetomany[i].modalSize
635
+ this.onetomany_index = i
636
+ this.update_onetomany_index = j
637
+
638
+ this.$dispatch('openUpdateModel', i, j)
639
+
640
+ this.show = true
641
+ },
642
+ // 添加
643
+ add(index) {
644
+ let count = 0
645
+ for (const item of this.data.onetomany[index].fields) {
646
+ if (item.type === 'datepicker') {
647
+ item.value = new Date().Format('yyyy-MM-dd')
648
+ }
649
+ if (item.required) {
650
+ count++
651
+ }
652
+ }
653
+
654
+ if (count === 0) {
655
+ this.disable_button_onetomany = false
737
656
  }
657
+ this.modeltitle = '新增'
658
+ this.modalSize = this.data.onetomany[index].modalSize
659
+ this.onetomany_index = index
660
+
661
+ this.$dispatch('openAddModel', index)
662
+
663
+ this.show = true
738
664
  },
739
- 'data.fields'() {
740
- this.refresh = false
741
- this.$nextTick(() => {
742
- this.refresh = true
743
- })
744
- this.initializtion()
665
+ // 关闭模态框
666
+ closemodal(val) {
667
+ if (val === 'but') {
668
+ this.disableButton()
669
+ this.showbutmodal = false
670
+ return
671
+ }
672
+ for (const item of this.data.onetomany[this.onetomany_index].fields) {
673
+ item.value = ''
674
+ }
675
+ this.show = false
676
+ this.disable_button_onetomany = true
677
+ this.onetomany_index = null
678
+ this.update_onetomany_index = null
679
+ this.modeltitle = null
680
+ this.modalSize = null
745
681
  },
746
- deep: true
747
- },
748
- computed: {
749
- // 输入后按钮检测
750
- check_disable: function () {
751
- let fields = this.data.fields
682
+ // 是否禁用模态框按钮
683
+ disableModalButton() {
684
+ let fields = this.data.onetomany[this.onetomany_index].fields
685
+
752
686
  let flag = false
753
- for (let i = 0; i < fields.length; i++) {
754
- if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
755
- flag = true
687
+ for (const item of fields) {
688
+ if (item.type !== 'checkbox' && item.required && !item.value) {
689
+ if (item.value === 0) {
690
+ flag = false
691
+ } else {
692
+ flag = true
693
+ }
756
694
  }
757
695
  }
696
+
758
697
  let count = 0
759
- for (let i = 0; i < fields.length; i++) {
760
- if (fields[i].type !== 'checkbox' && !fields[i].required) {
698
+ for (const item of fields) {
699
+ if (item.type !== 'checkbox' && item.required) {
761
700
  count++
762
701
  }
763
702
  }
764
- if (count == 0) {
703
+ if (count === 0) {
765
704
  flag = false
766
705
  }
767
- this.disable_button = flag
706
+ this.disable_button_onetomany = flag
768
707
  },
769
- refreshed() {
770
- let fields = this.data.fields
771
- this.data.fields = fields
708
+ // 监听模态框属性失去焦点
709
+ onchange_modal(index) {
710
+ this.disableModalButton()
711
+ this.$dispatch('onchange_modal', this.onetomany_index, index)
712
+ },
713
+ // 监听模态框属性失去焦点
714
+ onblur_modal(index) {
715
+ this.disableModalButton()
716
+ this.$dispatch('onblur_modal', this.onetomany_index, index)
717
+ },
718
+ // input输入属性值发生变化监听
719
+ oninput_modal(index) {
720
+ this.disableModalButton()
721
+ this.$dispatch('oninput_modal', this.onetomany_index, index)
772
722
  }
773
723
  }
774
724
  }
775
725
  </script>
726
+ <style>
727
+ .datepicker{
728
+ width: 100%!important;
729
+ }
730
+ .datepicker-input{
731
+ background-color: #ffffff!important;
732
+ width: 100%!important;
733
+ }
734
+ .datepicker-input:disabled{
735
+ border: 1px solid #DDD!important;
736
+ color: #ACA899!important;
737
+ width: 100%!important;
738
+ }
739
+ </style>
776
740
  <style scoped>
777
- th {
741
+ th{
742
+ font-size: 15px !important;
743
+ text-align: center !important;
744
+ background-color: #dfedfb!important;
745
+ color: #666666 !important;
746
+ font-family: PINGFANG-BOLD !important;
747
+ font-weight: normal!important;
748
+ }
749
+ /*清除model中的浮动*/
750
+ .clearfix:after,.clearfix:before{
751
+ display: table;
752
+ }
753
+ .clearfix:after{
754
+ clear: both;
755
+ }
756
+
757
+ .input_view{
758
+ padding: 8px;
759
+ background-color: #ffffff;
760
+ border-radius: 2px;
761
+ border: solid 1px #c7c7c7!important;
762
+ color: #333333!important;
763
+ font-size: 15px!important;
764
+ }
778
765
 
766
+ .input_view[readonly]{
767
+ border: 1px solid #DDD!important;
768
+ /*background-color: #F5F5F5;*/
769
+ color:#ACA899!important;
770
+ }
771
+ .input_view:disabled{
772
+ border: 1px solid #DDD!important;
773
+ /*background-color: #F5F5F5;*/
774
+ color:#ACA899!important;
779
775
  }
780
776
 
781
777
  .control-label-justify {
782
778
  display: inline-block;
783
779
  vertical-align: top;
784
- width: 70px;
780
+ width: 110px;
785
781
  text-align: justify;
786
782
  font-family: PingFang-SC-Bold;
787
783
  }
@@ -803,18 +799,4 @@
803
799
  -moz-appearance: textfield;
804
800
  }
805
801
 
806
- .onetomanymodal {
807
- background-color: #fff;
808
- left: 40%;
809
- margin: -300/2 0 0 -300/2;
810
- position: fixed;
811
- top: 15%;
812
- width: 500px;
813
- height: auto;
814
- z-index: 25;
815
- }
816
-
817
- tr {
818
- height: 34px;
819
- }
820
802
  </style>