apply-clients 3.2.30-13 → 3.2.30-14

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 (58) hide show
  1. package/index.html +1 -1
  2. package/package.json +4 -5
  3. package/src/AndroidApp.vue +2 -2
  4. package/src/apply.js +81 -86
  5. package/src/applyAndroid.js +1 -0
  6. package/src/components/android/AppOnetomany.vue +251 -40
  7. package/src/components/android/AppServiceView.vue +476 -574
  8. package/src/components/android/AppSign.vue +142 -0
  9. package/src/components/android/AppTakePic.vue +37 -6
  10. package/src/components/android/Process/AppExplorationUser.vue +201 -80
  11. package/src/components/android/Process/AppServiceControl.vue +543 -406
  12. package/src/components/android/TaskGraph.vue +139 -0
  13. package/src/components/product/ApplyCharge/ApplyChargeList.vue +208 -251
  14. package/src/components/product/Onetomany.vue +124 -42
  15. package/src/components/product/Order/OrderApplyList.vue +280 -280
  16. package/src/components/product/Process/ExplorationSelect.vue +285 -246
  17. package/src/components/product/Process/ExplorationUser.vue +94 -82
  18. package/src/components/product/Process/Processes/InstallationDetails.vue +350 -250
  19. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  20. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  21. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  22. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  23. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  24. package/src/components/product/Process/Processes/Print/printCharge.vue +142 -0
  25. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +135 -106
  26. package/src/components/product/Process/Processes/chargeManagement.vue +99 -27
  27. package/src/components/product/Process/Processes/devicesManagement.vue +478 -0
  28. package/src/components/product/Process/Processes/selectApply.vue +250 -0
  29. package/src/components/product/Process/Processes/selectUserinfo.vue +182 -0
  30. package/src/components/product/Process/Processes/supplementalAgreement.vue +181 -180
  31. package/src/components/product/Process/Service/ServiceControl.vue +1157 -284
  32. package/src/components/product/Process/Service/ShowBackReason.vue +33 -0
  33. package/src/components/product/ServiceView.vue +162 -137
  34. package/src/components/product/VueUtils/ApplyUpload.vue +53 -41
  35. package/src/components/product/VueUtils/HighMeter.vue +208 -0
  36. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +372 -231
  37. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +82 -0
  38. package/src/filiale/yuchuan/android.js +1 -5
  39. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +270 -232
  40. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +100 -87
  41. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +66 -0
  42. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +470 -0
  43. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +754 -505
  44. package/src/filiale/yuchuan/pc.js +2 -6
  45. package/src/components/android/Process/AppProgressReport.vue +0 -84
  46. package/src/components/product/Process/Processes/printCharge.vue +0 -126
  47. package/src/components/product/Process/ShowBackReason.vue +0 -29
  48. package/src/components/product/VueUtils/ToolsPage.vue +0 -51
  49. package/src/components/product/VueUtils/Tree.vue +0 -330
  50. package/src/filiale/wuan/android.js +0 -0
  51. package/src/filiale/wuan/pc.js +0 -4
  52. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  53. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -456
  54. package/src/filiale/yuchuan/android/Reserve/ApplyAMapPickMain.vue +0 -39
  55. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -194
  56. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -158
  57. package/src/filiale/yuchuan/pc/Process/Processes/ApplyUserInfo.vue +0 -515
  58. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -57
package/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <META HTTP-EQUIV="pragma" CONTENT="no-cache">
7
7
  <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
8
8
  <META HTTP-EQUIV="expires" CONTENT="0">
9
- <title>榆林榆川燃气</title>
9
+ <title>报建系统</title>
10
10
  <script src="https://webapi.amap.com/maps?v=1.4.2&key=4889f1e58df01cb40415536c8907bf64"></script>
11
11
  <!--引入UI组件库(1.1版本) -->
12
12
  <script src="https://webapi.amap.com/ui/1.1/main.js?v=1.1.1"></script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.2.30-13",
