Commit cc666f5b by zhangxw

权益单更新客户签名需求开发

1 parent acefcac6
......@@ -215,5 +215,9 @@ module.exports = {
// 攻防明细
defencedetail(data) {
return api.post("dj.api.smartcarlife.app.inspection.defence.detail", data);
},
// 更新客户签名
updateCustomerNameUrlAPI(data) {
return api.post("dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl", data)
}
}
......@@ -295,6 +295,15 @@ Component({
return
},
// 签名
handleSignature(e) {
let { target } = e.currentTarget.dataset
wx.$router.go("signature", {
orderId: target.orderId,
tabIndex: 2
});
},
// 复制链接
copyContractUrl(e) {
if (!e) {
......
......@@ -102,20 +102,26 @@
</view>
<!-- footer -->
<view class="item-footer">
<view>{{item.createdDate}}</view>
<!-- <view>{{item.createdDate}}</view> -->
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{ ((!userInfo.isSuper && userInfo.userType == 2&&item.orderStatus!=4)||(item.orderStatus==2))&&isOrder }}">
<view class="btn_box_class">
<view
class="order-btn default-btn"
bindtap="handleSignature"
data-target="{{ item }}"
data-type="download"
>{{item.customerNameUrl ? '修改客户签名' : '补录客户签名'}}</view>
<view
wx:if="{{ item.orderStatus == '2' }}"
class="order-btn"
class="order-btn default-btn"
bindtap="handlePreviewContract"
data-target="{{ item }}"
data-type="download"
>下载合同</view>
<view
wx:if="{{ item.orderStatus == '2' }}"
class="order-btn default-btn"
class="order-btn"
bindtap="handlePreviewContract"
data-target="{{ item }}"
>{{btnTxt[item.orderStatus]}}</view>
......
......@@ -250,7 +250,7 @@
font-size: var(--fontSize24);
color: #222222;
padding: var(--fontSize20) var(--fontSize32);
border-bottom: var(--fontSize1) solid #E1E2E6;
border-bottom: var(--fontSize1) solid #C3C3C34D;
}
.list .icon-sex {
......@@ -402,7 +402,7 @@
.item-footer {
display: flex;
justify-content: space-between;
justify-content: flex-end;
align-items: center;
font-size: var(--fontSize24);
color: #9B9B9E;
......@@ -424,8 +424,8 @@
color: #FFFFFF;
background: #347BFF;
border-radius: var(--fontSize32);
padding: 0 var(--fontSize40);
margin-right: var(--fontSize10);
padding: 0 var(--fontSize32);
margin-right: var(--fontSize16);
}
.order-btn:last-child{
margin-right: 0;
......@@ -436,7 +436,6 @@
border: var(--fontSize2) solid #347BFF;
border-radius: var(--fontSize32);
color: #347BFF;
margin-left: var(--fontSize30);
}
.list .item .order {
......
......@@ -265,7 +265,7 @@
class="order-btn default-btn padding_20"
bindtap="handleClickBtn"
data-target="{{ item }}"
>去签名</view>
>客户签名</view>
<!-- 已支付/已完成未录单 -->
<view
wx:if="{{ (item.orderStatus == '3' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') || (item.orderStatus == '5' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') }}"
......
import { uploadImg } from '~/api/api'
import { quotationUpgrade, updateOrderStatus } from '../../../api'
import { quotationUpgrade, updateOrderStatus, updateCustomerNameUrlAPI } from '../../../api'
// import api from '../../../carEquityApi'
import carLifeApi from '~/packageEquity/carEquityApi'
Page({
......@@ -35,10 +35,13 @@ Page({
let id = options.id
// let equityGoodsFlag = options.equityGoodsFlag
let orderId = options.orderId
this.getEquityDetail(orderId)
if (options.tabIndex != 2) {
this.getEquityDetail(orderId)
}
this.setData({
id,
orderId,
tabIndex: options.tabIndex // 1数字报价单 2权益提单
// equityGoodsFlag,
})
},
......@@ -205,7 +208,8 @@ Page({
},
cancel() {
// wx.$router.reLaunch('')
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: 1 })
let { tabIndex } = this.data
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: tabIndex || 1 })
},
toFullPage() {
let { id, orderId } = this.data
......@@ -214,6 +218,7 @@ Page({
// 上传图片
toUploadImage(tempFilePaths) {
let _this = this
let { tabIndex } = _this.data
const tempFiles = tempFilePaths
let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType
......@@ -227,8 +232,13 @@ Page({
}).then(res => {
let { data } = res
// _this.saveToHttp(data)
// 更新报价单状态
_this.changeOrderStatus(data)
if (tabIndex == 2) {
// 更新权益单客户签名信息
_this.updateEquityCustomerMessage(data)
} else {
// 更新报价单状态
_this.changeOrderStatus(data)
}
})
},
fail() {
......@@ -236,6 +246,13 @@ Page({
}
})
},
updateEquityCustomerMessage(signUrl) {
let { orderId } = this.data
updateCustomerNameUrlAPI({orderId, customerNameUrl: signUrl}).then(res => {
wx.$util.hideLoading()
wx.$router.go('packageEquity.equityPage', { tabIndex: 2 })
})
},
changeOrderStatus(signUrl) {
let { id, equityGoodsFlag } = this.data
updateOrderStatus({ id, orderStatus: 5, customerNameUrl: signUrl })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!