啊鑫
4 天以前 1b8ed4768feeb6433cef55ea8e7c4ad7070c151c
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
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
<template>
  <view class="page-container">
    <!-- 表单容器 - 高级卡片设计 -->
    <view class="form-card">
      <form :modelValue="formData">
        <view class="form-group">
          <label class="form-label">检验单号:</label>
          <input class="form-input" disabled="true" type="text" v-model="formData.releaseNo"/>
        </view>
        <view class="form-group">
          <label class="form-label">创建人:</label>
          <input class="form-input" disabled="true" type="text" v-model="formData.createBy"/>
        </view>
        <view class="form-group">
          <label class="form-label">创建时间:</label>
          <input class="form-input" disabled="true" type="text" v-model="formData.createDate"/>
        </view>
        <view class="uni-form-item uni-column form-item edit">
          <text class="form-label">线体编号:</text>
          <picker v-if="isUpdate" class="picker form-input" name="selector" :range="DAA020List"
                  @change="onDaa020Change">
            <text>{{ DAA020List[DAA020Index] }}</text>
          </picker>
          <input v-else class="form-input" disabled="true" type="text" v-model="formData.daa020"/>
        </view>
        <view class="uni-form-item uni-column form-item edit">
          <text class="form-label">物料编码:</text>
          <picker v-if="isUpdate" class="picker form-input" name="selector" :range="ItemList"
                  @change="onItemChange">
            <text>{{ ItemList[ItemIndex] }}</text>
          </picker>
          <input v-else class="form-input" disabled="true" type="text" v-model="formData.itemNo"/>
        </view>
        <view class="uni-form-item uni-column form-item edit">
          <text class="form-label">计划编号:</text>
          <picker v-if="isUpdate" class="picker form-input" name="selector" :range="DAA001List"
                  @change="onDaa001Change">
            <text>{{ DAA001List[DAA001Index] }}</text>
          </picker>
          <input v-else class="form-input" disabled="true" type="text" v-model="formData.billNo"/>
        </view>
 
        <view class="form-group">
          <label class="form-label">物料名称:</label>
          <input class="form-input" disabled="true" type="text" v-model="formData.itemName"/>
        </view>
        <view class="form-group">
          <label class="form-label">规格型号:</label>
          <input class="form-input" disabled="true" type="text" v-model="formData.itemModel"/>
        </view>
        <view class="form-group">
          <label class="form-label">工单数量:</label>
          <input class="form-input" disabled="true" type="text" v-model="formData.planQty"/>
        </view>
        <view class="form-group">
          <label class="form-label">不合格描述:</label>
          <input class="form-input" disabled="true" type="text" v-model="formData.remarks"/>
        </view>
      </form>
    </view>
 
    <!-- 表格容器 - 高级卡片设计 -->
    <view class="table-card">
      <uni-table ref="table" border emptyText="暂无更多数据">
        <uni-tr>
          <uni-th align="center" class="th">检验项目</uni-th>
          <uni-th align="center" class="th">是否合格</uni-th>
          <uni-th align="center" class="th">记录(点击)</uni-th>
        </uni-tr>
        <uni-tr v-for="(item, index) in tableData" :key="index">
          <uni-td align="center">
            <input class="form-input" disabled="true" type="text" v-model="item.projName"/>
          </uni-td>
          <uni-td align="center">
            <input class="form-input" disabled="true" type="text" v-model="item.result"/>
          </uni-td>
          <uni-td>
            <view class="uni-group">
              <button v-if="item.isCheck >= item.levelNum" type="default" @click="toDetail(item)" class="record-btn success">
                {{ item.levelNum + '/' + item.isCheck }}
              </button>
              <button v-else type="warn" @click="toDetail(item)" class="record-btn warning">
                {{ item.levelNum + '/' + item.isCheck }}
              </button>
            </view>
          </uni-td>
        </uni-tr>
      </uni-table>
    </view>
 
    <!-- 操作按钮组 - 优化布局 -->
    <view class="action-buttons">
      <view class="button-group">
        <button type="warn" v-if="!isUpdate && !isShowTable" @click="submit" class="action-btn primary">
          审核单据
        </button>
        <button type="warn" v-if="isUpdate && !isShowTable" @click="getItem" class="action-btn secondary">
          创建检验单并生成部分默认值
        </button>
      </view>
      <view class="button-group">
        <button type="warn" v-if="!isUpdate && !isShowTable" @click="toImage" class="action-btn secondary">
          上传/查看图片
        </button>
      </view>
      <view class="button-group">
        <button type="warn" v-if="!isUpdate && !isShowTable" @click="saveRemarks" class="action-btn secondary">
          添加不合格描述
        </button>
      </view>
      <view class="button-group">
        <button type="warn" v-if="isShowTable" @click="getTable" class="action-btn secondary">
          获取检验项目
        </button>
      </view>
      <view class="button-group">
        <button type="warn" v-if="isShowTable && isUpdate" @click="saveTable" class="action-btn secondary">
          生成检验项目
        </button>
      </view>
    </view>
 
    <!-- 弹出层 - 带动画效果 -->
    <view v-if="remarksPopup" class="overlay">
      <view class="popup" :class="{ 'popup-animate': remarksPopup }">
        <h3>修改不合格描述</h3>
        <form>
          <view class="form-group">
            <label class="form-label">不合格描述:</label>
            <input class="form-input" type="text" v-model="remarks"/>
          </view>
          <button type="warn" @click="editRemarks" class="action-btn primary">
            修改
          </button>
          <button @click="remarksPopup = !remarksPopup" class="action-btn cancel">
            取消
          </button>
        </form>
      </view>
    </view>
  </view>