3
+ "version": "3.2.30-14",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -29,13 +29,12 @@
29
29
  "dependencies": {
30
30
  "@logicflow/core": "^0.4.3",
31
31
  "co": "4.6.0",
32
- "install": "^0.13.0",
33
32
  "jsencrypt": "^3.0.0-rc.1",
34
33
  "less": "^2.7.1",
35
34
  "less-loader": "^2.2.3",
36
35
  "lib-flexible": "^0.3.2",
37
- "npm": "^8.0.0",
38
36
  "px2rem-loader": "^0.1.9",
37
+ "qrcodejs2": "0.0.2",
39
38
  "vue": "^1.0.17",
40
39
  "vue-bubble": "^1.0.3"
41
40
  },
@@ -94,9 +93,9 @@
94
93
  "style": "0.0.3",
95
94
  "style-loader": "^0.20.3",
96
95
  "system-clients": "3.1.87",
97
- "system-phone": "1.1.18",
96
+ "system-phone": "1.2.80-49",
98
97
  "url-loader": "^0.5.7",
99
- "vue-client": "1.24.22",
98
+ "vue-client": "1.24.33",
100
99
  "vue-hot-reload-api": "^1.2.0",
101
100
  "vue-html-loader": "^1.0.0",
102
101
  "vue-loader": "^8.2.1",
@@ -4,8 +4,8 @@
4
4
  <article>
5
5
  <!-- <route :comp="{name: 'login-app'}" name="root"></route>-->
6
6
  <!-- <route :comp="{name: 'apply-reserve'}" name="root"></route>-->
7
- <!-- <route :comp="{name: 'task-graph'}" name="root"></route>-->
8
- <route :comp="{name: 'app-exploration-user'}" name="root"></route>
7
+ <route :comp="{name: 'survey-tsak'}" name="root"></route>
8
+ <!-- <route :comp="{name: 'app-exploration-user'}" name="root"></route>-->
9
9
  </article>
10
10
  <time-out></time-out>
11
11
  <message-box>
