优化:设计 - 导航栏优化。非直接下单商品也可以选中,取消固定连接。商品选择表格内容优化

This commit is contained in:
wuhui_zzw 2023-09-22 09:48:12 +08:00
parent 6af1a100e0
commit 650184d860
3 changed files with 37 additions and 5 deletions

View File

@ -17,7 +17,7 @@
:close-on-click-modal="false"
@open="linkDialogOpen"
@closed="linkDialogClose"
width="460px">
:width="link.type == 'product' ? '800px' : '460px'">
<div slot="title" class="link-dialog-header">
<div class="title">{{ __('admin/builder.modules_choose') }}@{{ dialogTitle }}</div>
<div class="input-with-select" v-if="link.type != 'custom'">
@ -60,6 +60,33 @@
</div>
</div>
</template>
<template v-else-if="link.type == 'product'">
<div class="product-info" v-loading="loading">
<template v-if="linkDialog.data.length">
<div class="product-info-title">
<span>{{ __('admin/builder.modules_content') }}</span>
<span>{{ __('product.product_type') }}</span>
</div>
<ul class="product-list">
<li v-for="(product, index) in linkDialog.data" @click="link.value = product.id">
<div class="left">
<span :class="'checkbox-plus ' + (link.value == product.id ? 'active':'')"></span>
<img :src="product.image" v-if="product.image" class="img-responsive">
<div>@{{ product.name }}</div>
</div>
<div :class="'right ' + (product.status ? 'ok' : 'no')">
<template v-if="product.status">{{ __('common.enable_status') }}</template>
<template v-else>{{ __('common.disable_status') }}</template>
</div>
</li>
</ul>
</template>
<div class="product-info-no" v-if="!linkDialog.data.length && loading === false">
<div class="icon"><i class="iconfont">&#xe60c;</i></div>
<div class="no-text">{{ __('admin/builder.text_no_data') }}, <a :href="linkTypeAdmin" target="_blank">{{ __('admin/builder.text_to_add') }}@{{ dialogTitle }}</a></div>
</div>
</div>
</template>
<template v-else>
<div class="product-info" v-loading="loading">
<template v-if="linkDialog.data.length">
@ -142,7 +169,7 @@
{type: 'page', label: '{{ __('admin/builder.text_information') }}'},
{type: 'page_category', label: '{{ __('admin/builder.page_category') }}'},
{type: 'brand', label: '{{ __('admin/builder.text_manufacturer') }}'},
{type: 'static',label: '{{ __('admin/builder.text_static') }}'},
{{--{type: 'static',label: '{{ __('admin/builder.text_static') }}'},--}}
{type: 'custom',label: '{{ __('admin/builder.text_custom') }}'}
],
static: [
@ -186,11 +213,15 @@
computed: {
dialogTitle: function () {
return this.types.find(e => e.type == this.link.type).label;
let first = this.types.find(e => e.type == this.link.type) ?? {};
return first.label ?? '';
},
selectorTitle() {
return this.types.find(e => e.type == this.value.type).label;
let first = this.types.find(e => e.type == this.value.type) ?? {};
return first.label ?? '';
},
linkTypeAdmin: function () {

View File

@ -43,4 +43,5 @@ return [
'multiple_error' => 'The purchase quantity must be a multiple of :num',
'quantity_error_mini' => 'Purchase quantity error, the total purchase quantity of [:goods_name] must be greater than or equal to [:num]',
'quantity_error_multiple' => 'Purchase quantity error, the total purchase quantity of [:goods_name] must be a multiple of [:num]',
'product_type' => 'Product type',
];

View File

@ -44,7 +44,7 @@ return [
'multiple_error' => '采购数量必须是:num的倍数',
'quantity_error_mini' => '采购数量错误,【:goods_name】的采购总数量必须大于等于【:num】',
'quantity_error_multiple' => '采购数量错误,【:goods_name】的采购总数量必须是【:num】的倍数',
'product_type' => '产品类型',