safecheck-client 3.0.39-79 → 3.0.39-80

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.
@@ -355,6 +355,10 @@ div {
355
355
  </tr>
356
356
  </tbody>
357
357
  </table>
358
+ <div v-show="showButton">
359
+ <button class="button_spacing button_search" @click="auditSuccesss()">通过</button>
360
+ <button class="button_spacing button_search" @click="auditFail()">不通过</button>
361
+ </div>
358
362
  </div>
359
363
  </div>
360
364
 
@@ -422,12 +426,27 @@ div {
422
426
  <button type="button" class="btn btn-success" @click='imgclose'>关闭</button>
423
427
  </footer>
424
428
  </modal>
429
+ <modal :show.sync="showModel" :width="'50%'" :backdrop="false">
430
+ <div slot="modal-header" class="modal-header">
431
+ <h4 class="modal-title">
432
+ 安检审核备注
433
+ </h4>
434
+ </div>
435
+ <div slot="modal-body" class="modal-body">
436
+ <div class="row">
437
+ <div class="form-group col-sm-4">
438
+ <label class="font_normal_body">审核备注:</label>
439
+ <textarea v-model="message"></textarea>
440
+ </div>
441
+ </div>
442
+ </div>
443
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
444
+ <button class="button_search" style="margin-right: 15px" @click="auditFailOK()">确定</button>
445
+ <button class="button_search" style="margin-right: 15px" @click="auditFailCancel()">取消</button>
446
+ </div>
447
+ </modal>
425
448
  </template>
426
449
  <script>
427
- // import PaperUserm from './PaperUserm'
428
- // import PaperStatem from './PaperStatem'
429
- // import Devicesm from './Devicesm'
430
- // import PaperFeedbackm from './PaperFeedbackm'
431
450
  import ObjConfig from '../../../utils/GerJsonObjectConfig'
432
451
  import RadioGroup from 'vue-client/src/vue-strap/src/radioGroup'
433
452
  import Radio from 'vue-client/src/vue-strap/src/radioBtn'
@@ -507,6 +526,9 @@ export default {
507
526
  props: ['f_plan_id', 'item', 'role'],
508
527
  data() {
509
528
  return {
529
+ showModel:false,
530
+ showButton:false,
531
+ message:'',
510
532
  data: {
511
533
  f_devices: [],
512
534
  f_defect_content: ''
@@ -630,6 +652,43 @@ export default {
630
652
  }
631
653
  },
632
654
  methods: {
655
+ auditSuccesss() {
656
+ this.loading = true;
657
+ let sql = `update t_check_paper set f_approved_by='${this.$login.f.name}',f_approved_time='${Util.getNowDate()}',f_approved='不通过' where id='${this.item.id}'`
658
+ new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: sql}}, {
659
+ resolveMsg: '安检审核成功!',
660
+ rejectMsg: '安检审核出错!'
661
+ }).then((res) => {
662
+ this.loading = false;
663
+ this.$back()
664
+
665
+ })
666
+ },
667
+ auditFail() {
668
+ this.showModel = true;
669
+ },
670
+ showAudit() {
671
+ if (this.item.f_approved == '未审核' || !this.item.f_approved) {
672
+ this.showButton = true
673
+ }
674
+ },
675
+ auditFailOK() {
676
+ this.loading = true;
677
+ let sql = `update t_check_paper set f_approved_by='${this.$login.f.name}',f_approved_time='${Util.getNowDate()}',f_approved='通过' where id='${this.item.id}'`
678
+ new HttpResetClass().load('POST', 'rs/logic/runSQL', {data: {sql: sql}}, {
679
+ resolveMsg: '安检审核成功!',
680
+ rejectMsg: '安检审核出错!'
681
+ }).then((res) => {
682
+ this.loading = false;
683
+ this.message = '';
684
+ this.showModel = false;
685
+ this.$back()
686
+ })
687
+ },
688
+ auditFailCancel() {
689
+ this.showModel = false;
690
+ this.message = '';
691
+ },
633
692
  // pdf生成
634
693
  reportPdf() {
635
694
  // 抓取要截图的div的class名
@@ -1291,6 +1350,7 @@ export default {
1291
1350
  }
1292
1351
  },
1293
1352
  ready() {
1353
+ this.showAudit()
1294
1354
  // this.putDevices()
1295
1355
  this.newConfig = this.$appdata.getSingleValue('配置中心获取文件')?this.$appdata.getSingleValue('配置中心获取文件'):'否';
1296
1356
  if (this.item.f_state != '未检' || this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') {