From 404cd7df48bd6a354a6bbdd2b9e404da6a9ddfc6 Mon Sep 17 00:00:00 2001
From: mo-bai <1873032855@qq.com>
Date: Thu, 7 Apr 2022 10:26:37 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apis/applyApi.js | 34 +++
apis/orderApi.js | 4 +-
enums/index.js | 10 +
pages.json | 16 ++
pages/apply-detail/index.vue | 263 ++++++++++++++++++
pages/apply-manage/index.vue | 170 +++++++++++
pages/contract-manage/index.vue | 2 +-
pages/login/index.vue | 8 +-
pages/mine/index.vue | 76 +++--
.../digital-workshops/验厂管理.sketch | Bin 0 -> 151515 bytes
...ication-icon.png => apply-manage-icon.png} | Bin
utils/handlePushMsg.js | 13 +
12 files changed, 569 insertions(+), 27 deletions(-)
create mode 100644 apis/applyApi.js
create mode 100644 pages/apply-detail/index.vue
create mode 100644 pages/apply-manage/index.vue
create mode 100644 static/imgs/digital-workshops/验厂管理.sketch
rename static/imgs/mine/{certification-icon.png => apply-manage-icon.png} (100%)
diff --git a/apis/applyApi.js b/apis/applyApi.js
new file mode 100644
index 0000000..d6a32e4
--- /dev/null
+++ b/apis/applyApi.js
@@ -0,0 +1,34 @@
+import http from '@/utils/http/index.js'
+
+/**
+ * 获取远程验厂列表
+ */
+export function getApplyingList(data = {}) {
+ return http.get({
+ url: '/base-paper-trading/get/factory-inspection/list',
+ data
+ })
+}
+
+/**
+ * 获取远程验厂详情
+ */
+export function getApplyingInfo(data = {}) {
+ return http.get({
+ url: `/base-paper-trading/get/factory-inspection/${data.id}`,
+ data
+ })
+}
+
+/**
+ * 处理远程验厂申请
+ * @param {object} data
+ * @property {number} handleResult
+ * @property {number} id
+ */
+export function handleApplying(data = {}) {
+ return http.post({
+ url: `/base-paper-trading/handle/for-factory-inspection`,
+ data
+ })
+}
diff --git a/apis/orderApi.js b/apis/orderApi.js
index 20ae694..3e81ca6 100644
--- a/apis/orderApi.js
+++ b/apis/orderApi.js
@@ -144,7 +144,7 @@ export function getReciptCode(data) {
*/
export function getContractList(data) {
return http.get({
- url: '/base-paper-trading/supplier/get/contract-list',
+ url: '/base-paper-trading/customer/get/contract-list',
data
})
}
@@ -155,7 +155,7 @@ export function getContractList(data) {
*/
export function getCooperationList(data) {
return http.get({
- url: '/base-paper-trading/supplier/get/contract-enterprise-list',
+ url: '/base-paper-trading/customer/get/contract-enterprise-list',
data
})
}
diff --git a/enums/index.js b/enums/index.js
index 2df3540..890bd1f 100644
--- a/enums/index.js
+++ b/enums/index.js
@@ -339,3 +339,13 @@ export const encryptType = {
MD5: 1,
SHA256: 2
}
+
+/**
+ * 远程验厂申请状态 1:待处理 2:已同意 3:已拒绝 4:已过期
+ */
+export const applyingTypeEnum = {
+ WAITING: 1,
+ AGREE: 2,
+ REJECT: 3,
+ EXPIRED: 4
+}
diff --git a/pages.json b/pages.json
index 056a30a..f713fab 100644
--- a/pages.json
+++ b/pages.json
@@ -171,6 +171,22 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/apply-detail/index",
+ "style": {
+ "navigationBarTitleText": "验厂详情",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/apply-manage/index",
+ "style": {
+ "navigationBarTitleText": "验厂申请",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/mine/index",
"style": {
diff --git a/pages/apply-detail/index.vue b/pages/apply-detail/index.vue
new file mode 100644
index 0000000..dfaa799
--- /dev/null
+++ b/pages/apply-detail/index.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+
+ 通过后该用户可查看设备的视频信息、生产信息。
+
+
+ {{ bgMap[info.status].text }}
+
+
+
+ 用户名:
+ {{ info.userName }}
+
+
+ 手机号:
+ {{ info.mobile }}
+
+
+ 企业名:
+ {{ info.enterpriseName }}
+
+
+ 申请时间:
+ {{ info.createTime }}
+
+
+
+
+
+ 拒绝
+
+
+ 通过
+
+
+
+
+
+
+
+
+
diff --git a/pages/apply-manage/index.vue b/pages/apply-manage/index.vue
new file mode 100644
index 0000000..1ac216c
--- /dev/null
+++ b/pages/apply-manage/index.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+ {{ item.userName }} 申请远程验厂
+
+ {{ bgMap[item.status].text }}
+
+ {{ item.createTime }}
+
+ {{ item.enterpriseName }}
+
+
+
+
+
+
+
+
diff --git a/pages/contract-manage/index.vue b/pages/contract-manage/index.vue
index bd4e016..45ea49b 100644
--- a/pages/contract-manage/index.vue
+++ b/pages/contract-manage/index.vue
@@ -32,7 +32,7 @@
{{ typeMap[item.type].label }}
- {{ item.customerEnterpriseName }}
+ {{ item.supplierEnterpriseName }}
合同编号:
{{ item.contractNo }}
diff --git a/pages/login/index.vue b/pages/login/index.vue
index 9585564..1b24452 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -154,10 +154,10 @@ export default {
if (res) {
// 绑定推送
// #ifdef APP-PLUS
- // let cid = plus.push.getClientInfo().clientid
- // let platform = uni.getSystemInfoSync().platform
- // pushCustomerBind(cid, platform)
- // // #endif
+ let cid = plus.push.getClientInfo().clientid
+ let platform = uni.getSystemInfoSync().platform
+ pushCustomerBind(cid, platform)
+ // #endif
if (!res.enterpriseList || res.enterpriseList.length === 0) {
go2('select-role')
} else {
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 883538c..1d199a3 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -39,8 +39,22 @@
+
+
+ 20
+ 设备总数(台)
+
+
+ 14
+ 工作中(台)
+
+
+ 6
+ 空闲(台)
+
+
-
+
-
-
+
+
验厂申请