manage-client 3.3.233 → 3.3.235

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.3.233",
3
+ "version": "3.3.235",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -192,6 +192,45 @@ let getorg = async function (self) {
192
192
  console.log(this.$login.f)
193
193
  },
194
194
  methods: {
195
+ adjustParams(startDateStr,endDateStr) {
196
+ const now = new Date()
197
+ const todayStart = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)
198
+
199
+ const startDate = new Date(startDateStr)
200
+ const endDate = new Date(endDateStr)
201
+ let result
202
+ if (startDate < todayStart && endDate >= todayStart) {
203
+ // startDate 在今天之前,endDate 在今天或之后
204
+ let splitDates = 2
205
+ let month = now.getMonth() + 1
206
+ let date = now.getDate()
207
+ const yesterday = new Date(now);
208
+ yesterday.setDate(yesterday.getDate() - 1);
209
+ let month2 = yesterday.getMonth() + 1
210
+ let date2 = yesterday.getDate()
211
+ result = {
212
+ splitDates: splitDates,
213
+ yesterdayEnd: (yesterday.getFullYear() + '-' + (month2 < 10 ? '0' + month2 : month2) + '-' + (date2 < 10 ? '0' + date2 : date2) + ' 23:59:59'),
214
+ todayStart: now.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date) + ' 00:00:00'
215
+ }
216
+ } else if (startDate >= todayStart && endDate >= todayStart) {
217
+ // startDate 和 endDate 都在今天或之后
218
+ let splitDates = 0
219
+ result = {
220
+ splitDates: splitDates
221
+ }
222
+ } else {
223
+ // startDate 和 endDate 都在今天之前
224
+ let splitDates = 1
225
+ result = {
226
+ splitDates: splitDates
227
+ }
228
+ }
229
+ function padZero(num) {
230
+ return num.toString().padStart(2, '0');
231
+ }
232
+ return result;
233
+ },
195
234
  searchData () {
196
235
  this.$refs.paged.$refs.criteria.search()
197
236
  },
@@ -231,16 +270,47 @@ let getorg = async function (self) {
231
270
  }
232
271
  orgcondition += ' and ' + args.condition
233
272
  this.$refs.paged.$refs.criteria.model.f_orgid = orgcondition
