|
@@ -3,11 +3,11 @@
|
|
<!-- <block v-if="TabCur==2"> -->
|
|
<!-- <block v-if="TabCur==2"> -->
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">派车编号</view>
|
|
<view class="title">派车编号</view>
|
|
- <input name="input" v-model="goods.tranCarNo"></input>
|
|
|
|
|
|
+ <input disabled name="input" v-model="goods.tranCarNo"></input>
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">车牌号</view>
|
|
<view class="title">车牌号</view>
|
|
- <input placeholder="请输入车牌号" name="input" v-model="goods.carNo"></input>
|
|
|
|
|
|
+ <input maxlength='7' placeholder="请输入车牌号" name="input" v-model="goods.carNo"></input>
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">司机手机号</view>
|
|
<view class="title">司机手机号</view>
|
|
@@ -23,9 +23,16 @@
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="title">净重(吨)</view>
|
|
<view class="title">净重(吨)</view>
|
|
- <input placeholder="自动计算" type="mobile" name="input" v-model="goods.netWeight"></input>
|
|
|
|
|
|
+ <input placeholder="自动计算" type="mobile" name="input" v-model="goods.loadNetWeight"></input>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="cu-form-group">
|
|
|
|
+ <view class="title">发货日期</view>
|
|
|
|
+ <picker mode="date" :start="startDate" :end="endDate" :value="goods.sendDateStart" @change="DateChange">
|
|
|
|
+ <view class="picker">
|
|
|
|
+ {{goods.sendDateStart}}
|
|
|
|
+ </view>
|
|
|
|
+ </picker>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
<view class="cu-bar bg-white margin-top">
|
|
<view class="cu-bar bg-white margin-top">
|
|
<view class="action">
|
|
<view class="action">
|
|
上传磅单照片
|
|
上传磅单照片
|
|
@@ -33,19 +40,13 @@
|
|
</view>
|
|
</view>
|
|
<view class="cu-form-group">
|
|
<view class="cu-form-group">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
<view class="grid col-4 grid-square flex-sub">
|
|
- <view class="bg-img" v-if="personNoImg != ''" @tap="ViewImage" :data-url="personNoImg">
|
|
|
|
- <image :src="personNoImg" mode="aspectFit"></image>
|
|
|
|
|
|
+ <view class="bg-img" v-if="goods.loadPoundImg != ''" @tap="ViewImage" :data-url="goods.loadPoundImg">
|
|
|
|
+ <image :src="goods.loadPoundImg" mode="aspectFit"></image>
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
|
|
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="0">
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="bg-img" v-if="personNoImg1 != ''" @tap="ViewImage" :data-url="personNoImg1">
|
|
|
|
- <image :src="personNoImg1" mode="aspectFit"></image>
|
|
|
|
- <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="1">
|
|
|
|
- <text class='cuIcon-close'></text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="solids" @tap="ChooseImagePerson" v-if="personNoImg == '' || personNoImg1 == ''">
|
|
|
|
|
|
+ <view class="solids" @tap="ChooseImagePerson" v-if="goods.loadPoundImg == ''">
|
|
<text class='cuIcon-cameraadd'></text>
|
|
<text class='cuIcon-cameraadd'></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -71,12 +72,11 @@
|
|
carNo:'',
|
|
carNo:'',
|
|
grossWeight:'',
|
|
grossWeight:'',
|
|
tare:'',
|
|
tare:'',
|
|
- netWeight:'',
|
|
|
|
- personNoImg:'',
|
|
|
|
- personNoImg1:'',
|
|
|
|
-
|
|
|
|
|
|
+ loadNetWeight:'',
|
|
|
|
+ loadPoundImg:'',
|
|
contractNo:'',
|
|
contractNo:'',
|
|
goodsName:'',
|
|
goodsName:'',
|
|
|
|
+ sendDateStart:'请选择'
|
|
|
|
|
|
},
|
|
},
|
|
carNo:'',
|
|
carNo:'',
|
|
@@ -125,17 +125,28 @@
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapState(['hasLogin','userInfo'])
|
|
|
|
|
|
+ ...mapState(['hasLogin','userInfo']),
|
|
|
|
+ startDate() {
|
|
|
|
+ //限制开始时间;
|
|
|
|
+ //也可以直接限定为当天日期 var date= new Date(); return date
|
|
|
|
+ return new Date(new Date(new Date().toLocaleDateString()).getTime()-(1*60*60*1000))
|
|
|
|
+ },
|
|
|
|
+ endDate() {
|
|
|
|
+ return new Date()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
- this.goods.netWeight =option.netWeight
|
|
|
|
-
|
|
|
|
|
|
+ this.goods.goodsName=option.goodsName
|
|
|
|
+ this.goods.contractNo = option.contractNo
|
|
|
|
+ this.goods.tranCarNo=option.tranCarNo
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ DateChange(e) {
|
|
|
|
+ this.goods.sendDateStart = e.detail.value
|
|
|
|
+ },
|
|
commit1(item){
|
|
commit1(item){
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
|
|
url: `/pageB/contract/look?id=${item.id}&netWeight=${item.netWeight}&carNo=${item.carNo}&sendDateStart=${item.sendDateStart}`
|
|
@@ -143,33 +154,66 @@
|
|
},
|
|
},
|
|
grossWeightchange(e) {
|
|
grossWeightchange(e) {
|
|
if (this.goods.grossWeight && this.goods.tare) {
|
|
if (this.goods.grossWeight && this.goods.tare) {
|
|
- this.goods.netWeight = Number(
|
|
|
|
|
|
+ this.goods.loadNetWeight = Number(
|
|
this.goods.grossWeight - this.goods.tare
|
|
this.goods.grossWeight - this.goods.tare
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
tarechange(e) {
|
|
tarechange(e) {
|
|
if (this.goods.grossWeight && this.goods.tare) {
|
|
if (this.goods.grossWeight && this.goods.tare) {
|
|
- this.goods.netWeight = Number(
|
|
|
|
|
|
+ this.goods.loadNetWeight = Number(
|
|
this.goods.grossWeight - this.goods.tare
|
|
this.goods.grossWeight - this.goods.tare
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
getList(){
|
|
getList(){
|
|
- console.log(this.goods,"duixiang")
|
|
|
|
|
|
+ // tranCarNo:'',
|
|
|
|
+ // carNo:'',
|
|
|
|
+ // grossWeight:'',
|
|
|
|
+ // tare:'',
|
|
|
|
+ // loadNetWeight:'',
|
|
|
|
+ // loadPoundImg:'',
|
|
|
|
+ // contractNo:'',
|
|
|
|
+ // goodsName:'',
|
|
|
|
+ if(this.goods.carNo.length==0){
|
|
|
|
+ this.$api.msg('车牌号不能为空')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.goods.carNo.length!=7){
|
|
|
|
+ this.$api.msg('车牌号输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.goods.driverPhone.length==0){
|
|
|
|
+ this.$api.msg('手机号不能为空')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.goods.driverPhone.length!=11){
|
|
|
|
+ this.$api.msg('司机手机号输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.goods.grossWeight>100){
|
|
|
|
+ this.$api.msg('毛重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.goods.tare>50){
|
|
|
|
+ this.$api.msg('皮重输入错误')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
this.$api.doRequest('post','/tranCarInfo/api/addTranTask',this.goods).then(res => {
|
|
this.$api.doRequest('post','/tranCarInfo/api/addTranTask',this.goods).then(res => {
|
|
- console.log("调用接口")
|
|
|
|
- that.sendDisabled = true
|
|
|
|
- let sec = 60
|
|
|
|
- let interval = setInterval(() => {
|
|
|
|
- sec--;
|
|
|
|
- that.sendText = sec + 's后重发'
|
|
|
|
- if (sec <= 0) {
|
|
|
|
- that.sendDisabled = false
|
|
|
|
- that.sendText = "获取验证码"
|
|
|
|
- clearInterval(interval)
|
|
|
|
- }
|
|
|
|
- }, 1000)
|
|
|
|
|
|
+ if(res.data.code==200){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '添加发车信息成功',
|
|
|
|
+ icon:'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ uni.navigateBack();
|
|
|
|
+ }else if(res.data.code==11015){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '该司机未认证身份,请司机认证后再操作',
|
|
|
|
+ icon:'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
|
|
+ }
|
|
})
|
|
})
|
|
.catch(res => {
|
|
.catch(res => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -187,13 +231,11 @@
|
|
success: (res) => {
|
|
success: (res) => {
|
|
//上传图片
|
|
//上传图片
|
|
//图片路径可自行修改
|
|
//图片路径可自行修改
|
|
- uploadImage(res.tempFilePaths[0], 'personNoImg/',
|
|
|
|
|
|
+
|
|
|
|
+ uploadImage(res.tempFilePaths[0], 'loadPoundImg/',
|
|
result => {
|
|
result => {
|
|
- if (this.personNoImg.length != 0) {
|
|
|
|
- this.personNoImg1 = result
|
|
|
|
- } else {
|
|
|
|
- this.personNoImg = result
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ this.goods.loadPoundImg = result
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
}
|
|
}
|
|
)
|
|
)
|
|
@@ -281,305 +323,6 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- commit(){
|
|
|
|
- if (!this.hasLogin) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '登录提示',
|
|
|
|
- content: '您尚未登录,是否立即登录?',
|
|
|
|
- showCancel: true,
|
|
|
|
- confirmText: '登录',
|
|
|
|
- success: (e) => {
|
|
|
|
- if (e.confirm) {
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/public/login'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- fail: () => {},
|
|
|
|
- complete: () => {}
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- const that = this
|
|
|
|
- if(this.TabCur == 0){
|
|
|
|
- if(!that.seller){
|
|
|
|
- this.$api.msg('请填写车牌号');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.sellerPhone){
|
|
|
|
- this.$api.msg('请填写司机手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.exsitCount){
|
|
|
|
- this.$api.msg('请填写毛重');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.minSale){
|
|
|
|
- this.$api.msg('请填写皮重');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- that.saleInfo.seller = that.seller
|
|
|
|
- that.saleInfo.sellerPhone = that.sellerPhone
|
|
|
|
- that.saleInfo.priceType = that.price
|
|
|
|
- that.saleInfo.unitPrice = that.unitPrice
|
|
|
|
- that.saleInfo.minSale = that.minSale
|
|
|
|
- that.saleInfo.exsitCount = that.exsitCount
|
|
|
|
- that.saleInfo.origin = that.origin
|
|
|
|
- that.saleInfo.stock = that.stock
|
|
|
|
- that.saleInfo.verifyCode = that.verifyCode
|
|
|
|
- that.saleInfo.goodsName = that.goodsName
|
|
|
|
- that.saleInfo.buyer = that.buyer
|
|
|
|
- that.saleInfo.buyerPhone = that.buyerPhone
|
|
|
|
- that.saleInfo.level = that.level
|
|
|
|
- }else if(this.TabCur == 1){
|
|
|
|
- if(!that.buyer){
|
|
|
|
- this.$api.msg('请填写买方');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.buyerPhone){
|
|
|
|
- this.$api.msg('请填写手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.goodsName){
|
|
|
|
- this.$api.msg('请填写货名');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.verifyCode){
|
|
|
|
- this.$api.msg('请填写验证码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (!that.price) {
|
|
|
|
- that.$api.msg('请选择价格类型')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.unitPrice){
|
|
|
|
- that.$api.msg('请填写协议价格(元/吨)');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.origin){
|
|
|
|
- this.$api.msg('请填写产地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.stock){
|
|
|
|
- this.$api.msg('请填写库存地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.level){
|
|
|
|
- this.$api.msg('请填写国标等级');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- that.saleInfo.seller = that.seller
|
|
|
|
- that.saleInfo.sellerPhone = that.sellerPhone
|
|
|
|
- that.saleInfo.priceType = that.price
|
|
|
|
- that.saleInfo.unitPrice = that.unitPrice
|
|
|
|
- that.saleInfo.minSale = that.minSale
|
|
|
|
- that.saleInfo.exsitCount = that.exsitCount
|
|
|
|
- that.saleInfo.origin = that.origin
|
|
|
|
- that.saleInfo.stock = that.stock
|
|
|
|
- that.saleInfo.verifyCode = that.verifyCode
|
|
|
|
- that.saleInfo.goodsName = that.goodsName
|
|
|
|
- that.saleInfo.buyer = that.buyer
|
|
|
|
- that.saleInfo.buyerPhone = that.buyerPhone
|
|
|
|
- that.saleInfo.level = that.level
|
|
|
|
- }
|
|
|
|
- else if(this.TabCur == 2){
|
|
|
|
- if(!that.sender){
|
|
|
|
- this.$api.msg('请填写发货方');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.senderPhone){
|
|
|
|
- this.$api.msg('请填写发货方手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.receiver){
|
|
|
|
- this.$api.msg('请填写收货方');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.receiverPhone){
|
|
|
|
- this.$api.msg('请填写收货方手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.goodsName){
|
|
|
|
- this.$api.msg('请填写货名');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.verifyCode){
|
|
|
|
- this.$api.msg('请填写验证码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- that.tran.sender = that.sender
|
|
|
|
- that.tran.senderPhone = that.senderPhone
|
|
|
|
- that.tran.receiver = that.receiver
|
|
|
|
- that.tran.receiverPhone = that.receiverPhone
|
|
|
|
- that.tran.verifyCode = that.verifyCode
|
|
|
|
- that.tran.goodsName = that.goodsName
|
|
|
|
- that.tran.total = that.total
|
|
|
|
- that.tran.price = that.price
|
|
|
|
- that.tran.startPlace = that.startPlace
|
|
|
|
- that.tran.endPlace = that.endPlace
|
|
|
|
- }
|
|
|
|
- else if(this.TabCur == 3){
|
|
|
|
- if(!that.startPlace){
|
|
|
|
- this.$api.msg('请填写起始地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.endPlace){
|
|
|
|
- this.$api.msg('请填写目的地');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.driver){
|
|
|
|
- this.$api.msg('请填写承运人');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.driverPhone){
|
|
|
|
- this.$api.msg('请填写承运人手机号码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!/(^1[3|4|5|7|8][0-9]{9}$)/.test(that.driverPhone)){
|
|
|
|
- that.$api.msg('请输入正确的承运人手机号码');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!that.carNo){
|
|
|
|
- this.$api.msg('请填写车牌号');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if(!that.verifyCode){
|
|
|
|
- this.$api.msg('请填写验证码');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (!that.personNoImg || !that.personNoImg1) {
|
|
|
|
- that.$api.msg('请上传磅单');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (!that.driverNoImg || !that.driverNoImg1) {
|
|
|
|
- that.$api.msg('请上传驾驶证主、副页照片');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (!that.carNoImg || !that.carNoImg1) {
|
|
|
|
- that.$api.msg('请上传行车证主、副页照片');
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- that.tran.driver = that.driver
|
|
|
|
- that.tran.driverPhone = that.driverPhone
|
|
|
|
- that.tran.verifyCode = that.verifyCode
|
|
|
|
- that.tran.price = that.price
|
|
|
|
- that.tran.startPlace = that.startPlace
|
|
|
|
- that.tran.endPlace = that.endPlace
|
|
|
|
- that.tran.carNo = that.carNo
|
|
|
|
- that.tran.personNoImg = that.personNoImg
|
|
|
|
- that.tran.personNoImg1 = that.personNoImg1
|
|
|
|
- that.tran.driverNoImg = that.driverNoImg
|
|
|
|
- that.tran.driverNoImg1 = that.driverNoImg1
|
|
|
|
- that.tran.carNoImg = that.carNoImg
|
|
|
|
- that.tran.carNoImg1 = that.carNoImg1
|
|
|
|
- }
|
|
|
|
- // 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
|
|
|
|
- wx.getSetting({
|
|
|
|
- // withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
|
|
|
|
- success(res){
|
|
|
|
- if(res.authSetting['scope.subscribeMessage']){
|
|
|
|
- uni.openSetting({ // 打开设置页
|
|
|
|
- success(res) {
|
|
|
|
- console.log(res.authSetting)
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }else{// 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
|
|
|
|
- uni.requestSubscribeMessage({
|
|
|
|
- tmplIds: ['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'],//
|
|
|
|
- success (res) {
|
|
|
|
- console.log(res)
|
|
|
|
- if(res['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'] == "accept"){// 字段就是tmplIds模板id
|
|
|
|
- uni.showLoading({
|
|
|
|
- title: '正在提交',
|
|
|
|
- mask:true
|
|
|
|
- })
|
|
|
|
- if(that.TabCur == 0){
|
|
|
|
- that.$api.request('sale', 'addSale',that.saleInfo, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
-
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.sellerPhone,
|
|
|
|
- showCancel: false,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 1){
|
|
|
|
- that.$api.request('sale', 'addBuy',that.saleInfo, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
-
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- showCancel: false,
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.buyerPhone,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 2){
|
|
|
|
- that.$api.request('tran', 'addTran',that.tran, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- showCancel: false,
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.senderPhone,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- else if(that.TabCur == 3){
|
|
|
|
- that.$api.request('tran', 'addCarDriver',that.tran, failres => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- that.$api.msg(failres.errmsg);
|
|
|
|
- }).then(res => {
|
|
|
|
- uni.hideLoading()
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- showCancel: false,
|
|
|
|
- content: "发布提交成功,工作人员会尽快联系该号码:"+that.driverPhone,
|
|
|
|
- confirmText: '确定',
|
|
|
|
- success: () => {
|
|
|
|
- uni.navigateBack()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // that.$api.prePage().refreshList(data, that.manageType);
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|