manage-client 3.2.69 → 3.2.72

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.
@@ -0,0 +1,235 @@
1
+ <template>
2
+ <div class="basic-main" style="height: 100%">
3
+ <criteria-paged :model="model" :pager='false' v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
+ <p class="bg-info text-center" style="padding: 8px;">营业分类统计</p>
6
+ <div class="form-group" v-if="!$parent.$parent.data.f_files_path"></div>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
8
+ <div class="row">
9
+ <div class="col-sm-3" >
10
+ <label class="font_normal_body" for="startDate">开始日期:</label>
11
+ <datepicker id="startDate" placeholder="开始日期" style="width: 60%"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :disabled-days-of-Week="[]"
15
+ :format="'yyyy-MM'"
16
+ :show-reset-button="reset">
17
+ </datepicker>
18
+ </div>
19
+ <div class="col-sm-3" >
20
+ <label class="font_normal_body" for="endDate">结束日期:</label>
21
+ <datepicker id="endDate" placeholder="结束日期" style="width: 60%"
22
+ v-model="model.endDate"
23
+ :value.sync="model.endDate"
24
+ :disabled-days-of-Week="[]"
25
+ :format="'yyyy-MM'"
26
+ :show-reset-button="reset">
27
+ </datepicker>
28
+ </div>
29
+ <div class="col-sm-3">
30
+ <label class="font_normal_body" title="参数:分公司查询">公&emsp;&emsp;司:</label>
31
+ <v-select :value.sync="model.f_orgnames" multiple
32
+ v-model="model.f_orgnames"
33
+ :options='$parent.$parent.f_orgnames' placeholder='请选择'
34
+ condition="f_orgname in {}"
35
+ close-on-select></v-select>
36
+ </div>
37
+ <!--<div class="col-sm-3">-->
38
+ <!--<label class="font_normal_body">公&emsp;&emsp;司:</label>-->
39
+ <!--<right-tree @re-res="$parent.$parent.getRes"></right-tree>-->
40
+ <!--</div>-->
41
+ <div class="span" style = "float:right;">
42
+ <button class="button_search" @click="$parent.$parent.searchData()">查询</button>
43
+ <report-print id='gasprice' top='3cm' left='0' width='100%' height='100%' :preview="true"></report-print>
44
+ <report-excel id='gasprice'></report-excel>
45
+ </div>
46
+ </div>
47
+
48
+ </div>
49
+ </criteria>
50
+ <div partial='list' v-el:handcollect id='gasprice' style="overflow-y: scroll">
51
+ <table class='tableprint' style="margin: 0px auto" v-if="!$parent.data.f_files_path">
52
+ <thead>
53
+ <tr>
54
+ <th colspan='4' style="font-weight: normal; text-align: left;">
55
+ <h3 style="text-align: center">营业分类统计</h3>
56
+ </th>
57
+ </tr>
58
+ <tr>
59
+ <th colspan='4' style="font-weight: normal; text-align: center;;font-size: 1.0em;">
60
+ <span v-if="model.model.startDate === model.model.endDate">
61
+ 统计时间: {{model.model.startDate.replace('-','年')}}月
62
+ </span>
63
+ <span v-if="model.model.startDate !== model.model.endDate">
64
+ 统计时间: {{model.model.startDate.replace('-','年')}}月至{{ model.model.endDate.replace('-','年')}}月
65
+ </span>
66
+
67
+ <!--打印时间:{{{$parent.printTime}}}-->
68
+ </th>
69
+ </tr>
70
+ <tr>
71
+ <th colspan='4' style="font-weight: normal; text-align: center;;font-size: 1.0em;">
72
+ <div>
73
+ <span >{{model.model.f_orgnames}}</span>
74
+ <!--<span v-show="$parent.depname.trim()!=''"> 部门:{{$parent.depname}}</span>-->
75
+ <!--<span v-show="$parent.operatorname.trim()!=''">人员:{{$parent.operatorname}}</span>-->
76
+ </div>
77
+ </th>
78
+ </tr>
79
+ </thead>
80
+ <tr>
81
+ <td colspan='4' style="font-size: 1.0em;">
82
+ {{{ model.data.substring(26,model.data.length-8) }}}
83
+ </td>
84
+ </tr>
85
+ <tfoot>
86
+ <tr style="text-align: left;font-size: 1.0em;">
87
+ <th colspan='2'>&nbsp;</th>
88
+ <th colspan='1'>审核:</th>
89
+ <th colspan='1'>复核:</th>
90
+ </tr>
91
+ </tfoot>
92
+ </table>
93
+ {{{ $parent.reportStr}}}
94
+ </div>
95
+ </criteria-paged>
96
+ <modal :show.sync="show" v-ref:modal small backdrop="false">
97
+ <header slot="modal-header" class="modal-header">
98
+ <h4 class="modal-title">输入文件名称</h4>
99
+ </header>
100
+ <article slot="modal-body" class="modal-body">
101
+ <div class="form-group">
102
+ <input type="text" class="form-control" v-model="filename" placeholder='保存的文件名'>
103
+ </div>
104
+ </article>
105
+ <footer slot="modal-footer" class="modal-footer">
106
+ <button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
107
+ <button v-show="show" type="button" class="btn btn-success" @click='confirm(filename)'>确认</button>
108
+ </footer>
109
+ </modal>
110
+ </div>
111
+ </template>
112
+
113
+ <script>
114
+ import { DataModel } from 'vue-client'
115
+ import co from 'co'
116
+ let saveFile = function * (self) {
117
+ // 线验证文件是否重名
118
+ let count = yield self.$resetpost('rs/sql/manageSingleTable',
119
+ {data: {tablename: 't_report_record', condition: `f_files_name = '${self.filename}'`}},
120
+ {resolveMsg: null, rejectMsg: null})
121
+ if (count.data.length > 0) {
122
+ self.$showAlert('无法保存,文件名重名', 'warning', 3000)
123
+ return
124
+ }
125
+ let saveBack = yield self.$resetpost('rs/logic/saveReport', {f_files_content: self.$refs.paged.$els.handcollect.innerHTML,
126
+ f_files_name: self.filename, f_files_type: self.data.f_report_type, f_component_name: 'manage-bus-summary',
127
+ f_operator: this.$login.f.name, f_query_month: `${self.model.model.startDate}-${self.model.model.endDate}`,
128
+ f_outlets: this.$login.f.depname})
129
+ if (saveBack.data.status === 'succeed') {
130
+ self.show = false
131
+ self.filename = ''
132
+ // 后台保存完成,通知刷新
133
+ self.$dispatch('save-success', self.filename)
134
+ }
135
+ }
136
+ export default {
137
+ title: '营业分类统计',
138
+ props: ['data'],
139
+ data () {
140
+ return {
141
+ printTime: this.$login.toStandardTimeString(),
142
+ // depresid: [],
143
+ // userresid: [],
144
+ // f_orgid: this.$login.f.orgid,
145
+ // f_depid: this.$login.f.depids,
146
+ // f_operatorid: this.$login.f.id,
147
+ operatorid: [],
148
+ depid: [],
149
+ orgname: '',
150
+ depname: '',
151
+ operatorname: '',
152
+ orgCondtionStr: '1=1',
153
+ model: new DataModel('rs/report/BusinessClassifyTc', {startDate: 'this.model.startDate', endDate: 'this.model.endDate', f_orgid: 'this.model.f_orgid'}),
154
+ reportStr: null,
155
+ show: false,
156
+ }
157
+ },
158
+ ready () {
159
+ this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString().substring(0,7)
160
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString().substring(0,7)
161
+ this.$refs.paged.$refs.criteria.search()
162
+ console.log(this.$login.f)
163
+ },
164
+ methods: {
165
+ searchData () {
166
+ this.$refs.paged.$refs.criteria.search()
167
+ },
168
+ selfSearch (args) {
169
+ this.printTime = this.$login.toStandardTimeString()
170
+ let orgcondition ='1=1'
171
+ // if (this.f_orgid[0]) {
172
+ // orgcondition += ' and f_orgid in (' + this.f_orgid + ')'
173
+ // }
174
+ this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition + ' and ' + this.$refs.paged.$refs.criteria.condition
175
+ this.$refs.paged.search(args)
176
+ },
177
+ // getRes (obj) {
178
+ // this.orgname = obj.res[0]
179
+ // this.depresid = obj.resids
180
+ // this.f_orgid = obj.resids
181
+ // },
182
+ // getdep (obj, val) {
183
+ // this.depname = val[0]
184
+ // this.userresid = obj
185
+ // this.f_depid = obj
186
+ // },
187
+ // getuser ( obj, val) {
188
+ // this.operatorname = val[0]
189
+ // this.f_operatorid = obj
190
+ // },
191
+
192
+ // 根据文件路径获取储存的报表内容
193
+ getFileContent (path) {
194
+ this.$resetpost('rs/logic/getReportFileContent', {f_files_path: path}, {resolveMsg: null, rejectMsg: null}).then((res) => {
195
+ this.reportStr = res.data.filecontent
196
+ this.model.state = '正确'
197
+ })
198
+ },
199
+ confirm () {
200
+ if (!this.filename || this.filename === '') {
201
+ this.$showAlert('无法保存,文件名不能为空', 'warning', 3000)
202
+ }
203
+ let saveGen = saveFile(this)
204
+ co(saveGen)
205
+ },
206
+ close () {
207
+ this.show = false
208
+ },
209
+ // 将报表保存成文件
210
+ confirmReport () {
211
+ this.show = true
212
+ this.filename = this.data.f_report_name + this.$login.toStandardDateString()
213
+ },
214
+ },
215
+ watch: {
216
+ 'data' (val) {
217
+ if (val.f_files_path) {
218
+ this.getFileContent(val.f_files_path)
219
+ } else {
220
+ this.reportStr = null
221
+ }
222
+ }
223
+ },
224
+ computed: {
225
+ f_orgnames() {
226
+ return [...this.$appdata.getParam('分公司查询')]
227
+ }
228
+ }
229
+ }
230
+ </script>
231
+ <style scoped>
232
+ .noborder{
233
+ border: none;
234
+ }
235
+ </style>
@@ -52,7 +52,7 @@
52
52
  condition="f_address like '%{}%'" placeholder='客户地址'>
53
53
  </div>
54
54
  <div class="col-sm-2 form-group" >
55
- <label class="font_normal_body">客户状态</label>
55
+ <label class="font_normal_body">用户状态</label>
56
56
  <v-select :value.sync="model.f_user_state"
57
57
  v-model="model.f_user_state"
58
58
  :options='$parent.$parent.userstates' placeholder='请选择'
@@ -81,7 +81,7 @@
81
81
  </div>
82
82
 
83
83
  <div class="col-sm-2 form-group" >
84
- <label class="font_normal_body">客户状态</label>
84
+ <label class="font_normal_body">用户状态</label>
85
85
  <v-select :value.sync="model.f_user_state"
86
86
  v-model="model.f_user_state"
87
87
  :options='$parent.$parent.userstates' placeholder='请选择'