package/src/apply.js CHANGED
@@ -1,86 +1,81 @@
1
- import Vue from 'vue'
2
- Vue.config.silent = true
3
- import ApplyGetSaleParam from './stores/ApplyGetSaleParams'
4
- import ApplyLoadParams from './stores/ApplyLoadParams'
5
- /** ****************服务插件*********************/
6
-
7
- export default function (filiale) {
8
- Vue.use(ApplyGetSaleParam)
9
- Vue.use(ApplyLoadParams)
10
- /** ***************************报建模块*********************************/
11
- /** 报建流程业务 **/
12
- // 报建流程业务总入口
13
- Vue.component('exploration-user', (resolve) => { require(['./components/product/Process/ExplorationUser'], resolve) })
14
- // 报建流程业务总入口页面list布局
15
- Vue.component('exploration-select', (resolve) => { require(['./components/product/Process/ExplorationSelect'], resolve) })
16
- // 业务tab(control层)页
17
- Vue.component('service-control', (resolve) => { require(['./components/product/Process/Service/ServiceControl'], resolve) })
18
- // 公共业务显示(view层)页
19
- Vue.component('service-view', (resolve) => { require(['./components/product/ServiceView'], resolve) })
20
- Vue.component('onetomany', (resolve) => { require(['./components/product/Onetomany'], resolve) })
21
- // 显示退回理由tab页
22
- Vue.component('show-back-reason', (resolve) => { require(['./components/product/Process/ShowBackReason'], resolve) })
23
-
24
- /** 报建监控业务 **/
25
- // 流程监控入口页
26
- Vue.component('supervisory-control', (resolve) => { require(['./components/product/Supervisory/SupervisoryControl'], resolve) })
27
- // 流程监控列表页
28
- Vue.component('supervisory-list', (resolve) => { require(['./components/product/Supervisory/SupervisoryList'], resolve) })
29
- // 业务tab(control层)页
30
- Vue.component('supervisory-service-control', (resolve) => { require(['./components/product/Supervisory/Service/SupervisoryServiceControl'], resolve) })
31
- // 流程列表页
32
- Vue.component('supervisory-chart', (resolve) => { require(['./components/product/Supervisory/SupervisoryhCart'], resolve) })
33
-
34
- /** 报建功能业务 **/
35
- // 报建功能业务总入口
36
- Vue.component('install-function', (resolve) => { require(['./components/product/Function/InstallFunction'], resolve) })
37
- // 报建功能工程列表
38
- Vue.component('installinfoselect', (resolve) => { require(['./components/product/Function/InstallInfoSelect'], resolve) })
39
- // 报建菜单页面控制层
40
- Vue.component('function-service-control', (resolve) => { require(['./components/product/Function/Service/FunctionServiceControl'], resolve) })
41
-
42
- /** 预约报建 **/
43
- // 报建功能业务总入口
44
- Vue.component('order-apply', (resolve) => { require(['./components/product/Order/OrderApply'], resolve) })
45
- Vue.component('order-apply-list', (resolve) => { require(['./components/product/Order/OrderApplyList'], resolve) })
46
- Vue.component('order-message', (resolve) => { require(['./components/product/Order/OrderMessage'], resolve) })
47
-
48
- // 终止报建页面入口
49
- Vue.component('stop-apply', (resolve) => { require(['./components/product/Stop/StopApply'], resolve) })
50
- Vue.component('stop-apply-list', (resolve) => { require(['./components/product/Stop/StopApplyList'], resolve) })
51
-
52
-
53
- // 终止报建业务
54
- Vue.component('stop-install', (resolve) => { require(['./components/product/Function/functions/StopInstall'], resolve) })
55
- // 终止报建列表页
56
- Vue.component('stop-apply-cardlist', (resolve) => { require(['./components/product/Function/StopApplyCrrdList'], resolve) })
57
- // 撤销报建终止页
58
- Vue.component('apply-record-cancel', (resolve) => { require(['./components/product/Function/functions/ApplyRecordCancel'], resolve) })
59
-
60
- /** 报建收费记录 **/
61
- Vue.component('apply-charge-search', (resolve) => { require(['./components/product/ApplyCharge/ApplyChargeSearch'], resolve) })
62
- Vue.component('apply-charge-list', (resolve) => { require(['./components/product/ApplyCharge/ApplyChargeList'], resolve) })
63
-
64
- // 地址管理
65
- Vue.component('apply-address-userinfo-management', (resolve) => { require(['./components/product/Process/Processes/addressAndUserinfoManagement'], resolve) })
66
- // 施工安装明细
67
- Vue.component('installation-details', (resolve) => { require(['./components/product/Process/Processes/InstallationDetails'], resolve) })
68
- // 收费管理
69
- Vue.component('apply-charge-management', (resolve) => { require(['./components/product/Process/Processes/chargeManagement'], resolve) })
70
- Vue.component('apply-print-charge', (resolve) => { require(['./components/product/Process/Processes/printCharge'], resolve) })
71
- // 补充协议
72
- Vue.component('supplemental-agreement', (resolve) => { require(['./components/product/Process/Processes/supplementalAgreement'], resolve) })
73
- Vue.component('test', (resolve) => { require(['./components/product/Test'], resolve) })
74
-
75
- /** VueUtils **/
76
- Vue.component('back-page', (resolve) => { require(['./components/product/VueUtils/ToolsPage'], resolve) })
77
- Vue.component('tree2', (resolve) => { require(['./components/product/VueUtils/Tree'], resolve) })
78
- Vue.component('apply-upload', (resolve) => { require(['./components/product/VueUtils/ApplyUpload'], resolve) })
79
-
80
- if (filiale) {
81
- let filialeComp = require(`./filiale/${filiale}/pc`).specialComp
82
- for (let key in filialeComp) {
83
- Vue.component(key, filialeComp[key])
84
- }
85
- }
86
- }
1
+ import Vue from 'vue'
2
+ Vue.config.silent = true
3
+ import ApplyGetSaleParam from './stores/ApplyGetSaleParams'
4
+ import ApplyLoadParams from './stores/ApplyLoadParams'
5
+ /** ****************服务插件*********************/
6
+
7
+ export default function (filiale) {
8
+ Vue.use(ApplyGetSaleParam)
9
+ Vue.use(ApplyLoadParams)
10
+ /** ***************************报建模块*********************************/
11
+ /** 报建流程业务 **/
12
+ // 报建流程业务总入口
13
+ Vue.component('exploration-user', (resolve) => { require(['./components/product/Process/ExplorationUser'], resolve) })
14
+ // 报建流程业务总入口页面list布局
15
+ Vue.component('exploration-select', (resolve) => { require(['./components/product/Process/ExplorationSelect'], resolve) })
16
+ // 业务tab(control层)页
17
+ Vue.component('service-control', (resolve) => { require(['./components/product/Process/Service/ServiceControl'], resolve) })
18
+ // 公共业务显示(view层)页
19
+ Vue.component('service-view', (resolve) => { require(['./components/product/ServiceView'], resolve) })
20
+ Vue.component('onetomany', (resolve) => { require(['./components/product/Onetomany'], resolve) })
21
+ // 显示退回理由tab页
22
+ Vue.component('show-back-reason', (resolve) => { require(['./components/product/Process/Service/ShowBackReason'], resolve) })
23
+
24
+ /** 报建监控业务 **/
25
+ // 流程监控入口页
26
+ Vue.component('supervisory-control', (resolve) => { require(['./components/product/Supervisory/SupervisoryControl'], resolve) })
27
+ // 流程监控列表页
28
+ Vue.component('supervisory-list', (resolve) => { require(['./components/product/Supervisory/SupervisoryList'], resolve) })
29
+ // 业务tab(control层)页
30
+ Vue.component('supervisory-service-control', (resolve) => { require(['./components/product/Supervisory/Service/SupervisoryServiceControl'], resolve) })
31
+ // 流程列表页
32
+ Vue.component('supervisory-chart', (resolve) => { require(['./components/product/Supervisory/SupervisoryhCart'], resolve) })
33
+
34
+ /** 报建功能业务 **/
35
+ // 报建功能业务总入口
36
+ Vue.component('install-function', (resolve) => { require(['./components/product/Function/InstallFunction'], resolve) })
37
+ // 报建功能工程列表
38
+ Vue.component('installinfoselect', (resolve) => { require(['./components/product/Function/InstallInfoSelect'], resolve) })
39
+ // 报建菜单页面控制层
40
+ Vue.component('function-service-control', (resolve) => { require(['./components/product/Function/Service/FunctionServiceControl'], resolve) })
41
+
42
+ /** 预约报建 **/
43
+ Vue.component('order-apply', (resolve) => { require(['./components/product/Order/OrderApply'], resolve) })
44
+ Vue.component('order-apply-list', (resolve) => { require(['./components/product/Order/OrderApplyList'], resolve) })
45
+ Vue.component('order-message', (resolve) => { require(['./components/product/Order/OrderMessage'], resolve) })
46
+
47
+ // 终止报建页面入口
48
+ Vue.component('stop-apply', (resolve) => { require(['./components/product/Stop/StopApply'], resolve) })
49
+ Vue.component('stop-apply-list', (resolve) => { require(['./components/product/Stop/StopApplyList'], resolve) })
50
+
51
+ /** 报建收费记录 **/
52
+ Vue.component('apply-charge-search', (resolve) => { require(['./components/product/ApplyCharge/ApplyChargeSearch'], resolve) })
53
+ Vue.component('apply-charge-list', (resolve) => { require(['./components/product/ApplyCharge/ApplyChargeList'], resolve) })
54
+
55
+ // 地址管理
56
+ Vue.component('apply-address-userinfo-management', (resolve) => { require(['./components/product/Process/Processes/addressAndUserinfoManagement'], resolve) })
57
+ // 施工安装明细
58
+ Vue.component('installation-details', (resolve) => { require(['./components/product/Process/Processes/InstallationDetails'], resolve) })
59
+ // 收费管理
60
+ Vue.component('apply-charge-management', (resolve) => { require(['./components/product/Process/Processes/chargeManagement'], resolve) })
61
+
62
+ // 补充协议
63
+ Vue.component('supplemental-agreement', (resolve) => { require(['./components/product/Process/Processes/supplementalAgreement'], resolve) })
64
+ // 选择用户信息
65
+ Vue.component('select-userinfo', (resolve) => { require(['./components/product/Process/Processes/selectUserinfo'], resolve) })
66
+ // 选择报建项目
67
+ Vue.component('select-apply', (resolve) => { require(['./components/product/Process/Processes/selectApply'], resolve) })
68
+ // 设备管理
69
+ Vue.component('apply-devices-management', (resolve) => { require(['./components/product/Process/Processes/devicesManagement'], resolve) })
70
+
71
+ /** VueUtils **/
72
+ Vue.component('apply-upload', (resolve) => { require(['./components/product/VueUtils/ApplyUpload'], resolve) })
73
+ Vue.component('apply-high-meter', (resolve) => { require(['./components/product/VueUtils/HighMeter'], resolve) })
74
+
75
+ if (filiale) {
76
+ let filialeComp = require(`./filiale/${filiale}/pc`).specialComp
77
+ for (let key in filialeComp) {
78
+ Vue.component(key, filialeComp[key])
79
+ }
80
+ }
81
+ }
@@ -18,6 +18,7 @@ export default function (filiale) {
18
18
  Vue.component('app-take-pic', (resolve) => { require(['./components/android/AppTakePic'], resolve) })
19
19
  Vue.component('app-service-view', (resolve) => { require(['./components/android/AppServiceView'], resolve) })
20
20
  Vue.component('app-onetomany', (resolve) => { require(['./components/android/AppOnetomany'], resolve) })
21
+ Vue.component('task-graph', (resolve) => { require(['./components/android/TaskGraph'], resolve) })
21
22
 
22
23
  Vue.component('app-installation-details', (resolve) => { require(['./components/android/Process/Processes/AppInstallationDetails'], resolve) })
23
24
 
@@ -1,26 +1,147 @@
1
1
  <template>
2
2
  <div>
3
- <div class="row" v-if="!onetomany.hiddenOperate">
4
- <button class="btn btn-primary" @click.prevent="add()" v-if="!onetomany.addHidden" :style="onetomany.addStyle">{{ onetomany.addText === 'default' || !onetomany.addText ? '添加' : onetomany.addText }}</button>
3
+ <div class="col-sm-12 col-xs-12 form-group app-btn">
4
+ <button
5
+ :class="onetomany.add.class || 'btn btn-info'"
6
+ @click.prevent="openAdd()"
7
+ v-if="!onetomany.add.hidden"
8
+ :style="onetomany.add.style || ''">
9
+ {{ onetomany.add.text || '添加'}}
10
+ </button>
5
11
  </div>
6
- <list :model="onetomany" partial='list'>
7
- <div partial class="auto app-text panel">
8
- <div class="panel-body panel-self">
9
- <div class="row" v-for="field in $parent.model.fields" v-if="!field.displayPosition || field.displayPosition === '*' || field.displayPosition === 'list'">
10
- <p class="col-xs-3 text-left font"><b class="control-label-justify">{{ field.label }}</b></p>
11
- <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row[field.field] }}</p>
12
+ <div class="col-sm-12 col-xs-12">
13
+ <list :model="onetomany" partial='list'>
14
+ <div partial class="auto app-text panel">
15
+ <div class="panel-body panel-self">
16
+ <div class="row" v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
17
+ <p class="col-xs-3 text-left font label-justify"><b>{{ field.label }}</b></p>
18
+ <p class="col-xs-8 col-xs-offset-1 text-left input-font">{{ row[field.field] }}</p>
19
+ </div>
20
+ <div class="row text-right" v-if="!$parent.$parent.onetomany.hiddenOperate">
21
+ <button
22
+ :class="$parent.$parent.onetomany.update.style || 'btn btn-warning'"
23
+ @click.prevent="$parent.$parent.openUpdate($index)"
24
+ v-if="!$parent.$parent.onetomany.update.hidden"
25
+ :style="$parent.$parent.onetomany.update.style || ''">
26
+ {{ $parent.$parent.onetomany.update.text || '修改'}}
27
+ </button>
28
+ <button
29
+ :class="$parent.$parent.onetomany.delete.style || 'btn btn-danger'"
30
+ @click.prevent="$parent.$parent.openDelete($index)"
31
+ v-if="!$parent.$parent.onetomany.delete.hidden"
32
+ :style="$parent.$parent.onetomany.delete.style || ''">
33
+ {{ $parent.$parent.onetomany.delete.text || '删除'}}
34
+ </button>
35
+ </div>
12
36
  </div>