273
+ let monthObj = null
274
+ let yearObj = null
275
+ if (this.$refs.paged.$refs.criteria.model.startDate && this.$refs.paged.$refs.criteria.model.endDate ) {
276
+ monthObj = this.adjustParams(this.$refs.paged.$refs.criteria.model.startDate, this.$refs.paged.$refs.criteria.model.endDate)
277
+ }
278
+ if (this.$refs.paged.$refs.criteria.model.yearStartDate && this.$refs.paged.$refs.criteria.model.yearEndDate) {
279
+ yearObj = this.adjustParams(this.$refs.paged.$refs.criteria.model.yearStartDate, this.$refs.paged.$refs.criteria.model.yearEndDate)
280
+ }
281
+ console.log('========', monthObj)
282
+ console.log('========', yearObj)
234
283
  if (this.reportStyle == '1') {
235
284
  let load = new HttpResetClass()
285
+ let params = {
286
+ startDate: args.model.startDate,
287
+ endDate: args.model.endDate,
288
+ monthRealTime: 0,
289
+ yearRealTime: 0,
290
+ monthRealStart: '',
291
+ monthHistoryEnd: '',
292
+ yearRealStart: '',
293
+ yearHistoryEnd: '',
294
+ yearStartDate: args.model.yearStartDate,
295
+ yearEndDate: args.model.yearEndDate,
296
+ f_orgid: orgcondition
297
+ }
298
+ if (monthObj && monthObj.splitDates === 2) {
299
+ params.monthRealTime = monthObj.splitDates
300
+ params.monthRealStart = monthObj.todayStart
301
+ params.monthHistoryEnd = monthObj.yesterdayEnd
302
+ } else if (monthObj) {
303
+ params.monthRealTime = monthObj.splitDates
304
+ }
305
+ if (yearObj && yearObj.splitDates === 2) {
306
+ params.yearRealTime = yearObj.splitDates
307
+ params.yearRealStart = yearObj.todayStart
308
+ params.yearHistoryEnd = yearObj.yesterdayEnd
309
+ } else if (yearObj) {
310
+ params.yearRealTime = yearObj.splitDates
311
+ }
236
312
  load.load("POST", 'api/af-revenue/sql/UserCountNum',
237
- {data: {
238
- startDate: args.model.startDate,
239
- endDate: args.model.endDate,
240
- yearStartDate: args.model.yearStartDate,
241
- yearEndDate: args.model.yearEndDate,
242
- f_orgid: orgcondition
243
- }},
313
+ {data: params},
244
314
  {resolveMsg: null, rejectMsg: null})
245
315
  .then((res) => {
246
316
  let info = res.data
@@ -261,6 +331,26 @@ let getorg = async function (self) {
261
331
  this.$refs.paged.search(args)
262
332
  })
263
333
  } else {
334
+ this.model.params.monthRealTime = 0
335
+ this.model.params.yearRealTime = 0
336
+ this.model.params.monthRealStart = ''
337
+ this.model.params.monthHistoryEnd = ''
338
+ this.model.params.yearRealStart = ''
339
+ this.model.params.yearHistoryEnd = ''
340
+ if (monthObj && monthObj.splitDates === 2) {
341
+ this.model.params.monthRealTime = monthObj.splitDates
342
+ this.model.params.monthRealStart = monthObj.todayStart
343
+ this.model.params.monthHistoryEnd = monthObj.yesterdayEnd
344
+ }else if (monthObj) {
345
+ this.model.params.monthRealTime = monthObj.splitDates
346
+ }
347
+ if (yearObj && yearObj.splitDates === 2) {
348
+ this.model.params.yearRealTime = yearObj.splitDates
349
+ this.model.params.yearRealStart = yearObj.todayStart
350
+ this.model.params.yearHistoryEnd = yearObj.yesterdayEnd
351
+ }else if (yearObj) {
352
+ this.model.params.yearRealTime = yearObj.splitDates
353
+ }
264
354
  this.model.url = 'api/af-revenue/report/BusinessClassifyTwo'
265
355
  this.$refs.paged.search(args)
266
356
  }
@@ -45,7 +45,7 @@
45
45
  <export-excel :data="$parent.$parent.getCondition"
46
46
  :field="$parent.$parent.getExportField"
47
47
  v-if="$parent.$parent.authArr.includes('档案查询导出')"
48
- sqlurl="/api/af-revenue/easyExcel/compreExport" sql-name="compreQuery" template-name='综合档案查询导出' :choose-col="true"></export-excel>
48
+ sqlurl="api/af-revenue/logic/openapi/exportfile" sql-name="compreQuery" template-name='综合档案查询导出' :choose-col="true"></export-excel>
49
49
  <print-data :sum-field="$parent.$parent.getExportField" :model="$parent.model" :field="$parent.$parent.getExportField"
50
50
  :defaultfield="$parent.$parent.defaultfield"
51
51
  titletable="综合档案查询"
@@ -99,7 +99,7 @@
99
99
  v-model="model.f_payment"
100
100
  :options='$parent.$parent.dypayment' placeholder='请选择'
101
101
  condition="f_cost_type in {}"
102
- close-on-select></v-select>
102
+ ></v-select>
103
103
  </div>
104
104
  <div class="col-sm-2 form-group">
105
105
  <label class="font_normal_body">客户地址</label>
@@ -368,7 +368,7 @@
368
368
  },
369
369
  condition: '1=1',
370
370
  org:[this.$login.f.orgid],
371
- orgCondtionStr: ` and f_orgid = ${this.$login.f.orgid}`
371
+ orgCondtionStr: ` and u.f_orgid = ${this.$login.f.orgid}`
372
372
  }
373
373
  },
374
374
  ready() {