reception.uts
1.07 KB
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
import { reactive } from "vue";
export type ReceptionState = {
booksList: UTSJSONObject[]
customerInfo: null | UTSJSONObject
customerKey: string
receptionKey: string
receptionStatus: string
receptionTrack: UTSJSONObject[]
}
// 模块状态
export const receptionState = reactive({
customerKey: "",
customerInfo: null,
receptionStatus: "",
booksList: [],
receptionKey: "",
receptionTrack: []
} as ReceptionState);
// 模块变更方法 (Mutations)
export const setCustomerKey = (payload: string) => {
receptionState.customerKey = payload;
};
export const setCustomerInfo = (payload: null | UTSJSONObject) => {
receptionState.customerInfo = payload;
};
export const setReceptionStatus = (payload: string) => {
receptionState.receptionStatus = payload;
};
export const setBookList = (payload: UTSJSONObject[]) => {
receptionState.booksList = payload;
};
export const setReceptionKey = (payload: string) => {
receptionState.receptionKey = payload;
};
export const setReceptionTrack = (payload: UTSJSONObject[]) => {
receptionState.receptionTrack = payload;
};