优化计费重量规则,新增按收货重取重逻辑
This commit is contained in:
@@ -112,6 +112,14 @@
|
||||
style="margin-bottom: 12px"
|
||||
title="计费重 = max(长×宽×高(cm)/8000, 收货重);无尺寸时不覆盖"
|
||||
/>
|
||||
<el-alert
|
||||
v-if="form.ruleType === 'USE_RECEIVE_WEIGHT'"
|
||||
type="info"
|
||||
:closable="false"
|
||||
show-icon
|
||||
style="margin-bottom: 12px"
|
||||
title="命中后按取值字段取重;实重优先 actual_weight,次收货重 receive_weight"
|
||||
/>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio value="0">正常</el-radio>
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
<el-table-column :label="colBoundChannels" min-width="180" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ boundChannelText(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="colAction" width="90" align="center" fixed="right">
|
||||
<el-table-column :label="colAction" width="160" align="center" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button link type="primary" @click="openDetail(row)" v-hasPermi="['price:label:query']">查看详情</el-button>
|
||||
<el-button link type="primary" @click="openBindList(row)" v-hasPermi="['price:label:edit']">绑定</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -112,6 +113,23 @@
|
||||
<el-button type="primary" :loading="addSaving" @click="submitAddChannels">保存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-drawer
|
||||
v-model="detailVisible"
|
||||
:title="detailTitle"
|
||||
size="78%"
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
@closed="onDetailClosed"
|
||||
>
|
||||
<div v-loading="detailLoading">
|
||||
<label-config-detail v-if="detailProduct" :product="detailProduct" :editable="false" />
|
||||
<el-empty v-else-if="!detailLoading" description="暂无产品明细" />
|
||||
</div>
|
||||
<template #footer>
|
||||
<el-button @click="detailVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
@@ -119,9 +137,11 @@
|
||||
import {
|
||||
listLabelProducts,
|
||||
listLabelProductChannels,
|
||||
replaceLabelProductChannels
|
||||
replaceLabelProductChannels,
|
||||
getLabelProduct
|
||||
} from '@/api/price/label'
|
||||
import { listChannelOptions } from '@/api/masterdata/serviceChannel'
|
||||
import LabelConfigDetail from './LabelConfigDetail.vue'
|
||||
|
||||
const props = defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
@@ -145,6 +165,14 @@ const addVisible = ref(false)
|
||||
const addLoading = ref(false)
|
||||
const addSaving = ref(false)
|
||||
const addChannelIds = ref([])
|
||||
const detailVisible = ref(false)
|
||||
const detailLoading = ref(false)
|
||||
const detailProduct = ref(null)
|
||||
|
||||
const detailTitle = computed(() => {
|
||||
if (!detailProduct.value) return '产品明细'
|
||||
return detailProduct.value.productName || detailProduct.value.sheetName || '产品明细'
|
||||
})
|
||||
|
||||
const phSearch = '产品名称 / 绑定渠道'
|
||||
const colId = '产品编号'
|
||||
@@ -261,6 +289,26 @@ async function loadBoundChannels() {
|
||||
}
|
||||
}
|
||||
|
||||
async function openDetail(row) {
|
||||
if (!row?.productId) return
|
||||
detailVisible.value = true
|
||||
detailLoading.value = true
|
||||
detailProduct.value = null
|
||||
try {
|
||||
const res = await getLabelProduct(row.productId, row.versionId || row.termId)
|
||||
detailProduct.value = res.data || row
|
||||
} catch (e) {
|
||||
detailProduct.value = row
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function onDetailClosed() {
|
||||
detailProduct.value = null
|
||||
detailLoading.value = false
|
||||
}
|
||||
|
||||
async function openBindList(row) {
|
||||
if (!row?.productId) return
|
||||
bindProductId.value = row.productId
|
||||
|
||||
Reference in New Issue
Block a user