增加可修改计费重功能
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
<el-descriptions class="detail-desc" :column="2" border size="small">
|
||||
<el-descriptions-item label="产品">{{ productLabel(detail) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计费重量(kg)">{{ formatWeight(detail.chargeWeight ?? detail.weight) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="原计费重(kg)">{{ formatWeight(detail.weight) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="重量段">{{ detail.weightLabel || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计费时间">{{ detail.bizDate || '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="计价来源">
|
||||
@@ -94,6 +95,7 @@
|
||||
<el-tab-pane label="应收" name="income">
|
||||
<div class="fee-toolbar">
|
||||
<el-button type="primary" plain size="small" icon="Plus" v-hasPermi="['price:billing:feeAdd']" @click="openAddFee">增加费用</el-button>
|
||||
<el-button type="primary" plain size="small" icon="Edit" v-hasPermi="['price:billing:chargeWeightEdit']" :disabled="detail.refundStatus === 'REFUNDED'" @click="openEditCw">修改计费重</el-button>
|
||||
</div>
|
||||
<el-table v-if="incomeFees.length" :data="incomeFees" border size="small" class="fee-table">
|
||||
<el-table-column label="费用名称" min-width="140" show-overflow-tooltip>
|
||||
@@ -171,11 +173,20 @@
|
||||
:edit-row="editFeeRow"
|
||||
@success="onFeeAdded"
|
||||
/>
|
||||
<edit-charge-weight-dialog
|
||||
v-model="editCwOpen"
|
||||
:bill-id="detail?.billId || ''"
|
||||
:order-no="detail?.orderNo || ''"
|
||||
:origin-weight="detail?.weight"
|
||||
:current-charge-weight="detail?.chargeWeight"
|
||||
@success="onChargeWeightUpdated"
|
||||
/>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import AddIncomeFeeDialog from './AddIncomeFeeDialog.vue'
|
||||
import EditChargeWeightDialog from './EditChargeWeightDialog.vue'
|
||||
import { deleteIncomeBillFee } from '@/api/price/billing'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
@@ -192,6 +203,7 @@ const emit = defineEmits(['update:modelValue', 'updated'])
|
||||
const feeTab = ref('income')
|
||||
const addFeeOpen = ref(false)
|
||||
const editFeeRow = ref(null)
|
||||
const editCwOpen = ref(false)
|
||||
const { bms_fee_type, bms_currency } = useDict('bms_fee_type', 'bms_currency')
|
||||
|
||||
const incomeFees = computed(() => {
|
||||
@@ -240,6 +252,16 @@ function onFeeAdded(data) {
|
||||
if (data) emit('updated', data)
|
||||
}
|
||||
|
||||
function openEditCw() {
|
||||
if (!props.detail?.billId) return
|
||||
if (props.detail.refundStatus === 'REFUNDED') return
|
||||
editCwOpen.value = true
|
||||
}
|
||||
|
||||
function onChargeWeightUpdated(data) {
|
||||
if (data) emit('updated', data)
|
||||
}
|
||||
|
||||
|
||||
function customerActiveLabel(status) {
|
||||
const map = { ACTIVE: '正常', MISSING: '不存在', DISABLED: '停用' }
|
||||
|
||||
Reference in New Issue
Block a user