|
@@ -12,7 +12,7 @@
|
|
|
<view class="content2">
|
|
|
<view class="flex">
|
|
|
<view class="title">合同摘要</view>
|
|
|
- <view class="preview" @click="submit(1)">预览合同</view>
|
|
|
+ <view class="preview" @click="submit(1)">预览合同</view>
|
|
|
</view>
|
|
|
<view class='row-between'>
|
|
|
<view class="gray">发货单位</view>
|
|
@@ -62,7 +62,9 @@
|
|
|
<view class='row-between'>
|
|
|
<view class="gray">车牌号</view>
|
|
|
<view class="" style="color:#BBBBBB;" @click="carClick">
|
|
|
- {{dataDetails.carrierInfo.carNo?dataDetails.carrierInfo.carNo:'请选择车牌号'}}
|
|
|
+ <!-- {{dataDetails.carrierInfo.carNo?dataDetails.carrierInfo.carNo:'请选择车牌号'}} -->
|
|
|
+ <u--input placeholder="请输入挂车号" border="none" readOnly v-model="dataDetails.carrierInfo.carNo"
|
|
|
+ inputAlign='right' clearable></u--input>
|
|
|
</view>
|
|
|
|
|
|
<!-- <view class="flex">
|
|
@@ -74,7 +76,7 @@
|
|
|
<view class='row-between'>
|
|
|
<view class="gray">挂车号(选填)</view>
|
|
|
<view class="flex">
|
|
|
- <u--input placeholder="请输入挂车号" border="none" disabled v-model="dataDetails.trailerNumber"
|
|
|
+ <u--input placeholder="请输入挂车号" border="none" readOnly v-model="dataDetails.trailerNumber"
|
|
|
inputAlign='right' clearable></u--input>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -100,7 +102,8 @@
|
|
|
<view class="">
|
|
|
<!-- <u--input placeholder="请输入内容" border="none" v-model="dataDetails.value" inputAlign='right'
|
|
|
clearable></u--input> -->
|
|
|
- <view class="" @click="endShow = true">{{dataDetails.tranEndDate?dataDetails.tranEndDate:'请选择运输截止日期'}}
|
|
|
+ <view class="" @click="endShow = true">
|
|
|
+ {{dataDetails.tranEndDate?dataDetails.tranEndDate:'请选择运输截止日期'}}
|
|
|
</view>
|
|
|
<u-calendar :show="endShow" mode="single" @confirm="endDate" @close="endShow= false"></u-calendar>
|
|
|
</view>
|
|
@@ -203,8 +206,10 @@
|
|
|
lineSize: 5, // 笔记倍数
|
|
|
value: true,
|
|
|
dataDetails: {
|
|
|
- carrierInfo: {carNo:'',loadingAdvancePayment:''},
|
|
|
- serviceCharge:'50'
|
|
|
+ carrierInfo: {
|
|
|
+ loadingAdvancePayment: ''
|
|
|
+ },
|
|
|
+ serviceCharge: '50'
|
|
|
},
|
|
|
radiolist1: [{
|
|
|
name: '平台垫付运费',
|
|
@@ -217,8 +222,8 @@
|
|
|
],
|
|
|
startShow: false,
|
|
|
endShow: false,
|
|
|
- contractCheck:false,//判断合同是否提交
|
|
|
- proportion:"",//垫付比例
|
|
|
+ contractCheck: false, //判断合同是否提交
|
|
|
+ proportion: "", //垫付比例
|
|
|
|
|
|
|
|
|
};
|
|
@@ -237,27 +242,28 @@
|
|
|
this.$request.baseRequest('get', '/driverPayeeInfo/getDriverPayee', {
|
|
|
commonId: that.firstAuthentication.commonId
|
|
|
}).then(res => {
|
|
|
- if(res.data){
|
|
|
+ if (res.data) {
|
|
|
this.dataDetails.bankCard = res.data.bankCard
|
|
|
this.dataDetails.bankDeposit = res.data.bankDeposit
|
|
|
this.dataDetails.bankDepositBranch = res.data.bankDepositBranch
|
|
|
this.dataDetails.payeeName = res.data.payeeName
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
this.$request.baseRequest('get', '/commonUser/getSignatureAddress', {
|
|
|
phone: this.userInfo.phone,
|
|
|
- identification:1
|
|
|
+ identification: 1
|
|
|
}).then(res => {
|
|
|
- if(res.data){
|
|
|
- if(res.data.signImg){
|
|
|
+ if (res.data) {
|
|
|
+ if (res.data.signImg) {
|
|
|
// 获取远程图片,canvas无法直接绘制远程图片
|
|
|
+ this.userInfo.signImg = res.data.signImg
|
|
|
uni.getImageInfo({
|
|
|
- src:res.data.signImg,
|
|
|
- success(res){
|
|
|
- var ctx=uni.createCanvasContext('handWriting')
|
|
|
- ctx.drawImage(res.path,0,0,330,244)
|
|
|
+ src: res.data.signImg,
|
|
|
+ success(res) {
|
|
|
+ var ctx = uni.createCanvasContext('handWriting')
|
|
|
+ ctx.drawImage(res.path, 0, 0, 330, 244)
|
|
|
ctx.save()
|
|
|
ctx.draw()
|
|
|
}
|
|
@@ -265,29 +271,31 @@
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
console.log(this.dataDetails)
|
|
|
- this.$set(this.dataDetails.carrierInfo,'carNo',this.dataDetails.carNumber)
|
|
|
+ if (this.dataDetails.carNumber) {
|
|
|
+ this.$set(this.dataDetails.carrierInfo, 'carNo', this.dataDetails.carNumber)
|
|
|
+ }
|
|
|
this.preMoney()
|
|
|
// this.$set(this.dataDetails,'advanceCharge',this.dataDetails.advanceCharge)
|
|
|
// this.$set(this.dataDetails.carrierInfo,'carNo',this.dataDetails.carNo)
|
|
|
console.log(this.dataDetails)
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
-
|
|
|
+
|
|
|
this.carList = []
|
|
|
that = this
|
|
|
// this.dataDetails = JSON.parse(options.obj)
|
|
|
-
|
|
|
+
|
|
|
this.dataDetails = JSON.parse(options.obj)
|
|
|
// console.log(this.dataDetails.carNo,this.dataDetails.carrierInfo)
|
|
|
// this.dataDetails.advanceFreightService = '平台垫付运费'
|
|
|
this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
|
|
|
- if(this.dataDetails.hyCarrierInfo){
|
|
|
- this.dataDetails.weight=this.dataDetails.hyCarrierInfo.loadingWeight
|
|
|
+ if (this.dataDetails.hyCarrierInfo) {
|
|
|
+ this.dataDetails.weight = this.dataDetails.hyCarrierInfo.loadingWeight
|
|
|
}
|
|
|
- if(this.dataDetails.freightAdvance == 1){
|
|
|
- this.proportion = this.dataDetails.driverAdvancePayment >= this.dataDetails.ownerAdvancePayment ? this.dataDetails.ownerAdvancePayment:this.dataDetails.driverAdvancePayment
|
|
|
+ if (this.dataDetails.freightAdvance == 1) {
|
|
|
+ this.proportion = this.dataDetails.driverAdvancePayment >= this.dataDetails.ownerAdvancePayment ? this
|
|
|
+ .dataDetails.ownerAdvancePayment : this.dataDetails.driverAdvancePayment
|
|
|
}
|
|
|
// console.log(this.dataDetails)
|
|
|
this.dataDetails.carrierInfo = {}
|
|
@@ -306,7 +314,7 @@
|
|
|
})
|
|
|
this.$request.baseRequest('get', '/driverCarInfo/selectDriverCar', {
|
|
|
// driverId: that.userInfo.driverId,
|
|
|
- commonId:this.userInfo.id
|
|
|
+ commonId: this.userInfo.id
|
|
|
}).then(res => {
|
|
|
if (res.code == '200') {
|
|
|
uni.hideLoading()
|
|
@@ -329,8 +337,8 @@
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- preMoney(){
|
|
|
- if(this.dataDetails.freightAdvance == 1){
|
|
|
+ preMoney() {
|
|
|
+ if (this.dataDetails.freightAdvance == 1) {
|
|
|
this.dataDetails.advanceCharge = this.dataDetails.freight * this.proportion
|
|
|
}
|
|
|
},
|
|
@@ -352,7 +360,7 @@
|
|
|
carClick() {
|
|
|
this.showCarList = true
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//车牌号弹出键盘
|
|
|
handleShowKeyboard() {
|
|
|
if (!this.dataDetails.carrierInfo.carNo) {
|
|
@@ -395,22 +403,22 @@
|
|
|
},
|
|
|
submit(num) {
|
|
|
let _obj = {}
|
|
|
- if(num == 1){//预览合同
|
|
|
+ if (num == 1) { //预览合同
|
|
|
_obj.submitFlag = 1
|
|
|
this.contractCheck = false
|
|
|
- }else{//提交合同
|
|
|
- this.contractCheck = true
|
|
|
+ } else { //提交合同
|
|
|
+ this.contractCheck = true
|
|
|
_obj.submitFlag = 2
|
|
|
+ }
|
|
|
+ if (!that.isScaleStart) {
|
|
|
+ if (!this.userInfo.signImg) {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "手写签名不能为空!",
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
- if (!that.isScaleStart) {
|
|
|
- if(!this.userInfo.signImg){
|
|
|
- that.$refs.uToast.show({
|
|
|
- type: 'error',
|
|
|
- message: "手写签名不能为空!",
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
if (uni.$u.test.isEmpty(that.dataDetails.carrierInfo.carNo)) {
|
|
|
that.$refs.uToast.show({
|
|
@@ -461,8 +469,7 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- console.log(that.dataDetails.advanceCharge)
|
|
|
- if (uni.$u.test.isEmpty(that.dataDetails.advanceCharge)&&that.dataDetails.advanceCharge!=0) {
|
|
|
+ if (uni.$u.test.isEmpty(that.dataDetails.advanceCharge) && that.dataDetails.advanceCharge != 0) {
|
|
|
that.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: "装车后预付款不能为空!",
|
|
@@ -476,7 +483,6 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
_obj.trailerNumber = that.dataDetails.trailerNumber
|
|
|
_obj.tranStartDate = that.dataDetails.tranStartDate
|
|
|
_obj.tranEndDate = that.dataDetails.tranEndDate
|
|
@@ -522,24 +528,26 @@
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- if(that.contractCheck){//提交
|
|
|
- that.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- message: "提交成功",
|
|
|
- complete() {
|
|
|
- uni.removeStorageSync("payInfo") //如果要有银行卡缓存就删除
|
|
|
- uni.$u.route('/pages/order/confirmLoading', {
|
|
|
- obj: JSON.stringify(that
|
|
|
- .dataDetails),
|
|
|
- });
|
|
|
- // that.upCallback({
|
|
|
- // size: 10,
|
|
|
- // num: 1
|
|
|
- // })
|
|
|
- }
|
|
|
- })
|
|
|
+ if (that.contractCheck) { //提交
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'success',
|
|
|
+ message: "提交成功",
|
|
|
+ complete() {
|
|
|
+ uni.removeStorageSync(
|
|
|
+ "payInfo") //如果要有银行卡缓存就删除
|
|
|
+ uni.$u.route(
|
|
|
+ '/pages/order/confirmLoading', {
|
|
|
+ obj: JSON.stringify(that
|
|
|
+ .dataDetails),
|
|
|
+ });
|
|
|
+ // that.upCallback({
|
|
|
+ // size: 10,
|
|
|
+ // num: 1
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uni.$u.toast(res.message);
|
|
|
uni.hideLoading()
|
|
|
}
|
|
@@ -711,7 +719,8 @@
|
|
|
margin-bottom: 20rpx;
|
|
|
width: 50%;
|
|
|
}
|
|
|
- .preview{
|
|
|
+
|
|
|
+ .preview {
|
|
|
width: 50%;
|
|
|
text-align: right;
|
|
|
color: #2772FB;
|