manage-client-xy 3.2.0 → 3.2.1
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/dev-server.js +11 -17
- package/package.json +1 -1
- package/src/components/ManageHome/ImportSupplygas/UpdateSupply.vue +187 -187
- package/src/components/ManageHomeCS/ImportSupplygas/UpdateSupply.vue +187 -187
- package/src/components/sale/businessquery/AttachmentViewer.vue +252 -0
- package/src/components/sale/businessquery/ChangeMeterQuery.vue +22 -0
- package/src/components/sale/businessquery/ChargeQuery.vue +28 -4
- package/src/components/sale/businessquery/DisableQuery.vue +22 -0
- package/src/components/sale/businessquery/EnableQuery.vue +22 -0
- package/src/components/sale/businessquery/FillCardQuery.vue +22 -0
- package/src/components/sale/businessquery/FillGasQuery.vue +22 -0
- package/src/components/sale/businessquery/MoveQuery.vue +22 -3
- package/src/components/sale/businessquery/OtherChargeQuery.vue +20 -3
- package/src/components/sale/businessquery/RecordQuery.vue +22 -0
- package/src/components/sale/businessquery/TransferQuery.vue +23 -2
- package/src/components/sale/businessquery/cancelAccountQuery.vue +488 -488
- package/src/components/sale/report/aode/DayReport.vue +50 -50
- package/src/components/sale/report/aode/DayReportSummary.vue +75 -75
- package/src/components/sale/report/aode/widget/LifeDayReportListPrint.vue +189 -189
- package/src/components/sale/report/aode/widget/LifeMonthPrint.vue +153 -153
- package/src/components/sale/report/aode/widget/LifeYearPrint.vue +143 -143
- package/src/components/sale/report/aode/widget/MonthByChargePrint.vue +236 -236
- package/src/components/sale/report/aode/widget/MonthByUserPrint.vue +232 -232
- package/src/plugins/FileDownloadR.js +61 -0
- package/src/saleManage.js +40 -40
- package/static/qh.json +2410 -2410
- package/webstorm.config.js +13 -13
|
@@ -1,187 +1,187 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="auto select-overspread">
|
|
3
|
-
<div class="panel panel-info">
|
|
4
|
-
<div class="panel-heading">
|
|
5
|
-
<h3 class="panel-title">修改客户信息</h3>
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
<validator name="v">
|
|
9
|
-
<form class="form-horizontal">
|
|
10
|
-
<div class="col-sm-12 form-group" style="margin-top: 100px;">
|
|
11
|
-
<div class="col-sm-4" :class="[$v.f_gasmun.required ? 'has-error': '']">
|
|
12
|
-
<label class="col-sm-6 control-label">供气量:</label>
|
|
13
|
-
<div class="col-sm-4">
|
|
14
|
-
<input type="text" onkeyup="value=value.replace(/[^\.\d]/g,'')" onblur="value=value.replace(/[^\.\d]/g,'')" onblur="this.v();" class="form-control" v-model="model.f_gasmun" v-validate:f_gasmun='{required: true }'/>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="col-sm-4" :class="[$v.f_gasunits.required ? 'has-error': '']">
|
|
18
|
-
<label class="col-sm-6 control-label">供气单位:</label>
|
|
19
|
-
<div class="col-sm-4">
|
|
20
|
-
<input type="text" class="form-control" v-model="model.f_gasunits" v-validate:f_gasunits='{required: true }'/>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<!--<div class="col-sm-4" :class="[$v.fcredentials.required ? 'has-error select-error': '']">-->
|
|
24
|
-
<!--<label class="col-sm-6 control-label">证件类型:</label>-->
|
|
25
|
-
<!--<div class="col-sm-4">-->
|
|
26
|
-
<!--<input type="text" v-show="false" v-model="$refs.fcredentials.value[0]" v-validate:fcredentials='{required: true }'>-->
|
|
27
|
-
<!--<v-select :value.sync="model.f_credentials" v-model="model.f_credentials" v-ref:fcredentials :options='credentials'-->
|
|
28
|
-
<!--placeholder='请选择' close-on-select></v-select>-->
|
|
29
|
-
<!--</div>-->
|
|
30
|
-
<!--</div>-->
|
|
31
|
-
<!--//<div class="col-sm-4" :class="[$v.f_gasdate.required ? 'has-error select-error': '']"></div>-->
|
|
32
|
-
<div class="col-sm-4">
|
|
33
|
-
<label for="startDate" class="col-sm-6 control-label">供气时间:</label>
|
|
34
|
-
<div class="col-sm-4" >
|
|
35
|
-
<datepicker id="startDate" placeholder="开始日期"
|
|
36
|
-
v-model="model.f_gasdate"
|
|
37
|
-
:value.sync="model.f_gasdate"
|
|
38
|
-
:disabled-days-of-Week="[]"
|
|
39
|
-
:format="'yyyy-MM-dd'"
|
|
40
|
-
:show-reset-button="reset">
|
|
41
|
-
</datepicker>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</div>
|
|
47
|
-
<div class="col-sm-12 form-group">
|
|
48
|
-
|
|
49
|
-
<div class="col-sm-4" :class="[$v.f_department.required ? 'has-error': '']">
|
|
50
|
-
<label class="col-sm-6 control-label">操作部门:</label>
|
|
51
|
-
<div class="col-sm-4">
|
|
52
|
-
<input type="text" class="form-control" v-model="model.f_department" v-validate:f_department='{required: true }'/>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
<!--<div class="col-sm-4" :class="[$v.f_password.required ? 'has-error': '']">-->
|
|
56
|
-
<!--<label class="col-sm-6 control-label">密码:</label>-->
|
|
57
|
-
<!--<div class="col-sm-4">-->
|
|
58
|
-
<!--<input type="text" class="form-control" v-model="model.f_password" v-validate:f_password='{required: true }'/>-->
|
|
59
|
-
<!--</div>-->
|
|
60
|
-
<!--</div>-->
|
|
61
|
-
</div>
|
|
62
|
-
<div class="col-sm-12 form-group">
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</div>
|
|
66
|
-
<div class="col-sm-12 form-group">
|
|
67
|
-
<div class="col-sm-4">
|
|
68
|
-
<label class="col-sm-6 control-label">分公司:</label>
|
|
69
|
-
<div class="col-sm-4">
|
|
70
|
-
<input type="text" class="form-control" v-model="model.f_filiale" disabled/>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="col-sm-4">
|
|
74
|
-
<label class="col-sm-6 control-label">操作时间:</label>
|
|
75
|
-
<div class="col-sm-4">
|
|
76
|
-
<input type="text" class="form-control" v-model="model.f_date" disabled/>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
<div class="col-sm-4">
|
|
80
|
-
<label class="col-sm-6 control-label">操作人:</label>
|
|
81
|
-
<div class="col-sm-4">
|
|
82
|
-
<input type="text" class="form-control" v-model="model.f_operator" disabled/>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
</form>
|
|
87
|
-
</validator>
|
|
88
|
-
<div class="col-sm-12 form-group" style="margin-top: 40px;">
|
|
89
|
-
<center>
|
|
90
|
-
<button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:40px;" :disabled='$v.invalid'>
|
|
91
|
-
保存
|
|
92
|
-
</button>
|
|
93
|
-
<button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:40px;">
|
|
94
|
-
撤销
|
|
95
|
-
</button>
|
|
96
|
-
</center>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</template>
|
|
100
|
-
<script>
|
|
101
|
-
import * as Util from '../../../stores/Util'
|
|
102
|
-
//import AppData from '../../../../stores/AppData'
|
|
103
|
-
export default {
|
|
104
|
-
title: '添加人员信息',
|
|
105
|
-
data () {
|
|
106
|
-
return {
|
|
107
|
-
model: {
|
|
108
|
-
//f_filiale: Util. f.f_fengongsi,
|
|
109
|
-
//id: 185,
|
|
110
|
-
f_filiale: null,
|
|
111
|
-
f_date: Util.toStandardDateString(),
|
|
112
|
-
// f_operator: Util.f.name,
|
|
113
|
-
f_operator: null,
|
|
114
|
-
f_gasdate: Util.toStandardDateString(),
|
|
115
|
-
f_gasmun : null,
|
|
116
|
-
f_gasunits : null,
|
|
117
|
-
f_department : null
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
props: ['upperson'],
|
|
122
|
-
ready () {
|
|
123
|
-
this.$nextTick(() => {
|
|
124
|
-
this.$dispatch('hiddenpaged')
|
|
125
|
-
// this.upperson.f_credentials = this.upperson.f_credentials ? this.upperson.f_credentials : this.model.f_credentials
|
|
126
|
-
// this.upperson.f_inputtor_type = this.upperson.f_inputtor_type ? this.upperson.f_inputtor_type : this.model.f_inputtor_type
|
|
127
|
-
// this.upperson.f_parentname = this.upperson.f_parentname ? this.upperson.f_parentname : this.model.f_parentname
|
|
128
|
-
// this.model = Object.assign({}, this.model, this.upperson)
|
|
129
|
-
// this.model.f_credentials = [this.model.f_credentials]
|
|
130
|
-
// this.model.f_inputtor_type = [this.model.f_inputtor_type]
|
|
131
|
-
// this.model.f_parentname = [this.model.f_parentname]
|
|
132
|
-
console.log("组件之间的传值 f_gasmun,f_gasunits,f_department")
|
|
133
|
-
this.model = Object.assign({}, this.model, this.upperson) //添加id,识别是否为更新操作
|
|
134
|
-
console.log(this.upperson.f_gasmun);
|
|
135
|
-
console.log(this.model.f_gasmun);
|
|
136
|
-
console.log(this.upperson.f_gasunits);
|
|
137
|
-
console.log(this.upperson.f_department)
|
|
138
|
-
//thi.model.id = this.upperson.id
|
|
139
|
-
this.model.f_gasmun = this.upperson.f_gasmun //? this.upperson.f_gasmun :this.model.f_gasmun;
|
|
140
|
-
this.model.f_gasunits = this.upperson.f_gasunits //? this.upperson.f_gasunits :this.model.f_gasunits;
|
|
141
|
-
this.model.f_department = this.upperson.f_department //? this.upperson.f_department :this.model.f_department;
|
|
142
|
-
})
|
|
143
|
-
},
|
|
144
|
-
methods: {
|
|
145
|
-
confirm() {
|
|
146
|
-
console.log(this.model),
|
|
147
|
-
this.model.f_gasdate //= this.model.startDate;//供气时间赋值
|
|
148
|
-
//姓名相同所以不需要赋值
|
|
149
|
-
this.model.f_department=this.model.f_department;//操作部门
|
|
150
|
-
this.model.f_filiale //= this.model.f_fengongsi;//分公司赋值
|
|
151
|
-
this.model.f_date //= this.model.f_operator_date;//操作日期赋值
|
|
152
|
-
this.$resetpost('rs/entity/t_supplygas', this.model).then(() => {
|
|
153
|
-
this.reset()
|
|
154
|
-
})
|
|
155
|
-
},
|
|
156
|
-
reset () {
|
|
157
|
-
this.$dispatch('close')
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
watch: {
|
|
161
|
-
'upperson' () {
|
|
162
|
-
this.$nextTick(() => {
|
|
163
|
-
this.$dispatch('hiddenpaged')
|
|
164
|
-
// this.upperson.f_credentials = this.upperson.f_credentials ? this.upperson.f_credentials : this.model.f_credentials
|
|
165
|
-
// this.upperson.f_inputtor_type = this.upperson.f_inputtor_type ? this.upperson.f_inputtor_type : this.model.f_inputtor_type
|
|
166
|
-
// this.upperson.f_parentname = this.upperson.f_parentname ? this.upperson.f_parentname : this.model.f_parentname
|
|
167
|
-
// this.model = Object.assign({}, this.model, this.upperson)
|
|
168
|
-
this.model.f_gasmun = [this.model.f_gasmun]
|
|
169
|
-
this.model.f_gasunits = [this.model.f_gasunits]
|
|
170
|
-
this.model.f_date = [this.model.f_date]
|
|
171
|
-
})
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
computed: {
|
|
175
|
-
// credentials (){
|
|
176
|
-
// return AppData.getParam("证件类型")
|
|
177
|
-
// },
|
|
178
|
-
// inputtortype () {
|
|
179
|
-
// return AppData.getParam("角色类型")
|
|
180
|
-
// },
|
|
181
|
-
// parentname () {
|
|
182
|
-
// return AppData.getParam("营业网点")
|
|
183
|
-
// }
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
</script>
|
|
187
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto select-overspread">
|
|
3
|
+
<div class="panel panel-info">
|
|
4
|
+
<div class="panel-heading">
|
|
5
|
+
<h3 class="panel-title">修改客户信息</h3>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<validator name="v">
|
|
9
|
+
<form class="form-horizontal">
|
|
10
|
+
<div class="col-sm-12 form-group" style="margin-top: 100px;">
|
|
11
|
+
<div class="col-sm-4" :class="[$v.f_gasmun.required ? 'has-error': '']">
|
|
12
|
+
<label class="col-sm-6 control-label">供气量:</label>
|
|
13
|
+
<div class="col-sm-4">
|
|
14
|
+
<input type="text" onkeyup="value=value.replace(/[^\.\d]/g,'')" onblur="value=value.replace(/[^\.\d]/g,'')" onblur="this.v();" class="form-control" v-model="model.f_gasmun" v-validate:f_gasmun='{required: true }'/>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="col-sm-4" :class="[$v.f_gasunits.required ? 'has-error': '']">
|
|
18
|
+
<label class="col-sm-6 control-label">供气单位:</label>
|
|
19
|
+
<div class="col-sm-4">
|
|
20
|
+
<input type="text" class="form-control" v-model="model.f_gasunits" v-validate:f_gasunits='{required: true }'/>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<!--<div class="col-sm-4" :class="[$v.fcredentials.required ? 'has-error select-error': '']">-->
|
|
24
|
+
<!--<label class="col-sm-6 control-label">证件类型:</label>-->
|
|
25
|
+
<!--<div class="col-sm-4">-->
|
|
26
|
+
<!--<input type="text" v-show="false" v-model="$refs.fcredentials.value[0]" v-validate:fcredentials='{required: true }'>-->
|
|
27
|
+
<!--<v-select :value.sync="model.f_credentials" v-model="model.f_credentials" v-ref:fcredentials :options='credentials'-->
|
|
28
|
+
<!--placeholder='请选择' close-on-select></v-select>-->
|
|
29
|
+
<!--</div>-->
|
|
30
|
+
<!--</div>-->
|
|
31
|
+
<!--//<div class="col-sm-4" :class="[$v.f_gasdate.required ? 'has-error select-error': '']"></div>-->
|
|
32
|
+
<div class="col-sm-4">
|
|
33
|
+
<label for="startDate" class="col-sm-6 control-label">供气时间:</label>
|
|
34
|
+
<div class="col-sm-4" >
|
|
35
|
+
<datepicker id="startDate" placeholder="开始日期"
|
|
36
|
+
v-model="model.f_gasdate"
|
|
37
|
+
:value.sync="model.f_gasdate"
|
|
38
|
+
:disabled-days-of-Week="[]"
|
|
39
|
+
:format="'yyyy-MM-dd'"
|
|
40
|
+
:show-reset-button="reset">
|
|
41
|
+
</datepicker>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
<div class="col-sm-12 form-group">
|
|
48
|
+
|
|
49
|
+
<div class="col-sm-4" :class="[$v.f_department.required ? 'has-error': '']">
|
|
50
|
+
<label class="col-sm-6 control-label">操作部门:</label>
|
|
51
|
+
<div class="col-sm-4">
|
|
52
|
+
<input type="text" class="form-control" v-model="model.f_department" v-validate:f_department='{required: true }'/>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<!--<div class="col-sm-4" :class="[$v.f_password.required ? 'has-error': '']">-->
|
|
56
|
+
<!--<label class="col-sm-6 control-label">密码:</label>-->
|
|
57
|
+
<!--<div class="col-sm-4">-->
|
|
58
|
+
<!--<input type="text" class="form-control" v-model="model.f_password" v-validate:f_password='{required: true }'/>-->
|
|
59
|
+
<!--</div>-->
|
|
60
|
+
<!--</div>-->
|
|
61
|
+
</div>
|
|
62
|
+
<div class="col-sm-12 form-group">
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
</div>
|
|
66
|
+
<div class="col-sm-12 form-group">
|
|
67
|
+
<div class="col-sm-4">
|
|
68
|
+
<label class="col-sm-6 control-label">分公司:</label>
|
|
69
|
+
<div class="col-sm-4">
|
|
70
|
+
<input type="text" class="form-control" v-model="model.f_filiale" disabled/>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="col-sm-4">
|
|
74
|
+
<label class="col-sm-6 control-label">操作时间:</label>
|
|
75
|
+
<div class="col-sm-4">
|
|
76
|
+
<input type="text" class="form-control" v-model="model.f_date" disabled/>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="col-sm-4">
|
|
80
|
+
<label class="col-sm-6 control-label">操作人:</label>
|
|
81
|
+
<div class="col-sm-4">
|
|
82
|
+
<input type="text" class="form-control" v-model="model.f_operator" disabled/>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</form>
|
|
87
|
+
</validator>
|
|
88
|
+
<div class="col-sm-12 form-group" style="margin-top: 40px;">
|
|
89
|
+
<center>
|
|
90
|
+
<button type="button" @click="confirm()" class="btn btn-primary" style="width:80px; margin-left:40px;" :disabled='$v.invalid'>
|
|
91
|
+
保存
|
|
92
|
+
</button>
|
|
93
|
+
<button type="button" @click="reset()" class="btn btn-warning" style="width:80px; margin-left:40px;">
|
|
94
|
+
撤销
|
|
95
|
+
</button>
|
|
96
|
+
</center>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
<script>
|
|
101
|
+
import * as Util from '../../../stores/Util'
|
|
102
|
+
//import AppData from '../../../../stores/AppData'
|
|
103
|
+
export default {
|
|
104
|
+
title: '添加人员信息',
|
|
105
|
+
data () {
|
|
106
|
+
return {
|
|
107
|
+
model: {
|
|
108
|
+
//f_filiale: Util. f.f_fengongsi,
|
|
109
|
+
//id: 185,
|
|
110
|
+
f_filiale: null,
|
|
111
|
+
f_date: Util.toStandardDateString(),
|
|
112
|
+
// f_operator: Util.f.name,
|
|
113
|
+
f_operator: null,
|
|
114
|
+
f_gasdate: Util.toStandardDateString(),
|
|
115
|
+
f_gasmun : null,
|
|
116
|
+
f_gasunits : null,
|
|
117
|
+
f_department : null
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
props: ['upperson'],
|
|
122
|
+
ready () {
|
|
123
|
+
this.$nextTick(() => {
|
|
124
|
+
this.$dispatch('hiddenpaged')
|
|
125
|
+
// this.upperson.f_credentials = this.upperson.f_credentials ? this.upperson.f_credentials : this.model.f_credentials
|
|
126
|
+
// this.upperson.f_inputtor_type = this.upperson.f_inputtor_type ? this.upperson.f_inputtor_type : this.model.f_inputtor_type
|
|
127
|
+
// this.upperson.f_parentname = this.upperson.f_parentname ? this.upperson.f_parentname : this.model.f_parentname
|
|
128
|
+
// this.model = Object.assign({}, this.model, this.upperson)
|
|
129
|
+
// this.model.f_credentials = [this.model.f_credentials]
|
|
130
|
+
// this.model.f_inputtor_type = [this.model.f_inputtor_type]
|
|
131
|
+
// this.model.f_parentname = [this.model.f_parentname]
|
|
132
|
+
console.log("组件之间的传值 f_gasmun,f_gasunits,f_department")
|
|
133
|
+
this.model = Object.assign({}, this.model, this.upperson) //添加id,识别是否为更新操作
|
|
134
|
+
console.log(this.upperson.f_gasmun);
|
|
135
|
+
console.log(this.model.f_gasmun);
|
|
136
|
+
console.log(this.upperson.f_gasunits);
|
|
137
|
+
console.log(this.upperson.f_department)
|
|
138
|
+
//thi.model.id = this.upperson.id
|
|
139
|
+
this.model.f_gasmun = this.upperson.f_gasmun //? this.upperson.f_gasmun :this.model.f_gasmun;
|
|
140
|
+
this.model.f_gasunits = this.upperson.f_gasunits //? this.upperson.f_gasunits :this.model.f_gasunits;
|
|
141
|
+
this.model.f_department = this.upperson.f_department //? this.upperson.f_department :this.model.f_department;
|
|
142
|
+
})
|
|
143
|
+
},
|
|
144
|
+
methods: {
|
|
145
|
+
confirm() {
|
|
146
|
+
console.log(this.model),
|
|
147
|
+
this.model.f_gasdate //= this.model.startDate;//供气时间赋值
|
|
148
|
+
//姓名相同所以不需要赋值
|
|
149
|
+
this.model.f_department=this.model.f_department;//操作部门
|
|
150
|
+
this.model.f_filiale //= this.model.f_fengongsi;//分公司赋值
|
|
151
|
+
this.model.f_date //= this.model.f_operator_date;//操作日期赋值
|
|
152
|
+
this.$resetpost('rs/entity/t_supplygas', this.model).then(() => {
|
|
153
|
+
this.reset()
|
|
154
|
+
})
|
|
155
|
+
},
|
|
156
|
+
reset () {
|
|
157
|
+
this.$dispatch('close')
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
watch: {
|
|
161
|
+
'upperson' () {
|
|
162
|
+
this.$nextTick(() => {
|
|
163
|
+
this.$dispatch('hiddenpaged')
|
|
164
|
+
// this.upperson.f_credentials = this.upperson.f_credentials ? this.upperson.f_credentials : this.model.f_credentials
|
|
165
|
+
// this.upperson.f_inputtor_type = this.upperson.f_inputtor_type ? this.upperson.f_inputtor_type : this.model.f_inputtor_type
|
|
166
|
+
// this.upperson.f_parentname = this.upperson.f_parentname ? this.upperson.f_parentname : this.model.f_parentname
|
|
167
|
+
// this.model = Object.assign({}, this.model, this.upperson)
|
|
168
|
+
this.model.f_gasmun = [this.model.f_gasmun]
|
|
169
|
+
this.model.f_gasunits = [this.model.f_gasunits]
|
|
170
|
+
this.model.f_date = [this.model.f_date]
|
|
171
|
+
})
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
computed: {
|
|
175
|
+
// credentials (){
|
|
176
|
+
// return AppData.getParam("证件类型")
|
|
177
|
+
// },
|
|
178
|
+
// inputtortype () {
|
|
179
|
+
// return AppData.getParam("角色类型")
|
|
180
|
+
// },
|
|
181
|
+
// parentname () {
|
|
182
|
+
// return AppData.getParam("营业网点")
|
|
183
|
+
// }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</script>
|
|
187
|
+
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
4
|
+
<header slot="modal-header" class="modal-header">
|
|
5
|
+
<h4 class="modal-title">附件查看</h4>
|
|
6
|
+
</header>
|
|
7
|
+
<article slot="modal-body" class="modal-body">
|
|
8
|
+
<div v-if="loading" class="loading-container">
|
|
9
|
+
<div class="loading-spinner"></div>
|
|
10
|
+
<p>加载中...</p>
|
|
11
|
+
</div>
|
|
12
|
+
<div v-if="!loading && error" class="error-container">
|
|
13
|
+
<p>{{ error }}</p>
|
|
14
|
+
</div>
|
|
15
|
+
<div v-if="!loading && !error && (!attachments || attachments.length === 0)" class="no-data-container">
|
|
16
|
+
<p>暂无附件</p>
|
|
17
|
+
</div>
|
|
18
|
+
<div v-if="!loading && !error && attachments && attachments.length > 0" class="attachments-list">
|
|
19
|
+
<div class="showList col-sm-12" style="padding: 10px;margin-top: 10px">
|
|
20
|
+
<div class="col-sm-6" style="padding:10px 10px 0px 10px;height: auto;box-sizing: border-box"
|
|
21
|
+
v-for="attachment in attachments" track-by="id">
|
|
22
|
+
<div class="showData">
|
|
23
|
+
<div class="left">
|
|
24
|
+
<img v-if="isImageFile(attachment)" :src="attachment.f_downloadpath || '#'" />
|
|
25
|
+
<div v-else class="file-icon">
|
|
26
|
+
<i class="glyphicon" :class="getFileIconClass(attachment)"></i>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="right">
|
|
30
|
+
<ul class="buttonList top">
|
|
31
|
+
<li v-if="['jpg','jpeg','png','gif','bmp'].includes(attachment.f_filetype.toLowerCase())">
|
|
32
|
+
<a target="_blank" :href="attachment.f_downloadpath">预览</a>
|
|
33
|
+
</li>
|
|
34
|
+
<li>
|
|
35
|
+
<a href="javascript:void(0)" @click="downloadAttachment(attachment)">下载</a>
|
|
36
|
+
</li>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</article>
|
|
44
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
45
|
+
<button class="button_clear button_spacing" @click="close">关闭</button>
|
|
46
|
+
</footer>
|
|
47
|
+
</modal>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
import { HttpResetClass } from 'vue-client'
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
props: {
|
|
56
|
+
businessId: {
|
|
57
|
+
type: [String, Number],
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
tableName: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
show: true,
|
|
68
|
+
loading: true,
|
|
69
|
+
error: null,
|
|
70
|
+
attachments: []
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
created() {
|
|
74
|
+
this.fetchAttachments()
|
|
75
|
+
},
|
|
76
|
+
methods: {
|
|
77
|
+
fetchAttachments() {
|
|
78
|
+
this.loading = true
|
|
79
|
+
this.error = null
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
if(!this.businessId || !this.tableName){
|
|
83
|
+
this.error = '业务ID和表名不能为空'
|
|
84
|
+
this.loading = false
|
|
85
|
+
return
|
|
86
|
+
}
|
|
87
|
+
const HttpReset = new HttpResetClass()
|
|
88
|
+
HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
|
|
89
|
+
data: {
|
|
90
|
+
items: 'id,F_DOWNLOADPATH,f_filename,f_filetype',
|
|
91
|
+
condition: `F_TABLE_NAME='${this.tableName}' and F_BUSINESSID = '${this.businessId}'`,
|
|
92
|
+
tablename: 't_files',
|
|
93
|
+
orderitem: 'id'
|
|
94
|
+
}
|
|
95
|
+
},{rejectMsg:null,resolveMsg:null}).then((response) => {
|
|
96
|
+
this.attachments = response.data || []
|
|
97
|
+
// 处理文件路径,确保完整URL
|
|
98
|
+
this.attachments.forEach(item => {
|
|
99
|
+
if (item.f_downloadpath && !item.f_downloadpath.startsWith('http')) {
|
|
100
|
+
let temp = item.f_downloadpath
|
|
101
|
+
let URL = temp.substring(temp.lastIndexOf(":\\") + 2)
|
|
102
|
+
item.f_downloadpath = "http://" + location.host + "/" + URL
|
|
103
|
+
} else {
|
|
104
|
+
item.f_downloadpath = item.f_downloadpath
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
this.loading = false
|
|
108
|
+
}).catch((error) => {
|
|
109
|
+
this.error = '获取附件失败:' + (error.message || '未知错误')
|
|
110
|
+
this.loading = false
|
|
111
|
+
})
|
|
112
|
+
|
|
113
|
+
} catch (error) {
|
|
114
|
+
this.error = '获取附件失败:' + (error.message || '未知错误')
|
|
115
|
+
this.loading = false
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
previewAttachment(attachment) {
|
|
119
|
+
// 根据附件类型处理预览
|
|
120
|
+
alert('预览附件:' + attachment.fileName)
|
|
121
|
+
},
|
|
122
|
+
downloadAttachment(attachment) {
|
|
123
|
+
this.$downFileR(attachment.f_downloadpath,attachment.f_filename,true)
|
|
124
|
+
},
|
|
125
|
+
close() {
|
|
126
|
+
this.show = false
|
|
127
|
+
this.$emit('close')
|
|
128
|
+
},
|
|
129
|
+
isImageFile(file) {
|
|
130
|
+
const imageExtensions = ['jpg', 'jpeg', 'png', 'gif', 'bmp'];
|
|
131
|
+
const fileExt = file.f_filetype.toLowerCase();
|
|
132
|
+
return imageExtensions.indexOf(fileExt) !== -1;
|
|
133
|
+
},
|
|
134
|
+
getFileIconClass(file) {
|
|
135
|
+
const fileType = file.f_filetype.toLowerCase();
|
|
136
|
+
|
|
137
|
+
if (fileType === 'pdf') {
|
|
138
|
+
return 'glyphicon-file text-danger';
|
|
139
|
+
} else if (['doc', 'docx'].indexOf(fileType) !== -1) {
|
|
140
|
+
return 'glyphicon-file text-primary';
|
|
141
|
+
} else if (['xls', 'xlsx'].indexOf(fileType) !== -1) {
|
|
142
|
+
return 'glyphicon-file text-success';
|
|
143
|
+
} else {
|
|
144
|
+
return 'glyphicon-file';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
</script>
|
|
150
|
+
|
|
151
|
+
<style scoped>
|
|
152
|
+
.loading-container, .error-container, .no-data-container {
|
|
153
|
+
text-align: center;
|
|
154
|
+
padding: 30px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.loading-spinner {
|
|
158
|
+
display: inline-block;
|
|
159
|
+
width: 40px;
|
|
160
|
+
height: 40px;
|
|
161
|
+
border: 4px solid #f3f3f3;
|
|
162
|
+
border-top: 4px solid #3498db;
|
|
163
|
+
border-radius: 50%;
|
|
164
|
+
animation: spin 1s linear infinite;
|
|
165
|
+
margin-bottom: 10px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@keyframes spin {
|
|
169
|
+
0% { transform: rotate(0deg); }
|
|
170
|
+
100% { transform: rotate(360deg); }
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.attachments-list {
|
|
174
|
+
width: 100%;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.showData {
|
|
178
|
+
height: auto;
|
|
179
|
+
position: relative;
|
|
180
|
+
padding-bottom: 7px;
|
|
181
|
+
border-bottom: solid 1px #c1c1c1;
|
|
182
|
+
font-family: "微软雅黑";
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.showData .left {
|
|
186
|
+
height: 180px;
|
|
187
|
+
width: 210px;
|
|
188
|
+
background-color: rgb(240, 240, 240);
|
|
189
|
+
overflow: hidden;
|
|
190
|
+
line-height: 180px;
|
|
191
|
+
text-align: center;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.showData .left img {
|
|
195
|
+
width: 100%;
|
|
196
|
+
height: auto;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.showData .right {
|
|
200
|
+
position: absolute;
|
|
201
|
+
top: 0px;
|
|
202
|
+
left: 220px;
|
|
203
|
+
right: 0px;
|
|
204
|
+
height: 180px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.showData .right .top {
|
|
208
|
+
height: 30px;
|
|
209
|
+
line-height: 30px;
|
|
210
|
+
color: rgb(98, 98, 98);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.showData .right ul {
|
|
214
|
+
height: 20px;
|
|
215
|
+
padding: 0px;
|
|
216
|
+
margin: 0px;
|
|
217
|
+
font-size: 0px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.showData .right ul li {
|
|
221
|
+
display: inline-block;
|
|
222
|
+
height: 20px;
|
|
223
|
+
list-style: none;
|
|
224
|
+
font-size: 16px;
|
|
225
|
+
line-height: 20px;
|
|
226
|
+
color: #FFFFFF;
|
|
227
|
+
background-color: #5bb85d;
|
|
228
|
+
padding: 0px 7px;
|
|
229
|
+
margin-right: 10px;
|
|
230
|
+
cursor: pointer;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.showData .right ul li:hover {
|
|
234
|
+
background-color: rgb(80, 150, 80);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.showData .right ul li:active {
|
|
238
|
+
background-color: rgb(150, 200, 150);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.showData .right ul li a {
|
|
242
|
+
width: 100%;
|
|
243
|
+
height: 100%;
|
|
244
|
+
text-decoration: none;
|
|
245
|
+
color: #FFFFFF;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.file-icon {
|
|
249
|
+
font-size: 60px;
|
|
250
|
+
color: #999;
|
|
251
|
+
}
|
|
252
|
+
</style>
|