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
| <script>
| export default {
| data() {
| return {
| // 预到货状态值
| statusValueList: [
| {
| status: "审核成功",
| bgColor: "#33cc33",
| color: "#fff"
| },
| {
| status: "新建",
| bgColor: "#ffff66",
| color: "#000"
| },
| {
| status: "部分退货",
| bgColor: "#99cc66",
| color: "#fff"
| },
| {
| status: "审核失败",
| bgColor: "#ffcc66",
| color: "#fff"
| },
| {
| status: "在途中",
| bgColor: "#00ffff",
| color: "#000"
| },
| {
| status: "部分交货",
| bgColor: "#cc66ff",
| color: "#fff"
| },
| {
| status: "完全交货",
| bgColor: "#00ccff",
| color: "#fff"
| },
| {
| status: "终止",
| bgColor: "#ff6600",
| color: "#fff"
| },
| {
| status: "强制完成",
| bgColor: "#00ccff",
| color: "#fff"
| },
| {
| status: "完全退货",
| bgColor: "#E052FB",
| color: "#fff"
| }
| ],
| // 状态流加载参数
| stateLoadOptions: {
| folder: "inbound/purchase",
| projectName: "ERP.Inbound",
| tableView: "Purchase_Order_StatusHistory",
| idField: "history_Id",
| sortName: "history_Id DESC",
| pageIndex: 1,
| pageSize: 100,
| menu_Id: -1,
| noUserProduct_Id: true
| }
| };
| },
| methods: {
| // 状态背景颜色
| setStatusBgColor(status) {
| var colorItem = this.statusValueList.find(item => {
| return item.status === status;
| });
| var bgColor = "#ffffff";
| if (colorItem) bgColor = colorItem.bgColor;
|
| return bgColor;
| },
| // 状态字体颜色
| setStatusColor(status) {
| var colorItem = this.statusValueList.find(item => {
| return item.status === status;
| });
| var color = "#fffff";
| if (colorItem) color = colorItem.color;
| return {
| border: 0,
| color: color,
| cursor: "pointer"
| };
| }
| }
| };
| </script>
|
|