-
-
业务编号
-
服务项目
-
计价方式
-
收费标准
-
检查单位
-
选择服务
-
备注
+
+
+
+ 购买增值服务
-
-
-
-
{{ item.code }}
-
{{ item.name }}
-
{{ item.type }}
-
{{ item.price }}
-
{{ item.company }}
-
{{ item.select === 1 ? '已选' : ''}}
-
{{ item.comments }}
+
+
+
+
业务编号
+
服务项目
+
计价方式
+
收费标准
+
检查单位
+
选择服务
+
备注
+
+
+
+
+
{{ item.code }}
+
{{ item.name }}
+
{{ item.type }}
+
{{ item.price }}
+
{{ item.company }}
+
+
+ {{ item.select === 1 ? '已选' : '' }}
+
+
+
{{ item.comments }}
+
+
-
-
-
-
支付方式
-
-
- {{ item }}
-
-
-
-
-
-
-
-
请打开手机微信,扫一扫完成支付
-
已完成支付
-
-
立即支付
-
+
+
支付方式
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
请打开手机微信,扫一扫完成支付
+
已完成支付
+
+
立即支付
+
diff --git a/pages/user/order.vue b/pages/user/order.vue
new file mode 100644
index 0000000..c3963db
--- /dev/null
+++ b/pages/user/order.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+ 询价管理
+
+
+ 订单管理
+
+
+ 合同管理
+
+
+
+
+
+
+
+ {{ row.type === 0 ? '普通订单' : '金久信自营订单' }}
+
+
+
+
+
+
+
+
+ {{ item.goodsName }}
+ x{{ item.num }}
+
+ 小计: ¥{{ item.num * item.goodsPrice }}
+
+
+
+
+
+
+
+
+ 待支付
+ 已支付
+ 待收货
+ 已完成
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uniCloud-aliyun/cloudfunctions/pay_notify/index.js b/uniCloud-aliyun/cloudfunctions/pay_notify/index.js
new file mode 100644
index 0000000..96d452e
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/pay_notify/index.js
@@ -0,0 +1,25 @@
+'use strict';
+const querystring = require('querystring');
+exports.main = async (event, context) => {
+ //event为客户端上传的参数
+ console.log('event : ', event)
+ const {
+ body
+ } = event
+
+ const obj = querystring.parse(body);
+ // // 验证签名
+ // // Base64(SHA1(app_id +MD5(timestamp)+SHA1(app_secret+authenticationType+certStatus+customerId+serialNo+status+statusDesc)))
+ //
+ await uniCloud.callFunction({
+ name: "router",
+ data: {
+ $url: "client/payment.pub_payNotify",
+ data: obj
+ }
+ });
+ //
+ // return callFunctionRes
+ // console.log(obj)
+ return 'SUCCESS'
+};
diff --git a/uniCloud-aliyun/cloudfunctions/pay_notify/package.json b/uniCloud-aliyun/cloudfunctions/pay_notify/package.json
new file mode 100644
index 0000000..d815755
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/pay_notify/package.json
@@ -0,0 +1,7 @@
+{
+ "name": "pay_notify",
+ "dependencies": {},
+ "extensions": {
+ "uni-cloud-jql": {}
+ }
+}
\ No newline at end of file
diff --git a/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/add.js b/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/add.js
index ef1eaf6..804d4ff 100644
--- a/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/add.js
+++ b/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/add.js
@@ -16,7 +16,8 @@ module.exports = {
name,
enable,
sort,
- attributes
+ attributes,
+ extraAttributes
} = data;
// 这里需要把 params1 params2 params3 改成你数据库里允许用户添加的字段
let dbName = "jjx-enquiry-template";
@@ -26,7 +27,8 @@ module.exports = {
name,
enable,
sort,
- attributes
+ attributes,
+ extraAttributes
}
});
// 业务逻辑结束-----------------------------------------------------------
diff --git a/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/update.js b/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/update.js
index b90535f..0209b77 100644
--- a/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/update.js
+++ b/uniCloud-aliyun/cloudfunctions/router/service/admin/enquiry/template/sys/update.js
@@ -17,7 +17,8 @@ module.exports = {
name,
enable,
sort,
- attributes
+ attributes,
+ extraAttributes
} = data;
// 这里需要把 params1 params2 params3 改成你数据库里允许用户添加的字段
let dbName = "jjx-enquiry-template";
@@ -28,7 +29,8 @@ module.exports = {
name,
enable,
sort,
- attributes
+ attributes,
+ extraAttributes
}
});
// 业务逻辑结束-----------------------------------------------------------
diff --git a/uniCloud-aliyun/cloudfunctions/router/service/client/order/kh/getList.js b/uniCloud-aliyun/cloudfunctions/router/service/client/order/kh/getList.js
new file mode 100644
index 0000000..fbf1002
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/router/service/client/order/kh/getList.js
@@ -0,0 +1,44 @@
+'use strict';
+module.exports = {
+ /**
+ * XXXnameXXX
+ * @url client/order/kh/getList 前端调用的url参数地址
+ * data 请求参数
+ * @param {String} params1 参数1
+ */
+ main: async (event) => {
+ let {data = {}, userInfo, util, filterResponse, originalParam} = event;
+ let {customUtil, uniID, config, pubFun, vk, db, _} = util;
+ let {uid} = data;
+ let res = {code: 0, msg: ""};
+ // 业务逻辑开始-----------------------------------------------------------
+
+ res = await vk.baseDao.selects({
+ dbName: "jjx-order",
+ whereJson: {
+ uid
+ },
+ pageIndex: 1,
+ pageSize: 500,
+ sortArr:[{ "name":"_id", "type":"desc" }],
+ foreignDB: [
+ {
+ dbName: "jjx-order-goods",
+ localKey: "_id",
+ foreignKey: "orderId",
+ as: "goods",
+ limit: 500
+ }
+ ],
+ })
+
+ // res.rows.forEach(item => {
+ // if (item.type === 0) {
+ // item.goods =
+ // }
+ // })
+
+ // 业务逻辑结束-----------------------------------------------------------
+ return res;
+ }
+}
diff --git a/uniCloud-aliyun/cloudfunctions/router/service/client/payment.js b/uniCloud-aliyun/cloudfunctions/router/service/client/payment.js
new file mode 100644
index 0000000..57fea49
--- /dev/null
+++ b/uniCloud-aliyun/cloudfunctions/router/service/client/payment.js
@@ -0,0 +1,83 @@
+'use strict';
+var vk; // 全局vk实例
+// 涉及的表名
+const dbName = {
+ //test: "vk-test", // 测试表
+};
+
+var db = uniCloud.database(); // 全局数据库引用
+var _ = db.command; // 数据库操作符
+var $ = _.aggregate; // 聚合查询操作符
+/**
+ * 权限注意:访问以下链接查看
+ * 文档地址:https://vkdoc.fsq.pub/client/uniCloud/cloudfunctions/cloudObject.html#内置权限
+ */
+var cloudObject = {
+ isCloudObject: true, // 标记为云对象模式
+ /**
+ * 请求前处理,主要用于调用方法之前进行预处理,一般用于拦截器、统一的身份验证、参数校验、定义全局对象等。
+ * 文档地址:https://vkdoc.fsq.pub/client/uniCloud/cloudfunctions/cloudObject.html#before-预处理
+ */
+ _before: async function () {
+ vk = this.vk; // 将vk定义为全局对象
+ // let { customUtil, uniID, config, pubFun } = this.getUtil(); // 获取工具包
+ },
+ /**
+ * 请求后处理,主要用于处理本次调用方法的返回结果或者抛出的错误
+ * 文档地址:https://vkdoc.fsq.pub/client/uniCloud/cloudfunctions/cloudObject.html#after-后处理
+ */
+ _after: async function (options) {
+ let {err, res} = options;
+ if (err) {
+ return; // 如果方法抛出错误,直接return;不处理
+ }
+ return res;
+ },
+ /**
+ * 获取列表
+ * @url client/payment.getList 前端调用的url参数地址
+ */
+ pub_payNotify: async function (data) {
+ let res = {code: 0, msg: ''};
+ // 业务逻辑开始-----------------------------------------------------------
+
+ console.log('pay notify res', data)
+ const order = await vk.baseDao.findByWhereJson({
+ dbName: "jjx-order",
+ whereJson: {
+ orderNo: data.billNo,
+ }
+ });
+ console.log('order', order)
+ if (order && order.orderStatus === 0 && data.billStatus === 'PAID') {
+ const billPayment = JSON.parse(data.billPayment)
+ await vk.baseDao.updateById({
+ dbName: "jjx-order",
+ id: order._id,
+ dataJson: {
+ orderStatus: 1,
+ payTime: billPayment.payTime,
+ payAmount: parseFloat(billPayment.receiptAmount) / 100,
+ payNo: billPayment.paySeqId,
+ }
+ });
+ }
+ // 业务逻辑结束-----------------------------------------------------------
+ return res;
+ },
+ /**
+ * 模板函数
+ * @url client/payment.test 前端调用的url参数地址
+ */
+ test: async function (data) {
+ let res = {code: 0, msg: ''};
+ let {uid} = this.getClientInfo(); // 获取客户端信息
+ // 业务逻辑开始-----------------------------------------------------------
+
+
+ // 业务逻辑结束-----------------------------------------------------------
+ return res;
+ },
+};
+
+module.exports = cloudObject;