13
- <div class="row text-right" v-if="!$parent.$parent.onetomany.hiddenOperate">
14
- <button class="btn btn-warning" @click.prevent="$parent.$parent.update($index)" v-if="!$parent.$parent.onetomany.updateHidden">
15
- {{ $parent.$parent.onetomany.updateText === 'default' || !$parent.$parent.onetomany.updateText ? '修改' : $parent.$parent.onetomany.updateText }}
16
- </button>
17
- <button class="btn btn-danger" @click.prevent="$parent.$parent.delete($index)" v-if="!$parent.$parent.onetomany.deleteHidden">
18
- {{ $parent.$parent.onetomany.deleteText === 'default' || !$parent.$parent.onetomany.deleteText ? '删除' : $parent.$parent.onetomany.deleteText }}
19
- </button>
37
+ </div>
38
+ </list>
39
+ </div>
40
+
41
+
42
+ <!-- onetomany模态框 -->
43
+ <modal v-if="showModal" :show.sync="showModal" backdrop="false" :large="onetomany.modalSize === 'large' ? true : false" :small="onetomany.modalSize === 'small' ? true : false">
44
+ <header slot="modal-header" class="modal-header">
45
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
46
+ <span class="modal-title"><font
47
+ size="3">{{modelTitle}}</font></span>
48
+ </header>
49
+ <article slot="modal-body" class="modal-body clearfix">
50
+ <div v-for="(index,item) in onetomany.fields">
51
+ <!--input-->
52
+ <div :style="item.style ? item.style : ''"
53
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'app' || !item.device)"
54
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
55
+ <label class="control-label-justify">{{item.label}}</label>
56
+ <div :style="item.value_style ? item.value_style:''"
57
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
58
+ <input class="" style="width: 100%"
59
+ :type="item.type"
60
+ v-model="onetomany.fields[index].value"
61
+ :placeholder="item.placeholder"
62
+ :value="onetomany.fields[index].value"
63
+ :readonly="item.readonly"
64
+ :disabled="item.disabled"
65
+ @change="onchange(index)"
66
+ @blur="onblur(index)"
67
+ @input="oninput(index)"
68
+ />
69
+ </div>
70
+ </div>
71
+
72
+ <!--select-->
73
+ <div :style="item.style ? item.style : ''"
74
+ v-if="item.type==='select' && !item.hidden && (item.device === 'app' || !item.device)"
75
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped + ' form-group app-input':'col-xs-12 form-group app-input']">
76
+ <label class="control-label-justify">{{item.label}}</label>
77
+ <div :style="item.value_style ? item.value_style:''"
78
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
79
+ <v-select
80
+ class="select" width="100%" align="right"
81
+ :placeholder="item.placeholder"
82
+ :search="item.search"
83
+ close-on-select value-single
84
+ :options="item.options"
85
+ v-model="onetomany.fields[index].value"
86
+ :value.sync="onetomany.fields[index].value"
87
+ :readonly="item.readonly"
88
+ :disabled="item.disabled"
89
+ @blur="onblur(index)"
90
+ @change="onchange(index)"
91
+ ></v-select>
92
+ </div>
93
+ </div>
94
+
95
+ <!--时间datepicker-->
96
+ <div :style="item.style ? item.style : ''"
97
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'app' || !item.device)"
98
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped ? item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
99
+ <label class="control-label-justify">{{item.label}}</label>
100
+ <div :style="item.value_style ? item.value_style:''"
101
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
102
+ <datepicker
103
+ :placeholder="item.placeholder"
104
+ :value.sync="onetomany.fields[index].value"
105
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
106
+ v-model="onetomany.fields[index].value"
107
+ :readonly="item.readonly"
108
+ :disabled="item.disabled"
109
+ @change="onchange(index)"
110
+ @blur="onblur(index)"
111
+ :show-reset-button="true">
112
+ </datepicker>
113
+ </div>
114
+ </div>
115
+
116
+ <!--textarea-->
117
+ <div :style="item.style ? item.style : ''"
118
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'app' || !item.device)"
119
+ :class="[item.required && !(item.value) ? 'apply-has-error' : '', item.bootstraped?item.bootstraped+' form-group app-input':'col-xs-12 form-group app-input']">
120
+ <label class="control-label-justify">{{item.label}}</label>
121
+ <div :style="item.value_style ? item.value_style:''"
122
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-xs-8'">
123
+ <textarea
124
+ :readonly="item.readonly"
125
+ :disabled="item.disabled"
126
+ class="" rows="1"
127
+ style="width: 100%;height: 100%"
128
+ v-model="onetomany.fields[index].value"
129
+ :value="onetomany.fields[index].value"
130
+ @change="onchange(index)"
131
+ @blur="onblur(index)"
132
+ @input="oninput(index)"
133
+ ></textarea>
134
+ </div>
20
135
  </div>
