safecheck-client 4.0.1-46 → 4.0.1-48

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,7 +1,7 @@
1
1
  {
2
2
  "name": "safecheck-client",
3
3
  "//": "主分支版本别乱升,测试包的版本直接发包(建议使用1.XX.XX-XXX格式作为测试包,不要频繁升级第三位版本号),别提交版本号。切了分支切记把主分支版本升了,保证主分支始终是最高版本!!!!!",
4
- "version": "4.0.1-46",
4
+ "version": "4.0.1-48",
5
5
  "description": "安检模块 前端组件",
6
6
  "author": "丁新 <417755458@qq.com>",
7
7
  "license": "ISC",
@@ -309,7 +309,7 @@ export default {
309
309
  computed: {
310
310
  actionEnabled: {
311
311
  get() {
312
- return (this.role == 'inspect' && (this.item.f_last_check_state == '到访不遇' || this.item.f_last_check_state == '拒检' || this.item.f_approved == '不通过' )) || (this.role == 'inspect' && this.item.f_complete !='已完成' && this.item.f_complete !='已传' )
312
+ return (this.role == 'inspect' && (this.item.f_last_check_state == '到访不遇' || this.item.f_last_check_state == '拒检' || this.item.f_approved == '不通过' )) || (this.role == 'inspect' && (this.item.f_complete !='已完成' || this.item.f_complete !='已传' ))
313
313
  }
314
314
  }
315
315
  },
@@ -188,7 +188,7 @@
188
188
  import {HttpResetClass, PagedList} from 'vue-client'
189
189
  import Vue from 'vue'
190
190
  import * as Util from '../../Util'
191
- import {toStandardTimeString} from "../../Util";
191
+ import {isEmpty, toStandardTimeString} from "../../Util";
192
192
 
193
193
  export default {
194
194
  title: '安检员B',
@@ -307,38 +307,57 @@
307
307
  inspect(info) {
308
308
  // 当前系统时间
309
309
  let newdate = Util.toStandardTimeString()
310
- if (info.f_last_check_state == '入户' && info.f_last_check_date && info.f_user_type == '民用') {
311
- // 解析上次安检时间
312
- let lastCheckDate = new Date(info.f_last_check_date)
313
- let currentDate = new Date(newdate)
314
- // 计算时间差(毫秒)
315
- let timeDiff = currentDate.getTime() - lastCheckDate.getTime()
310
+ if(isEmpty(info.f_last_check_date)){
311
+ info.id = ''
312
+ info.f_state = '未检'
313
+ info.f_no_checkplan = '无计划安检'
314
+ //tag
315
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/查询计划项表信息`, {data: {f_userid: info.f_userinfo_id}}).then((response) => {
316
+ //tag)
317
+ info['f_plan_meters'] = response.data
318
+ var pardate = {
319
+ _this: this,
320
+ tittle: '安检详情',
321
+ safe: true
322
+ }
323
+ this.$dispatch('gotoson', pardate)
324
+ this.$goto('safecheck-order-v', {item: info, role: 'inspect', parentPage: 'AddPlanItem'}, 'self', this.reload)
325
+ })
326
+ }else {
327
+ if (info.f_last_check_state == '入户' && info.f_last_check_date && info.f_user_type == '民用') {
328
+ // 解析上次安检时间
329
+ let lastCheckDate = new Date(info.f_last_check_date)
330
+ let currentDate = new Date(newdate)
331
+ // 计算时间差(毫秒)
332
+ let timeDiff = currentDate.getTime() - lastCheckDate.getTime()
316
333
 
317
- // 6个月 = 6 * 30 * 24 * 60 * 60 * 1000 毫秒(约15552000000毫秒)
318
- // 更精确的计算:6个月 = 6 * 平均每月30.44天 * 24 * 60 * 60 * 1000
319
- let sixMonthsInMs = 6 * 30 * 24 * 60 * 60 * 1000
320
- if (timeDiff < sixMonthsInMs) {
321
- this.$showMessage('该用户半年内已进行入户安检,是否继续安检?', ['confirm', 'cancel']).then((res) => {
322
- if (res == 'confirm') {
323
- info.id = ''
324
- info.f_state = '未检'
325
- info.f_no_checkplan = '无计划安检'
326
- //tag
327
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/查询计划项表信息`, {data: {f_userid: info.f_userinfo_id}}).then((response) => {
328
- //tag)
329
- info['f_plan_meters'] = response.data
330
- var pardate = {
331
- _this: this,
332
- tittle: '安检详情',
333
- safe: true
334
- }
335
- this.$dispatch('gotoson', pardate)
336
- this.$goto('safecheck-order-v', {item: info, role: 'inspect', parentPage: 'AddPlanItem'}, 'self', this.reload)
337
- })
338
- }
339
- })
334
+ // 6个月 = 6 * 30 * 24 * 60 * 60 * 1000 毫秒(约15552000000毫秒)
335
+ // 更精确的计算:6个月 = 6 * 平均每月30.44天 * 24 * 60 * 60 * 1000
336
+ let sixMonthsInMs = 6 * 30 * 24 * 60 * 60 * 1000
337
+ if (timeDiff < sixMonthsInMs) {
338
+ this.$showMessage('该用户半年内已进行入户安检,是否继续安检?', ['confirm', 'cancel']).then((res) => {
339
+ if (res == 'confirm') {
340
+ info.id = ''
341
+ info.f_state = '未检'
342
+ info.f_no_checkplan = '无计划安检'
343
+ //tag
344
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/查询计划项表信息`, {data: {f_userid: info.f_userinfo_id}}).then((response) => {
345
+ //tag)
346
+ info['f_plan_meters'] = response.data
347
+ var pardate = {
348
+ _this: this,
349
+ tittle: '安检详情',
350
+ safe: true
351
+ }
352
+ this.$dispatch('gotoson', pardate)
353
+ this.$goto('safecheck-order-v', {item: info, role: 'inspect', parentPage: 'AddPlanItem'}, 'self', this.reload)
354
+ })
355
+ }
356
+ })
357
+ }
340
358
  }
341
359
  }
360
+
342
361
  },
343
362
  Mreadibook(){
344
363
  this.cbc=[]