Commit 5fc2c845 authored by dragondean@qq.com's avatar dragondean@qq.com

修复两个bug

parent b2b50e77
......@@ -119,6 +119,7 @@
</div>
<div style="text-align: center" v-else>
<el-button @click="()=>{
$emit('update:dialogVisible',false)
$router.push({path:'/bpm/process-instance/detail',query:{id:this.applyStatus.orderWarehouseApprovalBackVO.formId}})
}">{{$t('审核中')}}</el-button>
<el-button @click="cancellationOfOrder" >{{$t('取消审核')}}</el-button>
......
......@@ -49,7 +49,7 @@
</el-form-item>
<!-- 明佣+暗佣才显示 -->
<el-form-item label="暗佣佣金" v-if="form.commissionType == 3" prop="shadeCommissionAmount" :rules="{type: 'number', max: originPrice.toNumber(), message: '暗佣设置错误', trigger: 'blur'}">
<el-form-item label="暗佣佣金" v-if="form.commissionType == 3" prop="shadeCommissionAmount" :rules="{validator: shadeCommissionValidator, message: '暗佣设置错误', trigger: 'blur'}">
<el-input v-model="form.shadeCommissionAmount" placeholder="" type="number" class="w-100"></el-input>
{{ currencyMap[orderItem.seaFreightCurrency] }} / {{ unitMap[orderItem.seaFreightVolume] }}
</el-form-item>
......@@ -124,7 +124,15 @@ export default {
WorkFlow
},
data() {
let shadeCommissionValidator = (rule, value, callback) => {
if (!Number(value)) return callback(new Error('请输入有效数字'))
let reg = /((^[1-9]\d*)|^0)(\.\d*){0,1}$/;
if (!reg.test(value)) return callback(new Error('请输入有效数字'));
if(Number(value) > this.originPrice) return callback(new Error('暗佣不能超过运费'))
callback();
}
return {
shadeCommissionValidator,
applyType: 3, // 1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
unitList:[],
currencyList:[],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment