<div class="modal fade" tabindex="-1" role="dialog" id="auditOrRecover">
    <div class="modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>
            <div class="modal-body">
                <div class="row" v-if="showAuditPiece.C">
                    <label class="col-1 text-right h4"><span class="badge badge-success">新增</span></label>
                    <label class="col-1 h3 text-success" style="bottom: 0.25rem">
                        <span class="fa fa-long-arrow-right"></span>
                    </label>
                    <div class="col-10 border-bottom border-success">
                        <div v-if="selectedAudit=='storage'" v-for="s in auditList.storage.C">
                            <div><b>@{{ s.name }}</b><span class="text-muted">(@{{ s.counting_type }}-@{{ s.using_type }})</span></div>
                        </div>
                        <div v-if="selectedAudit=='operation'" v-for="s in auditList.operation.C">
                            <div><b>@{{ s.name }}</b><span class="text-muted">(@{{ s.operation_type }}-@{{ s.strategy }})</span></div>
                        </div>
                        <div v-if="selectedAudit=='express'" v-for="s in auditList.express.C">
                            <div><b>@{{ s.name }}</b></div>
                        </div>
                        <div v-if="selectedAudit=='logistic'" v-for="s in auditList.logistic.C">
                            <div><b>@{{ s.name }}</b></div>
                        </div>
                        <div v-if="selectedAudit=='directLogistic'" v-for="s in auditList.directLogistic.C">
                            <div><b>@{{ s.name }}</b><span class="text-muted">(起步：@{{ s.base_km }}KM)</span></div>
                        </div>
                        <div v-if="selectedAudit=='system'">
                            <div>使用费：￥<b>@{{ auditList.system.C.usage_fee }}</b></div>
                        </div>
                    </div>
                </div>
                <div class="row" v-if="showAuditPiece.D">
                    <label class="col-1 text-right h4"><span class="badge badge-danger">删除</span></label>
                    <label class="col-1 h3 text-danger" style="bottom: 0.25rem">
                        <span class="fa fa-long-arrow-right"></span>
                    </label>
                    <div class="col-10 border-bottom border-danger">
                        <div v-if="selectedAudit=='storage'" v-for="s in auditList.storage.D">
                            <table class="table table-sm">
                                <tr class="text-center">
                                    <th>名称</th>
                                    <th>计费类型</th>
                                    <th>用仓类型</th>
                                    <th>最低起租面积</th>
                                    <th>减免类型</th>
                                    <th>减免值</th>
                                    <th>单位</th>
                                    <th>计时单位</th>
                                    <th>数量-单价</th>
                                    <th>税率</th>
                                </tr>
                                <tr>
                                    <td>@{{ s.name }}</td>
                                    <td>@{{ s.counting_type }}</td>
                                    <td>@{{ s.using_type }}</td>
                                    <td>@{{ s.minimum_area }}</td>
                                    <td>@{{ s.discount_type }}</td>
                                    <td>@{{ s.discount_value }}</td>
                                    <td>@{{ s.unit_id }}</td>
                                    <td>@{{ s.time_unit_id }}</td>
                                    <td>
                                        <div class="float-left small">
                                            <span v-for="(a,i) in s.amount_interval" v-if="i!=s.amount_interval.length-1">@{{ a }}-@{{ s.amount_interval[i+1] }}（@{{ s.price[i] }}元）<br></span>
                                            <span>@{{ s.amount_interval[s.amount_interval.length-1] }}&nbsp;+（@{{ s.price[s.amount_interval.length-1] }}元）<br></span>
                                        </div>
                                    </td>
                                    <td>@{{ s.tax_rate_id }}</td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='operation'" v-for="s in auditList.operation.D">
                            <table class="table table-sm">
                                <tr>
                                    <th>名称</th>
                                    <th>作业类型</th>
                                    <th>策略</th>
                                    <th>特征</th>
                                    <th>按单价</th>
                                    <th>按单减免单价</th>
                                    <th>减免值</th>
                                    <th>类型</th>
                                    <th>附加费</th>
                                    <th>附加费单位</th>
                                    <th>封顶费</th>
                                    <th>备注</th>
                                    <th>税率</th>
                                </tr>
                                <tr>
                                    <td>@{{ s.name }}</td>
                                    <td>@{{ s.operation_type }}</td>
                                    <td>@{{ s.strategy }}</td>
                                    <td>@{{ s.feature }}</td>
                                    <td>@{{ s.total_price }}</td>
                                    <td>
                                        <div class="float-left small">
                                            <span v-for="(a,i) in s.total_discount_price">@{{ a }}元<br></span>
                                        </div>
                                    </td>
                                    <td>
                                        <div class="float-left small">
                                            <span v-for="(a,i) in s.discount_count" v-if="i!=s.discount_count.length-1">@{{ a }}-@{{ s.discount_count[i+1] }}<br></span>
                                            <span>@{{ s.discount_count[s.discount_count.length-1] }}&nbsp;+<br></span>
                                        </div>
                                    </td>
                                    <td>@{{ s.type_mark }}</td>
                                    <td>@{{ s.surcharge }}</td>
                                    <td>@{{ s.surcharge_unit_id }}</td>
                                    <td>@{{ s.max_fee }}</td>
                                    <td>@{{ s.remark }}</td>
                                    <td>@{{ s.tax_rate_id }}</td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='express'" v-for="s in auditList.express.D">
                            <table class="table table-sm">
                                <tr>
                                    <th>名称</th>
                                    <th>首重</th>
                                    <th>续重</th>
                                    <th>数量-重量</th>
                                    <th>税率</th>
                                </tr>
                                <tr>
                                    <td>@{{ s.name }}</td>
                                    <td>@{{ s.initial_weight }}</td>
                                    <td>@{{ s.additional_weight }}</td>
                                    <td>
                                        <span v-for="(a,i) in s.amount_interval" v-if="i!=s.amount_interval.length-1">@{{ a }}-@{{ s.amount_interval[i+1] }}/单（
                                            <span v-for="(w,j) in s.weight_interval[i]" v-if="j!=s.weight_interval[i].length">@{{ w }}-@{{ s.weight_interval[i][j+1] }}/KG,</span>
                                            @{{ s.weight_interval[i][s.weight_interval[i].length-1] }}&nbsp;+/KG）<br></span>
                                        <span>@{{ s.amount_interval[s.amount_interval.length-1] }}&nbsp;+/单（
                                            <span v-for="(w,j) in s.weight_interval[s.amount_interval.length-1]" v-if="j!=s.weight_interval[s.amount_interval.length-1].length">@{{ w }}-@{{ s.weight_interval[s.amount_interval.length-1][j+1] }}/KG,</span>
                                            @{{ s.weight_interval[s.amount_interval.length-1][s.weight_interval[s.amount_interval.length-1].length-1] }}&nbsp;+/KG）<br></span>
                                    </td>
                                    <td>@{{ s.tax_rate_id }}</td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='logistic'" v-for="s in auditList.logistic.D">
                            <table class="table table-sm">
                                <tr>
                                    <th>名称</th>
                                    <th>单位一</th>
                                    <th>单位一区间</th>
                                    <th>单位二</th>
                                    <th>单位二区间</th>
                                    <th>提货费</th>
                                    <th>燃油附加费</th>
                                    <th>服务费</th>
                                    <th>税率</th>
                                </tr>
                                <tr>
                                    <td>@{{ s.name }}</td>
                                    <td>@{{ s.unit_id }}</td>
                                    <td>
                                        <span class="small" v-for="u in s.unit_range">@{{ u }}<br></span>
                                    </td>
                                    <td>@{{ s.other_unit_id }}</td>
                                    <td>
                                        <span class="small" v-for="u in s.other_unit_range">@{{ u }}<br></span>
                                    </td>
                                    <td>@{{ s.pick_up_price }}</td>
                                    <td>@{{ s.fuel_price }}</td>
                                    <td>@{{ s.service_price }}</td>
                                    <td>@{{ s.tax_rate_id }}</td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='directLogistic'" v-for="s in auditList.directLogistic.D">
                            <table class="table table-sm">
                                <tr>
                                    <th>名称</th>
                                    <th>起步公里数</th>
                                    <th>税率</th>
                                </tr>
                                <tr>
                                    <td>@{{ s.name }}</td>
                                    <td>@{{ s.base_km }}</td>
                                    <td>@{{ s.tax_rate_id }}</td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='system'">
                            <div>使用费：<b>@{{ auditList.system.D.usage_fee }}</b></div>
                            <div>税率：<b>@{{ auditList.system.D.tax_rate_id }}</b></div>
                            <div>计时单位：<b>@{{ poolMapping.units ? poolMapping.units[auditList.system.D.time_unit_id] : '' }}</b></div>
                        </div>
                    </div>
                </div>
                <div class="row" v-if="showAuditPiece.U">
                    <label class="col-1 text-right h4"><span class="badge badge-primary">修改</span></label>
                    <label class="col-1 h3 text-primary" style="bottom: 0.25rem">
                        <span class="fa fa-long-arrow-right"></span>
                    </label>
                    <div class="col-10">
                        <div v-if="selectedAudit=='storage'" v-for="s in auditList.storage.U">
                            <table class="table table-sm">
                                <tr>
                                    <th v-for="(val,key) in auditList.mapping.storage">@{{ val }}</th>
                                </tr>
                                <tr>
                                    <td v-for="(val,key) in auditList.mapping.storage" v-html="s[key]"></td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='operation'" v-for="s in auditList.operation.U">
                            <table class="table table-sm">
                                <tr>
                                    <th v-for="(val,key) in auditList.mapping.operation" v-if="key!='child'">@{{ val }}</th>
                                    <th v-if="s.items.length>0" class="text-center">子项</th>
                                </tr>
                                <tr>
                                    <td v-for="(val,key) in auditList.mapping.operation" v-if="key!='child'" v-html="s[key]"></td>
                                    <td v-if="s.items.length>0">
                                        <table class="table table-sm">
                                            <tr><th v-for="(val,key) in auditList.mapping.operation.child">@{{ val }}</th></tr>
                                            <tr v-for="item in s.items" :class="item.operation=='C' ? 'bg-success' : (item.operation=='D' ? 'bg-danger' : '')">
                                                <td v-for="(val,key) in auditList.mapping.operation.child" v-html="item[key]"></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='express'" v-for="s in auditList.express.U">
                            <table class="table table-sm">
                                <tr>
                                    <th v-for="(val,key) in auditList.mapping.express" v-if="key!='child'">@{{ val }}</th>
                                    <th v-if="s.details.length>0" class="text-center">子项</th>
                                </tr>
                                <tr>
                                    <td v-for="(val,key) in auditList.mapping.express" v-if="key!='child'" v-html="s[key]"></td>
                                    <td v-if="s.details.length>0">
                                        <table class="table table-sm">
                                            <tr><th v-for="(val,key) in auditList.mapping.express.child">@{{ val }}</th></tr>
                                            <tr v-for="item in s.details" :class="item.operation=='C' ? 'bg-success' : (item.operation=='D' ? 'bg-danger' : '')">
                                                <td v-for="(val,key) in auditList.mapping.express.child" v-html="item[key]"></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='logistic'" v-for="s in auditList.logistic.U">
                            <table class="table table-sm">
                                <tr>
                                    <th v-for="(val,key) in auditList.mapping.logistic" v-if="key!='child'">@{{ val }}</th>
                                    <th v-if="s.details.length>0" class="text-center">子项</th>
                                </tr>
                                <tr>
                                    <td v-for="(val,key) in auditList.mapping.logistic" v-if="key!='child'" v-html="s[key]"></td>
                                    <td v-if="s.details.length>0">
                                        <table class="table table-sm">
                                            <tr><th v-for="(val,key) in auditList.mapping.logistic.child">@{{ val }}</th></tr>
                                            <tr v-for="item in s.details" :class="item.operation=='C' ? 'bg-success' : (item.operation=='D' ? 'bg-danger' : '')">
                                                <td v-for="(val,key) in auditList.mapping.logistic.child" v-html="item[key]"></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='directLogistic'" v-for="s in auditList.directLogistic.U">
                            <table class="table table-sm">
                                <tr>
                                    <th v-for="(val,key) in auditList.mapping.directLogistic" v-if="key!='child'">@{{ val }}</th>
                                    <th v-if="s.details.length>0" class="text-center">子项</th>
                                </tr>
                                <tr>
                                    <td v-for="(val,key) in auditList.mapping.directLogistic" v-if="key!='child'" v-html="s[key]"></td>
                                    <td v-if="s.details.length>0">
                                        <table class="table table-sm">
                                            <tr><th v-for="(val,key) in auditList.mapping.directLogistic.child">@{{ val }}</th></tr>
                                            <tr v-for="item in s.details" :class="item.operation=='C' ? 'bg-success' : (item.operation=='D' ? 'bg-danger' : '')">
                                                <td v-for="(val,key) in auditList.mapping.directLogistic.child" v-html="item[key]"></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div v-if="selectedAudit=='system'">
                            <div v-if="auditList.system.H.usage_fee!=auditList.system.U.usage_fee">
                                <div class="float-left">使用费：</div>
                                <div class="float-left small text-secondary mt-1">@{{ auditList.system.H.usage_fee }}</div>
                                <div class="float-left mt-1 mr-4">
                                    <span class="float-left fa fa-arrow-right text-info ml-2 mr-2"></span>
                                    <div class="float-left small text-primary font-weight-bold">@{{ auditList.system.U.usage_fee }}</div>
                                </div>
                            </div>
                            <div v-if="auditList.system.H.time_unit_id!=auditList.system.U.time_unit_id">
                                <div class="float-left">计时单位：</div>
                                <div class="float-left small text-secondary mt-1">@{{ auditList.system.H.time_unit_id ? auditList.system.H.time_unit_id : '无' }}</div>
                                <div class="float-left mt-1">
                                    <span class="float-left fa fa-arrow-right text-info ml-2 mr-2"></span>
                                    <div class="float-left small text-primary font-weight-bold">@{{ poolMapping.units ? poolMapping.units[auditList.system.D.time_unit_id] : '' }}</div>
                                </div>
                            </div>
                            <div v-if="auditList.system.H.tax_rate_id!=auditList.system.U.tax_rate_id">
                                <div class="float-left">税率：</div>
                                <div class="float-left small text-secondary mt-1">@{{ auditList.system.H.tax_rate_id ? auditList.system.H.tax_rate_id : '无' }}</div>
                                <div class="float-left mt-1">
                                    <span class="float-left fa fa-arrow-right text-info ml-2 mr-2"></span>
                                    <div class="float-left small text-primary font-weight-bold">@{{ auditList.system.U.tax_rate_id }}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button @click="exeAuditOrRecoverModel()" class="float-right btn" :class="isAudit ? 'btn-success' : 'btn-danger'">
                    <label v-if="isAudit">审核内容确认</label>
                    <label v-else>回滚内容确认</label>
                </button>
            </div>
        </div>
    </div>
</div>