</template>
 
<script>
export default {
  data() {
    return {
      formData: {
        id: "",
        releaseNo: "",
        createBy: "",
        createDate: "",
        daa020: "",
        itemNo: "",
        billNo: "",
        catQty: "",
        detailMem: "",
        taskNo: "",
        fcheckResu: "",
        boardModel: "",
        planQty: "",
        mocode: "",
        boardStyle: "",
        itemId: "",
      },
 
      DAA020List: [],
      DAA020Index: -1,
 
      DAA001List: [],
      DAA001Index: -1,
      schemeResult: [],
 
      isShowTable: false,
 
      ItemList: [],
      ItemIndex: -1,
      boardItems: [],
 
      lineList: [],
 
      lineNo: "",
 
      tableData: [],
 
      isSubmit: true,
 
      isUpdate: true,
 
      remarks: "",
      remarksPopup: false,
    };
  },
  onLoad(options) {
    //options中包含了url附带的参数
    let params = options;
 
    if (params["id"]) {
      this.isUpdate = false;
      this.formData.id = params["id"];
      this.formData.releaseNo = params["releaseNo"];
      //getQaItemXj02
      this.init();
    } else {
      //初始化检验单号
      this.$post({
        url: "/XJ/getMaxReleaseNo"
      }).then(res => {
        this.formData.releaseNo = res.data.tbBillList;
        this.formData.createBy = this.$loginInfo.account;
        this.formData.createDate = this.$getDate("yyyy-mm-dd");
      });
 
      //车间下拉框的初始化
      this.$post({
        url: "/XJ/getLineAll"
      }).then(res => {
        this.lineList = res.data.tbBillList;
        this.DAA020List = res.data.tbBillList.map(item => item.lineName);
      })
    }
  },
  methods: {
    removeXJ() {
      if (this.formData.id) {
        this.$post({
          url: "/XJ/removeXJ",
          data: {
            id: this.formData.id
          }
        }).then(res => {
          if (res.data.tbBillList > 0) {
            this.$showMessage("删除成功");
            //关闭当前页面,返回上一页面或多级页面
            uni.navigateBack();
          } else {
            this.$showMessage("删除失败");
          }
        });
      } else {
        this.$showMessage("请先选择检验单号");
      }
    },
    getItem() {
      if (this.isSubmit) {
        this.$showMessage("此物料无启用的检验项目,请维护!");
        return;
      }
 
      if (!this.formData.billNo) {
        this.$showMessage("请选择计划编号");
        return;
      }
 
      this.$post({
        url: "/XJ/save",
        data: {
          from: this.formData,
          userNo: this.$loginInfo.account,
          items: this.tableData
        }
      }).then(res => {
        this.formData.id = res.data.tbBillList;
        this.$showMessage("生成检验项目成功");
        this.init();
        this.isUpdate = false;
      });
    },
    //生产线别选择并初始话工单号
    onDaa020Change(event) {
      //获取生产线别的下标地址
      this.DAA020Index = event.mp.detail.value;
 
      this.lineNo = this.lineList[this.DAA020Index].lineNo;
 
      this.$post({
        url: "/XJ/getBoardItem",
        data: {
          lineNo: this.lineNo
        }
      }).then(res => {
        //填充工单号的数据源
        this.boardItems = res.data.tbBillList;
        this.ItemList = this.boardItems.map(item => item.itemName);
        //变为默认空值的状态
        this.ItemIndex = -1;
      })
 
    },
    onItemChange(event) {
      this.ItemIndex = event.mp.detail.value;
      this.formData.itemNo = this.boardItems[this.ItemIndex].itemNo;//主要是改这里
      this.formData.itemId = this.boardItems[this.ItemIndex].id;//主要是改这里
      this.formData.itemName = this.boardItems[this.ItemIndex].itemName;//主要是改这里
      this.formData.itemModel = this.boardItems[this.ItemIndex].itemModel;//主要是改这里
      this.$post({
        url: "/XJ/getDaa001",
        data: {
          daa020: this.lineNo,
          item: this.formData.itemNo
        }
      }).then(res => {
        //填充工单号的数据源
        this.schemeResult = res.data.tbBillList;
        this.DAA001List = this.schemeResult.map(s => s.daa001);
        //变为默认空值的状态
        this.DAA001Index = -1;
 
        this.formData.billNo = "";
      })
    },
    //选取工单填充物料号和其他信息
    onDaa001Change(event) {
      this.DAA001Index = event.mp.detail.value;
      this.formData.billNo = this.schemeResult[this.DAA001Index].daa001;
      this.formData.planQty = this.schemeResult[this.DAA001Index].daa008;
      //表单中的部分字段赋值
      this.$post({
        url: "/XJ/getItem",
        data: {
          daa001: this.formData.billNo
        }
      }).then(res => {
        let data = res.data.tbBillList[0];
        //当返回的结果集为空时置空原有的值
        if (!data) {
          this.formData.billNo = "";
          this.formData.itemNo = "";
          this.formData.planQty = "";
          this.tableData = [];
          return;
        }
 
        this.$post({
          url: "/XJ/setJYItem",
          data: {
           itemId: this.formData.itemId
          }
        }).then(res => {
          if (res.data.tbBillList.length > 0) {
            this.tableData = res.data.tbBillList; // 在箭头函数中,this 指向外层作用域的 this
            this.isSubmit = false;
          } else {
            this.$showMessage("此物料没有启用的检验项目,请维护!");
            this.isSubmit = true;
            this.tableData = [];
          }
        });
      });
    },
    submit() {
      this.$post({
        url: "/XJ/XJQaSubmit",
        data: {
          userNo: this.$loginInfo.account,
          gid: this.formData.id
        }
      }).then(res => {
        //2024-11-28 kyy 校验合格提交增加提示
        console.log("Status Code的值:", res.statusCode);
        if (res.statusCode === 200) {
          this.$showMessage("成功提交检验");
          // 使用setTimeout在7秒后隐藏消息
          setTimeout(() => {
            this.hideCustomMessage();
          }, 7000); // 7000毫秒等于7秒
        } else {
          this.$showMessage(res.data.message);
        }
      })
    },
    init() {
      this.$post({
        url: "/XJ/getPage",
        data: {
          id: this.formData.id,
          pageIndex: 1,
          limit: 1,
        }
      }).then(res => {
        let data = res.data.tbBillList[0];
        if (data) {
          this.formData = data;
 
          this.$post({
            url: "/XJ/getJYItem",
            data: {
              pid: this.formData.id
            }
          }).then(res1 => {
            let tableData = res1.data.tbBillList
            //当已检验个数都不为空时按照检测结构排序
            tableData.sort((a, b) => {
              if (a.result === '未完成' && b.result === '合格') {
                return -1;
              } else if (a.result === '合格' && b.result === '未完成') {
                return 1;
              } else {
                return 0;
              }
            });
            this.tableData = tableData;
            if (this.tableData.length === 0) {
              this.isShowTable = true;
            }
          })
        }
      });
    },
    toDetail(item) {
      if (this.isUpdate) {
        uni.showToast({
          icon: "none",
          title: "请先生成检验项目",
          duration: 2000,
        });
      } else {
        uni.navigateTo({
          url: 'detail?id=' + item.id + '&billNo=' + this.formData.billNo + '&gid=' + this.formData.id
        });
      }
    },
    saveRemarks() {
      this.remarksPopup = !this.remarksPopup;
      this.remarks = this.formData.remarks;
    },
    editRemarks() {
      if (this.remarks) {
        //saveRemarksGid
        this.$post({
          url: "/XJ/saveRemarksGid",
          data: {
            gid: this.formData.id,
            remarks: this.remarks
          }
        }).then(res => {
          if (res.data.tbBillList > 0) {
            this.formData.remarks = this.remarks;
            this.remarksPopup = !this.remarksPopup;
            this.$showMessage("保存成功");
          }
        })
      }
    },
    toImage() {
      uni.navigateTo({
        url: 'ImageItem?id=' + this.formData.id
      });
    },
    getTable() {
      this.$post({
        url: "/XJ/setJYItem",
        data: {
         itemId: this.formData.itemId
        }
      }).then(res => {
        if (res.data.tbBillList.length > 0) {
          this.tableData = res.data.tbBillList; // 在箭头函数中,this 指向外层作用域的 this
          this.isShowTable = true;
          this.isUpdate = true;
        } else {
          this.$showMessage("此物料没有启用的检验项目,请维护!");
          this.isShowTable = true;
          this.isUpdate = false;
          this.tableData = [];
        }
      });
    },
    saveTable() {
      if (this.tableData.length === 0) {
        return;
      }
      this.$post({
        url: "/XJ/saveItem",
        data: {
          gid: this.formData.id,
          items: this.tableData,
          userNo: this.$loginInfo.account
        }
      }).then(res => {
        this.formData.id = res.data.tbBillList;
        this.isShowTable = false;
        this.isUpdate = false;
        this.init();
      })
    }
  },
  onShow() {
    //每次进入页面都会执行的方法
    if (this.formData.id) {
      this.init();
    }
  }
};
</script>
 
