Commit ec28e2ec by 前端

Merge branch 'SAAS+V4.41' into 'master'

上线合并

See merge request !300
2 parents 7f75c43c e69cb42f
...@@ -59,7 +59,7 @@ Component({ ...@@ -59,7 +59,7 @@ Component({
filmOrder: String // 下单类型 filmOrder: String // 下单类型
}, },
lifetimes: { lifetimes: {
attached() {} attached() { }
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
...@@ -260,7 +260,9 @@ Component({ ...@@ -260,7 +260,9 @@ Component({
c.disabled = true c.disabled = true
if (c.active) { if (c.active) {
delete orderObj.merchantCouponId delete orderObj.merchantCouponId
orderObj.customerCouponId = e.merchantCoupon.id if (orderObj.customerCouponId == null) {
orderObj.customerCouponId = e.merchantCoupon.id
}
thisPage.setData({ thisPage.setData({
orderObj orderObj
}) })
......
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
* 获取客户角色 * 获取客户角色
*/ */
sparringRole(data) { sparringRole(data) {
return api.post("dj.api.carboutique.ai.sparring.role.info.page", data,[],"/rop-dj-pairexc/router"); return api.post("dj.api.carboutique.ai.sparring.role.info.page", data,[],"/rop-dj-car-boutique/router");
}, },
/** /**
* 对练次数 * 对练次数
......
...@@ -307,6 +307,7 @@ Page({ ...@@ -307,6 +307,7 @@ Page({
main_point, main_point,
roleInspiration, roleInspiration,
round, round,
person_type,
} = this.data; } = this.data;
this.data.isSend = false; this.data.isSend = false;
let history_message = this.getHistory(); let history_message = this.getHistory();
...@@ -320,6 +321,7 @@ Page({ ...@@ -320,6 +321,7 @@ Page({
const { uuid } = wx.$util.getUserInfo(); const { uuid } = wx.$util.getUserInfo();
aiApi aiApi
.sparring({ .sparring({
person_type,
user_message, user_message,
history_message, history_message,
step, step,
...@@ -380,18 +382,18 @@ Page({ ...@@ -380,18 +382,18 @@ Page({
wx.$util.showToast("AI还未回复"); wx.$util.showToast("AI还未回复");
return; return;
} }
// const audioBox = this.selectComponent("#audioBox"); const audioBox = this.selectComponent("#audioBox");
// const list = audioBox.data.list; const list = audioBox.data.list;
// let isCan = true let isCan = true
// list.forEach((i) => { list.forEach((i) => {
// if(i.role == 2 && !i.suggestions_for_improvement) { if(i.role == 2 && !i.suggestions_for_improvement) {
// isCan = false; isCan = false;
// } }
// }); });
// if (!isCan) { if (!isCan) {
// wx.$util.showToast("回答分析生产中..."); wx.$util.showToast("回答分析生产中...");
// return; return;
// } }
const { speakLoading } = this.data; const { speakLoading } = this.data;
if (speakLoading) return; if (speakLoading) return;
this.setData({ this.setData({
...@@ -476,10 +478,11 @@ Page({ ...@@ -476,10 +478,11 @@ Page({
timer = setInterval(() => { timer = setInterval(() => {
duration++; duration++;
}, 1000); }, 1000);
const { sex, avatar, roleName, roleType, attackScript } = options; const { sex, avatar, roleName, roleType, attackScript,person_type} = options;
this.getScriptList(attackScript); this.getScriptList(attackScript);
this.setData({ this.setData({
avatar, avatar,
person_type,
sex, sex,
roleName, roleName,
roleType, roleType,
......
<!--packageEquity/pages/aiCheck/chat/chat.wxml--> <!--packageEquity/pages/aiCheck/chat/chat.wxml-->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar class="chat-bar" showBack="{{false}}" navStyle="{{navStyle}}"> <navigation-bar class="chat-bar" showBack="{{false}}" navStyle="{{navStyle}}">
<view class="navigation-title"> <view class="navigation-title">
<view class="navigation-title-text text-hide">驻店延保</view> <view class="navigation-title-text text-hide">驻店延保</view>
......
...@@ -285,6 +285,9 @@ Component({ ...@@ -285,6 +285,9 @@ Component({
this.toBottom() this.toBottom()
this.stopAudio() this.stopAudio()
}, },
/**
* @param index 1代表结束了,不播放音频
*/
setList(val, index) { setList(val, index) {
const { const {
list list
......
...@@ -25,10 +25,10 @@ Page({ ...@@ -25,10 +25,10 @@ Page({
}, },
jump() { jump() {
const {selectedIndex,customeTypeList} = this.data const {selectedIndex,customeTypeList} = this.data
const {avatar,roleName,roleType,attackScript,roleDetail} = customeTypeList[selectedIndex] const {avatar,roleName,roleType,attackScript,roleDetail,languageStyle} = customeTypeList[selectedIndex]
const sex = /性别:男/.test(roleDetail)?1:0 const sex = /性别:男/.test(roleDetail)?1:0
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/chat/chat?avatar=${avatar}&sex=${sex}&roleName=${roleName}&roleType=${roleType}&attackScript=${attackScript}` url: `/packageEquity/pages/aiCheck/chat/chat?avatar=${avatar}&sex=${sex}&roleName=${roleName}&roleType=${roleType}&attackScript=${attackScript}&person_type=${languageStyle}`
}) })
this.setData({show:false}) this.setData({show:false})
}, },
......
...@@ -139,7 +139,10 @@ Component({ ...@@ -139,7 +139,10 @@ Component({
userInfo: {}, userInfo: {},
sufferReason: "", sufferReason: "",
// mode: 0, // mode: 0,
showRendering: false showRendering: false,
repealVisible: false,
repealReason: '',
repealId: ''
}, },
observers: { observers: {
mode: function (value) { mode: function (value) {
...@@ -331,9 +334,11 @@ Component({ ...@@ -331,9 +334,11 @@ Component({
); );
} }
item.isTouchMove = false; item.isTouchMove = false;
// onlyRepeal 战败且为超管,或者是待报价、待支付的非融合都可撤销
item.onlyRepeal = ((item.orderStatus == 2 || item.orderStatus == 0) || (item.orderStatus == -1 && this.data.userInfo.isSuper)) && item.mode != 0;
item.repeal = item.repeal =
(item.orderStatus == 3 || item.orderStatus == 5) && ((item.orderStatus == 3 || item.orderStatus == 5) &&
item.mode != 0; item.mode != 0) || item.onlyRepeal;
return item; return item;
}); });
this.setData({ this.setData({
...@@ -696,22 +701,51 @@ Component({ ...@@ -696,22 +701,51 @@ Component({
//返回角度 /Math.atan()返回数字的反正切值 //返回角度 /Math.atan()返回数字的反正切值
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI); return (360 * Math.atan(_Y / _X)) / (2 * Math.PI);
}, },
cancelRepeal() {
this.clearData()
},
textareaInput(e) {
let { value } = e.detail
this.setData({
repealReason: value
})
},
confirmRepeal() {
const {repealReason, repealId} = this.data
if(!repealReason){
wx.showToast({
title: '请填写撤销原因',
duration: 2000,
icon: 'none'
})
return
}
this.repeal(repealId, repealReason);
},
toConfirmReturanOrder(e) { toConfirmReturanOrder(e) {
const { id } = e.currentTarget.dataset; console.log(e.currentTarget.dataset, 'e.currentTarget.dataset')
const { id, repeal, status } = e.currentTarget.dataset;
let _this = this; let _this = this;
wx.showModal({ if(repeal && status==-1) {
title: "", this.setData({
content: "是否取撤销该工单?", repealVisible: true,
confirmText: "是", repealId: id
confirmColor: "#347BFF", })
cancelText: "否", }else{
success(res) { wx.showModal({
if (res.confirm) { title: "",
// _this.showLoading('取消中...') content: "是否取撤销该工单?",
_this.repeal(id); confirmText: "是",
} confirmColor: "#347BFF",
}, cancelText: "否",
}); success(res) {
if (res.confirm) {
// _this.showLoading('取消中...')
_this.repeal(id);
}
},
});
}
}, },
toCopyNumber(e) { toCopyNumber(e) {
let { ordernum } = e.currentTarget.dataset; let { ordernum } = e.currentTarget.dataset;
...@@ -723,13 +757,16 @@ Component({ ...@@ -723,13 +757,16 @@ Component({
}, },
}); });
}, },
repeal(id) { repeal(id , revokeReason) {
let _this = this; let _this = this;
cancelOrderById({ let params = {id}
id, if(revokeReason) {
}).then((_res_) => { params.revokeReason = revokeReason
}
cancelOrderById(params).then((_res_) => {
let { code, message } = _res_; let { code, message } = _res_;
if (code == 0) { if (code == 0) {
_this.clearData()
wx.showToast({ wx.showToast({
title: "操作成功", title: "操作成功",
icon: "success", icon: "success",
...@@ -742,6 +779,13 @@ Component({ ...@@ -742,6 +779,13 @@ Component({
} }
}); });
}, },
clearData() {
this.setData({
repealVisible: false,
repealId: '',
repealReason: ''
})
},
toshowErrorOrder(e) { toshowErrorOrder(e) {
const { item } = e.currentTarget.dataset; const { item } = e.currentTarget.dataset;
this.setData( this.setData(
......
...@@ -225,11 +225,11 @@ ...@@ -225,11 +225,11 @@
</view> </view>
</block> </block>
</view> </view>
<view wx:if="{{ item.payType==2 }}" data-id="{{ item.id }}" bind:tap="toConfirmReturanOrder" class="del"> <view wx:if="{{ item.payType==2 || item.onlyRepeal }}" data-id="{{ item.id }}" data-repeal="{{item.onlyRepeal}}" data-status="{{item.orderStatus}}" bind:tap="toConfirmReturanOrder" class="del">
<view>撤销</view> <view>撤销</view>
<view>工单</view> <view>工单</view>
</view> </view>
<view wx:if="{{ item.payType==1 }}" data-item="{{ item }}" bind:tap="toshowErrorOrder" class="del"> <view wx:if="{{ item.payType==1 && !item.onlyRepeal}}" data-item="{{ item }}" bind:tap="toshowErrorOrder" class="del">
<view>错误</view> <view>错误</view>
<view>工单</view> <view>工单</view>
</view> </view>
...@@ -287,4 +287,24 @@ ...@@ -287,4 +287,24 @@
<view wx:if="{{ showRendering }}"> <view wx:if="{{ showRendering }}">
<order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" bindconfirm="searchScreen" /> <order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" bindconfirm="searchScreen" />
</view> </view>
</page-container>
\ No newline at end of file \ No newline at end of file
</page-container>
<view class="repeal-modal" wx:if="{{repealVisible}}">
<view class="repeal-wrap">
<view class="title">
撤销原因
</view>
<view class='textarea-wrap'>
<textarea class='textarea' maxlength="{{30}}" value='{{repealReason}}' focus="{{true}}"
placeholder="请填写撤销工单原因,最多30个字" bindinput='textareaInput' ></textarea>
</view>
<view class="footer">
<view class="btn" bindtap="cancelRepeal">
取消
</view>
<view class="btn" bindtap="confirmRepeal">
确定
</view>
</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -813,4 +813,67 @@ ...@@ -813,4 +813,67 @@
.text-hideWidth { .text-hideWidth {
width: calc(100% - 36rpx); width: calc(100% - 36rpx);
}
\ No newline at end of file \ No newline at end of file
}
.repeal-modal{
background: rgba(0, 0, 0, 0.6);
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 999;
}
.repeal-wrap{
width: 622rpx;
height: 496rpx;
background: #FFFFFF;
border-radius: 20rpx;
transform: translate(-50%, -50%);
position: absolute;
top: 50%;
left: 50%;
padding: 40rpx 0 0;
box-sizing: border-box;
}
.repeal-wrap .title{
font-weight: 600;
font-size: 32rpx;
color: #222222;
text-align: center;
line-height: 48rpx;
}
.repeal-wrap .textarea-wrap{
margin: 40rpx 0;
padding: 0 40rpx ;
width: 100%;
box-sizing: border-box;
}
.repeal-wrap .textarea{
background: #F4F5F7;
width: 100%;
height: 224rpx;
padding: 24rpx;
box-sizing: border-box;
border-radius: 12rpx;
}
.repeal-wrap .footer{
position: absolute;
bottom: 0;
border-top: 2rpx solid #EBEDF0;
display: flex;
width: 100%;
}
.repeal-wrap .footer .btn{
height: 96rpx;
line-height: 96rpx;
flex: 1;
font-weight: 400;
font-size: 32rpx;
color: #333333;
text-align: center;
}
.repeal-wrap .footer .btn:last-child{
color: #3582EE;
border-left: 2rpx solid #EBEDF0;
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var dateContrast = function (params) { var dateContrast = function (params) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数 var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
var currentDate = getDate().getTime() // 当前日期 var currentDate = getDate().getTime() // 当前日期
var targetDate = getDate(params + ' 00:00:00').getTime() // 给定的日期 零点的时间戳 var targetDate = getDate(params).getTime() - (8 * 60 * 60 * 1000) // 给定的日期 零点的时间戳
return targetDate < currentDate + oneDay return targetDate < currentDate + oneDay
} }
...@@ -10,9 +10,9 @@ var dateContrast = function (params) { ...@@ -10,9 +10,9 @@ var dateContrast = function (params) {
var isShowBtns = function (date) { var isShowBtns = function (date) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数 var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
var currentDate = getDate() // 当前日期 var currentDate = getDate() // 当前日期
var targetDate = getDate(date + ' 00:00:00') // 给定的日期 var targetDate = getDate(date) // 给定的日期
// 计算给定日期与当前日期的时间差(以毫秒为单位) // 计算给定日期与当前日期的时间差(以毫秒为单位)
var diffMilliseconds = targetDate - currentDate var diffMilliseconds = (targetDate - 8 * 60 * 60 * 1000) - currentDate // targetDate是当天8点 减去8小时
// 计算时间差对应的天数 // 计算时间差对应的天数
var diffDays = Math.floor(diffMilliseconds / oneDay) var diffDays = Math.floor(diffMilliseconds / oneDay)
return diffDays >= -1 return diffDays >= -1
......
...@@ -515,7 +515,8 @@ Page({ ...@@ -515,7 +515,8 @@ Page({
outTradeNo, outTradeNo,
totalFee, totalFee,
total, total,
disabled disabled,
baseConfigData
} = this.data } = this.data
orderObj = wx.$util.deepClone(orderObj) orderObj = wx.$util.deepClone(orderObj)
goodsList = wx.$util.deepClone(goodsList) goodsList = wx.$util.deepClone(goodsList)
...@@ -559,7 +560,8 @@ Page({ ...@@ -559,7 +560,8 @@ Page({
number: e.count, number: e.count,
// merchantGoodsId: e.id // merchantGoodsId: e.id
// merchantGoodsId: e.merchantGoodsId // merchantGoodsId: e.merchantGoodsId
merchantGoodsId: e.id || e.merchantGoodsId merchantGoodsId: e.id || e.merchantGoodsId,
upgradeGoodsType: e.upgradeGoodsType // 商品分类
} }
if (e.price < e.shopMinPrice) priceDisabled = false if (e.price < e.shopMinPrice) priceDisabled = false
subOrderList.push(obj) subOrderList.push(obj)
...@@ -613,7 +615,11 @@ Page({ ...@@ -613,7 +615,11 @@ Page({
} }
console.log(orderObj) console.log(orderObj)
// return // return
// 校验商品类型 精品补录 出现太阳膜商品
if (this.data.filmOrder == 1) {
let obj = orderObj?.subOrderList?.find(v => v.upgradeGoodsType == 1 || v.upgradeGoodsType == baseConfigData?.selfBuildFilmType) || {}
if (Object.keys(obj).length) return this.showToast('客户档案不匹配补单产品类型')
}
this.showLoading('提交中...') this.showLoading('提交中...')
this.setData({ this.setData({
disabled: true disabled: true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!