zrg
2025-09-05 46cc7a29dc1f9b3dffee5cdcb9b7f9dfdac3b16d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
<template>
    <view>
        <view class="form">
            <view class="form-item">
                <view class="title">单据号:</view>
                <view class="righton">
                    <input name="HBillNo" disabled v-model="hform.HBillNo" placeholder="请输入单据号" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">单据日期:</view>
                <view class="righton">
                    <input name="HDate" disabled v-model="hform.HDate" placeholder="请选择" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">主题:</view>
                <view class="right">
                    <input name="HContext" v-model="hform.HContext" placeholder="请输入主题" />
                </view>
            </view>
            <view class="form-item" style="align-items: flex-start;">
                <view class="title"><text>*</text>详细内容:</view>
                <view class="right" style="min-height: 150rpx;">
                    <textarea name="HDescription" v-model="hform.HDescription" auto-height maxlength="-1" placeholder="请输入详细内容"></textarea>
                </view>
            </view>
            <view class="form-item" style="align-items: flex-start;">
                <view class="title">备注:</view>
                <view class="right" style="min-height: 150rpx;">
                    <textarea name="HRemark" v-model="hform.HRemark" auto-height maxlength="-1" placeholder="请输入备注"></textarea>
                </view>
            </view>
            
            <view class="tab_area"></view>
            
            <view class="form-item">
                <view class="title">发送部门:</view>
                <view class="righton">
                    <input name="HDeptName" disabled v-model="hform.HDeptName" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">发送人:</view>
                <view class="righton">
                    <input name="HSendMan" disabled v-model="hform.HSendMan" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">接收人:</view>
                <view class="righton">
                    <input name="HReceiveMan" disabled v-model="hform.HReceiveMan" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">抄送人:</view>
                <view class="righton">
                    <input name="HCopyMan" disabled v-model="hform.HCopyMan" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">责任人:</view>
                <view class="righton">
                    <input name="HBadProcManName" disabled v-model="hform.HBadProcManName" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">QE责任人:</view>
                <view class="righton">
                    <input name="HQEManName" disabled v-model="hform.HQEManName" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">指派处理人:</view>
                <view class="righton">
                    <input name="HHandleEmpName" disabled v-model="hform.HHandleEmpName" placeholder="" />
                </view>
            </view>
            
            <view class="tab_area"></view>
            
            <view class="form-item">
                <view class="title">异常类型:</view>
                <view class="righton">
                    <input name="HErrMsgBackTypeName" disabled v-model="hform.HErrMsgBackTypeName" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">产品编码:</view>
                <view class="right">
                    <input name="HMaterNumber" v-model="hform.HMaterNumber" placeholder="请输入产品编码" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">产品名称:</view>
                <view class="right">
                    <input name="HMaterName" v-model="hform.HMaterName" placeholder="请输入产品名称" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">规格型号:</view>
                <view class="right">
                    <input name="HMaterModel" v-model="hform.HMaterModel" placeholder="请输入规格型号" />
                </view>
            </view>
            <view class="form-item">
                <view class="title"><text>*</text>数量:</view>
                <view class="right">
                    <input name="HQty" v-model="hform.HQty" placeholder="请输入数量" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">紧急程度:</view>
                <view class="right">
                    <picker :range="arrayHLevel" v-model="hform.HLevel" @change="HLevelChange">
                        <input name="HLevel" disabled v-model="hform.HLevel" placeholder="请选择紧急程度" />
                    </picker>
                </view>
            </view>
            <view class="form-item">
                <view class="title">催促次数:</view>
                <view class="right">
                    <input name="HHasten" v-model="hform.HHasten" placeholder="请输入催促次数" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">问题来源:</view>
                <view class="right">
                    <picker :range="arrayHForm" v-model="hform.HForm" @change="HFormChange">
                        <input name="HForm" disabled v-model="hform.HForm" placeholder="请选择问题来源" />
                    </picker>
                </view>
            </view>
            <view class="form-item">
                <view class="title">变化点:</view>
                <view class="right">
                    <input name="HChangeNote" v-model="hform.HChangeNote" placeholder="请输入变化点" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">影响面程度:</view>
                <view class="right">
                    <picker :range="arrayHErrLev" v-model="hform.HErrLev" @change="HErrLevChange">
                        <input name="HErrLev" disabled v-model="hform.HErrLev" placeholder="请选择影响面程度" />
                    </picker>
                </view>
            </view>
            
            <view class="tab_area"></view>
            
            <view class="form-item">
                <view class="title">生产资源:</view>
                <view class="righton">
                    <input name="HSourceName" disabled v-model="hform.HSourceName" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">生产班次:</view>
                <view class="righton">
                    <input name="HShiftsName" disabled v-model="hform.HShiftsName" placeholder="" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">源单单号:</view>
                <view class="righton">
                    <input name="HMainSourceBillNo" disabled v-model="hform.HMainSourceBillNo" placeholder="请输入源单单号" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">源单类型:</view>
                <view class="righton">
                    <input name="HMainSourceBillType" disabled v-model="hform.HMainSourceBillType" placeholder="请输入源单类型" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">车间:</view>
                <view class="righton">
                    <input name="HCenterName" disabled v-model="hform.HCenterName" placeholder="请输入车间" />
                </view>
            </view>
            <view class="form-item">
                <view class="title">发送类型:</view>
                <view class="right">
                    <picker :range="arrayHSendType" v-model="hform.HSendType" @change="HSendTypeChange">
                        <input name="HSendType" disabled v-model="hform.HSendType" placeholder="请选择发送类型" />
                    </picker>
                </view>
            </view>
            
            <view class="tab_area"></view>
            
            <view class="form-item">
                <view class="title">制单人:</view>
                <view class="righton">
                    <input v-model="hform.HMaker" disabled/>
                </view>
            </view>
            <view class="form-item">
                <view class="title">制单日期:</view>
                <view class="righton">
                    <input name="HMakeDate" disabled v-model="hform.HMakeDate" placeholder="请选择制单日期" />
                </view>
            </view>
 
            <view class="bottom-btn">
                <button class="btn-a" size="mini" @tap="submit">提交</button>
                <!-- <button class="btn-b" size="mini" @tap="showMask = true">新增</button> -->
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
            </view>
        </view>
    </view>
