feat(order): 更新折扣类型为商业折扣并优化表格列宽
- 将现金折扣统一修改为商业折扣 - 调整出库单和发货单表格列宽度以改善显示效果 - 新增 OverflowCopyColumn 组件支持内容省略与复制功能dev_1.0.0
parent
6b3deec414
commit
54c1e03830
|
|
@ -0,0 +1,56 @@
|
||||||
|
<template>
|
||||||
|
<el-table-column v-bind="$attrs">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!-- 允许自定义列内容 -->
|
||||||
|
<slot
|
||||||
|
v-if="$scopedSlots.default"
|
||||||
|
:row="scope.row"
|
||||||
|
:$index="scope.$index"
|
||||||
|
></slot>
|
||||||
|
|
||||||
|
<!-- 默认渲染方案 -->
|
||||||
|
<template v-else>
|
||||||
|
<el-popover
|
||||||
|
placement="top"
|
||||||
|
trigger="hover"
|
||||||
|
popper-class="table-popover"
|
||||||
|
>
|
||||||
|
<!-- 展开内容,可复制 -->
|
||||||
|
<div class="popover-content">
|
||||||
|
{{ scope.row[$attrs.prop] }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 表格单元格:省略显示 -->
|
||||||
|
<div slot="reference" class="cell-ellipsis">
|
||||||
|
{{ scope.row[$attrs.prop] }}
|
||||||
|
</div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "OverflowCopyColumn",
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.cell-ellipsis {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
cursor: text;
|
||||||
|
}
|
||||||
|
.popover-content {
|
||||||
|
user-select: text;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- 全局样式,可放到全局样式文件 -->
|
||||||
|
<style scoped>
|
||||||
|
.table-popover {
|
||||||
|
max-width: 400px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<th v-if="!hidePrice" class="col-price">目录单价(¥)</th>
|
<th v-if="!hidePrice" class="col-price">目录单价(¥)</th>
|
||||||
<th v-if="!hidePrice" class="col-discount">折扣</th>
|
<th v-if="!hidePrice" class="col-discount">折扣</th>
|
||||||
<th class="col-price">单价(¥)</th>
|
<th class="col-price">单价(¥)</th>
|
||||||
<th class="col-discount">现金折扣</th>
|
<th class="col-discount">商业折扣</th>
|
||||||
<th class="col-price">总价(¥)</th>
|
<th class="col-price">总价(¥)</th>
|
||||||
<th class="col-price">折后总价(¥)</th>
|
<th class="col-price">折后总价(¥)</th>
|
||||||
<th class="col-tax">税率(%)</th>
|
<th class="col-tax">税率(%)</th>
|
||||||
|
|
@ -69,7 +69,7 @@
|
||||||
<th v-if="!hidePrice" class="col-price">目录单价(¥)</th>
|
<th v-if="!hidePrice" class="col-price">目录单价(¥)</th>
|
||||||
<th v-if="!hidePrice" class="col-discount">折扣</th>
|
<th v-if="!hidePrice" class="col-discount">折扣</th>
|
||||||
<th class="col-price">单价(¥)</th>
|
<th class="col-price">单价(¥)</th>
|
||||||
<th class="col-discount">现金折扣</th>
|
<th class="col-discount">商业折扣</th>
|
||||||
<th class="col-price">总价(¥)</th>
|
<th class="col-price">总价(¥)</th>
|
||||||
<th class="col-price">折后总价(¥)</th>
|
<th class="col-price">折后总价(¥)</th>
|
||||||
<th class="col-tax">税率(%)</th>
|
<th class="col-tax">税率(%)</th>
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
<th v-if="!hidePrice" class="col-price">目录单价(¥)</th>
|
<th v-if="!hidePrice" class="col-price">目录单价(¥)</th>
|
||||||
<th v-if="!hidePrice" class="col-discount">折扣</th>
|
<th v-if="!hidePrice" class="col-discount">折扣</th>
|
||||||
<th class="col-price">单价(¥)</th>
|
<th class="col-price">单价(¥)</th>
|
||||||
<th class="col-discount">现金折扣</th>
|
<th class="col-discount">商业折扣</th>
|
||||||
<th class="col-price">总价(¥)</th>
|
<th class="col-price">总价(¥)</th>
|
||||||
<th class="col-price">折后总价(¥)</th>
|
<th class="col-price">折后总价(¥)</th>
|
||||||
<th class="col-tax">税率(%)</th>
|
<th class="col-tax">税率(%)</th>
|
||||||
|
|
@ -179,7 +179,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row type="flex" justify="end" align="middle" class="summary-row">
|
<el-row type="flex" justify="end" align="middle" class="summary-row">
|
||||||
<el-col :span="18" style="text-align: center;">
|
<el-col :span="18" style="text-align: center;">
|
||||||
<span style="margin-right: 5px;">现金折扣</span>
|
<span style="margin-right: 5px;">商业折扣</span>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="selectedDiscount"
|
v-model="selectedDiscount"
|
||||||
placeholder="请选择折扣率"
|
placeholder="请选择折扣率"
|
||||||
|
|
|
||||||
|
|
@ -49,15 +49,15 @@
|
||||||
<!-- 数据表格 -->
|
<!-- 数据表格 -->
|
||||||
<el-table v-loading="loading" :data="deliveryList">
|
<el-table v-loading="loading" :data="deliveryList">
|
||||||
<el-table-column label="序号" type="index" width="50" align="center"/>
|
<el-table-column label="序号" type="index" width="50" align="center"/>
|
||||||
<el-table-column label="出库单号" align="center" prop="outerCode" show-overflow-tooltip/>
|
<el-table-column label="出库单号" align="center" width="180" prop="outerCode" show-overflow-tooltip/>
|
||||||
<el-table-column label="物流单号" align="center" prop="logisticsCode" show-overflow-tooltip/>
|
<el-table-column label="物流单号" align="center" width="180" prop="logisticsCode" show-overflow-tooltip/>
|
||||||
<el-table-column label="项目编号" align="center" prop="projectCode" show-overflow-tooltip/>
|
<el-table-column label="项目编号" align="center" width="100" prop="projectCode" show-overflow-tooltip/>
|
||||||
<el-table-column label="合同编号" align="center" prop="orderCode" show-overflow-tooltip/>
|
<el-table-column label="合同编号" align="center" min-width="250" prop="orderCode" show-overflow-tooltip/>
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" show-overflow-tooltip/>
|
<el-table-column label="项目名称" align="center" width="180" prop="projectName" show-overflow-tooltip/>
|
||||||
<el-table-column label="产品编码" align="center" prop="productCode" show-overflow-tooltip/>
|
<el-table-column label="产品编码" align="center" width="180" prop="productCode" show-overflow-tooltip/>
|
||||||
<el-table-column label="产品型号" align="center" prop="model" show-overflow-tooltip/>
|
<el-table-column label="产品型号" align="center" width="180" prop="model" show-overflow-tooltip/>
|
||||||
<el-table-column label="发货数量" align="center" prop="quantity"/>
|
<el-table-column label="发货数量" align="center" width="100" prop="quantity"/>
|
||||||
<el-table-column label="发货方式" align="center" prop="deliveryType">
|
<el-table-column label="发货方式" align="center" width="100" prop="deliveryType">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.delivery_type" :value="scope.row.deliveryType"/>
|
<dict-tag :options="dict.type.delivery_type" :value="scope.row.deliveryType"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -139,7 +139,6 @@ import {
|
||||||
exportDelivery,
|
exportDelivery,
|
||||||
} from "@/api/inventory/delivery";
|
} from "@/api/inventory/delivery";
|
||||||
import DeliveryDetail from "./Detail";
|
import DeliveryDetail from "./Detail";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Delivery",
|
name: "Delivery",
|
||||||
components: {DeliveryDetail},
|
components: {DeliveryDetail},
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
<span>{{ scope.row.deliveryTimeType == '0' ? '立即发货' : scope.row.deliveryTime }}</span>
|
<span>{{ scope.row.deliveryTimeType == '0' ? '立即发货' : scope.row.deliveryTime }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="项目编号" prop="projectCode" width="150" show-overflow-tooltip/>
|
<el-table-column label="项目编号" prop="projectCode" width="100" show-overflow-tooltip/>
|
||||||
<el-table-column label="合同编号" prop="orderCode" width="150" show-overflow-tooltip/>
|
<el-table-column label="合同编号" prop="orderCode" min-width="250" show-overflow-tooltip />
|
||||||
<el-table-column label="项目名称" prop="projectName" width="200" show-overflow-tooltip/>
|
<el-table-column label="项目名称" prop="projectName" width="200" show-overflow-tooltip/>
|
||||||
<el-table-column label="产品编码" prop="productCode" width="150" show-overflow-tooltip/>
|
<el-table-column label="产品编码" prop="productCode" width="150" show-overflow-tooltip/>
|
||||||
<el-table-column label="产品型号" prop="model" width="150" show-overflow-tooltip/>
|
<el-table-column label="产品型号" prop="model" width="150" show-overflow-tooltip/>
|
||||||
|
|
|
||||||
|
|
@ -1307,7 +1307,7 @@ ${
|
||||||
// $('.discount-all').css("display", "none")
|
// $('.discount-all').css("display", "none")
|
||||||
$('.all-total-price').css("border-bottom", "1px solid")
|
$('.all-total-price').css("border-bottom", "1px solid")
|
||||||
}else{
|
}else{
|
||||||
$('.discount-text').text('现金折扣')
|
$('.discount-text').text('商业折扣')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue