|
@@ -52,6 +52,16 @@
|
|
|
<view class="gray">收费比例(%)</view>
|
|
|
<view class="">{{chargeProportion}}</view><!-- 暂时写死6% -->
|
|
|
</view>
|
|
|
+ <view style='color:#6A6A6A;margin-top:20px;font-size:30rpx;align-items: center;' class="flex">
|
|
|
+ <u--image style='margin-right:3px;position:relative;top:1rpx;' @click='consent'
|
|
|
+ :src="consentStatus==true?'../../static/images/mine/duihao@2x.png':'../../static/images/mine/wxz.png'"
|
|
|
+ width="17px" height="17px"></u--image>
|
|
|
+ 我已阅读并同意
|
|
|
+ <view>
|
|
|
+ <u--text type="primary" text="《货物运输委托协议》" @click="lookContract"></u--text>
|
|
|
+ </view>
|
|
|
+ 条款
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="wrapper content3">
|
|
|
<view class="qm-row">
|
|
@@ -67,19 +77,20 @@
|
|
|
<view class="handRight">
|
|
|
|
|
|
</view>
|
|
|
- <view class="handBtn">
|
|
|
- <!-- <image @click="selectColorEvent('black','#1A1A1A')"
|
|
|
- :src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
|
|
|
- :class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
|
|
|
- <image @click="selectColorEvent('red','#ca262a')"
|
|
|
- :src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
|
|
|
- :class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image> -->
|
|
|
-
|
|
|
- <!-- <button @click="saveCanvasAsImg" class="saveBtn">保存</button> -->
|
|
|
- <view @click="$u.throttle(submit, 1000)" class="saveBtn">提交</view>
|
|
|
- <!-- <button @click="previewCanvasImg" class="previewBtn">预览</button> -->
|
|
|
- <!-- <button @click="subCanvas" class="subBtn">完成</button> -->
|
|
|
- </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="handBtn">
|
|
|
+ <!-- <image @click="selectColorEvent('black','#1A1A1A')"
|
|
|
+ :src="selectColor === 'black' ? '/static/other/color_black_selected.png' : '/static/other/color_black.png'"
|
|
|
+ :class="[selectColor === 'black' ? 'color_select' : '', 'black-select']"></image>
|
|
|
+ <image @click="selectColorEvent('red','#ca262a')"
|
|
|
+ :src="selectColor === 'red' ? '/static/other/color_red_selected.png' : '/static/other/color_red.png'"
|
|
|
+ :class="[selectColor === 'red' ? 'color_select' : '', 'black-select']"></image> -->
|
|
|
+
|
|
|
+ <!-- <button @click="saveCanvasAsImg" class="saveBtn">保存</button> -->
|
|
|
+ <view @click="$u.throttle(submit, 1000)" class="saveBtn">提交</view>
|
|
|
+ <!-- <button @click="previewCanvasImg" class="previewBtn">预览</button> -->
|
|
|
+ <!-- <button @click="subCanvas" class="subBtn">完成</button> -->
|
|
|
</view>
|
|
|
<u-toast ref="uToast"></u-toast>
|
|
|
</view>
|
|
@@ -110,7 +121,7 @@
|
|
|
value: true,
|
|
|
dataDetails: {
|
|
|
carrierInfo: {},
|
|
|
- serviceCharge:'50'
|
|
|
+ serviceCharge: '50'
|
|
|
},
|
|
|
radiolist1: [{
|
|
|
name: '平台垫付运费',
|
|
@@ -121,7 +132,10 @@
|
|
|
disabled: false
|
|
|
},
|
|
|
],
|
|
|
- chargeProportion:"",//收费比例
|
|
|
+ chargeProportion: "", //收费比例
|
|
|
+ consentStatus: false,
|
|
|
+ codestatus: false,
|
|
|
+ addType: "",
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -135,10 +149,10 @@
|
|
|
}).then(res => {
|
|
|
uni.setStorageSync("firstAuthentication", res.data)
|
|
|
//收费比例从缓存中取
|
|
|
- that.chargeProportion =uni.getStorageSync("firstAuthentication").chargeProportion*100
|
|
|
+ that.chargeProportion = uni.getStorageSync("firstAuthentication").chargeProportion * 100
|
|
|
})
|
|
|
-
|
|
|
this.dataDetails = JSON.parse(decodeURIComponent(options.obj))
|
|
|
+ this.addType = JSON.parse(decodeURIComponent(options.type))
|
|
|
// this.dataDetails.advanceFreightService = '平台垫付运费'
|
|
|
this.ctx = uni.createCanvasContext("handWriting");
|
|
|
this.$nextTick(() => {
|
|
@@ -184,6 +198,28 @@
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ lookContract() {
|
|
|
+ uni.downloadFile({
|
|
|
+ url: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/pcfiles/hzContract.pdf",
|
|
|
+ success: function(res) {
|
|
|
+ var filePath = res.tempFilePath;
|
|
|
+ uni.openDocument({
|
|
|
+ filePath: filePath,
|
|
|
+ showMenu: true,
|
|
|
+ success: function(res) {
|
|
|
+ console.log('打开文档成功');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ consent() {
|
|
|
+ this.consentStatus = !this.consentStatus
|
|
|
+ uni.setStorage({
|
|
|
+ key: 'policyStorageKey',
|
|
|
+ data: this.consentStatus
|
|
|
+ });
|
|
|
+ },
|
|
|
submit() {
|
|
|
if (!that.isScaleStart) {
|
|
|
that.$refs.uToast.show({
|
|
@@ -199,15 +235,22 @@
|
|
|
// })
|
|
|
// return
|
|
|
// }
|
|
|
-
|
|
|
+ if (!that.consentStatus) {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: "请阅读并确认协议条款!",
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
uni.canvasToTempFilePath({
|
|
|
canvasId: 'handWriting',
|
|
|
fileType: 'png',
|
|
|
quality: 1, //图片质量
|
|
|
- width:330,
|
|
|
- height:244,
|
|
|
- destWidth:330,
|
|
|
- destHeight:244,
|
|
|
+ width: 330,
|
|
|
+ height: 244,
|
|
|
+ destWidth: 330,
|
|
|
+ destHeight: 244,
|
|
|
success(res) {
|
|
|
console.log(res.tempFilePath, 'canvas生成图片地址');
|
|
|
uploadImage('image', res.tempFilePath, 'appData/',
|
|
@@ -219,52 +262,141 @@
|
|
|
title: '加载中',
|
|
|
mask: true
|
|
|
})
|
|
|
- let _obj = {}
|
|
|
- _obj.id = that.dataDetails.id
|
|
|
- _obj.submitFlag=2
|
|
|
- _obj.typeFlag = 1
|
|
|
- _obj.cargoOwnerAutograph = that.dataDetails.cargoOwnerAutograph
|
|
|
- that.$request.baseRequest('get', '/orderInfo/setPdf', _obj).then(
|
|
|
- res => {
|
|
|
+ if (that.addType == 1) { //新增
|
|
|
+ that.$request.baseRequest('post', '/publishTaskInfo/api/addTask', that
|
|
|
+ .dataDetails).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'storage_saddress'
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'storage_faddress'
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'releaseCargoOwner'
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'releasecompId'
|
|
|
+ });
|
|
|
+ // uni.redirectTo({
|
|
|
+ // url: "/pages/release/release"
|
|
|
+ // })
|
|
|
+ that.dataDetails.id = res.data
|
|
|
+ let _obj = {}
|
|
|
+ _obj.id = that.dataDetails.id
|
|
|
+ _obj.cargoOwnerAutograph = that.dataDetails
|
|
|
+ .cargoOwnerAutograph
|
|
|
+ that.$request.baseRequest('get',
|
|
|
+ '/publishTaskInfo/signContract', _obj).then(
|
|
|
+ res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ if (res.code == 200) {
|
|
|
+
|
|
|
+ // that.contractSrc = res.data
|
|
|
+ // uni.downloadFile({
|
|
|
+ // url: res.data,
|
|
|
+ // success: function(res) {
|
|
|
+ // var filePath = res.tempFilePath;
|
|
|
+ // uni.openDocument({
|
|
|
+ // filePath: filePath,
|
|
|
+ // showMenu: true,
|
|
|
+ // success: function(res) {
|
|
|
+ // console.log('打开文档成功');
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'success',
|
|
|
+ message: "发布成功",
|
|
|
+ complete() {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/order/index'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
uni.hideLoading()
|
|
|
- uni.navigateBack({
|
|
|
- delta:1
|
|
|
+ uni.showToast({
|
|
|
+ title: res.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
})
|
|
|
+ });
|
|
|
+ } else if (that.addType == 2) { //编辑
|
|
|
+ that.$request.baseRequest('post', '/publishTaskInfo/api/editTask', that
|
|
|
+ .dataDetails).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- // that.contractSrc = res.data
|
|
|
- // uni.downloadFile({
|
|
|
- // url: res.data,
|
|
|
- // success: function(res) {
|
|
|
- // var filePath = res.tempFilePath;
|
|
|
- // uni.openDocument({
|
|
|
- // filePath: filePath,
|
|
|
- // showMenu: true,
|
|
|
- // success: function(res) {
|
|
|
- // console.log('打开文档成功');
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- // this.$refs.uToast.show({
|
|
|
- // type: 'success',
|
|
|
- // message: "提交成功",
|
|
|
- // complete() {
|
|
|
- // that.upCallback({
|
|
|
- // size: 10,
|
|
|
- // num: 1
|
|
|
- // })
|
|
|
- // }
|
|
|
- // })
|
|
|
-
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'storage_saddress'
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'storage_faddress'
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'releaseCargoOwner'
|
|
|
+ });
|
|
|
+ uni.removeStorage({
|
|
|
+ key: 'releasecompId'
|
|
|
+ });
|
|
|
+ let _obj = {}
|
|
|
+ _obj.id = that.dataDetails.id
|
|
|
+ _obj.cargoOwnerAutograph = that.dataDetails
|
|
|
+ .cargoOwnerAutograph
|
|
|
+ that.$request.baseRequest('get',
|
|
|
+ '/publishTaskInfo/signContract', _obj).then(
|
|
|
+ res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ if (res.code == 200) {
|
|
|
+ // that.contractSrc = res.data
|
|
|
+ // uni.downloadFile({
|
|
|
+ // url: res.data,
|
|
|
+ // success: function(res) {
|
|
|
+ // var filePath = res.tempFilePath;
|
|
|
+ // uni.openDocument({
|
|
|
+ // filePath: filePath,
|
|
|
+ // showMenu: true,
|
|
|
+ // success: function(res) {
|
|
|
+ // console.log('打开文档成功');
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'success',
|
|
|
+ message: "修改成功",
|
|
|
+ complete() {
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/order/index'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.$u.toast(res.message);
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
- .catch(res => {
|
|
|
- uni.hideLoading()
|
|
|
- uni.$u.toast(res.message);
|
|
|
- });
|
|
|
- }
|
|
|
- )
|
|
|
-
|
|
|
+ .catch(res => {
|
|
|
+ uni.hideLoading()
|
|
|
+ uni.showToast({
|
|
|
+ title: res.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -286,7 +418,7 @@
|
|
|
//设置线条粗细
|
|
|
this.ctx.setLineWidth(this.lineSize)
|
|
|
//设置线条的结束端点样式
|
|
|
- this.ctx.setLineCap("round")//'butt'、'round'、'square'
|
|
|
+ this.ctx.setLineCap("round") //'butt'、'round'、'square'
|
|
|
//开始画笔
|
|
|
this.ctx.beginPath()
|
|
|
},
|
|
@@ -501,13 +633,25 @@
|
|
|
text-align: center;
|
|
|
border-radius: 50rpx;
|
|
|
padding: 20rpx;
|
|
|
+ height: 50rpx;
|
|
|
}
|
|
|
|
|
|
.handBtn {
|
|
|
display: flex;
|
|
|
+ height: 60px;
|
|
|
+ bottom: 0px;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ background-color: #FFFFFF;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
|
|
|
+ uni-navigator {
|
|
|
+ //条款
|
|
|
+ display: inline-block;
|
|
|
+ color: #2772FB;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
.wrapper {
|
|
|
width: 100%;
|