21
136
  </div>
22
- </div>
23
- </list>
137
+ </article>
138
+ <footer slot="modal-footer" class="modal-footer">
139
+ <button :class="disableButton?'btn btn-default':'btn btn-primary'"
140
+ :disabled="disableButton" type="button" @click.prevent="confirmModal()">
141
+ 确认
142
+ </button>
143
+ </footer>
144
+ </modal>
24
145
  </div>
25
146
  </template>
26
147
 
@@ -33,19 +154,119 @@ export default {
33
154
  props: ['onetomany', 'index'],
34
155
  data () {
35
156
  return {
157
+ showModal: false,
158
+ disableButton: true,
159
+ modelTitle: null,
160
+ rowIndex: null
36
161
  }
37
162
  },
38
163
  ready () {
39
164
  },
40
165
  methods: {
41
- add () {
42
- this.$dispatch('add', this.index)
166
+ confirmModal () {
167
+ if (this.modelTitle === '新增') {
168
+ if (this.onetomany.add.event) {
169
+ this.$dispatch(this.onetomany.add.event, this.index)
170
+ } else {
171
+ this.$dispatch('onetomanyadd', this.index)
172
+ }
173
+ }
174
+ if (this.modelTitle === '修改') {
175
+ if (this.onetomany.update.event) {
176
+ this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
177
+ } else {
178
+ this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
179
+ }
180
+ }
181
+
182
+ this.closeModal()
183
+ },
184
+ onchange (fieldIndex) {
185
+ this.disableModalButton()
186
+ if (this.onetomany.fields[fieldIndex].onchange) {
187
+ this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
188
+ } else {
189
+ this.$dispatch('onchangeModal', this.index, fieldIndex)
190
+ }
43
191
  },
44
- update (i) {
45
- this.$dispatch('update', this.index, i)
192
+ onblur (fieldIndex) {
193
+ this.disableModalButton()
194
+ if (this.onetomany.fields[fieldIndex].onblur) {
195
+ this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
196
+ } else {
197
+ this.$dispatch('onblurModal', this.index, fieldIndex)
198
+ }
46
199
  },
47
- delete (i) {
48
- this.$dispatch('delete', this.index, i)
200
+ oninput (fieldIndex) {
201
+ this.disableModalButton()
202
+ if (this.onetomany.fields[fieldIndex].oninput) {
203
+ this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
204
+ } else {
205
+ this.$dispatch('oninputModal', this.index, fieldIndex)
206
+ }
207
+ },
208
+ openDelete (rowIndex) {
209
+ this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
210
+ if (res === 'confirm') {
211
+ if (this.onetomany.delete.event) {
212
+ this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
213
+ } else {
214
+ this.$dispatch('onetomanydelete', this.index, rowIndex)
215
+ }
216
+ }
217
+ })
218
+ },
219
+ // 修改
220
+ openUpdate (rowIndex) {
221
+ let row = this.onetomany.rows[rowIndex]
222
+ for (const item of this.onetomany.fields) {
223
+ item.value = row[item.field]
224
+ }
225
+
226
+ this.disableModalButton()
227
+
228
+ this.modelTitle = '修改'
229
+ this.rowIndex = rowIndex
230
+
231
+ if (this.onetomany.update.openEvent) {
232
+ this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
233
+ }
234
+ this.$dispatch('openUpdateModel', this.index, this.rowIndex)
235
+
236
+ this.showModal = true
237
+ },
238
+ openAdd () {
239
+ this.disableModalButton()
240
+ this.modelTitle = '新增'
241
+
242
+ if (this.onetomany.add.openEvent) {
243
+ this.$dispatch(this.onetomany.add.openEvent, this.index)
244
+ }
245
+ this.$dispatch('openAddModel', this.index)
246
+
247
+ this.showModal = true
248
+ },
249
+ closeModal () {
250
+ this.showModal = false
251
+ this.disableButton = false
252
+ this.modelTitle = null
253
+ this.rowIndex = null
254
+
255
+ for (const item of this.onetomany.fields) {
256
+ item.value = null
257
+ }
258
+ },
259
+ // 是否禁用按钮
260
+ disableModalButton () {
261
+ let flag = false
262
+
263
+ for (const field of this.onetomany.fields) {
264
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
265
+ flag = true
266
+ }
267
+ }
268
+
269
+ this.disableButton = flag
49
270
  }
50
271
  },
51
272
  computed: {
@@ -57,22 +278,16 @@ export default {
57
278
 
58
279
  <style scoped>
59
280
  .control-label-justify {
60
- display: inline-block;
61
- vertical-align: top;
62
- width: 100%;
281
+ width: 30%;
63
282
  text-align: justify;
283
+ text-align-last: justify;
64
284
  font-family: PingFang-SC-Bold;
285
+ float: left;
65
286
  }
66
-
67
- .control-label-justify::after {
68
- content: "";
69
- display: inline-block;
70
- width: 100%;
71
- overflow: hidden;
72
- height: 0;
73
- }
74
- .app-text {
75
- font-size: 12px;
287
+ .label-justify {
288
+ text-align: justify;
289
+ text-align-last: justify;
290
+ float: left;
76
291
  }
77
292
  .panel-self{
78
293
  border-radius: 10px;
@@ -83,8 +298,4 @@ export default {
83
298
  font: 15px PingFang-SC-Medium;
84
299
  color: #666666;
85
300
  }
86
- .input-font{
87
- font: 15px PingFang-SC-Medium;
88
- color: #333333;
89
- }
90
301
  </style>