显示平台订单号
This commit is contained in:
parent
5376dff3de
commit
a15c91f5a1
@ -139,6 +139,8 @@ function defaultShopIdOf(): number | null {
|
|||||||
|
|
||||||
/** 当前编辑的单据是否由外部打单平台拉取(店铺不可修改) */
|
/** 当前编辑的单据是否由外部打单平台拉取(店铺不可修改) */
|
||||||
const isExternal = ref(false)
|
const isExternal = ref(false)
|
||||||
|
/** 外部单的店铺展示名:外部平台店铺不在可选列表里,直接显示名称而不是让下拉回显 ID */
|
||||||
|
const externalShopLabel = ref('')
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
Object.assign(form, {
|
Object.assign(form, {
|
||||||
@ -173,6 +175,8 @@ function reset() {
|
|||||||
buyer_message: '',
|
buyer_message: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
})
|
})
|
||||||
|
isExternal.value = false
|
||||||
|
externalShopLabel.value = ''
|
||||||
fillItems([])
|
fillItems([])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,6 +187,8 @@ async function loadDetail(id: number) {
|
|||||||
const { order, items } = await getOrderStatusDetail(id)
|
const { order, items } = await getOrderStatusDetail(id)
|
||||||
// 外部打单平台拉取的订单,店铺由平台决定,编辑时不允许修改
|
// 外部打单平台拉取的订单,店铺由平台决定,编辑时不允许修改
|
||||||
isExternal.value = !!(order as { is_external?: boolean }).is_external
|
isExternal.value = !!(order as { is_external?: boolean }).is_external
|
||||||
|
const externalShop = props.filters.shops.find(shop => shop.id === order.shop_id)
|
||||||
|
externalShopLabel.value = order.shop_name || order.shop_nick || externalShop?.name || ''
|
||||||
Object.assign(form, {
|
Object.assign(form, {
|
||||||
parent_order_no: order.parent_order_no || '',
|
parent_order_no: order.parent_order_no || '',
|
||||||
order_no: order.order_no,
|
order_no: order.order_no,
|
||||||
@ -551,25 +557,26 @@ async function submit() {
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="店铺" prop="shop_id">
|
<el-form-item label="店铺" prop="shop_id">
|
||||||
<el-select
|
<el-input
|
||||||
v-model="form.shop_id"
|
v-if="isExternal"
|
||||||
placeholder="请选择店铺"
|
:model-value="externalShopLabel || '店铺信息不可用'"
|
||||||
clearable
|
disabled
|
||||||
filterable
|
|
||||||
:disabled="isExternal"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
/>
|
||||||
<el-option
|
<template v-else>
|
||||||
v-for="shop in selectableShops"
|
<el-select v-model="form.shop_id" placeholder="请选择店铺" clearable filterable style="width: 100%">
|
||||||
:key="shop.id"
|
<el-option
|
||||||
:label="shop.code ? `${shop.name}(${shop.code})` : shop.name"
|
v-for="shop in selectableShops"
|
||||||
:value="shop.id"
|
:key="shop.id"
|
||||||
/>
|
:label="shop.code ? `${shop.name}(${shop.code})` : shop.name"
|
||||||
</el-select>
|
:value="shop.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<div v-if="!selectableShops.length" class="form-tip">
|
||||||
|
当前主体下没有可用的平台店铺(外部打单平台店铺不可用于手工建单)
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<div v-if="isExternal" class="form-tip">平台拉取的订单,店铺由平台决定,不可修改</div>
|
<div v-if="isExternal" class="form-tip">平台拉取的订单,店铺由平台决定,不可修改</div>
|
||||||
<div v-else-if="!selectableShops.length" class="form-tip">
|
|
||||||
当前主体下没有可用的平台店铺(外部打单平台店铺不可用于手工建单)
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user