|
@@ -127,89 +127,89 @@
|
|
</view>
|
|
</view>
|
|
<view class="c-row flex justify-end">
|
|
<view class="c-row flex justify-end">
|
|
<view class='deductfreight' @click="freightDeduction(item)">扣运费</view>
|
|
<view class='deductfreight' @click="freightDeduction(item)">扣运费</view>
|
|
- <view class="freightAlert-model">
|
|
|
|
- <u-modal v-model="freightAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
|
|
|
|
- show-cancel-button=true @confirm="confirmFreight(0,item)">
|
|
|
|
- <view class="freightAlert-warp">
|
|
|
|
- <view class="freightAlert-row">
|
|
|
|
- <view class="title">扣运费</view>
|
|
|
|
- <u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
|
|
|
|
- </view>
|
|
|
|
- <view class="freightAlert-row2 row">
|
|
|
|
- <view>运输损耗</view>
|
|
|
|
- <view>{{item.reciveNetWeight-item.dispatchNetWeight}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="freightAlert-row3 row">
|
|
|
|
- 扣款金额
|
|
|
|
- </view>
|
|
|
|
- <view class="freightAlert-row4">
|
|
|
|
- <u-input v-model="freightDeductionAmount" :type="type" :border="border"
|
|
|
|
- placeholder="请输入扣款金额" class="uview-border" @input="inputWatch" />
|
|
|
|
- <view class="text">
|
|
|
|
- 元
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="red-tip" v-show="isShowFreightTip">
|
|
|
|
- 扣款金额输入错误/扣款金额不能为空
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class='payfreight' @click="payDeduction(item)">付运费</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-model">
|
|
|
|
+ <u-modal v-model="freightAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
|
|
|
|
+ show-cancel-button=true @confirm="confirmFreight(0,dataList)">
|
|
|
|
+ <view class="freightAlert-warp">
|
|
|
|
+ <view class="freightAlert-row">
|
|
|
|
+ <view class="title">扣运费</view>
|
|
|
|
+ <u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-row2 row">
|
|
|
|
+ <view>运输损耗</view>
|
|
|
|
+ <view>{{dataList.reciveNetWeight-dataList.dispatchNetWeight}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-row3 row">
|
|
|
|
+ 扣款金额
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-row4">
|
|
|
|
+ <u-input v-model="freightDeductionAmount" :type="type" :border="border"
|
|
|
|
+ placeholder="请输入扣款金额" class="uview-border" @input="inputWatch" />
|
|
|
|
+ <view class="text">
|
|
|
|
+ 元
|
|
</view>
|
|
</view>
|
|
- </u-modal>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="red-tip" v-show="isShowFreightTip">
|
|
|
|
+ 扣款金额输入错误/扣款金额不能为空
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class='payfreight' @click="payDeduction()">付运费</view>
|
|
|
|
- <view class="freightAlert-model">
|
|
|
|
- <u-modal v-model="payAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
|
|
|
|
- show-cancel-button=true @confirm="confirmFreight(1,item)">
|
|
|
|
- <view class="freightAlert-warp payAlert">
|
|
|
|
- <view class="freightAlert-row">
|
|
|
|
- <view class="title">付运费</view>
|
|
|
|
- <u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
|
|
|
|
- </view>
|
|
|
|
- <view class="freightAlert-row3 row">
|
|
|
|
- 应付
|
|
|
|
- </view>
|
|
|
|
- <view class="freightAlert-row4">
|
|
|
|
- <u-input v-model="item.freightIngPayable" :type="type" :border="border"
|
|
|
|
- placeholder="请输入付款金额" class="uview-border" @input="paidInputWatch" />
|
|
|
|
- <view class="text">
|
|
|
|
- 元
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="red-tip paid-tip" v-show="isShowPaidTip">
|
|
|
|
- 应付金额不能为空/应付运费不能小于已付运费
|
|
|
|
- </view>
|
|
|
|
- <view class="paid">
|
|
|
|
- <view class="">
|
|
|
|
- 已付
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- {{item.freightEdPayable}}元
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="unpaid">
|
|
|
|
- <view class="">
|
|
|
|
- 未付
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- {{item.freightIngPayable-item.freightEdPayable}}元
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="freightAlert-row3 row">
|
|
|
|
- 付款金额
|
|
|
|
- </view>
|
|
|
|
- <view class="freightAlert-row4">
|
|
|
|
- <u-input v-model="item.money" :type="type" :border="border" placeholder="请输入本次支付运费金额"
|
|
|
|
- class="uview-border" @input="payInputWatch($event,item)" />
|
|
|
|
- <view class="text">
|
|
|
|
- 元
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="red-tip pay-tip" v-show="isShowPayTip">
|
|
|
|
- 付款金额输入错误/付款金额不能超过未付金额/付款金额不能为空
|
|
|
|
- </view>
|
|
|
|
|
|
+ </u-modal>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-model">
|
|
|
|
+ <u-modal v-model="payAlert" cancel-color="#AFB3BF" confirm-color="#22C572" :show-title="false"
|
|
|
|
+ show-cancel-button=true @confirm="confirmFreight(1,dataList)">
|
|
|
|
+ <view class="freightAlert-warp payAlert">
|
|
|
|
+ <view class="freightAlert-row">
|
|
|
|
+ <view class="title">付运费</view>
|
|
|
|
+ <u-icon name="close" class="close" size="20" @click="closeModel"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-row3 row">
|
|
|
|
+ 应付
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-row4">
|
|
|
|
+ <u-input v-model="dataList.freightIngPayable" :type="type" :border="border"
|
|
|
|
+ placeholder="请输入付款金额" class="uview-border" @input="paidInputWatch" />
|
|
|
|
+ <view class="text">
|
|
|
|
+ 元
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="red-tip paid-tip" v-show="isShowPaidTip">
|
|
|
|
+ 应付金额不能为空/应付运费不能小于已付运费
|
|
|
|
+ </view>
|
|
|
|
+ <view class="paid">
|
|
|
|
+ <view class="">
|
|
|
|
+ 已付
|
|
|
|
+ </view>
|
|
|
|
+ <view>
|
|
|
|
+ {{dataList.freightEdPayable}}元
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="unpaid">
|
|
|
|
+ <view class="">
|
|
|
|
+ 未付
|
|
|
|
+ </view>
|
|
|
|
+ <view>
|
|
|
|
+ {{dataList.freightIngPayable-dataList.freightEdPayable}}元
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-row3 row">
|
|
|
|
+ 付款金额
|
|
|
|
+ </view>
|
|
|
|
+ <view class="freightAlert-row4">
|
|
|
|
+ <u-input v-model="dataList.money" :type="type" :border="border" placeholder="请输入本次支付运费金额"
|
|
|
|
+ class="uview-border" @input="payInputWatch($event,dataList)" />
|
|
|
|
+ <view class="text">
|
|
|
|
+ 元
|
|
</view>
|
|
</view>
|
|
- </u-modal>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <view class="red-tip pay-tip" v-show="isShowPayTip">
|
|
|
|
+ 付款金额输入错误/付款金额不能超过未付金额/付款金额不能为空
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
|
|
+ </u-modal>
|
|
</view>
|
|
</view>
|
|
<view class='footer'>
|
|
<view class='footer'>
|
|
<button class="btn" @click="commit()">添加发车信息</button>
|
|
<button class="btn" @click="commit()">添加发车信息</button>
|
|
@@ -247,7 +247,14 @@
|
|
isShowFreightTip: false,
|
|
isShowFreightTip: false,
|
|
isShowPaidTip: false,
|
|
isShowPaidTip: false,
|
|
isShowPayTip: false,
|
|
isShowPayTip: false,
|
|
- id: ""
|
|
|
|
|
|
+ id: "",
|
|
|
|
+ dataList:{
|
|
|
|
+ reciveNetWeight:"",
|
|
|
|
+ dispatchNetWeight:"",
|
|
|
|
+ freightEdPayable:"",
|
|
|
|
+ freightIngPayable:"",
|
|
|
|
+ freightEdPayable:""
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
@@ -270,7 +277,7 @@
|
|
methods: {
|
|
methods: {
|
|
commit() {
|
|
commit() {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/pageA/freightTransport/contract_detail?id=' + this.purchaseOrder.batch
|
|
|
|
|
|
+ url: '/pageA/freightTransport/contract_detail?id=' + this.id+'&batch='+this.purchaseOrder.batch
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 查看磅单
|
|
// 查看磅单
|
|
@@ -281,18 +288,18 @@
|
|
this.isShowSViewPoundList = true
|
|
this.isShowSViewPoundList = true
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- confirmFreight(flag, val) {
|
|
|
|
|
|
+ confirmFreight(flag,val) {
|
|
if (flag == 1) {
|
|
if (flag == 1) {
|
|
val.money = parseInt(val.money);
|
|
val.money = parseInt(val.money);
|
|
|
|
+ val.freightIngPayable = parseInt(val.freightIngPayable);
|
|
} else {
|
|
} else {
|
|
val.freightDeductionAmount = parseInt(this.freightDeductionAmount);
|
|
val.freightDeductionAmount = parseInt(this.freightDeductionAmount);
|
|
}
|
|
}
|
|
- val.freightIngPayable = parseInt(val.freightIngPayable);
|
|
|
|
val.flag = flag
|
|
val.flag = flag
|
|
this.$api.doRequest('post', 'freightReceivingDispatching/api/paymentAndDeductionfreight', val).then(
|
|
this.$api.doRequest('post', 'freightReceivingDispatching/api/paymentAndDeductionfreight', val).then(
|
|
res => {
|
|
res => {
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
- location.reload()
|
|
|
|
|
|
+ window.location.reload()
|
|
}
|
|
}
|
|
|
|
|
|
}).catch(res => {
|
|
}).catch(res => {
|
|
@@ -315,8 +322,8 @@
|
|
this.isShowPaidTip = false
|
|
this.isShowPaidTip = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- payInputWatch(e, item) {
|
|
|
|
- let _val = this.checkVal(e, "pay", item);
|
|
|
|
|
|
+ payInputWatch(e, dataList) {
|
|
|
|
+ let _val = this.checkVal(e, "pay", dataList);
|
|
if (_val) {
|
|
if (_val) {
|
|
this.isShowPayTip = true
|
|
this.isShowPayTip = true
|
|
} else {
|
|
} else {
|
|
@@ -326,13 +333,19 @@
|
|
// 扣运费
|
|
// 扣运费
|
|
freightDeduction(item) {
|
|
freightDeduction(item) {
|
|
this.freightAlert = true;
|
|
this.freightAlert = true;
|
|
- item.freightDeductionAmount = ""
|
|
|
|
|
|
+ this.dataList.freightDeductionAmount = ""
|
|
|
|
+ this.dataList.reciveNetWeight=item.reciveNetWeight
|
|
|
|
+ this.dataList.dispatchNetWeight=item.dispatchNetWeight
|
|
console.log("扣运费")
|
|
console.log("扣运费")
|
|
},
|
|
},
|
|
// 付运费
|
|
// 付运费
|
|
- payDeduction() {
|
|
|
|
|
|
+ payDeduction(item) {
|
|
console.log("付运费")
|
|
console.log("付运费")
|
|
this.payAlert = true
|
|
this.payAlert = true
|
|
|
|
+ this.dataList.id =item.id
|
|
|
|
+ this.dataList.freightEdPayable=item.freightEdPayable
|
|
|
|
+ this.dataList.freightIngPayable=item.freightIngPayable
|
|
|
|
+ this.dataList.freightEdPayable=item.freightEdPayable
|
|
},
|
|
},
|
|
|
|
|
|
//判断输入值
|
|
//判断输入值
|