Commit ec28e2ec by 前端

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

上线合并

See merge request !300
2 parents 7f75c43c e69cb42f
......@@ -59,7 +59,7 @@ Component({
filmOrder: String // 下单类型
},
lifetimes: {
attached() {}
attached() { }
},
/**
* 组件的初始数据
......@@ -260,7 +260,9 @@ Component({
c.disabled = true
if (c.active) {
delete orderObj.merchantCouponId
orderObj.customerCouponId = e.merchantCoupon.id
if (orderObj.customerCouponId == null) {
orderObj.customerCouponId = e.merchantCoupon.id
}
thisPage.setData({
orderObj
})
......
......@@ -201,7 +201,7 @@ export default {
* 获取客户角色
*/
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({
main_point,
roleInspiration,
round,
person_type,
} = this.data;
this.data.isSend = false;
let history_message = this.getHistory();
......@@ -320,6 +321,7 @@ Page({
const { uuid } = wx.$util.getUserInfo();
aiApi
.sparring({
person_type,
user_message,
history_message,
step,
......@@ -380,18 +382,18 @@ Page({
wx.$util.showToast("AI还未回复");
return;
}
// const audioBox = this.selectComponent("#audioBox");
// const list = audioBox.data.list;
// let isCan = true
// list.forEach((i) => {
// if(i.role == 2 && !i.suggestions_for_improvement) {
// isCan = false;
// }
// });
// if (!isCan) {
// wx.$util.showToast("回答分析生产中...");
// return;
// }
const audioBox = this.selectComponent("#audioBox");
const list = audioBox.data.list;
let isCan = true
list.forEach((i) => {
if(i.role == 2 && !i.suggestions_for_improvement) {
isCan = false;
}
});
if (!isCan) {
wx.$util.showToast("回答分析生产中...");
return;
}
const { speakLoading } = this.data;
if (speakLoading) return;
this.setData({
......@@ -476,10 +478,11 @@ Page({
timer = setInterval(() => {
duration++;
}, 1000);
const { sex, avatar, roleName, roleType, attackScript } = options;
const { sex, avatar, roleName, roleType, attackScript,person_type} = options;
this.getScriptList(attackScript);
this.setData({
avatar,
person_type,
sex,
roleName,
roleType,
......
<!--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}}">
<view class="navigation-title">
<view class="navigation-title-text text-hide">驻店延保</view>
......
......@@ -285,6 +285,9 @@ Component({
this.toBottom()
this.stopAudio()
},
/**
* @param index 1代表结束了,不播放音频
*/
setList(val, index) {
const {
list
......
......@@ -25,10 +25,10 @@ Page({
},
jump() {
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
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})
},
......
......@@ -139,7 +139,10 @@ Component({
userInfo: {},
sufferReason: "",
// mode: 0,
showRendering: false
showRendering: false,
repealVisible: false,
repealReason: '',
repealId: ''
},
observers: {
mode: function (value) {
......@@ -331,9 +334,11 @@ Component({
);
}
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.orderStatus == 3 || item.orderStatus == 5) &&
item.mode != 0;
((item.orderStatus == 3 || item.orderStatus == 5) &&
item.mode != 0) || item.onlyRepeal;
return item;
});
this.setData({
......@@ -696,22 +701,51 @@ Component({
//返回角度 /Math.atan()返回数字的反正切值
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) {
const { id } = e.currentTarget.dataset;
console.log(e.currentTarget.dataset, 'e.currentTarget.dataset')
const { id, repeal, status } = e.currentTarget.dataset;
let _this = this;
wx.showModal({
title: "",
content: "是否取撤销该工单?",
confirmText: "是",
confirmColor: "#347BFF",
cancelText: "否",
success(res) {
if (res.confirm) {
// _this.showLoading('取消中...')
_this.repeal(id);
}
},
});
if(repeal && status==-1) {
this.setData({
repealVisible: true,
repealId: id
})
}else{
wx.showModal({
title: "",
content: "是否取撤销该工单?",
confirmText: "是",
confirmColor: "#347BFF",
cancelText: "否",
success(res) {
if (res.confirm) {
// _this.showLoading('取消中...')
_this.repeal(id);
}
},
});
}
},
toCopyNumber(e) {
let { ordernum } = e.currentTarget.dataset;
......@@ -723,13 +757,16 @@ Component({
},
});
},
repeal(id) {
repeal(id , revokeReason) {
let _this = this;
cancelOrderById({
id,
}).then((_res_) => {
let params = {id}
if(revokeReason) {
params.revokeReason = revokeReason
}
cancelOrderById(params).then((_res_) => {
let { code, message } = _res_;
if (code == 0) {
_this.clearData()
wx.showToast({
title: "操作成功",
icon: "success",
......@@ -742,6 +779,13 @@ Component({
}
});
},
clearData() {
this.setData({
repealVisible: false,
repealId: '',
repealReason: ''
})
},
toshowErrorOrder(e) {
const { item } = e.currentTarget.dataset;
this.setData(
......
......@@ -225,11 +225,11 @@
</view>
</block>
</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 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>
......@@ -287,4 +287,24 @@
<view wx:if="{{ showRendering }}">
<order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" status="{{ orderStatus }}" bindconfirm="searchScreen" />
</view>
</page-container>
\ 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
......@@ -813,4 +813,67 @@
.text-hideWidth {
width: calc(100% - 36rpx);
}
\ 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 @@
var dateContrast = function (params) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
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
}
......@@ -10,9 +10,9 @@ var dateContrast = function (params) {
var isShowBtns = function (date) {
var oneDay = 24 * 60 * 60 * 1000 // 一天的毫秒数
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)
return diffDays >= -1
......
......@@ -515,7 +515,8 @@ Page({
outTradeNo,
totalFee,
total,
disabled
disabled,
baseConfigData
} = this.data
orderObj = wx.$util.deepClone(orderObj)
goodsList = wx.$util.deepClone(goodsList)
......@@ -559,7 +560,8 @@ Page({
number: e.count,
// merchantGoodsId: e.id
// merchantGoodsId: e.merchantGoodsId
merchantGoodsId: e.id || e.merchantGoodsId
merchantGoodsId: e.id || e.merchantGoodsId,
upgradeGoodsType: e.upgradeGoodsType // 商品分类
}
if (e.price < e.shopMinPrice) priceDisabled = false
subOrderList.push(obj)
......@@ -613,7 +615,11 @@ Page({
}
console.log(orderObj)
// 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.setData({
disabled: true
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!