</template>
<script>
    import getDateTime from '@/utils/getdateTime.js';
    import { getUserInfo } from "@/utils/auth.js";
    export default {
        data() {
            return {
                userInfo:getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
                
                arrayHLevel:['普通','紧急'],
                arrayHForm:['人','机','料','法','环','测'],
                arrayHErrLev:['无法判断','停线','批量不良','偶发不良'],
                arrayHSendType:['公共','个人'],
                isEdit: false,
                eData:{
                    HICMOBillNo:'',
                    HSourceName:'',
                    HSourceBillNo:'',
                    HType:'',
                    OperationType:'',
                    linterid:'',
                    HSouceBillType:'',
                },
                hform:{
                    HBillNo:'',
                    HInterID:'',
                    HEntryID:'',
                    HDate:getDateTime.dateTimeStr('y-m-d h:i:s'),
                    HContext:'',
                    HDescription:'',
                    HRemark:'',
                    
                    HDeptName:'',
                    HDeptID:'',
                    HSendMan:'',
                    HReceiveMan:'',
                    HCopyMan:'',
                    HBadProcManName:'',
                    HBadProcMan:0,
                    HQEManName:'',
                    HQEMan:0,
                    HHandleEmpName:'',
                    HHandleEmpID:0,
                    
                    HErrMsgBackTypeID:'',
                    HErrMsgBackTypeName:'',
                    HMaterNumber:'',
                    HMaterName:'',
                    HMaterModel:'',
                    HQty:'',
                    HLevel:'普通',
                    HHasten:'0',
                    HForm:'',
                    HChangeNote:'',
                    HErrLev:'',
                    
                    HSourceName:'',
                    HSourceID:'',
                    HShiftsName:'',
                    HShiftsID:0,
                    HReTransmitMan:'',
                    HMainSourceBillNo:'',
                    HMainSourceInterID:'',
                    HMainSourceEntryID:'',
                    HMainSourceBillType:'',
                    HCenterName:'',
                    HCenterID:'',
                    HSendType:'公共',
                    
                    EquipNumber:'',
                    
                    HMaker:getUserInfo().Czymc,
                    HMakeDate:getDateTime.dateTimeStr('y-m-d h:i:s'),
                }
            }
        },
        onLoad(e) {
            console.log(e)
            uni.showLoading({
                title:'数据加载中'
            })
            this.eData = e
            this.hform.HErrMsgBackTypeName = e.HType
            //判断操作类型
            if (e.OperationType == 1) {//无源单
                this.set_AddFNew();
            }else if (e.OperationType == 2) {//有源单
                this.set_AddNew();
            }else if (e.OperationType == 3) {//编辑
                this.set_EditFromGrid();
            }else if (e.OperationType == 4) {
                this.set_AddFNew();    
                this.set_Sc_ICMOBillStatus(e.HSourceBillNo,e.HType,e.HSourceName);//回填信息
                this.hform.HContext = e.HType
                // this.hform.HDescription = this.generateString(this.hform.HDate, getUserInfo().Czymc, HSourceName1, HICMOBillNo, HTypes, EquipNumber)
            }else if (OperationType == 5) {  //查看
                set_EditFromGrid();
                $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
                $('#VerIfySaver').addClass("layui-btn-disabled").attr("disabled", true);
            }
            this.getNewData()
            
        },
        methods: {
            //选择紧急程度
            HLevelChange(e){
                this.hform.HLevel = this.arrayHLevel[e.detail.value]
            },
            //问题来源
            HFormChange(e){
                this.hform.HForm = this.arrayHForm[e.detail.value]
            },
            //影响程度
            HErrLevChange(e){
                this.hform.HErrLev = this.arrayHErrLev[e.detail.value]
            },
            //发送类型
            HSendTypeChange(e){
                this.hform.HSendType = this.arrayHSendType[e.detail.value]
            },
            set_AddFNew() {
                //初始基本信息赋值
                // console.log(getUserInfo())
                this.hform.HDeptID = this.userInfo.HDeptID
                this.hform.HDeptName = this.userInfo.HDept
                this.hform.HSendMan = this.userInfo.Czymc
                this.hform.HCenterName = this.userInfo.HWorkCenter
                this.hform.HCenterID = this.userInfo.HWorkCenterID
                this.hform.HReceiveMan = this.userInfo.Czymc
            },
            set_Sc_ICMOBillStatus(HSourceBill,HType,HSourceName){
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_Sc_ICMOBillStatus', 
                    type: "GET",
                    data: { "HSourceBill": HSourceBill },
                    success: (res) => {
                        var data = res.data.data[0]
                        console.log(HSourceBill,res.data)
                        if(res.data.count == 1 ){
                            if(res.data.data[0]){
                                this.hform.HMaterNumber = data.物料代码//产品名称
                                this.hform.HMaterName = data.物料名称//产品名称
                                this.hform.HMaterModel = data.规格型号//产品规格
                                this.hform.HMainSourceBillNo = data.流转卡号//源单单号
                                this.hform.HMainSourceInterID = data.流转卡主内码//源单主内码
                                this.hform.HMainSourceEntryID = data.流转卡子内码//源单子内码
                                this.hform.HMainSourceEntryID = data.流转卡子内码//源单子内码
                                this.hform.HMainSourceBillType = 3772//源单类型
                                this.hform.HQty = data.计划数量//计划数量
                                this.hform.HSourceID = data.HSourceID//生产资源id
                                this.hform.HSourceName = data.生产资源//生产资源
                            }
                        }else{
                            uni.showToast({
                                title:'获取产品基本信息失败',
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_ErrMsgBackType', 
                    type: "GET",
                    data: { "TypeName": HType },
                    success: (res) => {
                        var data = res.data.data[0]
                        // console.log(res.data)
                        if(res.data.count == 1 ){
                            this.hform.HErrMsgBackTypeID = data.HItemID
                            this.hform.HErrMsgBackTypeName = data.HName
                        }else{
                            uni.showToast({
                                title:'获取异常类型数据失败',
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'获取异常类型失败',
                            icon:'none'
                        })
                    },
                });
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/set_EquipFile', 
                    type: "GET",
                    data: { "HSourceName": HSourceName },
                    success: (res) => {
                        var data = res.data.data[0]
                        console.log(res.data)
                        if(res.data.count == 1 ){
                            this.hform.EquipNumber = data.设备编码
                        }else{
                            uni.showToast({
                                title:'获取设备编码失败',
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'获取设备编码失败',
                            icon:'none'
                        })
                    },
                });
                
                setTimeout(()=>{
                    uni.hideLoading()
                    this.hform.HDescription = '异常反馈单号:' + this.hform.HBillNo + ',异常类型:' + HType + ',订单号:' + this.eData.HICMOBillNo + ',流转卡号:' + this.eData.HICMOBillNo
                        + ', 产品编码:' + this.hform.HMaterNumber + ',产品名称:' + this.hform.HMaterName + ',规格型号:' + this.hform.HMaterModel
                        + ',发送人:' + this.hform.HMaker + ',发生时间:' + this.hform.HDate + ',生产资源:' + this.hform.HSourceName + ',设备编码:' + this.hform.EquipNumber + ',对应处理人:' + this.hform.HHandleEmpName
                },1000)
            },
            //编辑
            getEditData(hmainid){
                //主表
                uni.request({
                    url: this.serverUrl + '/Gy_EquipFileMain/Gy_EquipFileCheckDetai', 
                    data: { HInterID: hmainid },
                    success: (res) => {
                        console.log(1,res.data.data[0]);
                        if(res.data.code == 1){
                            var data = res.data.data[0]
                            this.hform = {
                                HInterID:hmainid,
                                HBillNo:data.单据号,
                                HDate:data.日期.substr(0,10),
                                HOutComNo:data.设备出厂编号,
                                HBarCode:data.条形码,
                                
                                HEquipFileNumber:data.设备代码,
                                HEquipFileNo:data.设备编码,
                                HName:data.设备名称,
                                HModel:data.设备规格,
                                HModel2:data.设备型号,
                                
                                HEquipMaintainRuleInterName:data.默认保养规程,
                                HEquipMaintainRuleInterID:data.HEquipMaintainRuleInterID,
                                HEquipDotCheckRuleInterName:data.默认点检规程,
                                HEquipDotCheckRuleInterID:data.HEquipDotCheckRuleInterID,
                                HSourceName:data.HSourceName,
                                HSourceID:data.HSourceID,
                                
                                HMaterNumber:data.物料名称,
                                HMaterID:data.HMaterID,
                                HEquipFileTypeName:data.设备类型,
                                HEquipFileTypeID:data.HEquipFileTypeID,
                                HUnitName:data.单位,
                                HUnitID:data.HUnitID,
                                HSellSupName:data.供应商,
                                HSellSupID:data.HSellSupID,
                                
                                HDeptName:data.使用部门,
                                HDeptID:data.HDeptID,
                                HUseEmpName:data.使用负责人,
                                HUseEmpID:data.HUseEmpID,
                                HRepairEmpName:data.维护负责人,
                                HRepairEmpID:data.HRepairEmpID,
                                HMakeSupName:data.制造商,
                                HMakeSupID:data.HMakeSupID,
                                
                                HOutComDate:data.设备出厂日期.substr(0,10),
                                HAddress:data.安装地点,
                                HSetupDate:data.安装日期.substr(0,10),
                                HStartupDate:data.运行开始日期.substr(0,10),
                                
                                HProNum:data.工程编码,
                                HWorkArea:data.产地,
                                HLogo:data.品牌,
                                HStatus:data.当前状态,
                            }
                        }else{
                            uni.showToast({
                                title:'获取表单信息回填失败',
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            //新增
            getNewData(){
                uni.request({
                    url: this.serverUrl + '/Web/GetMAXNum', 
                    data: { HBillType: '4502' },
                    success: (res) => {
                        // console.log(res.data)
                        if(res.data.count == 1){
                            this.hform.HInterID = res.data.data[0].HInterID
                            this.hform.HBillNo = res.data.data[0].HBillNo
                        }else{
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        }
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            submit() {
                if(!this.hform.HDescription){
                    uni.showToast({
                        title:'请输入详细内容',
                        icon:'none'
                    })
                }else if(!this.hform.HQty){
                    uni.showToast({
                        title:'请输入数量',
                        icon:'none'
                    })
                }else{
                    uni.showLoading({
                        title:'请稍候'
                    })
                    // var ModRightNameAdd = 'Gy_MouldFile_Edit';
                    // if(this.isEdit){
                    //     this.hform.HUpDater = uni.getStorageSync('HUserName');//修改人
                    //     var sMainStr = JSON.stringify(this.hform);
                    //     var sMainSub = sMainStr + ";" + ModRightNameAdd + ";" + uni.getStorageSync('HUserName');
                    //     var urls = '/Gy_EquipFileMain/EditBill'
                    // }else{
                    //     this.hform.HMaker = uni.getStorageSync('HUserName');//制单人
                        // var sMainStr = JSON.stringify(this.hform);
                        // var sMainSub = sMainStr + ";" + ModRightNameAdd + ";" + uni.getStorageSync('HUserName');
                    //     var urls = '/Gy_EquipFileMain/AddBill'
                    // }
                    var sMainStr = JSON.stringify(this.hform);
                    var sMainSub = sMainStr + ';' + uni.getStorageSync('HUserName') + ';Add'
                    // console.log(sMainSub);
                    uni.request({
                        url: this.serverUrl + '/Sc_MESTransFerWorkBill/SaveGetMESTransFerWorkFrom',
                        method:'POST',
                        dataType:"json",
                        data:{ "msg": sMainSub },
                        success: (res) => {
                            console.log(1,res);
                            uni.hideLoading()
                            if(res.data.count == 1){
                                if (res.data.Verify == "Y"){ //自动审核
                                    this.SaveVerify(res.data.HInterID) //审核
                                }else {
                                    let pages = getCurrentPages(); // 当前页面
                                    let prePage = pages[pages.length - 2]; // 上一页
                                    prePage.$vm.getList(this.hform.HSourceID)//调用上一页方法getList()
                                    setTimeout(()=>{
                                        uni.navigateBack()
                                    },1000)
                                }
                            }
                            uni.showToast({
                                title:res.data.Message,
                                icon:'none'
                            })
                        },
                        fail: (res) => {
                            console.log(res);
                            uni.showToast({
                                title:'接口请求失败',
                                icon:'none'
                            })
                        },
                    });
                }
            },
            SaveVerify(HInterID){
                var datas={
                    HInterID:HInterID,
                    IsAudit:0,
                    CurUserName:getUserInfo().Czymc
                }
                console.log(datas)
                uni.request({
                    url: this.serverUrl + '/Sc_MESTransFerWorkBill/AuditTransFerReportList',
                    method:'GET',
                    dataType:"json",
                    async: true,
                    data:datas,
                    success: (res) => {
                        console.log(1,res);
                        uni.hideLoading()
                        if(res.data.count == 1){
                            let pages = getCurrentPages(); 
                            let prePage = pages[pages.length - 2]; 
                            prePage.$vm.getList(this.hform.HSourceID)
                            setTimeout(()=>{
                                uni.navigateBack()
                            },1000)
                        }
                        uni.showToast({
                            title:res.data.Message,
                            icon:'none'
                        })
                    },
                    fail: (res) => {
                        console.log(res);
                        uni.showToast({
                            title:'接口请求失败',
                            icon:'none'
                        })
                    },
                });
            },
            goBack(){
                uni.navigateBack()
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .form{
        width: 668rpx;
        margin: 20rpx auto;
        padding-bottom: 240rpx;
    }
    .tab_area{
        width: 100%;
        height: 50rpx;
    }
    .form-item{
        display: flex;
        align-items: center;
        font-size: 30rpx;
        padding: 6rpx 0;
        .title{
            width: 208rpx;
            text{
                color: red;
                font-weight: bold;
            }
        }
        .right{
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #acacac;
        }
        .righton{
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input{
            width: 100%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
        textarea{
            width: 94%;
            padding: 8rpx 3%;
            font-size: 30rpx;
        }
 
    }
    .bottom-btn{
        width: 100%;
        // height: 120rpx;
        position: fixed;
        bottom: 0;
        left: 0;
        background-color: #fff;
        box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
        padding: 30rpx 40rpx 40rpx 40rpx;
        button{
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a{
            background-color: #3A78FF;
            color: #fff;
        }
        .btn-b{
            background-color: #41a863;
            color: #fff;
            margin-left: 30rpx;
        }
        .btn-c{
            background-color: #acacac;
            color: #fff;
            position: absolute;
            right: 120rpx;
        }
    }
</style>