Commit cc666f5b by zhangxw

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

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