<style lang="scss">
/* 全局样式 - 莫兰迪色系 */
:root {
  --primary: #5B6EF4;        /* 主色调 - 灰蓝色 */
  --primary-light: #E8EBFF;   /* 主色浅色 */
  --secondary: #86909C;       /* 次要色 - 浅灰色 */
  --success: #00B42A;         /* 成功色 - 橄榄绿 */
  --warning: #F7BA1E;         /* 警告色 - 琥珀黄 */
  --danger: #F53F3F;          /* 危险色 - 珊瑚红 */
  --text-primary: #1D2129;     /* 主文本色 */
  --text-secondary: #4E5969;   /* 次文本色 */
  --bg-primary: #F2F3F5;       /* 背景色 */
  --bg-card: #FFFFFF;         /* 卡片背景 */
  --border-color: #E5E6EB;     /* 边框色 */
}
 
page {
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
}
 
/* 页面容器 */
.page-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
 
/* 卡片样式 - 高级设计 */
.form-card, .table-card {
  background: var(--bg-card);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(91, 110, 244, 0.12);
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
 
.form-card::before, .table-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), #8A94FF);
  border-radius: 20px 0 0 20px;
}
 
.form-card:hover, .table-card:hover {
  box-shadow: 0 12px 40px rgba(91, 110, 244, 0.18);
  transform: translateY(-5px);
}
 
