| | |
| | | <span class="remote-tip"><p class="tip-warn"><i class="el-icon-warning"></i>根据配送里程预计配送时长并展示在小程序下单页面</p></span> |
| | | </div> |
| | | <el-table :data="timeTableData" border stripe> |
| | | <el-table-column label="订单级别"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.fieldA == 1" >标速达</span> |
| | | <span v-if="row.fieldA == 2" >急速达</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="起送里程(公里)"> |
| | | <template slot-scope="{row}"> |
| | | <el-input v-model="row.startDistance" type="number" placeholder="请输入"></el-input> |
| | |
| | | <div class="price-tip"><p class="tip-warn"><i class="el-icon-warning"></i>根据订单中不同运营角色而独立配置不同分成比例</p></div> |
| | | <div class="price-items"> |
| | | <div class="price-item" v-for="(item, index) in shareTableData" :key="index"> |
| | | <span class="price-label">{{item.fieldType === 4 ? '在订单中作为配送员时,' : '其中门店类型为'}}{{item.fieldTypeName}}分成比例为</span> |
| | | <el-input style="width: 100px;" v-model="item.ratio" type="number" placeholder="请输入"></el-input> |
| | | <span class="price-label">{{item.fieldTypeName}}{{item.fieldType === 4 ? '在订单中作为配送员时,' : '门店'}}分成比例为</span> |
| | | <el-input style="width: 100px;" v-model="item.ratio" placeholder="请输入"></el-input> |
| | | <span class="price-unit">%</span> |
| | | </div> |
| | | </div> |
| | |
| | | this.$message.error('请填写所有分成比例') |
| | | return false |
| | | } |
| | | const num = Number(item.ratio) |
| | | if (isNaN(num) || num < 1) { |
| | | this.$message.error(item.fieldTypeName + '分成比例必须大于等于1') |
| | | return false |
| | | } |
| | | const str = String(item.ratio) |
| | | if (str.includes('.')) { |
| | | const decimal = str.split('.')[1] |
| | | if (decimal.length > 1) { |
| | | this.$message.error(item.fieldTypeName + '分成比例最多支持一位小数') |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | return true |
| | | } |