完善发货流程
This commit is contained in:
@@ -484,16 +484,19 @@ class DemandService
|
|||||||
exception('更新发货状态失败');
|
exception('更新发货状态失败');
|
||||||
}
|
}
|
||||||
Db::commit();
|
Db::commit();
|
||||||
//给客户发送发货通知
|
//给客户发送确认收货提醒(跳转需求详情查看交付内容)
|
||||||
$msgData = [
|
$msgData = [
|
||||||
|
'page' => SubscribeMessageService::PAGE_DEMAND_DETAIL,
|
||||||
|
'param' => ['id' => $demand->id],
|
||||||
'values' => [
|
'values' => [
|
||||||
|
//character_string 字段不支持中文,产品名称填需求编号
|
||||||
|
$demand->parent_order_no,
|
||||||
$finalOrder->order_no,
|
$finalOrder->order_no,
|
||||||
mb_substr($demand->title, 0, 20),
|
$finalOrder->payment_amount,
|
||||||
'已发货',
|
mb_substr($remark ?: SubscribeMessageService::MSG_MAP[SubscribeMessageService::MSG_TEMP_CONFIRM_RECEIPT]['remark'], 0, 20),
|
||||||
'开发成果已交付,请到需求详情查看交付内容并确认收货',
|
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
(new EasyWeChatService)->sendMsg($demand->user_id, SubscribeMessageService::MSG_TEMP_ORDER_SHIPPED, $msgData);
|
(new EasyWeChatService)->sendMsg($demand->user_id, SubscribeMessageService::MSG_TEMP_CONFIRM_RECEIPT, $msgData);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -623,6 +626,18 @@ class DemandService
|
|||||||
]
|
]
|
||||||
];
|
];
|
||||||
(new EasyWeChatService)->sendMsg($demand->winBidding->user_id, SubscribeMessageService::MSG_TEMP_WORK_ACCEPT_RESULT, $msgData);
|
(new EasyWeChatService)->sendMsg($demand->winBidding->user_id, SubscribeMessageService::MSG_TEMP_WORK_ACCEPT_RESULT, $msgData);
|
||||||
|
//给开发者发送发货提醒(客户已支付尾款,跳转需求详情去发货)
|
||||||
|
$shipMsgData = [
|
||||||
|
'page' => SubscribeMessageService::PAGE_DEMAND_DETAIL,
|
||||||
|
'param' => ['id' => $demand->id],
|
||||||
|
'values' => [
|
||||||
|
$demandOrder->order_no,
|
||||||
|
mb_substr($demand->title, 0, 20),
|
||||||
|
'待发货',
|
||||||
|
'客户已支付尾款,请及时发货交付',
|
||||||
|
]
|
||||||
|
];
|
||||||
|
(new EasyWeChatService)->sendMsg($userId, SubscribeMessageService::MSG_TEMP_ORDER_SHIPPED, $shipMsgData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,10 @@ class SubscribeMessageService
|
|||||||
const MSG_TEMP_CONTRACT_PAY = 'RxZ1VlzI5cFl_q8fF-WfQlkUqMKp1HGhDCGzAYcmRtk'; //合同付款
|
const MSG_TEMP_CONTRACT_PAY = 'RxZ1VlzI5cFl_q8fF-WfQlkUqMKp1HGhDCGzAYcmRtk'; //合同付款
|
||||||
const MSG_TEMP_CONTRACT_SIGN = '1Yz9jAXFaySOQyeUfM1V2utomImvVKBRx7m-9FvQ3xo'; //合同签约
|
const MSG_TEMP_CONTRACT_SIGN = '1Yz9jAXFaySOQyeUfM1V2utomImvVKBRx7m-9FvQ3xo'; //合同签约
|
||||||
const MSG_TEMP_ORDER_SHIPPED = 'jGxNQ11on1yD0d5tGwk4S8jP_CEdddfAkrp9-xVeeZY'; //订单发货
|
const MSG_TEMP_ORDER_SHIPPED = 'jGxNQ11on1yD0d5tGwk4S8jP_CEdddfAkrp9-xVeeZY'; //订单发货
|
||||||
|
const MSG_TEMP_CONFIRM_RECEIPT = 'Utj3mlCNu0uiwshpoCeTPVMggXWYC6hVGqFBgGm9TFk'; //确认收货通知
|
||||||
const MSG_TEMP_DEVELOPER_JOIN = '0LRwQET1LgJohEok6EbcfMTnikuICe6-NZ7pc0WSbOY'; //申请入驻
|
const MSG_TEMP_DEVELOPER_JOIN = '0LRwQET1LgJohEok6EbcfMTnikuICe6-NZ7pc0WSbOY'; //申请入驻
|
||||||
const PAGE_DEMAND_LIST = 'pages/demand/list/index';
|
const PAGE_DEMAND_LIST = 'pages/demand/list/index';
|
||||||
|
const PAGE_DEMAND_DETAIL = 'pages/demand/detail/index';
|
||||||
const PAGE_ORDER_LIST = 'pages/order/order-list/index';
|
const PAGE_ORDER_LIST = 'pages/order/order-list/index';
|
||||||
const PAGE_HOME = 'pages/home/home';
|
const PAGE_HOME = 'pages/home/home';
|
||||||
|
|
||||||
@@ -119,6 +121,17 @@ class SubscribeMessageService
|
|||||||
*/
|
*/
|
||||||
'fields' => ['character_string2', 'thing1', 'phrase19', 'thing6'],
|
'fields' => ['character_string2', 'thing1', 'phrase19', 'thing6'],
|
||||||
],
|
],
|
||||||
|
self::MSG_TEMP_CONFIRM_RECEIPT => [
|
||||||
|
'page' => self::PAGE_DEMAND_DETAIL, //需求详情(发送时携带需求id)
|
||||||
|
'remark' => '开发成果已交付,请查看交付内容并确认收货',
|
||||||
|
/*
|
||||||
|
产品名称:JG202609300001(注:character_string 字段不支持中文,产品名称填需求编号)
|
||||||
|
订单号:A12345678984
|
||||||
|
付款金额:1750.00
|
||||||
|
备注:开发成果已交付,请查看交付内容并确认收货
|
||||||
|
*/
|
||||||
|
'fields' => ['character_string1', 'character_string2', 'amount3', 'thing5'],
|
||||||
|
],
|
||||||
self::MSG_TEMP_DEVELOPER_JOIN => [
|
self::MSG_TEMP_DEVELOPER_JOIN => [
|
||||||
'page' => self::PAGE_HOME, //首页
|
'page' => self::PAGE_HOME, //首页
|
||||||
'remark' => '开发者入驻成功,前去接单大厅接单',
|
'remark' => '开发者入驻成功,前去接单大厅接单',
|
||||||
|
|||||||
@@ -338,7 +338,8 @@ Page({
|
|||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
wx.requestSubscribeMessage({
|
wx.requestSubscribeMessage({
|
||||||
tmplIds: ['0H4GVHXI9G8RtZ1FuS_BuWN8yzOiBQ0-47ym6f08X_I', 'Xpqqk4si-Jh6HqfD-1VS9IH2AtlgVgGJLzgVS7RRMFk'],
|
// 验收结果 + 工单结算 + 订单发货提醒(客户支付尾款后提醒开发者发货)
|
||||||
|
tmplIds: ['0H4GVHXI9G8RtZ1FuS_BuWN8yzOiBQ0-47ym6f08X_I', 'Xpqqk4si-Jh6HqfD-1VS9IH2AtlgVgGJLzgVS7RRMFk', 'jGxNQ11on1yD0d5tGwk4S8jP_CEdddfAkrp9-xVeeZY'],
|
||||||
complete(re) {
|
complete(re) {
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
@@ -396,7 +397,8 @@ Page({
|
|||||||
console.log(res);
|
console.log(res);
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
wx.requestSubscribeMessage({
|
wx.requestSubscribeMessage({
|
||||||
tmplIds: ['RxZ1VlzI5cFl_q8fF-WfQlkUqMKp1HGhDCGzAYcmRtk'],
|
// 合同付款提醒 + 确认收货通知(开发者发货后提醒客户确认收货)
|
||||||
|
tmplIds: ['RxZ1VlzI5cFl_q8fF-WfQlkUqMKp1HGhDCGzAYcmRtk', 'Utj3mlCNu0uiwshpoCeTPVMggXWYC6hVGqFBgGm9TFk'],
|
||||||
complete: (re) => {
|
complete: (re) => {
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user