'!'
This commit is contained in:
@@ -47,7 +47,7 @@ const merchant = {
|
|||||||
* @param {object} params 请求参数 storeID int 门店ID vendorID int 厂商ID
|
* @param {object} params 请求参数 storeID int 门店ID vendorID int 厂商ID
|
||||||
*/
|
*/
|
||||||
update_store_vendor_map: async (params: AnyObject): Promise<AnyObject> => {
|
update_store_vendor_map: async (params: AnyObject): Promise<AnyObject> => {
|
||||||
return await request.api('v2/store/UpdateStoreVendorMap','PUT',params)
|
return await request.api('/v2/store/UpdateStoreVendorMap','PUT',params)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,7 @@
|
|||||||
(sku.mtwmSyncStatus & 2) !== 2 &&
|
(sku.mtwmSyncStatus & 2) !== 2 &&
|
||||||
(sku.mtwmSyncStatus & 4) !== 4
|
(sku.mtwmSyncStatus & 4) !== 4
|
||||||
"
|
"
|
||||||
>美团:该商品无法修改价格,请联系运营修改</view
|
>美团:该商品无法修改价格,请联系运营修改</view>
|
||||||
>
|
|
||||||
<view
|
<view
|
||||||
class="error eb"
|
class="error eb"
|
||||||
v-if="
|
v-if="
|
||||||
|
|||||||
@@ -503,9 +503,7 @@ function shoppingMangerFn() {
|
|||||||
currentValue.value = ''
|
currentValue.value = ''
|
||||||
} else {
|
} else {
|
||||||
currentValue.value = ''
|
currentValue.value = ''
|
||||||
toast(
|
toast(+price < originalUnitPrice ? '修改成功' : '提交成功, 请等待审核')
|
||||||
+price < originalUnitPrice ? '修改成功' : '提交成功, 请等待审核'
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toast('修改失败', 2)
|
toast('修改失败', 2)
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ const messageFn = function () {
|
|||||||
}
|
}
|
||||||
let venderIDInfo = arr.find((item:AnyObject) => item.vendorID === '1')
|
let venderIDInfo = arr.find((item:AnyObject) => item.vendorID === '1')
|
||||||
let ebStore = arr.find((item:AnyObject) => item.vendorID === '3')
|
let ebStore = arr.find((item:AnyObject) => item.vendorID === '3')
|
||||||
|
let jdStore = arr.find((item:AnyObject) => item.vendorID === '0')
|
||||||
|
|
||||||
let res = await message.get_IM_user_list(data)
|
let res = await message.get_IM_user_list(data)
|
||||||
// res = msgInfo.userList // 模拟数据
|
// res = msgInfo.userList // 模拟数据
|
||||||
@@ -77,9 +78,12 @@ const messageFn = function () {
|
|||||||
let newArr: any = []
|
let newArr: any = []
|
||||||
let fmtUserList = venderIDInfo ? res.data[`${venderIDInfo.appID}:${venderIDInfo.vendorStoreID}:1`] || [] : [] // 美团
|
let fmtUserList = venderIDInfo ? res.data[`${venderIDInfo.appID}:${venderIDInfo.vendorStoreID}:1`] || [] : [] // 美团
|
||||||
let febUserList = ebStore && JSON.stringify(ebStore) !== '{}' ? res.data[`${ebStore.appID}:${ebStore.vendorStoreID}:3`] || [] : [] // 饿百
|
let febUserList = ebStore && JSON.stringify(ebStore) !== '{}' ? res.data[`${ebStore.appID}:${ebStore.vendorStoreID}:3`] || [] : [] // 饿百
|
||||||
|
let jdUserList = jdStore && JSON.stringify(jdStore) !== '{}' ? res.data[`${jdStore.appID}:${jdStore.vendorStoreID}:0`] || [] : [] // 京东
|
||||||
|
|
||||||
let reverseList = fmtUserList && fmtUserList.length > 0 ? fmtUserList.reverse() : []
|
let reverseList = fmtUserList && fmtUserList.length > 0 ? fmtUserList.reverse() : []
|
||||||
let reverseListEb = febUserList && febUserList.length > 0 ? febUserList.reverse() : []
|
let reverseListEb = febUserList && febUserList.length > 0 ? febUserList.reverse() : []
|
||||||
|
let reverseListJD = jdUserList && jdUserList.length > 0 ? jdUserList.reverse() : []
|
||||||
|
|
||||||
reverseList.map((element: any) => {
|
reverseList.map((element: any) => {
|
||||||
let resData = JSON.parse(element)
|
let resData = JSON.parse(element)
|
||||||
|
|
||||||
@@ -141,6 +145,24 @@ const messageFn = function () {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 京东
|
||||||
|
if(reverseListJD && reverseListJD.length>0){
|
||||||
|
reverseListJD.forEach((element:string) => {
|
||||||
|
let resData = JSON.parse(element)
|
||||||
|
// console.log('京东消息,用户列表',resData)
|
||||||
|
let latestMsgHandler = resData.latestMsg
|
||||||
|
|
||||||
|
let userList = {
|
||||||
|
...resData,
|
||||||
|
latestMsg: latestMsgHandler,
|
||||||
|
latestTime: timeFormatDHM(+new Date(resData.latestTime )),
|
||||||
|
orderInfo: {},
|
||||||
|
orderDesc: ''
|
||||||
|
}
|
||||||
|
newArr.push(userList)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
userListData.value = newArr
|
userListData.value = newArr
|
||||||
} else {
|
} else {
|
||||||
toast('获取信息异常')
|
toast('获取信息异常')
|
||||||
|
|||||||
@@ -22,12 +22,13 @@
|
|||||||
:title="
|
:title="
|
||||||
item.vendorID == 1
|
item.vendorID == 1
|
||||||
? `【美团${item.orderDesc}】${item.userID === '0' ? '群发消息' : item.userID}`
|
? `【美团${item.orderDesc}】${item.userID === '0' ? '群发消息' : item.userID}`
|
||||||
: `【淘宝闪购】${item.userID}`
|
: item.vendorID == 3 ? `【淘宝闪购】${item.userID}` : `【京东】${item.userID}`
|
||||||
"
|
"
|
||||||
:avatar="
|
:avatar="
|
||||||
item.vendorID == 1
|
item.vendorID == 1
|
||||||
? 'https://image.jxc4.com/image/75654ab606494a0efdb0cf7d7ad060d9.png'
|
? 'https://image.jxc4.com/image/75654ab606494a0efdb0cf7d7ad060d9.png'
|
||||||
: 'https://image.jxc4.com/image/6c2f1dfd95890df8ef5e27bde15c4e7f.png'
|
: item.vendorID == 3 ? 'https://image.jxc4.com/image/6c2f1dfd95890df8ef5e27bde15c4e7f.png'
|
||||||
|
: 'https://image.jxc4.com/image/884664b80ffd2eda64a4aab9f4dc402e.png'
|
||||||
"
|
"
|
||||||
:note="item.latestMsg"
|
:note="item.latestMsg"
|
||||||
:time="item.latestTime"
|
:time="item.latestTime"
|
||||||
|
|||||||
@@ -60,8 +60,8 @@
|
|||||||
>若退款造成的损失较大,建议联系顾客,自行上门取回退货。</text
|
>若退款造成的损失较大,建议联系顾客,自行上门取回退货。</text
|
||||||
>
|
>
|
||||||
<view class="btn-root">
|
<view class="btn-root">
|
||||||
<view class="reject" @tap.stop="popup.open()">驳回</view>
|
<view class="reject" @tap.stop="popup.open()" style="width: 86%;font-size: 40rpx;">驳回</view>
|
||||||
<view class="resolve" @tap.stop="handleAgree">同意</view>
|
<view class="resolve" @tap.stop="handleAgree" style="width: 14%;">同意</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 查看详情 -->
|
<!-- 查看详情 -->
|
||||||
<view class="detail-btn">查看详情</view>
|
<view class="detail-btn" style="font-size: 40rpx;">查看详情</view>
|
||||||
|
|
||||||
<!-- 提示内容 -->
|
<!-- 提示内容 -->
|
||||||
<view class="tips-text">
|
<view class="tips-text">
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ const cancelTime = ref<any>()
|
|||||||
const timer = ref<any>()
|
const timer = ref<any>()
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
if (props.item.lockStatus === -5) {
|
if (props.item.lockStatus === -5) {
|
||||||
let { purchaseVendorInfo } = store.state.serveInfo.sysInfo as any
|
let { purchaseVendorInfo } = store.state.serveInfo.serviceInfo as any
|
||||||
let { userApplyCancelWaitMinute } = purchaseVendorInfo[props.item.vendorID]
|
let { userApplyCancelWaitMinute } = purchaseVendorInfo[props.item.vendorID]
|
||||||
let cancelTime1 =
|
let cancelTime1 =
|
||||||
new Date(props.item.lockStatusTime).getTime() +
|
new Date(props.item.lockStatusTime).getTime() +
|
||||||
|
|||||||
@@ -35,9 +35,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 自提订单 -->
|
<!-- 自提订单 -->
|
||||||
<view class="self-order self" v-if="item.deliveryType === 'self'"
|
<view class="self-order self" v-if="item.deliveryType === 'self'">[自提订单]</view>
|
||||||
>[自提订单]</view
|
|
||||||
>
|
|
||||||
|
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<view class="operation">
|
<view class="operation">
|
||||||
@@ -60,7 +58,10 @@
|
|||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 商家自送送达按钮 status 20 -->
|
<!-- 商家自送送达按钮 status 20
|
||||||
|
石总,要求,自送订单,填了骑手名字的,隐藏该送达操作
|
||||||
|
给技术人员保留权限
|
||||||
|
-->
|
||||||
<template v-if="isConfrim">
|
<template v-if="isConfrim">
|
||||||
<div class="btn-picked" @tap.stop="handleSelfDelivered">
|
<div class="btn-picked" @tap.stop="handleSelfDelivered">
|
||||||
确认送达
|
确认送达
|
||||||
@@ -95,6 +96,7 @@ import orderListTop from '../component/orderListTop.vue'
|
|||||||
import orderMoney from '../component/orderMoney.vue'
|
import orderMoney from '../component/orderMoney.vue'
|
||||||
import { store } from '@/store'
|
import { store } from '@/store'
|
||||||
import order from '@/api/https/order'
|
import order from '@/api/https/order'
|
||||||
|
import { getStorage } from '@/utils/storage'
|
||||||
const {
|
const {
|
||||||
orderDetail, // 订单详情
|
orderDetail, // 订单详情
|
||||||
deliverManager, // 配送管理
|
deliverManager, // 配送管理
|
||||||
@@ -123,12 +125,17 @@ const wbVendor = computed(() => {
|
|||||||
* 计算属性展示确认送达按钮
|
* 计算属性展示确认送达按钮
|
||||||
*/
|
*/
|
||||||
const isConfrim = computed(() => {
|
const isConfrim = computed(() => {
|
||||||
return (
|
let flag = false
|
||||||
(props.item.deliveryFlag & 3) === 3 &&
|
if(props.item.deliveryType === 'self' && props.item.courierMobile){
|
||||||
|
// 给后端操作人员保留一个操作接口
|
||||||
|
flag = getStorage('mobile') === '18981810340' ? true : false
|
||||||
|
}else{
|
||||||
|
flag = (props.item.deliveryFlag & 3) === 3 &&
|
||||||
props.item.lockStatus === 0 &&
|
props.item.lockStatus === 0 &&
|
||||||
props.item.deliveryType !== 'self' &&
|
props.item.deliveryType !== 'self' &&
|
||||||
!props.item.vendorWaybillID
|
!props.item.vendorWaybillID
|
||||||
)
|
}
|
||||||
|
return flag
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -151,8 +151,6 @@
|
|||||||
mobile: mobile.value,
|
mobile: mobile.value,
|
||||||
}
|
}
|
||||||
let res = await login.add_auth_bind(data)
|
let res = await login.add_auth_bind(data)
|
||||||
console.log('绑定成功后,返回的信息',res)
|
|
||||||
debugger
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
setStorage('token', authToken)
|
setStorage('token', authToken)
|
||||||
newTOken()
|
newTOken()
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ function setUp() {
|
|||||||
})
|
})
|
||||||
async function getStoreMsg() {
|
async function getStoreMsg() {
|
||||||
// 读取vuex 中的 store 数据
|
// 读取vuex 中的 store 数据
|
||||||
|
await store.dispatch('storeInfo/getOneStore', getStorage("storeID"))
|
||||||
smsNotify.value = store.state.storeInfo.allStoreInfo.smsNotify
|
smsNotify.value = store.state.storeInfo.allStoreInfo.smsNotify
|
||||||
printerDisabled.value = store.state.storeInfo.allStoreInfo.printerDisabled
|
printerDisabled.value = store.state.storeInfo.allStoreInfo.printerDisabled
|
||||||
// 获取第三方美团门店
|
// 获取第三方美团门店
|
||||||
@@ -60,6 +61,9 @@ function setUp() {
|
|||||||
let ebStataus = store.state.storeInfo.imOnlineStatus.filter(item => item.vendorID === 3)
|
let ebStataus = store.state.storeInfo.imOnlineStatus.filter(item => item.vendorID === 3)
|
||||||
imEbStoreStatus.value = ebStataus[0].imStatus
|
imEbStoreStatus.value = ebStataus[0].imStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let jxStore = store.state.storeInfo.allStoreInfo.StoreMaps.find((item: { vendorID: number }) => item.vendorID === 9)
|
||||||
|
if(jxStore && JSON.stringify(jxStore) !== '{}') isDeliverSelf.value = jxStore.deliverySelf === 1
|
||||||
}
|
}
|
||||||
// 网络打印机
|
// 网络打印机
|
||||||
netPrinter.value = (store.state.serveInfo.serviceInfo as any).printerVendorInfo
|
netPrinter.value = (store.state.serveInfo.serviceInfo as any).printerVendorInfo
|
||||||
@@ -103,6 +107,9 @@ function setUp() {
|
|||||||
// IM单聊状态是否开启
|
// IM单聊状态是否开启
|
||||||
const imEbStoreStatus = ref<number>(0)
|
const imEbStoreStatus = ref<number>(0)
|
||||||
|
|
||||||
|
// 门店是否可自提
|
||||||
|
const isDeliverSelf = ref<boolean>(false)
|
||||||
|
|
||||||
// 美团门店信息
|
// 美团门店信息
|
||||||
const mtStoreInfo = ref<AnyObject>({})
|
const mtStoreInfo = ref<AnyObject>({})
|
||||||
|
|
||||||
@@ -500,6 +507,19 @@ function setUp() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***************************************************
|
||||||
|
* 修改自提的类型
|
||||||
|
*/
|
||||||
|
async function switchJxDeliverySelf(e:AnyObject) {
|
||||||
|
let res = await merchant.update_store_vendor_map({
|
||||||
|
storeID:getStorage('storeID'),
|
||||||
|
vendorID:9,
|
||||||
|
payload:JSON.stringify({
|
||||||
|
isDeliverySelf:e.detail.value ? 1 : 0
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
copyRight, // 京西版权信息
|
copyRight, // 京西版权信息
|
||||||
@@ -520,6 +540,8 @@ function setUp() {
|
|||||||
switchprinterDisabled, // 网络打印机禁用开关
|
switchprinterDisabled, // 网络打印机禁用开关
|
||||||
imMtStoreStatus, // IM单聊状态是否开启
|
imMtStoreStatus, // IM单聊状态是否开启
|
||||||
imEbStoreStatus, // IM单聊状态是否开启 饿百
|
imEbStoreStatus, // IM单聊状态是否开启 饿百
|
||||||
|
isDeliverSelf, // 京西
|
||||||
|
switchJxDeliverySelf, // 切换自送
|
||||||
switchImMtStoreStatus, // 更改IM单聊门店状态
|
switchImMtStoreStatus, // 更改IM单聊门店状态
|
||||||
isExistMtStore, // 是否绑定美团门店
|
isExistMtStore, // 是否绑定美团门店
|
||||||
isExistEbStore, // 是否绑定饿百门店
|
isExistEbStore, // 是否绑定饿百门店
|
||||||
|
|||||||
@@ -152,6 +152,15 @@
|
|||||||
<view>营业时间设置</view>
|
<view>营业时间设置</view>
|
||||||
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
|
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item" >
|
||||||
|
<view>自提(仅京西)</view>
|
||||||
|
<switch
|
||||||
|
:checked="isDeliverSelf"
|
||||||
|
@change="switchJxDeliverySelf($event)"
|
||||||
|
color="#4EB331"
|
||||||
|
style="zoom: 0.85"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
<view class="item" v-if="isExistEbStore" @tap="jumpInvoiceSet">
|
<view class="item" v-if="isExistEbStore" @tap="jumpInvoiceSet">
|
||||||
<view>发票设置(淘宝闪购)</view>
|
<view>发票设置(淘宝闪购)</view>
|
||||||
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
|
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
|
||||||
@@ -232,6 +241,8 @@ const {
|
|||||||
switchprinterDisabled, // 网络打印机禁用开关
|
switchprinterDisabled, // 网络打印机禁用开关
|
||||||
imMtStoreStatus, // IM单聊状态是否开启
|
imMtStoreStatus, // IM单聊状态是否开启
|
||||||
imEbStoreStatus, // IM单聊状态是否开启 饿百
|
imEbStoreStatus, // IM单聊状态是否开启 饿百
|
||||||
|
isDeliverSelf, // 京西
|
||||||
|
switchJxDeliverySelf, // 切换自送
|
||||||
switchImMtStoreStatus, // 更改IM单聊门店状态
|
switchImMtStoreStatus, // 更改IM单聊门店状态
|
||||||
isExistMtStore, // 是否绑定美团门店
|
isExistMtStore, // 是否绑定美团门店
|
||||||
isExistEbStore, // 是否绑定饿百门店
|
isExistEbStore, // 是否绑定饿百门店
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ const msgChatFn = function () {
|
|||||||
*/
|
*/
|
||||||
let useData: AnyObject = {}
|
let useData: AnyObject = {}
|
||||||
let ebStore: AnyObject = {}
|
let ebStore: AnyObject = {}
|
||||||
|
let jdStore: AnyObject = {}
|
||||||
let detailTime: any = null // 计时器
|
let detailTime: any = null // 计时器
|
||||||
onLoad((potion: any) => {
|
onLoad((potion: any) => {
|
||||||
let res:any = getStorage('vendorUserInfo')
|
let res:any = getStorage('vendorUserInfo')
|
||||||
@@ -54,13 +55,14 @@ const msgChatFn = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (store.state.storeInfo.allStoreInfo.StoreMaps && store.state.storeInfo.allStoreInfo.StoreMaps.length > 0) ebStore = store.state.storeInfo.allStoreInfo.StoreMaps.find((item: { vendorID: number }) => item.vendorID === 3) // 饿百
|
if (store.state.storeInfo.allStoreInfo.StoreMaps && store.state.storeInfo.allStoreInfo.StoreMaps.length > 0) ebStore = store.state.storeInfo.allStoreInfo.StoreMaps.find((item: { vendorID: number }) => item.vendorID === 3) // 饿百
|
||||||
|
if (store.state.storeInfo.allStoreInfo.StoreMaps && store.state.storeInfo.allStoreInfo.StoreMaps.length > 0) jdStore = store.state.storeInfo.allStoreInfo.StoreMaps.find((item: { vendorID: number }) => item.vendorID === 0) // 京东
|
||||||
|
|
||||||
// 修改标题
|
// 修改标题
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title:
|
title:
|
||||||
useData.vendorID == 1
|
useData.vendorID == 1
|
||||||
? `【美团${useData.orderDesc}】${useData.userID === '0' ? '群发消息' : useData.userID}`
|
? `【美团${useData.orderDesc}】${useData.userID === '0' ? '群发消息' : useData.userID}`
|
||||||
: `【淘宝闪购】${useData.userID}`,
|
: useData.vendorID == 3 ? `【淘宝闪购】${useData.userID}` : `【京东】${useData.userID}`,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取聊天数据
|
// 获取聊天数据
|
||||||
@@ -81,8 +83,8 @@ const msgChatFn = function () {
|
|||||||
async function SetMsgRead() {
|
async function SetMsgRead() {
|
||||||
let venderIDInfo = store.state.storeInfo.vendorStoreIDS
|
let venderIDInfo = store.state.storeInfo.vendorStoreIDS
|
||||||
let data = {
|
let data = {
|
||||||
appID: useData.vendorID === 1 ? venderIDInfo.appID : ebStore.vendorOrgCode,
|
appID: useData.vendorID === 1 ? venderIDInfo.appID : useData.vendorID === 3 ? ebStore.vendorOrgCode : jdStore.vendorOrgCode,
|
||||||
vendorStoreID: useData.vendorID === 1 ? venderIDInfo.MT : ebStore.vendorStoreID,
|
vendorStoreID: useData.vendorID === 1 ? venderIDInfo.MT : useData.vendorID === 3 ? ebStore.vendorStoreID : jdStore.vendorStoreID,
|
||||||
vendorID: "" + useData.vendorID,
|
vendorID: "" + useData.vendorID,
|
||||||
orderID: "" + useData.orderID ? useData.orderID : '0',
|
orderID: "" + useData.orderID ? useData.orderID : '0',
|
||||||
userID: useData.userID
|
userID: useData.userID
|
||||||
@@ -99,9 +101,9 @@ const msgChatFn = function () {
|
|||||||
let venderIDInfo = store.state.storeInfo.vendorStoreIDS
|
let venderIDInfo = store.state.storeInfo.vendorStoreIDS
|
||||||
let data = {
|
let data = {
|
||||||
payLoad: JSON.stringify([{
|
payLoad: JSON.stringify([{
|
||||||
vendorStoreID: useData.vendorID === 1 ? venderIDInfo.MT : ebStore.vendorStoreID,
|
vendorStoreID: useData.vendorID === 1 ? venderIDInfo.MT : useData.vendorID === 3 ? ebStore.vendorStoreID : jdStore.vendorStoreID,
|
||||||
vendorID: "" + useData.vendorID,
|
vendorID: "" + useData.vendorID,
|
||||||
appID: useData.vendorID === 1 ? venderIDInfo.appID : ebStore.vendorOrgCode,
|
appID: useData.vendorID === 1 ? venderIDInfo.appID : useData.vendorID === 3 ? ebStore.vendorOrgCode : jdStore.vendorOrgCode,
|
||||||
userID: useData.userID
|
userID: useData.userID
|
||||||
}])
|
}])
|
||||||
}
|
}
|
||||||
@@ -116,7 +118,7 @@ const msgChatFn = function () {
|
|||||||
(newMsg.splice(chatData.value.length - 1)).forEach((element: any) => {
|
(newMsg.splice(chatData.value.length - 1)).forEach((element: any) => {
|
||||||
let resData = jxParse(element)
|
let resData = jxParse(element)
|
||||||
if (resData.msgContent != undefined) {
|
if (resData.msgContent != undefined) {
|
||||||
let msg_content = resData.msgContent.msg_type == 1 ? analyEmoji(Decrypt(resData.msgContent.msg_content, platformID.value)) : Decrypt(resData.msgContent.msg_content, platformID.value)
|
let msg_content = resData.msgContent.msg_type == 1 || resData.msgContent.msg_type == 11 ? analyEmoji(Decrypt(resData.msgContent.msg_content, platformID.value)) : Decrypt(resData.msgContent.msg_content, platformID.value)
|
||||||
if (resData.msgContent.msg_type == 4) msg_content = resData.msgContent.app_spu_codes // 商品skuid
|
if (resData.msgContent.msg_type == 4) msg_content = resData.msgContent.app_spu_codes // 商品skuid
|
||||||
let msgList = {
|
let msgList = {
|
||||||
sendType: resData.sendType,
|
sendType: resData.sendType,
|
||||||
@@ -131,7 +133,7 @@ const msgChatFn = function () {
|
|||||||
newMsg.forEach((element: any) => {
|
newMsg.forEach((element: any) => {
|
||||||
let resData = jxParse(element)
|
let resData = jxParse(element)
|
||||||
if (resData.msgContent != undefined) {
|
if (resData.msgContent != undefined) {
|
||||||
let msg_content = resData.msgContent.msg_type == 1 ? analyEmoji(Decrypt(resData.msgContent.msg_content, platformID.value)) : Decrypt(resData.msgContent.msg_content, platformID.value)
|
let msg_content = resData.msgContent.msg_type == 1 || resData.msgContent.msg_type == 11 ? analyEmoji(Decrypt(resData.msgContent.msg_content, platformID.value)) : Decrypt(resData.msgContent.msg_content, platformID.value)
|
||||||
if (resData.msgContent.msg_type == 4) msg_content = resData.msgContent.app_spu_codes // 商品skuid
|
if (resData.msgContent.msg_type == 4) msg_content = resData.msgContent.app_spu_codes // 商品skuid
|
||||||
let msgList = {
|
let msgList = {
|
||||||
sendType: resData.sendType,
|
sendType: resData.sendType,
|
||||||
@@ -144,7 +146,7 @@ const msgChatFn = function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else if(useData.vendorID === 3){
|
||||||
// 饿百
|
// 饿百
|
||||||
let newMsg = res.data[`${ebStore.vendorOrgCode}:${ebStore.vendorStoreID}:${useData.vendorID}:${useData.userID}`] || []
|
let newMsg = res.data[`${ebStore.vendorOrgCode}:${ebStore.vendorStoreID}:${useData.vendorID}:${useData.userID}`] || []
|
||||||
if (num === 1) newArr = chatData.value
|
if (num === 1) newArr = chatData.value
|
||||||
@@ -270,6 +272,25 @@ const msgChatFn = function () {
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}else if(useData.vendorID === 0){
|
||||||
|
let newMsg = res.data[`${jdStore.vendorOrgCode}:${jdStore.vendorStoreID}:${useData.vendorID}:${useData.userID}`] || []
|
||||||
|
newMsg.forEach((element:string) => {
|
||||||
|
let resData = jxParse(element)
|
||||||
|
if(resData.msgContent){
|
||||||
|
let msg = JSON.parse(resData.msgContent.extendJsonData)
|
||||||
|
let content = msg.body.type === 'text' ? msg.body.content : msg.body.type === 'image' ? msg.body.url : msg.body.content
|
||||||
|
// console.log(msg,'msg','获取聊天详情,resData',resData,'useData',useData.userID)
|
||||||
|
|
||||||
|
let msgList = {
|
||||||
|
sendType:'jd',
|
||||||
|
...msg,
|
||||||
|
msg_content: msg.body.type === 'text' ? analyEmoji(content) : msg.body.type === 'image' ? content : '未知' ,
|
||||||
|
msg_source: useData.userID === msg.from.pin ? 2 : 1, // 目前全是客户发的消息
|
||||||
|
msg_type: msg.body.type === 'text' ? 1 : msg.body.type === 'image' ? 2 : 99 // 目前只支持文本消息
|
||||||
|
}
|
||||||
|
newArr.push(msgList)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
chatData.value = newArr
|
chatData.value = newArr
|
||||||
@@ -434,11 +455,11 @@ const msgChatFn = function () {
|
|||||||
* 发送数据
|
* 发送数据
|
||||||
*/
|
*/
|
||||||
async function sendClick(msgData: AnyObject) {
|
async function sendClick(msgData: AnyObject) {
|
||||||
let venderIDInfo = useData.vendorID === 1 ? store.state.storeInfo.vendorStoreIDS : ebStore.vendorOrgCode
|
let venderIDInfo = useData.vendorID === 1 ? store.state.storeInfo.vendorStoreIDS : useData.vendorID === 3 ? ebStore.vendorOrgCode : jdStore.vendorOrgCode
|
||||||
let data = {
|
let data = {
|
||||||
sendType: useData.vendorID === 1 ? "mt" : "elm",
|
sendType: useData.vendorID === 1 ? "mt" : useData.vendorID === 3 ? "elm" : 'jd',
|
||||||
app_id: useData.vendorID === 1 ? venderIDInfo.appID : ebStore.vendorOrgCode,
|
app_id: useData.vendorID === 1 ? venderIDInfo.appID : useData.vendorID === 3 ? ebStore.vendorOrgCode : jdStore.vendorOrgCode,
|
||||||
app_poi_code: useData.vendorID === 1 ? venderIDInfo.MT : ebStore.vendorStoreID,
|
app_poi_code: useData.vendorID === 1 ? venderIDInfo.MT : useData.vendorID === 3 ? ebStore.vendorStoreID : jdStore.vendorStoreID,
|
||||||
cts: Math.round(new Date().getTime() / 1000).toString(),
|
cts: Math.round(new Date().getTime() / 1000).toString(),
|
||||||
msg_content: msgData.type === 1 ? analyEmoji(msgData.msg) : msgData.msg,
|
msg_content: msgData.type === 1 ? analyEmoji(msgData.msg) : msgData.msg,
|
||||||
msg_id: Math.round(new Date().getTime()).toString(),
|
msg_id: Math.round(new Date().getTime()).toString(),
|
||||||
@@ -475,7 +496,7 @@ const msgChatFn = function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else if(useData.vendorID === 3) {
|
||||||
let chatDataItem = chatData.value.filter(item => item.msg_source === 2)
|
let chatDataItem = chatData.value.filter(item => item.msg_source === 2)
|
||||||
sendMsg = {
|
sendMsg = {
|
||||||
// platformShopId: ebStore.vendorStoreID,
|
// platformShopId: ebStore.vendorStoreID,
|
||||||
@@ -508,6 +529,44 @@ const msgChatFn = function () {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}else if(useData.vendorID === 0){
|
||||||
|
sendMsg = {
|
||||||
|
vendorOrgCode: jdStore.vendorOrgCode,
|
||||||
|
sendData:JSON.stringify({
|
||||||
|
vendorID: 0,
|
||||||
|
storeId:jdStore.storeID,
|
||||||
|
data:{
|
||||||
|
id: '' + Math.round(new Date().getTime()).toString() + 184572 , // uuid //随机生成一个字符串
|
||||||
|
lang: "zh_CN",
|
||||||
|
type: "chat_message",
|
||||||
|
from: {
|
||||||
|
pin:chatData.value[0].to.pin,
|
||||||
|
app:'im.waiter', // 固定不变
|
||||||
|
clientType:'android'
|
||||||
|
},
|
||||||
|
to: {
|
||||||
|
pin:chatData.value[0].from.pin,
|
||||||
|
app:'im.customer', // 固定不变
|
||||||
|
},
|
||||||
|
body: {
|
||||||
|
type:msgData.type === 1 ? "text" : "image", // 消息类型
|
||||||
|
content:msgData.msg,
|
||||||
|
chatinfo:{
|
||||||
|
venderId:chatData.value[0].body.chatinfo.venderId,
|
||||||
|
askAllocateType:chatData.value[0].body.chatinfo.askAllocateType,
|
||||||
|
sid:chatData.value[0].body.chatinfo.sid,
|
||||||
|
source:chatData.value[0].body.chatinfo.source
|
||||||
|
},
|
||||||
|
template:{
|
||||||
|
source:'dd_msg_583984a984834b1889f853be6e449f39_e66c448b9fbe4704901925d3217081a3' // 文本固定不变 //卡片类消息必传
|
||||||
|
},
|
||||||
|
mt:60,
|
||||||
|
},
|
||||||
|
timestamp:new Date().getTime(), // 时间戳
|
||||||
|
clientTime:new Date().getTime() // 客户端时间
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let res = await message.send_to_vendor(sendMsg)
|
let res = await message.send_to_vendor(sendMsg)
|
||||||
|
|||||||
@@ -117,8 +117,8 @@
|
|||||||
>若退款造成的损失较大,建议联系顾客,自行上门取回退货。</view
|
>若退款造成的损失较大,建议联系顾客,自行上门取回退货。</view
|
||||||
>
|
>
|
||||||
<view class="btn-group">
|
<view class="btn-group">
|
||||||
<text class="refuse" @tap.stop="popup.open()">驳回</text>
|
<text class="refuse" @tap.stop="popup.open()" style="width: 82%;">驳回</text>
|
||||||
<text class="agree" @tap.stop="handleAgree">同意</text>
|
<text class="agree" @tap.stop="handleAgree" style="width: 14%;margin-left: 6rpx;">同意</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 已进行审核操作 -->
|
<!-- 已进行审核操作 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user