apply-clients 3.3.36 → 3.3.37
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/build/css-loaders.js +34 -0
- package/build/dev-android.js +101 -0
- package/build/dev-client.js +8 -0
- package/build/dev-server-app.js +76 -0
- package/build/dev-server.js +130 -0
- package/build/example-server.js +80 -0
- package/build/release.sh +28 -0
- package/build/utils.js +80 -0
- package/build/webpack.base.conf.js +84 -0
- package/build/webpack.baseandroid.conf.js +84 -0
- package/build/webpack.dev.conf.js +39 -0
- package/build/webpack.devandroid.conf.js +34 -0
- package/build/webpack.example.conf.js +49 -0
- package/build/webpack.prod.conf.js +60 -0
- package/build/webpack.prodandroid.conf.js +60 -0
- package/build/webpack.test.conf.js +31 -0
- package/index.html +33 -33
- package/package.json +1 -1
- package/src/AndroidApp.vue +30 -30
- package/src/android.js +21 -21
- package/src/apply.js +1 -8
- package/src/applyAndroid.js +1 -8
- package/src/components/android/AppOnetomany.vue +305 -305
- package/src/components/android/AppServiceView.vue +570 -570
- package/src/components/android/AppTakePic.vue +143 -143
- package/src/components/android/Function/AppFunctionServiceControl.vue +344 -344
- package/src/components/android/Function/AppInstallFunction.vue +1 -1
- package/src/components/android/Process/AppExplorationUser.vue +1 -1
- package/src/components/android/Process/AppServiceControl.vue +756 -756
- package/src/components/android/Process/Processes/AppChargeManagement.vue +468 -468
- package/src/components/android/Process/Processes/AppDevicesManagement.vue +508 -508
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +471 -471
- package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +297 -297
- package/src/components/android/Supervisory/AppProcessSupervisory.vue +1 -1
- package/src/components/android/Supervisory/AppSupervisoryCart.vue +115 -115
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +59 -13
- package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
- package/src/components/product/Function/InstallFunction.vue +10 -0
- package/src/components/product/Function/InstallInfoSelect.vue +4 -0
- package/src/components/product/Function/Service/FunctionServiceControl.vue +4 -4
- package/src/components/product/Install/InstallProject.vue +194 -194
- package/src/components/product/Material/MaterialDetailed.vue +224 -224
- package/src/components/product/OldApply/Handle/HandleApply.vue +3 -0
- package/src/components/product/OldApply/Monitor/MonitorApply.vue +3 -0
- package/src/components/product/OldApply/OldApply.vue +2 -2
- package/src/components/product/OldApply/OldApplyMessage.vue +411 -411
- package/src/components/product/Onetomany.vue +381 -381
- package/src/components/product/Order/OrderApply.vue +47 -47
- package/src/components/product/Order/OrderApplyList.vue +263 -263
- package/src/components/product/Order/OrderMessage.vue +237 -237
- package/src/components/product/Process/ExplorationSelect.vue +4 -0
- package/src/components/product/Process/ExplorationUser.vue +10 -0
- package/src/components/product/Process/Processes/InstallationDetails.vue +578 -578
- package/src/components/product/Process/Processes/Print/printBuildOrder.vue +8 -29
- package/src/components/product/Process/Processes/Print/printCharge.vue +142 -142
- package/src/components/product/Process/Processes/Print/printRefund.vue +1 -1
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +186 -186
- package/src/components/product/Process/Processes/chargeManagement.vue +1 -1
- package/src/components/product/Process/Processes/devicesManagement.vue +478 -478
- package/src/components/product/Process/Processes/selectApply.vue +250 -250
- package/src/components/product/Process/Processes/selectUserinfo.vue +182 -182
- package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
- package/src/components/product/Process/Service/ServiceControl.vue +1 -1
- package/src/components/product/Process/ShowBackReason.vue +33 -33
- package/src/components/product/ServiceView.vue +637 -637
- package/src/components/product/Stop/StopApply.vue +101 -101
- package/src/components/product/Stop/StopApplyList.vue +271 -271
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +804 -804
- package/src/components/product/Supervisory/SupervisoryControl.vue +10 -0
- package/src/components/product/Supervisory/SupervisoryList.vue +4 -0
- package/src/components/product/Supervisory/SupervisoryhCart.vue +124 -124
- package/src/components/product/VueUtils/ApplyUpload.vue +262 -262
- package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -1090
- package/src/main.js +23 -23
- package/dist-android/index.html +0 -3
- package/dist-android/static/.gitkeep +0 -0
- package/dist-android/static/0.js +0 -2
- package/dist-android/static/0.js.map +0 -1
- package/dist-android/static/1.js +0 -2
- package/dist-android/static/1.js.map +0 -1
- package/dist-android/static/10.js +0 -2
- package/dist-android/static/10.js.map +0 -1
- package/dist-android/static/100.js +0 -2
- package/dist-android/static/100.js.map +0 -1
- package/dist-android/static/11.js +0 -2
- package/dist-android/static/11.js.map +0 -1
- package/dist-android/static/12.js +0 -2
- package/dist-android/static/12.js.map +0 -1
- package/dist-android/static/13.js +0 -2
- package/dist-android/static/13.js.map +0 -1
- package/dist-android/static/14.js +0 -2
- package/dist-android/static/14.js.map +0 -1
- package/dist-android/static/15.js +0 -2
- package/dist-android/static/15.js.map +0 -1
- package/dist-android/static/16.js +0 -2
- package/dist-android/static/16.js.map +0 -1
- package/dist-android/static/17.js +0 -2
- package/dist-android/static/17.js.map +0 -1
- package/dist-android/static/18.js +0 -2
- package/dist-android/static/18.js.map +0 -1
- package/dist-android/static/19.js +0 -2
- package/dist-android/static/19.js.map +0 -1
- package/dist-android/static/2.js +0 -2
- package/dist-android/static/2.js.map +0 -1
- package/dist-android/static/20.js +0 -2
- package/dist-android/static/20.js.map +0 -1
- package/dist-android/static/21.js +0 -2
- package/dist-android/static/21.js.map +0 -1
- package/dist-android/static/22.js +0 -2
- package/dist-android/static/22.js.map +0 -1
- package/dist-android/static/23.js +0 -2
- package/dist-android/static/23.js.map +0 -1
- package/dist-android/static/24.js +0 -2
- package/dist-android/static/24.js.map +0 -1
- package/dist-android/static/25.js +0 -2
- package/dist-android/static/25.js.map +0 -1
- package/dist-android/static/26.js +0 -2
- package/dist-android/static/26.js.map +0 -1
- package/dist-android/static/27.js +0 -2
- package/dist-android/static/27.js.map +0 -1
- package/dist-android/static/28.js +0 -2
- package/dist-android/static/28.js.map +0 -1
- package/dist-android/static/29.js +0 -2
- package/dist-android/static/29.js.map +0 -1
- package/dist-android/static/3.js +0 -2
- package/dist-android/static/3.js.map +0 -1
- package/dist-android/static/30.js +0 -2
- package/dist-android/static/30.js.map +0 -1
- package/dist-android/static/31.js +0 -2
- package/dist-android/static/31.js.map +0 -1
- package/dist-android/static/32.js +0 -2
- package/dist-android/static/32.js.map +0 -1
- package/dist-android/static/33.js +0 -2
- package/dist-android/static/33.js.map +0 -1
- package/dist-android/static/34.js +0 -2
- package/dist-android/static/34.js.map +0 -1
- package/dist-android/static/35.js +0 -2
- package/dist-android/static/35.js.map +0 -1
- package/dist-android/static/36.js +0 -2
- package/dist-android/static/36.js.map +0 -1
- package/dist-android/static/37.js +0 -2
- package/dist-android/static/37.js.map +0 -1
- package/dist-android/static/38.js +0 -2
- package/dist-android/static/38.js.map +0 -1
- package/dist-android/static/39.js +0 -2
- package/dist-android/static/39.js.map +0 -1
- package/dist-android/static/4.js +0 -2
- package/dist-android/static/4.js.map +0 -1
- package/dist-android/static/40.js +0 -2
- package/dist-android/static/40.js.map +0 -1
- package/dist-android/static/41.js +0 -2
- package/dist-android/static/41.js.map +0 -1
- package/dist-android/static/42.js +0 -2
- package/dist-android/static/42.js.map +0 -1
- package/dist-android/static/43.js +0 -2
- package/dist-android/static/43.js.map +0 -1
- package/dist-android/static/44.js +0 -2
- package/dist-android/static/44.js.map +0 -1
- package/dist-android/static/45.js +0 -2
- package/dist-android/static/45.js.map +0 -1
- package/dist-android/static/46.js +0 -2
- package/dist-android/static/46.js.map +0 -1
- package/dist-android/static/47.js +0 -2
- package/dist-android/static/47.js.map +0 -1
- package/dist-android/static/48.js +0 -2
- package/dist-android/static/48.js.map +0 -1
- package/dist-android/static/49.js +0 -2
- package/dist-android/static/49.js.map +0 -1
- package/dist-android/static/5.js +0 -2
- package/dist-android/static/5.js.map +0 -1
- package/dist-android/static/50.js +0 -2
- package/dist-android/static/50.js.map +0 -1
- package/dist-android/static/51.js +0 -2
- package/dist-android/static/51.js.map +0 -1
- package/dist-android/static/52.js +0 -2
- package/dist-android/static/52.js.map +0 -1
- package/dist-android/static/53.js +0 -2
- package/dist-android/static/53.js.map +0 -1
- package/dist-android/static/54.js +0 -2
- package/dist-android/static/54.js.map +0 -1
- package/dist-android/static/55.js +0 -2
- package/dist-android/static/55.js.map +0 -1
- package/dist-android/static/56.js +0 -2
- package/dist-android/static/56.js.map +0 -1
- package/dist-android/static/57.js +0 -2
- package/dist-android/static/57.js.map +0 -1
- package/dist-android/static/58.js +0 -2
- package/dist-android/static/58.js.map +0 -1
- package/dist-android/static/59.js +0 -2
- package/dist-android/static/59.js.map +0 -1
- package/dist-android/static/6.js +0 -2
- package/dist-android/static/6.js.map +0 -1
- package/dist-android/static/60.js +0 -2
- package/dist-android/static/60.js.map +0 -1
- package/dist-android/static/61.js +0 -2
- package/dist-android/static/61.js.map +0 -1
- package/dist-android/static/62.js +0 -2
- package/dist-android/static/62.js.map +0 -1
- package/dist-android/static/63.js +0 -2
- package/dist-android/static/63.js.map +0 -1
- package/dist-android/static/64.js +0 -2
- package/dist-android/static/64.js.map +0 -1
- package/dist-android/static/65.js +0 -2
- package/dist-android/static/65.js.map +0 -1
- package/dist-android/static/66.js +0 -2
- package/dist-android/static/66.js.map +0 -1
- package/dist-android/static/67.js +0 -2
- package/dist-android/static/67.js.map +0 -1
- package/dist-android/static/68.js +0 -2
- package/dist-android/static/68.js.map +0 -1
- package/dist-android/static/69.js +0 -2
- package/dist-android/static/69.js.map +0 -1
- package/dist-android/static/7.js +0 -6
- package/dist-android/static/7.js.map +0 -1
- package/dist-android/static/70.js +0 -2
- package/dist-android/static/70.js.map +0 -1
- package/dist-android/static/71.js +0 -2
- package/dist-android/static/71.js.map +0 -1
- package/dist-android/static/72.js +0 -2
- package/dist-android/static/72.js.map +0 -1
- package/dist-android/static/73.js +0 -2
- package/dist-android/static/73.js.map +0 -1
- package/dist-android/static/74.js +0 -2
- package/dist-android/static/74.js.map +0 -1
- package/dist-android/static/75.js +0 -2
- package/dist-android/static/75.js.map +0 -1
- package/dist-android/static/76.js +0 -2
- package/dist-android/static/76.js.map +0 -1
- package/dist-android/static/77.js +0 -2
- package/dist-android/static/77.js.map +0 -1
- package/dist-android/static/78.js +0 -2
- package/dist-android/static/78.js.map +0 -1
- package/dist-android/static/79.js +0 -2
- package/dist-android/static/79.js.map +0 -1
- package/dist-android/static/8.js +0 -2
- package/dist-android/static/8.js.map +0 -1
- package/dist-android/static/80.js +0 -2
- package/dist-android/static/80.js.map +0 -1
- package/dist-android/static/81.js +0 -2
- package/dist-android/static/81.js.map +0 -1
- package/dist-android/static/82.js +0 -2
- package/dist-android/static/82.js.map +0 -1
- package/dist-android/static/83.js +0 -2
- package/dist-android/static/83.js.map +0 -1
- package/dist-android/static/84.js +0 -2
- package/dist-android/static/84.js.map +0 -1
- package/dist-android/static/85.js +0 -2
- package/dist-android/static/85.js.map +0 -1
- package/dist-android/static/86.js +0 -2
- package/dist-android/static/86.js.map +0 -1
- package/dist-android/static/87.js +0 -2
- package/dist-android/static/87.js.map +0 -1
- package/dist-android/static/88.js +0 -2
- package/dist-android/static/88.js.map +0 -1
- package/dist-android/static/89.js +0 -2
- package/dist-android/static/89.js.map +0 -1
- package/dist-android/static/9.js +0 -3
- package/dist-android/static/9.js.map +0 -1
- package/dist-android/static/90.js +0 -2
- package/dist-android/static/90.js.map +0 -1
- package/dist-android/static/91.js +0 -2
- package/dist-android/static/91.js.map +0 -1
- package/dist-android/static/92.js +0 -2
- package/dist-android/static/92.js.map +0 -1
- package/dist-android/static/93.js +0 -2
- package/dist-android/static/93.js.map +0 -1
- package/dist-android/static/94.js +0 -2
- package/dist-android/static/94.js.map +0 -1
- package/dist-android/static/95.js +0 -2
- package/dist-android/static/95.js.map +0 -1
- package/dist-android/static/96.js +0 -2
- package/dist-android/static/96.js.map +0 -1
- package/dist-android/static/97.js +0 -2
- package/dist-android/static/97.js.map +0 -1
- package/dist-android/static/98.js +0 -2
- package/dist-android/static/98.js.map +0 -1
- package/dist-android/static/99.js +0 -2
- package/dist-android/static/99.js.map +0 -1
- package/dist-android/static/app.css +0 -2
- package/dist-android/static/app.css.map +0 -1
- package/dist-android/static/app.js +0 -80
- package/dist-android/static/app.js.map +0 -1
- package/dist-android/static/batchleft.png +0 -0
- package/dist-android/static/batchright.png +0 -0
- package/dist-android/static/bluemainbg.jpg +0 -0
- package/dist-android/static/config.json +0 -7
- package/dist-android/static/denglu.png +0 -0
- package/dist-android/static/glyphicons-halflings-regular.eot +0 -0
- package/dist-android/static/glyphicons-halflings-regular.svg +0 -288
- package/dist-android/static/glyphicons-halflings-regular.ttf +0 -0
- package/dist-android/static/glyphicons-halflings-regular.woff +0 -0
- package/dist-android/static/glyphicons-halflings-regular.woff2 +0 -0
- package/dist-android/static/huangtengbiaozhi.png +0 -0
- package/dist-android/static/jingyin.jpg +0 -0
- package/dist-android/static/login_bg.jpg +0 -0
- package/dist-android/static/login_title.png +0 -0
- package/dist-android/static/login_title1.png +0 -0
- package/dist-android/static/loginbg.jpg +0 -0
- package/dist-android/static/loginlogo.png +0 -0
- package/dist-android/static/main_logo.png +0 -0
- package/dist-android/static/mainbg.jpg +0 -0
- package/dist-android/static/menulogo.png +0 -0
- package/dist-android/static/newmainbg.jpg +0 -0
- package/dist-android/static/psicon.png +0 -0
- package/dist-android/static/singleleft.png +0 -0
- package/dist-android/static/singleright.png +0 -0
- package/dist-android/static/treeopen.png +0 -0
- package/dist-android/static/treeout.png +0 -0
- package/dist-android/static/treeset.png +0 -0
- package/dist-android/static/usericon.png +0 -0
- package/dist-android/static/workflow_apply.json +0 -766
- package/dist-android/static/xinxi.png +0 -0
- package/dist-android/static//344/277/256/346/224/271/345/257/206/347/240/201.png +0 -0
- package/dist-android/static//345/256/211/346/243/200/345/257/274/350/210/252/347/253/226/345/261/2173.png +0 -0
- package/dist-android/static//345/257/274/345/207/272/346/225/260/346/215/256.png +0 -0
- package/dist-android/static//346/270/205/347/251/272/346/225/260/346/215/256.png +0 -0
- package/src/filiale/wuan/android.js +0 -0
- package/src/filiale/wuan/pc.js +0 -4
- package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
- package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +0 -414
- package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -456
- package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
- package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
- package/src/filiale/yuchuan/android.js +0 -8
- package/src/filiale/yuchuan/pc/Order/OrderApply.vue +0 -517
- package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +0 -343
- package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +0 -356
- package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +0 -131
- package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
- package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +0 -517
- package/src/filiale/yuchuan/pc.js +0 -13
|
@@ -1,381 +1,381 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<data-grid :model="onetomany" class="list_area table_sy">
|
|
4
|
-
<template partial='head'>
|
|
5
|
-
<tr>
|
|
6
|
-
<th style="white-space: nowrap;">序号</th>
|
|
7
|
-
<th v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
|
|
8
|
-
<nobr>{{field.label}}</nobr>
|
|
9
|
-
</th>
|
|
10
|
-
<th v-if="!$parent.$parent.onetomany.hiddenOperate">
|
|
11
|
-
<button :style="$parent.$parent.onetomany.add.style"
|
|
12
|
-
:class="$parent.$parent.onetomany.add.class ? $parent.$parent.onetomany.add.class + ' button_spacing' : 'button_new button_spacing'"
|
|
13
|
-
v-if="!$parent.$parent.onetomany.add.hidden"
|
|
14
|
-
@click.prevent="$parent.$parent.openAdd()" >
|
|
15
|
-
{{ $parent.$parent.onetomany.add.text || '添加' }}
|
|
16
|
-
</button>
|
|
17
|
-
<button :style="$parent.$parent.onetomany.import.style"
|
|
18
|
-
:class="$parent.$parent.onetomany.import.class ? $parent.$parent.onetomany.import.class + ' button_spacing' : 'button_export button_spacing'"
|
|
19
|
-
v-if="!$parent.$parent.onetomany.import.hidden"
|
|
20
|
-
@click.prevent="$parent.$parent.showFile = !$parent.$parent.showFile" >
|
|
21
|
-
{{ $parent.$parent.onetomany.import.text || '导入' }}
|
|
22
|
-
</button>
|
|
23
|
-
<a type="button" style="text-decoration: none"
|
|
24
|
-
class="button_export button_spacing"
|
|
25
|
-
v-if="$parent.$parent.onetomany.import.templateUrl"
|
|
26
|
-
:href="$parent.$parent.onetomany.import.templateUrl" download>模板下载</a>
|
|
27
|
-
<export-excel
|
|
28
|
-
v-if="!$parent.$parent.onetomany.export.hidden"
|
|
29
|
-
:data="$parent.$parent.getCondition"
|
|
30
|
-
:field="$parent.$parent.getField"
|
|
31
|
-
sqlurl="rs/logic/applyExportfile"
|
|
32
|
-
:sql-name="$parent.$parent.onetomany.export.sqlName || 'singleTable'"
|
|
33
|
-
:template-name="$parent.$parent.onetomany.export.templateName || '导出明细'"
|
|
34
|
-
:btn-name="$parent.$parent.onetomany.export.butName || '导出'"
|
|
35
|
-
:choose-col="true"></export-excel>
|
|
36
|
-
</th>
|
|
37
|
-
</tr>
|
|
38
|
-
</template>
|
|
39
|
-
<template partial='body'>
|
|
40
|
-
<tr>
|
|
41
|
-
<td style="text-align: center">
|
|
42
|
-
<nobr><font>{{$index+1}}</font></nobr>
|
|
43
|
-
</td>
|
|
44
|
-
<td class="text-center" style="text-align: center" v-for="key in $parent.$parent.onetomany.fields" v-if="!key.displayPosition || key.displayPosition === 'list'">
|
|
45
|
-
{{row[key.field]}}
|
|
46
|
-
</td>
|
|
47
|
-
<td style="text-align: center" v-if="!$parent.$parent.onetomany.hiddenOperate">
|
|
48
|
-
<button :style="$parent.$parent.onetomany.update.style"
|
|
49
|
-
:class="$parent.$parent.onetomany.update.class ? $parent.$parent.onetomany.update.class + ' button_spacing' : 'button_search button_spacing'"
|
|
50
|
-
v-if="!$parent.$parent.onetomany.update.hidden"
|
|
51
|
-
@click.prevent="$parent.$parent.openUpdate($index)" >
|
|
52
|
-
{{ $parent.$parent.onetomany.update.text || '修改' }}
|
|
53
|
-
</button>
|
|
54
|
-
<button :style="$parent.$parent.onetomany.delete.style"
|
|
55
|
-
:class="$parent.$parent.onetomany.delete.class ? $parent.$parent.onetomany.delete.class + ' button_spacing' : 'button_delete button_spacing'"
|
|
56
|
-
v-if="!$parent.$parent.onetomany.delete.hidden"
|
|
57
|
-
@click.prevent="$parent.$parent.openDelete($index)" >
|
|
58
|
-
{{ $parent.$parent.onetomany.delete.text || '删除' }}
|
|
59
|
-
</button>
|
|
60
|
-
</td>
|
|
61
|
-
</tr>
|
|
62
|
-
</template>
|
|
63
|
-
</data-grid>
|
|
64
|
-
|
|
65
|
-
<!-- onetomany模态框 -->
|
|
66
|
-
<modal v-if="showModal" :show.sync="showModal" backdrop="false" large>
|
|
67
|
-
<header slot="modal-header" class="modal-header">
|
|
68
|
-
<button type="button" class="close" @click="closeModal()"><span>×</span></button>
|
|
69
|
-
<span class="modal-title"><font
|
|
70
|
-
size="3">{{modelTitle}}</font></span>
|
|
71
|
-
</header>
|
|
72
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
73
|
-
<div class="form-group" style="padding: 0 150px">
|
|
74
|
-
<div v-for="(index,item) in onetomany.fields">
|
|
75
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
|
|
76
|
-
v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
77
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
78
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
79
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
80
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
81
|
-
<input class="form-control input_view"
|
|
82
|
-
:placeholder="item.placeholder"
|
|
83
|
-
:type="item.type"
|
|
84
|
-
v-model="item.value"
|
|
85
|
-
:value="item.value"
|
|
86
|
-
:readonly="item.readonly"
|
|
87
|
-
:disabled="item.disabled"
|
|
88
|
-
@change="onchange(index)"
|
|
89
|
-
@blur="onblur(index)"
|
|
90
|
-
@input="oninput(index)"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<!--时间datepicker-->
|
|
96
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
97
|
-
v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
98
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
99
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
100
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
101
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
102
|
-
<datepicker
|
|
103
|
-
:placeholder="item.placeholder"
|
|
104
|
-
:value.sync="item.value"
|
|
105
|
-
v-model="item.value"
|
|
106
|
-
:readonly="item.readonly"
|
|
107
|
-
:disabled="item.disabled"
|
|
108
|
-
:format="item.format ? item.format : 'yyyy-MM-dd'"
|
|
109
|
-
:show-reset-button="true"
|
|
110
|
-
@change="onchange(index)"
|
|
111
|
-
@blur="onblur(index)"
|
|
112
|
-
></datepicker>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
<!--select-->
|
|
117
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
118
|
-
v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
119
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
120
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
121
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
122
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
123
|
-
<input-select
|
|
124
|
-
class="select select_list"
|
|
125
|
-
:value.sync="item.value"
|
|
126
|
-
v-model="item.value"
|
|
127
|
-
:options='item.options'
|
|
128
|
-
:readonly="item.readonly"
|
|
129
|
-
:disable="item.disabled"
|
|
130
|
-
:valueSingle="true"
|
|
131
|
-
@blur="onblur(index)"
|
|
132
|
-
@change="onchange(index)"
|
|
133
|
-
></input-select>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<!--textarea-->
|
|
138
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
139
|
-
v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
140
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
141
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
142
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
143
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
144
|
-
<textarea
|
|
145
|
-
class="form-control input_view"
|
|
146
|
-
style="width: 100%;height: 100%"
|
|
147
|
-
v-model="item.value"
|
|
148
|
-
:value="item.value"
|
|
149
|
-
:rows="item.rows"
|
|
150
|
-
:readonly="item.readonly"
|
|
151
|
-
:disabled="item.disabled"
|
|
152
|
-
@change="onchange(index)"
|
|
153
|
-
@blur="onblur(index)"
|
|
154
|
-
@input="oninput(index)"
|
|
155
|
-
></textarea>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
</article>
|
|
161
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
162
|
-
<button :class="disableButton ? 'btn btn-default':'btn btn-primary'"
|
|
163
|
-
:disabled="disableButton" type="button" @click="confirmModal()">
|
|
164
|
-
确认
|
|
165
|
-
</button>
|
|
166
|
-
</footer>
|
|
167
|
-
</modal>
|
|
168
|
-
|
|
169
|
-
<modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
170
|
-
<header slot="modal-header" class="modal-header">
|
|
171
|
-
<button type="button" class="close" @click="closeFile()"><span>×</span></button>
|
|
172
|
-
<h4 class="modal-title">选择文件</h4>
|
|
173
|
-
</header>
|
|
174
|
-
<article slot="modal-body" class="modal-body">
|
|
175
|
-
<div class="form-group">
|
|
176
|
-
<file-upload class="my-file-uploader" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
|
|
177
|
-
</div>
|
|
178
|
-
</article>
|
|
179
|
-
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
180
|
-
</modal>
|
|
181
|
-
</div>
|
|
182
|
-
</template>
|
|
183
|
-
|
|
184
|
-
<script>
|
|
185
|
-
import {HttpResetClass} from 'vue-client'
|
|
186
|
-
import Vue from 'vue'
|
|
187
|
-
export default {
|
|
188
|
-
title: 'onetomany',
|
|
189
|
-
props: {
|
|
190
|
-
selectdata: {
|
|
191
|
-
type: Object
|
|
192
|
-
},
|
|
193
|
-
onetomany: {
|
|
194
|
-
type: Object
|
|
195
|
-
},
|
|
196
|
-
index: {
|
|
197
|
-
type: Number
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
data () {
|
|
201
|
-
return {
|
|
202
|
-
disableButton: false,
|
|
203
|
-
showModal: false,
|
|
204
|
-
modelTitle: null,
|
|
205
|
-
rowIndex: null,
|
|
206
|
-
showFile: false
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
ready () {
|
|
210
|
-
},
|
|
211
|
-
methods: {
|
|
212
|
-
confirmModal () {
|
|
213
|
-
if (this.modelTitle === '新增') {
|
|
214
|
-
if (this.onetomany.add.event) {
|
|
215
|
-
this.$dispatch(this.onetomany.add.event, this.index)
|
|
216
|
-
} else {
|
|
217
|
-
this.$dispatch('onetomanyadd', this.index)
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
if (this.modelTitle === '修改') {
|
|
221
|
-
if (this.onetomany.update.event) {
|
|
222
|
-
this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
|
|
223
|
-
} else {
|
|
224
|
-
this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
this.closeModal()
|
|
229
|
-
},
|
|
230
|
-
onchange (fieldIndex) {
|
|
231
|
-
this.disableModalButton()
|
|
232
|
-
if (this.onetomany.fields[fieldIndex].onchange) {
|
|
233
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
|
|
234
|
-
} else {
|
|
235
|
-
this.$dispatch('onchangeModal', this.index, fieldIndex)
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
onblur (fieldIndex) {
|
|
239
|
-
this.disableModalButton()
|
|
240
|
-
if (this.onetomany.fields[fieldIndex].onblur) {
|
|
241
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
|
|
242
|
-
} else {
|
|
243
|
-
this.$dispatch('onblurModal', this.index, fieldIndex)
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
oninput (fieldIndex) {
|
|
247
|
-
this.disableModalButton()
|
|
248
|
-
if (this.onetomany.fields[fieldIndex].oninput) {
|
|
249
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
|
|
250
|
-
} else {
|
|
251
|
-
this.$dispatch('oninputModal', this.index, fieldIndex)
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
openDelete (rowIndex) {
|
|
255
|
-
this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
|
|
256
|
-
if (res === 'confirm') {
|
|
257
|
-
if (this.onetomany.delete.event) {
|
|
258
|
-
this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
|
|
259
|
-
} else {
|
|
260
|
-
this.$dispatch('onetomanydelete', this.index, rowIndex)
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
})
|
|
264
|
-
},
|
|
265
|
-
// 修改
|
|
266
|
-
openUpdate (rowIndex) {
|
|
267
|
-
let row = this.onetomany.rows[rowIndex]
|
|
268
|
-
for (const item of this.onetomany.fields) {
|
|
269
|
-
item.value = row[item.field]
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
this.disableModalButton()
|
|
273
|
-
|
|
274
|
-
this.modelTitle = '修改'
|
|
275
|
-
this.rowIndex = rowIndex
|
|
276
|
-
|
|
277
|
-
if (this.onetomany.update.openEvent) {
|
|
278
|
-
this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
|
|
279
|
-
}
|
|
280
|
-
this.$dispatch('openUpdateModel', this.index, this.rowIndex)
|
|
281
|
-
|
|
282
|
-
this.showModal = true
|
|
283
|
-
},
|
|
284
|
-
// 添加
|
|
285
|
-
openAdd () {
|
|
286
|
-
this.disableModalButton()
|
|
287
|
-
this.modelTitle = '新增'
|
|
288
|
-
|
|
289
|
-
if (this.onetomany.add.openEvent) {
|
|
290
|
-
this.$dispatch(this.onetomany.add.openEvent, this.index)
|
|
291
|
-
}
|
|
292
|
-
this.$dispatch('openAddModel', this.index)
|
|
293
|
-
|
|
294
|
-
this.showModal = true
|
|
295
|
-
},
|
|
296
|
-
closeModal () {
|
|
297
|
-
this.showModal = false
|
|
298
|
-
this.disableButton = false
|
|
299
|
-
this.modelTitle = null
|
|
300
|
-
this.rowIndex = null
|
|
301
|
-
|
|
302
|
-
for (const item of this.onetomany.fields) {
|
|
303
|
-
item.value = null
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
// 是否禁用按钮
|
|
307
|
-
disableModalButton () {
|
|
308
|
-
let flag = false
|
|
309
|
-
|
|
310
|
-
for (const field of this.onetomany.fields) {
|
|
311
|
-
if (field.required && !field.value) {
|
|
312
|
-
if (field.value === 0) {
|
|
313
|
-
flag = false
|
|
314
|
-
} else {
|
|
315
|
-
flag = true
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
this.disableButton = flag
|
|
321
|
-
},
|
|
322
|
-
// 关闭文件上传对话框
|
|
323
|
-
closeFile () {
|
|
324
|
-
this.showFile = false
|
|
325
|
-
// 将选的文件清空
|
|
326
|
-
this.$refs.file.$el.querySelector('input').value = ''
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
computed: {
|
|
330
|
-
getField () {
|
|
331
|
-
if (this.onetomany.export.fields) {
|
|
332
|
-
return this.onetomany.export.fields
|
|
333
|
-
}
|
|
334
|
-
let field = {}
|
|
335
|
-
for (const item of this.onetomany.fields) {
|
|
336
|
-
if (item.displayPosition === 'form' || !item.displayPosition) {
|
|
337
|
-
field[item.field] = item.label
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
return field
|
|
341
|
-
},
|
|
342
|
-
getCondition () {
|
|
343
|
-
if (this.onetomany.export.condition) {
|
|
344
|
-
return this.onetomany.export.condition
|
|
345
|
-
}
|
|
346
|
-
return {
|
|
347
|
-
tablename: this.onetomany.tables[0],
|
|
348
|
-
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
events: {
|
|
353
|
-
async 'onFileUpload'(file, result) {
|
|
354
|
-
if (this.onetomany.import.event) {
|
|
355
|
-
this.$dispatch(this.onetomany.import.event, this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
|
|
356
|
-
} else {
|
|
357
|
-
this.$dispatch('importEvent', this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
</script>
|
|
363
|
-
|
|
364
|
-
<style scoped>
|
|
365
|
-
.control-label-justify {
|
|
366
|
-
display: inline-block;
|
|
367
|
-
vertical-align: top;
|
|
368
|
-
width: 110px;
|
|
369
|
-
text-align: justify;
|
|
370
|
-
font-family: PingFang-SC-Bold;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.control-label-justify::after {
|
|
374
|
-
content: "";
|
|
375
|
-
display: inline-block;
|
|
376
|
-
width: 100%;
|
|
377
|
-
overflow: hidden;
|
|
378
|
-
height: 0;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<data-grid :model="onetomany" class="list_area table_sy">
|
|
4
|
+
<template partial='head'>
|
|
5
|
+
<tr>
|
|
6
|
+
<th style="white-space: nowrap;">序号</th>
|
|
7
|
+
<th v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
|
|
8
|
+
<nobr>{{field.label}}</nobr>
|
|
9
|
+
</th>
|
|
10
|
+
<th v-if="!$parent.$parent.onetomany.hiddenOperate">
|
|
11
|
+
<button :style="$parent.$parent.onetomany.add.style"
|
|
12
|
+
:class="$parent.$parent.onetomany.add.class ? $parent.$parent.onetomany.add.class + ' button_spacing' : 'button_new button_spacing'"
|
|
13
|
+
v-if="!$parent.$parent.onetomany.add.hidden"
|
|
14
|
+
@click.prevent="$parent.$parent.openAdd()" >
|
|
15
|
+
{{ $parent.$parent.onetomany.add.text || '添加' }}
|
|
16
|
+
</button>
|
|
17
|
+
<button :style="$parent.$parent.onetomany.import.style"
|
|
18
|
+
:class="$parent.$parent.onetomany.import.class ? $parent.$parent.onetomany.import.class + ' button_spacing' : 'button_export button_spacing'"
|
|
19
|
+
v-if="!$parent.$parent.onetomany.import.hidden"
|
|
20
|
+
@click.prevent="$parent.$parent.showFile = !$parent.$parent.showFile" >
|
|
21
|
+
{{ $parent.$parent.onetomany.import.text || '导入' }}
|
|
22
|
+
</button>
|
|
23
|
+
<a type="button" style="text-decoration: none"
|
|
24
|
+
class="button_export button_spacing"
|
|
25
|
+
v-if="$parent.$parent.onetomany.import.templateUrl"
|
|
26
|
+
:href="$parent.$parent.onetomany.import.templateUrl" download>模板下载</a>
|
|
27
|
+
<export-excel
|
|
28
|
+
v-if="!$parent.$parent.onetomany.export.hidden"
|
|
29
|
+
:data="$parent.$parent.getCondition"
|
|
30
|
+
:field="$parent.$parent.getField"
|
|
31
|
+
sqlurl="rs/logic/applyExportfile"
|
|
32
|
+
:sql-name="$parent.$parent.onetomany.export.sqlName || 'singleTable'"
|
|
33
|
+
:template-name="$parent.$parent.onetomany.export.templateName || '导出明细'"
|
|
34
|
+
:btn-name="$parent.$parent.onetomany.export.butName || '导出'"
|
|
35
|
+
:choose-col="true"></export-excel>
|
|
36
|
+
</th>
|
|
37
|
+
</tr>
|
|
38
|
+
</template>
|
|
39
|
+
<template partial='body'>
|
|
40
|
+
<tr>
|
|
41
|
+
<td style="text-align: center">
|
|
42
|
+
<nobr><font>{{$index+1}}</font></nobr>
|
|
43
|
+
</td>
|
|
44
|
+
<td class="text-center" style="text-align: center" v-for="key in $parent.$parent.onetomany.fields" v-if="!key.displayPosition || key.displayPosition === 'list'">
|
|
45
|
+
{{row[key.field]}}
|
|
46
|
+
</td>
|
|
47
|
+
<td style="text-align: center" v-if="!$parent.$parent.onetomany.hiddenOperate">
|
|
48
|
+
<button :style="$parent.$parent.onetomany.update.style"
|
|
49
|
+
:class="$parent.$parent.onetomany.update.class ? $parent.$parent.onetomany.update.class + ' button_spacing' : 'button_search button_spacing'"
|
|
50
|
+
v-if="!$parent.$parent.onetomany.update.hidden"
|
|
51
|
+
@click.prevent="$parent.$parent.openUpdate($index)" >
|
|
52
|
+
{{ $parent.$parent.onetomany.update.text || '修改' }}
|
|
53
|
+
</button>
|
|
54
|
+
<button :style="$parent.$parent.onetomany.delete.style"
|
|
55
|
+
:class="$parent.$parent.onetomany.delete.class ? $parent.$parent.onetomany.delete.class + ' button_spacing' : 'button_delete button_spacing'"
|
|
56
|
+
v-if="!$parent.$parent.onetomany.delete.hidden"
|
|
57
|
+
@click.prevent="$parent.$parent.openDelete($index)" >
|
|
58
|
+
{{ $parent.$parent.onetomany.delete.text || '删除' }}
|
|
59
|
+
</button>
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
</template>
|
|
63
|
+
</data-grid>
|
|
64
|
+
|
|
65
|
+
<!-- onetomany模态框 -->
|
|
66
|
+
<modal v-if="showModal" :show.sync="showModal" backdrop="false" large>
|
|
67
|
+
<header slot="modal-header" class="modal-header">
|
|
68
|
+
<button type="button" class="close" @click="closeModal()"><span>×</span></button>
|
|
69
|
+
<span class="modal-title"><font
|
|
70
|
+
size="3">{{modelTitle}}</font></span>
|
|
71
|
+
</header>
|
|
72
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
73
|
+
<div class="form-group" style="padding: 0 150px">
|
|
74
|
+
<div v-for="(index,item) in onetomany.fields">
|
|
75
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
|
|
76
|
+
v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
77
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
78
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
79
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
80
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
81
|
+
<input class="form-control input_view"
|
|
82
|
+
:placeholder="item.placeholder"
|
|
83
|
+
:type="item.type"
|
|
84
|
+
v-model="item.value"
|
|
85
|
+
:value="item.value"
|
|
86
|
+
:readonly="item.readonly"
|
|
87
|
+
:disabled="item.disabled"
|
|
88
|
+
@change="onchange(index)"
|
|
89
|
+
@blur="onblur(index)"
|
|
90
|
+
@input="oninput(index)"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<!--时间datepicker-->
|
|
96
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
97
|
+
v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
98
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
99
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
100
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
101
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
102
|
+
<datepicker
|
|
103
|
+
:placeholder="item.placeholder"
|
|
104
|
+
:value.sync="item.value"
|
|
105
|
+
v-model="item.value"
|
|
106
|
+
:readonly="item.readonly"
|
|
107
|
+
:disabled="item.disabled"
|
|
108
|
+
:format="item.format ? item.format : 'yyyy-MM-dd'"
|
|
109
|
+
:show-reset-button="true"
|
|
110
|
+
@change="onchange(index)"
|
|
111
|
+
@blur="onblur(index)"
|
|
112
|
+
></datepicker>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<!--select-->
|
|
117
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
118
|
+
v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
119
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
120
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
121
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
122
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
123
|
+
<input-select
|
|
124
|
+
class="select select_list"
|
|
125
|
+
:value.sync="item.value"
|
|
126
|
+
v-model="item.value"
|
|
127
|
+
:options='item.options'
|
|
128
|
+
:readonly="item.readonly"
|
|
129
|
+
:disable="item.disabled"
|
|
130
|
+
:valueSingle="true"
|
|
131
|
+
@blur="onblur(index)"
|
|
132
|
+
@change="onchange(index)"
|
|
133
|
+
></input-select>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<!--textarea-->
|
|
138
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
139
|
+
v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
140
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
141
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
142
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
143
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
144
|
+
<textarea
|
|
145
|
+
class="form-control input_view"
|
|
146
|
+
style="width: 100%;height: 100%"
|
|
147
|
+
v-model="item.value"
|
|
148
|
+
:value="item.value"
|
|
149
|
+
:rows="item.rows"
|
|
150
|
+
:readonly="item.readonly"
|
|
151
|
+
:disabled="item.disabled"
|
|
152
|
+
@change="onchange(index)"
|
|
153
|
+
@blur="onblur(index)"
|
|
154
|
+
@input="oninput(index)"
|
|
155
|
+
></textarea>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</article>
|
|
161
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
162
|
+
<button :class="disableButton ? 'btn btn-default':'btn btn-primary'"
|
|
163
|
+
:disabled="disableButton" type="button" @click="confirmModal()">
|
|
164
|
+
确认
|
|
165
|
+
</button>
|
|
166
|
+
</footer>
|
|
167
|
+
</modal>
|
|
168
|
+
|
|
169
|
+
<modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
|
|
170
|
+
<header slot="modal-header" class="modal-header">
|
|
171
|
+
<button type="button" class="close" @click="closeFile()"><span>×</span></button>
|
|
172
|
+
<h4 class="modal-title">选择文件</h4>
|
|
173
|
+
</header>
|
|
174
|
+
<article slot="modal-body" class="modal-body">
|
|
175
|
+
<div class="form-group">
|
|
176
|
+
<file-upload class="my-file-uploader" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
|
|
177
|
+
</div>
|
|
178
|
+
</article>
|
|
179
|
+
<footer slot="modal-footer" class="modal-footer"></footer>
|
|
180
|
+
</modal>
|
|
181
|
+
</div>
|
|
182
|
+
</template>
|
|
183
|
+
|
|
184
|
+
<script>
|
|
185
|
+
import {HttpResetClass} from 'vue-client'
|
|
186
|
+
import Vue from 'vue'
|
|
187
|
+
export default {
|
|
188
|
+
title: 'onetomany',
|
|
189
|
+
props: {
|
|
190
|
+
selectdata: {
|
|
191
|
+
type: Object
|
|
192
|
+
},
|
|
193
|
+
onetomany: {
|
|
194
|
+
type: Object
|
|
195
|
+
},
|
|
196
|
+
index: {
|
|
197
|
+
type: Number
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
data () {
|
|
201
|
+
return {
|
|
202
|
+
disableButton: false,
|
|
203
|
+
showModal: false,
|
|
204
|
+
modelTitle: null,
|
|
205
|
+
rowIndex: null,
|
|
206
|
+
showFile: false
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
ready () {
|
|
210
|
+
},
|
|
211
|
+
methods: {
|
|
212
|
+
confirmModal () {
|
|
213
|
+
if (this.modelTitle === '新增') {
|
|
214
|
+
if (this.onetomany.add.event) {
|
|
215
|
+
this.$dispatch(this.onetomany.add.event, this.index)
|
|
216
|
+
} else {
|
|
217
|
+
this.$dispatch('onetomanyadd', this.index)
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
if (this.modelTitle === '修改') {
|
|
221
|
+
if (this.onetomany.update.event) {
|
|
222
|
+
this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
|
|
223
|
+
} else {
|
|
224
|
+
this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
this.closeModal()
|
|
229
|
+
},
|
|
230
|
+
onchange (fieldIndex) {
|
|
231
|
+
this.disableModalButton()
|
|
232
|
+
if (this.onetomany.fields[fieldIndex].onchange) {
|
|
233
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
|
|
234
|
+
} else {
|
|
235
|
+
this.$dispatch('onchangeModal', this.index, fieldIndex)
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
onblur (fieldIndex) {
|
|
239
|
+
this.disableModalButton()
|
|
240
|
+
if (this.onetomany.fields[fieldIndex].onblur) {
|
|
241
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
|
|
242
|
+
} else {
|
|
243
|
+
this.$dispatch('onblurModal', this.index, fieldIndex)
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
oninput (fieldIndex) {
|
|
247
|
+
this.disableModalButton()
|
|
248
|
+
if (this.onetomany.fields[fieldIndex].oninput) {
|
|
249
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
|
|
250
|
+
} else {
|
|
251
|
+
this.$dispatch('oninputModal', this.index, fieldIndex)
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
openDelete (rowIndex) {
|
|
255
|
+
this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
|
|
256
|
+
if (res === 'confirm') {
|
|
257
|
+
if (this.onetomany.delete.event) {
|
|
258
|
+
this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
|
|
259
|
+
} else {
|
|
260
|
+
this.$dispatch('onetomanydelete', this.index, rowIndex)
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
})
|
|
264
|
+
},
|
|
265
|
+
// 修改
|
|
266
|
+
openUpdate (rowIndex) {
|
|
267
|
+
let row = this.onetomany.rows[rowIndex]
|
|
268
|
+
for (const item of this.onetomany.fields) {
|
|
269
|
+
item.value = row[item.field]
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
this.disableModalButton()
|
|
273
|
+
|
|
274
|
+
this.modelTitle = '修改'
|
|
275
|
+
this.rowIndex = rowIndex
|
|
276
|
+
|
|
277
|
+
if (this.onetomany.update.openEvent) {
|
|
278
|
+
this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
|
|
279
|
+
}
|
|
280
|
+
this.$dispatch('openUpdateModel', this.index, this.rowIndex)
|
|
281
|
+
|
|
282
|
+
this.showModal = true
|
|
283
|
+
},
|
|
284
|
+
// 添加
|
|
285
|
+
openAdd () {
|
|
286
|
+
this.disableModalButton()
|
|
287
|
+
this.modelTitle = '新增'
|
|
288
|
+
|
|
289
|
+
if (this.onetomany.add.openEvent) {
|
|
290
|
+
this.$dispatch(this.onetomany.add.openEvent, this.index)
|
|
291
|
+
}
|
|
292
|
+
this.$dispatch('openAddModel', this.index)
|
|
293
|
+
|
|
294
|
+
this.showModal = true
|
|
295
|
+
},
|
|
296
|
+
closeModal () {
|
|
297
|
+
this.showModal = false
|
|
298
|
+
this.disableButton = false
|
|
299
|
+
this.modelTitle = null
|
|
300
|
+
this.rowIndex = null
|
|
301
|
+
|
|
302
|
+
for (const item of this.onetomany.fields) {
|
|
303
|
+
item.value = null
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
// 是否禁用按钮
|
|
307
|
+
disableModalButton () {
|
|
308
|
+
let flag = false
|
|
309
|
+
|
|
310
|
+
for (const field of this.onetomany.fields) {
|
|
311
|
+
if (field.required && !field.value) {
|
|
312
|
+
if (field.value === 0) {
|
|
313
|
+
flag = false
|
|
314
|
+
} else {
|
|
315
|
+
flag = true
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
this.disableButton = flag
|
|
321
|
+
},
|
|
322
|
+
// 关闭文件上传对话框
|
|
323
|
+
closeFile () {
|
|
324
|
+
this.showFile = false
|
|
325
|
+
// 将选的文件清空
|
|
326
|
+
this.$refs.file.$el.querySelector('input').value = ''
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
computed: {
|
|
330
|
+
getField () {
|
|
331
|
+
if (this.onetomany.export.fields) {
|
|
332
|
+
return this.onetomany.export.fields
|
|
333
|
+
}
|
|
334
|
+
let field = {}
|
|
335
|
+
for (const item of this.onetomany.fields) {
|
|
336
|
+
if (item.displayPosition === 'form' || !item.displayPosition) {
|
|
337
|
+
field[item.field] = item.label
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return field
|
|
341
|
+
},
|
|
342
|
+
getCondition () {
|
|
343
|
+
if (this.onetomany.export.condition) {
|
|
344
|
+
return this.onetomany.export.condition
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
tablename: this.onetomany.tables[0],
|
|
348
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
events: {
|
|
353
|
+
async 'onFileUpload'(file, result) {
|
|
354
|
+
if (this.onetomany.import.event) {
|
|
355
|
+
this.$dispatch(this.onetomany.import.event, this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
|
|
356
|
+
} else {
|
|
357
|
+
this.$dispatch('importEvent', this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
</script>
|
|
363
|
+
|
|
364
|
+
<style scoped>
|
|
365
|
+
.control-label-justify {
|
|
366
|
+
display: inline-block;
|
|
367
|
+
vertical-align: top;
|
|
368
|
+
width: 110px;
|
|
369
|
+
text-align: justify;
|
|
370
|
+
font-family: PingFang-SC-Bold;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.control-label-justify::after {
|
|
374
|
+
content: "";
|
|
375
|
+
display: inline-block;
|
|
376
|
+
width: 100%;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
height: 0;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
</style>
|