business_tms_program 0.0.0
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.
- package/.editorconfig +12 -0
- package/.eslintrc-auto-import.json +113 -0
- package/.eslintrc.js +121 -0
- package/.prettierrc.js +9 -0
- package/.stylelintignore +4 -0
- package/README.md +43 -0
- package/components.d.ts +23 -0
- package/index.html +20 -0
- package/package.json +70 -0
- package/shims-uni.d.ts +10 -0
- package/src/App.vue +81 -0
- package/src/api/afterSale.ts +184 -0
- package/src/api/context.ts +26 -0
- package/src/api/device.ts +134 -0
- package/src/api/index.ts +80 -0
- package/src/api/installtion.ts +155 -0
- package/src/api/model/index.ts +15 -0
- package/src/api/model/userModel.ts +62 -0
- package/src/api/order.ts +49 -0
- package/src/api/system.ts +19 -0
- package/src/api/user.ts +171 -0
- package/src/auto-imports.d.ts +108 -0
- package/src/components/ConfirmDialog.vue +101 -0
- package/src/components/DaySelect.vue +212 -0
- package/src/components/Drawer.vue +104 -0
- package/src/components/DrawerSelect.vue +105 -0
- package/src/components/DropMenu.vue +144 -0
- package/src/components/Empty.vue +49 -0
- package/src/components/Loading.vue +41 -0
- package/src/components/RippleBtn.vue +159 -0
- package/src/components/SinglePick.vue +120 -0
- package/src/components/Skeleton.vue +43 -0
- package/src/components/Timeline.vue +85 -0
- package/src/components/Upload.vue +217 -0
- package/src/config/app.ts +32 -0
- package/src/config/env.ts +29 -0
- package/src/dict/afterSale.ts +161 -0
- package/src/dict/device.ts +29 -0
- package/src/dict/installtion.ts +141 -0
- package/src/dict/systems.ts +4 -0
- package/src/env.d.ts +8 -0
- package/src/hooks/useForm.ts +222 -0
- package/src/hooks/useUpload.ts +80 -0
- package/src/main.ts +8 -0
- package/src/manifest.json +39 -0
- package/src/pages/acceptance/DeviceInfo.vue +132 -0
- package/src/pages/acceptance/list.vue +276 -0
- package/src/pages/afterSale/DeviceInfo.vue +128 -0
- package/src/pages/afterSale/Step.vue +0 -0
- package/src/pages/afterSale/faultReport.vue +552 -0
- package/src/pages/afterSale/orderDetail.vue +327 -0
- package/src/pages/afterSale/orderFinish.vue +517 -0
- package/src/pages/afterSale/orderList.vue +305 -0
- package/src/pages/afterSale/returnVisit.vue +288 -0
- package/src/pages/afterSale/searchDeviceList.vue +148 -0
- package/src/pages/device/Search.vue +201 -0
- package/src/pages/device/acceptance.vue +270 -0
- package/src/pages/device/detail.vue +165 -0
- package/src/pages/device/index.vue +322 -0
- package/src/pages/device/info.vue +140 -0
- package/src/pages/device/list.vue +219 -0
- package/src/pages/device/materialTowerCode.vue +589 -0
- package/src/pages/device/searchList.vue +224 -0
- package/src/pages/installtion/Record.vue +145 -0
- package/src/pages/installtion/StatusTimeline.vue +85 -0
- package/src/pages/installtion/addAcceptance.vue +409 -0
- package/src/pages/installtion/addRecord.vue +338 -0
- package/src/pages/installtion/orderDetail.vue +220 -0
- package/src/pages/installtion/orderList.vue +100 -0
- package/src/pages/user/component/PersonAgree.vue +226 -0
- package/src/pages/user/component/PrivayAgree.vue +221 -0
- package/src/pages/user/component/SliderCode.vue +173 -0
- package/src/pages/user/forgetPassword.vue +249 -0
- package/src/pages/user/index.vue +139 -0
- package/src/pages/user/login.vue +342 -0
- package/src/pages/user/register.vue +348 -0
- package/src/pages/user/repassword.vue +329 -0
- package/src/pages/user/utils/mcaptcha.js +75 -0
- package/src/pages/user/utils/verifyCode.ts +41 -0
- package/src/pages/workspace/index.vue +225 -0
- package/src/pages.json +203 -0
- package/src/shime-uni.d.ts +6 -0
- package/src/static/icon/system/breeder_icon.png +0 -0
- package/src/static/icon/system/check.png +0 -0
- package/src/static/icon/system/factory_icon.png +0 -0
- package/src/static/icon/system/plus.png +0 -0
- package/src/static/icon/system/right.png +0 -0
- package/src/static/icon/system/unCheck.png +0 -0
- package/src/static/icon/tab/search.png +0 -0
- package/src/static/icon/tab/user.png +0 -0
- package/src/static/icon/tab/user_active.png +0 -0
- package/src/static/icon/tab/workspace.png +0 -0
- package/src/static/icon/tab/workspace_active.png +0 -0
- package/src/static/img/active_dot.png +0 -0
- package/src/static/img/afterSale_icon.png +0 -0
- package/src/static/img/check.png +0 -0
- package/src/static/img/close.png +0 -0
- package/src/static/img/confirm.png +0 -0
- package/src/static/img/empty.png +0 -0
- package/src/static/img/equipment_icon.png +0 -0
- package/src/static/img/fault_icon.png +0 -0
- package/src/static/img/install_icon.png +0 -0
- package/src/static/img/login_bg2.png +0 -0
- package/src/static/img/movable_right.png +0 -0
- package/src/static/img/navigation.png +0 -0
- package/src/static/img/psw_off.png +0 -0
- package/src/static/img/psw_on.png +0 -0
- package/src/static/img/scan.png +0 -0
- package/src/static/img/scan_icon.png +0 -0
- package/src/static/img/search.png +0 -0
- package/src/static/img/turn_right.png +0 -0
- package/src/static/img/unActive_dot.png +0 -0
- package/src/static/img/verifyBg.png +0 -0
- package/src/stores/index.ts +11 -0
- package/src/stores/modules/customer.ts +146 -0
- package/src/stores/modules/installtion.ts +30 -0
- package/src/stores/modules/system.ts +56 -0
- package/src/stores/modules/user.ts +133 -0
- package/src/stores/types.ts +16 -0
- package/src/stores/utils.ts +6 -0
- package/src/styles/index.less +63 -0
- package/src/types/chengyiApi.d.ts +36 -0
- package/src/types/index.d.ts +95 -0
- package/src/utils/address.ts +17 -0
- package/src/utils/cipher.ts +61 -0
- package/src/utils/form.ts +155 -0
- package/src/utils/httpEnum.ts +31 -0
- package/src/utils/image.ts +21 -0
- package/src/utils/index.ts +111 -0
- package/src/utils/request.ts +139 -0
- package/src/utils/requestCancelHandle.ts +67 -0
- package/stylelint.config.js +87 -0
- package/tsconfig.docs.json +11 -0
- package/tsconfig.json +30 -0
- package/typedoc.json +6 -0
- package/vite.config.ts +55 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import env from '@/config/env';
|
|
2
|
+
|
|
3
|
+
type ServiceType = 'api' | 'system' | 'thirdParty' | 'general';
|
|
4
|
+
|
|
5
|
+
const serviceMap = {
|
|
6
|
+
api: env.apiBaseUrl,
|
|
7
|
+
system: env.systemUrl,
|
|
8
|
+
general: env.generalUrl,
|
|
9
|
+
thirdParty: 'https://unidemo.dcloud.net.cn',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const getServiceUrl = (serviceType: ServiceType): string => {
|
|
13
|
+
return serviceMap[serviceType];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
// crm相关接口
|
|
18
|
+
basicApi: getServiceUrl('api') + '/tms',
|
|
19
|
+
// 客户资料相关接口
|
|
20
|
+
customerApi: '/customer',
|
|
21
|
+
// 系统相关接口
|
|
22
|
+
systemApi: getServiceUrl('system') + '/general',
|
|
23
|
+
testApi: getServiceUrl('thirdParty') + '/upload',
|
|
24
|
+
generalApi: getServiceUrl('general') + '/general',
|
|
25
|
+
loginApi: getServiceUrl('system') + '/tms',
|
|
26
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import context from "@/api/context";
|
|
2
|
+
import http from "@/utils/request";
|
|
3
|
+
import { isCheckStatusEnum } from "@/dict/device";
|
|
4
|
+
const deviceApi = context.basicApi + "/device";
|
|
5
|
+
|
|
6
|
+
interface DevicePageParams {
|
|
7
|
+
size: number;
|
|
8
|
+
current: number;
|
|
9
|
+
customerCode?: string;
|
|
10
|
+
deviceCode?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface DevicePageRes {
|
|
14
|
+
current: 0;
|
|
15
|
+
size: 0;
|
|
16
|
+
total: 0;
|
|
17
|
+
pages: 0;
|
|
18
|
+
records: [
|
|
19
|
+
{
|
|
20
|
+
customerName: string;
|
|
21
|
+
deviceCode: string;
|
|
22
|
+
isCheckStatus: isCheckStatusEnum;
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function queryDevicePageList(data: DevicePageParams): Promise<DevicePageRes> {
|
|
28
|
+
return http.post({
|
|
29
|
+
url: `${deviceApi}/queryDevicePageList`,
|
|
30
|
+
data: { ...data }, // 展开参数对象
|
|
31
|
+
}, {
|
|
32
|
+
permActionName: "queryDevicePageList"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface DeviceDetailRes {
|
|
37
|
+
customerName: string;
|
|
38
|
+
deviceCode: string;
|
|
39
|
+
address: string;
|
|
40
|
+
productName: string;
|
|
41
|
+
isCheckStatus: number;
|
|
42
|
+
customerCheckDate: string;
|
|
43
|
+
customerCheckBy: number;
|
|
44
|
+
customerCheckMemo: string;
|
|
45
|
+
customerCheckAttachments: string;
|
|
46
|
+
// 新增字段
|
|
47
|
+
siloCode?: string; // 料塔编码
|
|
48
|
+
deviceMesStatus: number; // 设备信息状态:0-待补充,1-已补充
|
|
49
|
+
lastUpdateTime?: string; // 上一次更新时间
|
|
50
|
+
updateBy?: string; // 更新人
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function queryDeviceDetail(data: {
|
|
54
|
+
deviceCode: string;
|
|
55
|
+
}): Promise<DeviceDetailRes> {
|
|
56
|
+
return http.post({
|
|
57
|
+
url: `${deviceApi}/deviceDetail`,
|
|
58
|
+
data: { ...data }, // 展开参数对象
|
|
59
|
+
}, {
|
|
60
|
+
permActionName: "deviceDetail"
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface DeviceCheckParams {
|
|
65
|
+
deviceCode: string;
|
|
66
|
+
customerCheckDate: string;
|
|
67
|
+
customerCheckBy: number;
|
|
68
|
+
customerCheckMemo: string;
|
|
69
|
+
customerCheckAttachments: Array<number>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 设备验收
|
|
73
|
+
export function deviceCheck(data: DeviceCheckParams): Promise<boolean> {
|
|
74
|
+
return http.post({
|
|
75
|
+
url: `${deviceApi}/deviceChecked`,
|
|
76
|
+
data: {...data }, // 展开参数对象
|
|
77
|
+
}, {
|
|
78
|
+
permActionName: "deviceChecked"
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//根据客户名称查询客户编码
|
|
83
|
+
export function queryCustomerCode(data: {customerName: string}): Promise<{customerCode: string; customerName: string}> {
|
|
84
|
+
return http.post({
|
|
85
|
+
url: `${deviceApi}/queryCustomerCodeByName`,
|
|
86
|
+
data: {...data }, // 展开参数对象
|
|
87
|
+
}, {
|
|
88
|
+
permActionName: "queryCustomerCodeByName"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function queryDeviceCheckedList(data: {deviceCode: string}): Promise<any> {
|
|
93
|
+
return http.post({
|
|
94
|
+
url: `${deviceApi}/queryDeviceCheckedList`,
|
|
95
|
+
data: {...data }, // 展开参数对象
|
|
96
|
+
}, {
|
|
97
|
+
permActionName: "queryDeviceCheckedList"
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// 料塔供应商列表查询
|
|
102
|
+
export interface SiloSupplierItem {
|
|
103
|
+
supplierAbbrEn: string; // 供应商缩写
|
|
104
|
+
supplierName: string; // 供应商名称
|
|
105
|
+
supplierCode: string; // 供应商编码
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function querySiloSupplier(): Promise<SiloSupplierItem[]> {
|
|
109
|
+
return http.post({
|
|
110
|
+
url: `${deviceApi}/querySiloSupplier`,
|
|
111
|
+
data: {},
|
|
112
|
+
}, {
|
|
113
|
+
permActionName: "querySiloSupplier"
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// 编辑料塔编码
|
|
118
|
+
export interface TmsDeviceInfoUpdateDTO {
|
|
119
|
+
deviceCode: string; // 设备编码
|
|
120
|
+
siloCodeRules: number; // 料塔编码规则:1-供应商编码,2-发货编码
|
|
121
|
+
supplierAbbrEn: string; // 料塔供应商缩写
|
|
122
|
+
produceTime?: string; // 生产日期
|
|
123
|
+
shippingTime?: string; // 发货月份
|
|
124
|
+
produceFlowCode?: string; // 生产流水编码
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function updateDeviceInfo(data: TmsDeviceInfoUpdateDTO): Promise<boolean> {
|
|
128
|
+
return http.post({
|
|
129
|
+
url: `${deviceApi}/updateDeviceInfo`,
|
|
130
|
+
data: { ...data },
|
|
131
|
+
}, {
|
|
132
|
+
permActionName: "updateDeviceInfo"
|
|
133
|
+
});
|
|
134
|
+
}
|
package/src/api/index.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import context from '@/api/context'
|
|
2
|
+
import { useUserStoreWithOut } from '@/stores/modules/user';
|
|
3
|
+
import type { dictListParams } from '@/api/model/index'
|
|
4
|
+
import http from '@/utils/request';
|
|
5
|
+
import { APPID } from '@/config/app';
|
|
6
|
+
|
|
7
|
+
type fileItem = {
|
|
8
|
+
url: string;
|
|
9
|
+
uid: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 上传文件
|
|
14
|
+
* @param fitem 文件
|
|
15
|
+
* @param formData 表单数据
|
|
16
|
+
* @param onProgress 进度回调
|
|
17
|
+
* @returns Promise
|
|
18
|
+
*/
|
|
19
|
+
export function uploadWxFile(
|
|
20
|
+
fitem: fileItem,
|
|
21
|
+
formData?: any,
|
|
22
|
+
onProgress?: (progress: number) => void
|
|
23
|
+
) {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
const uploadTask = uni.uploadFile({
|
|
26
|
+
url: `${context.systemApi}/file/upload`,
|
|
27
|
+
name: 'file',
|
|
28
|
+
filePath: fitem.url,
|
|
29
|
+
header: {
|
|
30
|
+
'Authorization': useUserStoreWithOut().getToken,
|
|
31
|
+
"X-Perms": APPID + ':uploadFile',
|
|
32
|
+
'X-APP-ID': APPID
|
|
33
|
+
},
|
|
34
|
+
formData: {
|
|
35
|
+
...formData,
|
|
36
|
+
appId: APPID,
|
|
37
|
+
},
|
|
38
|
+
success: function(res) {
|
|
39
|
+
if (res.statusCode !== 200) {
|
|
40
|
+
reject(res);
|
|
41
|
+
uni.showToast({ title: '网络异常,上传失败', icon: 'error' })
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const resData = JSON.parse(res.data);
|
|
45
|
+
resolve({ ...resData, uid: fitem.uid, url: fitem.url })
|
|
46
|
+
},
|
|
47
|
+
fail: function() {
|
|
48
|
+
uni.showToast({ title: '网络异常,上传失败', icon: 'error' })
|
|
49
|
+
reject();
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
uploadTask.onProgressUpdate((res: { progress: number; }) => {
|
|
53
|
+
if (onProgress) {
|
|
54
|
+
onProgress(res.progress);
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function downloadWxFile(url: string) {
|
|
61
|
+
return new Promise((resolve, reject) => {
|
|
62
|
+
uni.downloadFile({
|
|
63
|
+
url: context.systemApi + url,
|
|
64
|
+
header: {
|
|
65
|
+
'Csf-Auth': useUserStoreWithOut().getToken
|
|
66
|
+
},
|
|
67
|
+
responseType: "arraybuffer",
|
|
68
|
+
success: resolve,
|
|
69
|
+
fail: reject
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function getDictList (params: dictListParams) {
|
|
75
|
+
return http.post({
|
|
76
|
+
url: `${context.generalApi}/dict/label/list`, // 客户分页查询接口地址
|
|
77
|
+
sslVerify: false,
|
|
78
|
+
data: { ...params } // 展开参数对象
|
|
79
|
+
});
|
|
80
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import context from "@/api/context";
|
|
2
|
+
import http from "@/utils/request";
|
|
3
|
+
const installtionApi = context.basicApi + "/work/order/applet";
|
|
4
|
+
type orderParams = {
|
|
5
|
+
size: number;
|
|
6
|
+
current: number;
|
|
7
|
+
userCode?: string;
|
|
8
|
+
status?: number;
|
|
9
|
+
};
|
|
10
|
+
type orderRecord = {
|
|
11
|
+
planId: number;
|
|
12
|
+
workOrderCode: string;
|
|
13
|
+
customerCode: string;
|
|
14
|
+
customerName: string;
|
|
15
|
+
contactsName: string;
|
|
16
|
+
contactsMobile: string;
|
|
17
|
+
deviceList: [
|
|
18
|
+
{
|
|
19
|
+
id: number;
|
|
20
|
+
deviceCode: string;
|
|
21
|
+
deviceName: string;
|
|
22
|
+
status: number;
|
|
23
|
+
address: string;
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
};
|
|
27
|
+
type orderRes = {
|
|
28
|
+
current: number;
|
|
29
|
+
size: number;
|
|
30
|
+
total: number;
|
|
31
|
+
pages: number;
|
|
32
|
+
records: orderRecord[];
|
|
33
|
+
};
|
|
34
|
+
export function getInstalltionOrderList(data: orderParams): Promise<orderRes> {
|
|
35
|
+
return http.post({
|
|
36
|
+
url: `${installtionApi}/pageListByUserCode`,
|
|
37
|
+
data: { ...data }, // 展开参数对象
|
|
38
|
+
}, {
|
|
39
|
+
permActionName: 'getInstalltionOrderList'
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
export function getInstalltionStatusOrderList(data: orderParams): Promise<orderRes> {
|
|
43
|
+
return http.post({
|
|
44
|
+
url: `${installtionApi}/pageListByUserCodeAndStatus`,
|
|
45
|
+
data: { ...data }, // 展开参数对象
|
|
46
|
+
}, {
|
|
47
|
+
permActionName: 'getInstalltionStatusOrderList'
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface addAcceptanceParams {
|
|
52
|
+
planDeviceId: number | string;
|
|
53
|
+
workNodeFlag: number;
|
|
54
|
+
imageList: Array<number>;
|
|
55
|
+
status: number;
|
|
56
|
+
description: string;
|
|
57
|
+
deviceLocation: string;
|
|
58
|
+
workOrderCode: string;
|
|
59
|
+
userCode: string;
|
|
60
|
+
deviceCode: string;
|
|
61
|
+
}
|
|
62
|
+
type recordType = 'installWorkAcceptance' | 'installWorkComplete' | 'installWorkReady'
|
|
63
|
+
export function addRecord(
|
|
64
|
+
data: addAcceptanceParams,
|
|
65
|
+
config?: {
|
|
66
|
+
permActionName?: recordType
|
|
67
|
+
}
|
|
68
|
+
): Promise<boolean> {
|
|
69
|
+
return http.post({
|
|
70
|
+
url: `${context.basicApi}/device/installation/record/applet/add`,
|
|
71
|
+
data: data, // 展开参数对象
|
|
72
|
+
}, {
|
|
73
|
+
permActionName: config?.permActionName || 'addInstallationRecord'
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function updateRecord(
|
|
78
|
+
data: addAcceptanceParams & { id: number }
|
|
79
|
+
): Promise<boolean> {
|
|
80
|
+
return http.post({
|
|
81
|
+
url: `${context.basicApi}/device/installation/record/applet/update`,
|
|
82
|
+
data: data, // 展开参数对象
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface orderDetailRes {
|
|
87
|
+
deliverCode: string;
|
|
88
|
+
workOrderCode: string;
|
|
89
|
+
customerName: string;
|
|
90
|
+
deviceVOList: [
|
|
91
|
+
{
|
|
92
|
+
id: 0;
|
|
93
|
+
deviceCode: string;
|
|
94
|
+
status: 0;
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
export function getOrderDetail(data: { id: number }): Promise<orderDetailRes> {
|
|
99
|
+
return http.post({
|
|
100
|
+
url: `${context.basicApi}/installation/work/order/detail`,
|
|
101
|
+
data: data, // 展开参数对象
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface DeviceRecord {
|
|
106
|
+
workNodeFlag: number;
|
|
107
|
+
description: string;
|
|
108
|
+
imageList: [
|
|
109
|
+
{
|
|
110
|
+
attachmentId: number;
|
|
111
|
+
attachmentUrl: string;
|
|
112
|
+
attachmentName: string;
|
|
113
|
+
}
|
|
114
|
+
];
|
|
115
|
+
status: number;
|
|
116
|
+
createTime: string;
|
|
117
|
+
userName: string;
|
|
118
|
+
}
|
|
119
|
+
interface deviceDetailRes {
|
|
120
|
+
id: number;
|
|
121
|
+
workOrderCode: string;
|
|
122
|
+
customerName: string;
|
|
123
|
+
customerCode: string;
|
|
124
|
+
contactsName: string;
|
|
125
|
+
contactsMobile: string;
|
|
126
|
+
deviceCode: string;
|
|
127
|
+
deviceName: string;
|
|
128
|
+
status: number;
|
|
129
|
+
address: string;
|
|
130
|
+
recordList: DeviceRecord[];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function getInstalltionDeviceDetail(
|
|
134
|
+
data: { id: number | string }
|
|
135
|
+
): Promise<deviceDetailRes> {
|
|
136
|
+
return http.post({
|
|
137
|
+
url: `${context.basicApi}/installation/plan/device/applet/detail`,
|
|
138
|
+
data: data, // 展开参数对象
|
|
139
|
+
}, {
|
|
140
|
+
permActionName: 'getInstalltionDeviceDetail'
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
type countRes = {
|
|
145
|
+
"nonCheckCount": number,
|
|
146
|
+
"acceptedCount": number
|
|
147
|
+
}
|
|
148
|
+
export function getAccepttanceCount(
|
|
149
|
+
data: { userCode?: number | string }
|
|
150
|
+
): Promise<countRes> {
|
|
151
|
+
return http.post({
|
|
152
|
+
url: `${installtionApi}/countByUserCode`,
|
|
153
|
+
data, // 展开参数对象
|
|
154
|
+
});
|
|
155
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ListModel {
|
|
2
|
+
current: number; // 当前页
|
|
3
|
+
pages: number; // 总页数
|
|
4
|
+
records: any[]; // 当前分页数据
|
|
5
|
+
size: number; // 分页大小
|
|
6
|
+
total: number; // 总记录数
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface dictListParams{
|
|
10
|
+
"size": number,
|
|
11
|
+
"current": number,
|
|
12
|
+
"dictName"?: string,
|
|
13
|
+
"dictCode": string,
|
|
14
|
+
"status"?: 0
|
|
15
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Description: 用户相关接口参数
|
|
3
|
+
*/
|
|
4
|
+
export interface LoginParams {
|
|
5
|
+
grantType?: 'captcha' | 'password';
|
|
6
|
+
tenantId?: string;
|
|
7
|
+
account?: string;
|
|
8
|
+
password?: string;
|
|
9
|
+
wxCode?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface CaptchaParams {
|
|
13
|
+
key: string;
|
|
14
|
+
code: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface GetCaptchaModel {
|
|
18
|
+
key: string;
|
|
19
|
+
image: string;
|
|
20
|
+
code: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface RoleInfo {
|
|
24
|
+
roleName: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description: Login interface return value
|
|
30
|
+
*/
|
|
31
|
+
export interface LoginResultModel {
|
|
32
|
+
accessToken: string;
|
|
33
|
+
tokenType: string;
|
|
34
|
+
refreshToken: string;
|
|
35
|
+
userId: string;
|
|
36
|
+
tenantId: string;
|
|
37
|
+
oauthId: string;
|
|
38
|
+
avatar: string;
|
|
39
|
+
authority: string;
|
|
40
|
+
userName: string;
|
|
41
|
+
account: string;
|
|
42
|
+
expiresIn: number;
|
|
43
|
+
license: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @description: Get user information return value
|
|
48
|
+
*/
|
|
49
|
+
export interface GetUserInfoModel {
|
|
50
|
+
roles: RoleInfo[];
|
|
51
|
+
// 用户id
|
|
52
|
+
userId: string | number;
|
|
53
|
+
// 用户名
|
|
54
|
+
username: string;
|
|
55
|
+
// 真实名字
|
|
56
|
+
realName: string;
|
|
57
|
+
// 头像
|
|
58
|
+
avatar: string;
|
|
59
|
+
// 介绍
|
|
60
|
+
desc?: string;
|
|
61
|
+
}
|
|
62
|
+
|
package/src/api/order.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import context from "@/api/context";
|
|
2
|
+
import http from "@/utils/request";
|
|
3
|
+
const orderApi = context.basicApi + "/after/order";
|
|
4
|
+
|
|
5
|
+
export interface OrderListParams {
|
|
6
|
+
orderCode?: string;
|
|
7
|
+
deviceCode: string;
|
|
8
|
+
customerName: string;
|
|
9
|
+
customerCode: string;
|
|
10
|
+
responsiblePerson: string;
|
|
11
|
+
executionMemberList: string[];
|
|
12
|
+
statusDescription: string;
|
|
13
|
+
imageUploadList: string[];
|
|
14
|
+
orderStatus?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// 新增售后工单
|
|
18
|
+
export function addAfterOrder(data: OrderListParams): Promise<{id: number}> {
|
|
19
|
+
return http.post({
|
|
20
|
+
url: `${orderApi}/add`,
|
|
21
|
+
data: { ...data }, // 展开参数对象
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
permActionName: 'addAfterOrder'
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const deviceApi = `${context.basicApi}/device`;
|
|
30
|
+
|
|
31
|
+
export interface DeviceDetailRes {
|
|
32
|
+
customerName: string;
|
|
33
|
+
deviceCode: string;
|
|
34
|
+
address: string;
|
|
35
|
+
productName: string;
|
|
36
|
+
isCheckStatus: number;
|
|
37
|
+
customerCheckDate: string;
|
|
38
|
+
customerCheckBy: number;
|
|
39
|
+
customerCheckMemo: string;
|
|
40
|
+
customerCheckAttachments: string;
|
|
41
|
+
}
|
|
42
|
+
export function queryDeviceDetail(data: { deviceCode?: string }): Promise<DeviceDetailRes> {
|
|
43
|
+
return http.post({
|
|
44
|
+
url: `${deviceApi}/queryCustomerByDeviceCode`,
|
|
45
|
+
data: { ...data }, // 展开参数对象
|
|
46
|
+
}, {
|
|
47
|
+
permActionName: 'queryDeviceDetail'
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import context from '@/api/context'
|
|
2
|
+
import http from '@/utils/request';
|
|
3
|
+
const smsApi = context.basicApi + '/sms';
|
|
4
|
+
|
|
5
|
+
// 发送忘记密码验证码
|
|
6
|
+
export function sendResetPasswordCode(data: {mobile: number | undefined}): Promise<boolean> {
|
|
7
|
+
return http.post({
|
|
8
|
+
url: `${smsApi}/sendResetPasswordCode`,
|
|
9
|
+
data: { ...data } // 展开参数对象
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// 发送注册验证码
|
|
14
|
+
export function sendRegisterCode(data: {mobile: number | undefined}): Promise<boolean> {
|
|
15
|
+
return http.post({
|
|
16
|
+
url: `${smsApi}/sendRegisterCode`,
|
|
17
|
+
data: { ...data } // 展开参数对象
|
|
18
|
+
});
|
|
19
|
+
}
|