/* 表单组样式 */
.form-group {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
 
.form-group:last-child {
  border-bottom: none;
}
 
.form-group:hover {
  background-color: var(--primary-light);
  border-radius: 12px;
}
 
.form-label {
  min-width: 120px;
  color: var(--text-primary);
  font-weight: 500;
  margin-right: 18px;
  font-size: 15px;
}
 
.form-input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
 
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 110, 244, 0.2);
  outline: none;
}
 
/* 下拉选择器样式 */
.uni-form-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
 
.uni-form-item:last-child {
  border-bottom: none;
}
 
.uni-form-item:hover {
  background-color: var(--primary-light);
  border-radius: 12px;
}
 
.picker {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 15px;
  appearance: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
 
.picker::after {
  content: "▼";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  font-size: 14px;
}
 
.edit {
  background-color: var(--bg-card);
}
 
/* 表格样式 */
.list-container {
  overflow-y: auto;
}
 
.th {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  padding: 16px 20px;
  font-size: 15px;
  border-radius: 12px 12px 0 0;
}
 
.uni-tr {
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
 
.uni-tr:last-child {
  border-bottom: none;
}
 
.uni-tr:hover {
  background-color: var(--primary-light);
}
 
.uni-td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 15px;
  color: var(--text-primary);
}
 
.uni-td:last-child {
  border-right: none;
}
 
/* 记录按钮样式 */
.record-btn {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: none;
  font-size: 14px;
  min-width: 80px;
}
 
.success {
  background-color: rgba(0, 180, 42, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 180, 42, 0.2);
}
 
.success:hover {
  background-color: rgba(0, 180, 42, 0.2);
}
 
.warning {
  background-color: rgba(247, 186, 30, 0.1);
  color: var(--warning);
  border: 1px solid rgba(247, 186, 30, 0.2);
}
 
.warning:hover {
  background-color: rgba(247, 186, 30, 0.2);
}
 
/* 操作按钮组 */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
}
 
.button-group {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
 
.action-btn {
  padding: 14px 20px;
  border-radius: 24px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border: none;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(91, 110, 244, 0.15);
  position: relative;
  overflow: hidden;
}
 
.action-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
 
.action-btn:hover::before {
  transform: translateX(100%);
}
 
.action-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(91, 110, 244, 0.1);
}
 
.primary {
  background: linear-gradient(135deg, var(--primary), #7B88FF);
  color: white;
}
 
.secondary {
  background-color: white;
  color: var(--primary);
  border: 1px solid var(--border-color);
}
 
.secondary:hover {
  background-color: var(--primary-light);
}
 
.cancel {
  background-color: #F2F3F5;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
 
.cancel:hover {
  background-color: #E5E6EB;
}
 
/* 弹出层样式 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}
 
.popup {
  background-color: white;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  padding: 32px;
  width: 90%;
  max-width: 560px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
 
.popup-animate {
  opacity: 1;
  transform: translateY(0);
}
 
.popup h3 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 18px;
}
 
/* 响应式设计 */
@media (max-width: 768px) {
  .form-card, .table-card {
    padding: 20px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .button-group {
    min-width: 100%;
  }
  
  .form-label {
    min-width: 90px;
    font-size: 14px;
  }
  
  .form-input, .picker {
    padding: 12px 16px;
    font-size: 14px;
  }
}
 
/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
</style>