This commit is contained in:
parent
8ecfe79909
commit
c4079cd7a1
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
||||||
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
<el-form-item label="所属ID" prop="pid">
|
<el-form-item label="所属ID" prop="pid">
|
||||||
<!-- <el-input v-model="formData.pid" clearable placeholder="请输入所属ID" /> -->
|
<!-- <el-input v-model="formData.pid" clearable placeholder="请输入所属ID" /> -->
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
<el-form-item label="备注信息" prop="data">
|
<el-form-item label="备注信息" prop="data">
|
||||||
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" />
|
<el-input v-model="formData.data" clearable placeholder="请输入备注信息" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="图片" prop="pic">
|
<el-form-item label="图片" prop="pic">
|
||||||
<material-picker v-model="formData.pic" />
|
<material-picker v-model="formData.pic" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -46,10 +46,12 @@
|
||||||
<el-table-column label="排序" prop="sort" show-overflow-tooltip />
|
<el-table-column label="排序" prop="sort" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['store.storecategory/edit']" type="primary" link @click.stop="handleEdit(row)">
|
<el-button v-perms="['store.storecategory/edit']" type="primary" link
|
||||||
|
@click.stop="handleEdit(row)">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['store.storecategory/delete']" type="danger" link @click.stop="handleDelete(row.id)">
|
<el-button v-perms="['store.storecategory/delete']" type="danger" link
|
||||||
|
@click.stop="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,16 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup
|
<popup ref="popupRef" title="详情" :async="true" width="550px" :cancelButtonText="false"
|
||||||
ref="popupRef"
|
:confirmButtonText="false">
|
||||||
title="详情"
|
|
||||||
:async="true"
|
|
||||||
width="550px"
|
|
||||||
:cancelButtonText="false"
|
|
||||||
:confirmButtonText="false"
|
|
||||||
>
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px">
|
<el-form ref="formRef" :model="formData" label-width="90px">
|
||||||
<el-form-item label="商品名称" prop="store_name">
|
<el-form-item label="商品名称" prop="store_name">
|
||||||
<el-input v-model="formData.store_name" clearable placeholder="请输入商品名称" :readonly="true"/>
|
<el-input v-model="formData.store_name" clearable placeholder="请输入商品名称" :readonly="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
|
@ -3,91 +3,39 @@
|
||||||
<div class="mb-4 text-lg font-bold">
|
<div class="mb-4 text-lg font-bold">
|
||||||
{{ mode == "add" ? "添加商品" : "编辑商品" }}
|
{{ mode == "add" ? "添加商品" : "编辑商品" }}
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||||
ref="formRef"
|
|
||||||
:model="formData"
|
|
||||||
label-width="90px"
|
|
||||||
:rules="formRules"
|
|
||||||
>
|
|
||||||
<el-form-item label="商品图片" prop="image">
|
<el-form-item label="商品图片" prop="image">
|
||||||
<material-picker v-model="formData.image" :limit="1" />
|
<material-picker v-model="formData.image" :limit="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品名称" prop="store_name">
|
<el-form-item label="商品名称" prop="store_name">
|
||||||
<el-input
|
<el-input v-model="formData.store_name" clearable placeholder="请输入商品名称" :readonly="false" />
|
||||||
v-model="formData.store_name"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入商品名称"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品条码" prop="bar_code">
|
<el-form-item label="商品条码" prop="bar_code">
|
||||||
<el-input
|
<el-input v-model="formData.bar_code" clearable placeholder="请输入商品条码" :readonly="false" />
|
||||||
v-model="formData.bar_code"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入商品条码"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品分类" prop="cate_id">
|
<el-form-item label="商品分类" prop="cate_id">
|
||||||
<el-input
|
<el-input v-model="formData.cate_id" clearable placeholder="请输入商品分类" :readonly="false" />
|
||||||
v-model="formData.cate_id"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入商品分类"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品价格" prop="price">
|
<el-form-item label="商品价格" prop="price">
|
||||||
<el-input
|
<el-input v-model="formData.price" clearable placeholder="请输入商品价格" :readonly="false" />
|
||||||
v-model="formData.price"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入商品价格"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品单位" prop="unit">
|
<el-form-item label="商品单位" prop="unit">
|
||||||
<el-input
|
<el-input v-model="formData.unit" clearable placeholder="请输入商品单位" :readonly="false" />
|
||||||
v-model="formData.unit"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入商品单位"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="库存" prop="stock">
|
<el-form-item label="库存" prop="stock">
|
||||||
<el-input
|
<el-input v-model="formData.stock" clearable placeholder="请输入库存" :readonly="false" />
|
||||||
v-model="formData.stock"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入库存"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="成本价" prop="cost">
|
<el-form-item label="成本价" prop="cost">
|
||||||
<el-input
|
<el-input v-model="formData.cost" clearable placeholder="请输入成本价" :readonly="false" />
|
||||||
v-model="formData.cost"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入成本价"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="采购价" prop="purchase">
|
<el-form-item label="采购价" prop="purchase">
|
||||||
<el-input
|
<el-input v-model="formData.purchase" clearable placeholder="请输入采购价" :readonly="false" />
|
||||||
v-model="formData.purchase"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入采购价"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上浮比例" prop="rose">
|
<el-form-item label="上浮比例" prop="rose">
|
||||||
<el-input
|
<el-input v-model="formData.rose" clearable placeholder="请输入上浮比例" :readonly="false" />
|
||||||
v-model="formData.rose"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入上浮比例"
|
|
||||||
:readonly="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-button @click="handleSubmit" type="primary" class="w-40"
|
<el-button @click="handleSubmit" type="primary" class="w-40">提交</el-button>
|
||||||
>提交</el-button
|
|
||||||
>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
|
@ -3,12 +3,7 @@
|
||||||
<el-card class="!border-none mb-4" shadow="never">
|
<el-card class="!border-none mb-4" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
<el-form-item label="商品名称" prop="store_name">
|
<el-form-item label="商品名称" prop="store_name">
|
||||||
<el-input
|
<el-input class="w-[280px]" v-model="queryParams.store_name" clearable placeholder="请输入商品名称" />
|
||||||
class="w-[280px]"
|
|
||||||
v-model="queryParams.store_name"
|
|
||||||
clearable
|
|
||||||
placeholder="请输入商品名称"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
@ -17,25 +12,16 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
<el-button
|
<el-button v-perms="['store_product.store_product/add']" type="primary" icon="Plus">
|
||||||
v-perms="['store_product.store_product/add']"
|
<router-link :to="{
|
||||||
type="primary"
|
|
||||||
icon="Plus"
|
|
||||||
>
|
|
||||||
<router-link
|
|
||||||
:to="{
|
|
||||||
path: 'store_product_edit',
|
path: 'store_product_edit',
|
||||||
query: { id: 0, mode: 'add' },
|
query: { id: 0, mode: 'add' },
|
||||||
}"
|
}">
|
||||||
>
|
|
||||||
新增
|
新增
|
||||||
</router-link>
|
</router-link>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['store_product.store_product/delete']" :disabled="!selectData.length"
|
||||||
v-perms="['store_product.store_product/delete']"
|
@click="handleDelete(selectData)">
|
||||||
:disabled="!selectData.length"
|
|
||||||
@click="handleDelete(selectData)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
|
@ -47,26 +33,10 @@
|
||||||
<el-image style="width: 50px; height: 50px" :src="row.image" />
|
<el-image style="width: 50px; height: 50px" :src="row.image" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="商品名称" prop="store_name" show-overflow-tooltip />
|
||||||
label="商品名称"
|
<el-table-column label="分类id" prop="cate_id" show-overflow-tooltip />
|
||||||
prop="store_name"
|
<el-table-column label="商品价格" prop="price" show-overflow-tooltip />
|
||||||
show-overflow-tooltip
|
<el-table-column label="单位名" prop="unit_name" show-overflow-tooltip />
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="分类id"
|
|
||||||
prop="cate_id"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="商品价格"
|
|
||||||
prop="price"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="单位名"
|
|
||||||
prop="unit_name"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column label="销量" prop="sales" show-overflow-tooltip />
|
<el-table-column label="销量" prop="sales" show-overflow-tooltip />
|
||||||
<el-table-column label="库存" prop="stock" show-overflow-tooltip />
|
<el-table-column label="库存" prop="stock" show-overflow-tooltip />
|
||||||
<el-table-column label="状态" prop="is_show" show-overflow-tooltip>
|
<el-table-column label="状态" prop="is_show" show-overflow-tooltip>
|
||||||
|
@ -74,51 +44,23 @@
|
||||||
{{ row.is_show ? "上架" : "未上架" }}
|
{{ row.is_show ? "上架" : "未上架" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="是否新品" prop="is_new" show-overflow-tooltip />
|
||||||
label="是否新品"
|
<el-table-column label="添加时间" prop="add_time" show-overflow-tooltip />
|
||||||
prop="is_new"
|
<el-table-column label="是否包邮" prop="is_postage" show-overflow-tooltip />
|
||||||
show-overflow-tooltip
|
<el-table-column label="是否删除" prop="is_del" show-overflow-tooltip />
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="添加时间"
|
|
||||||
prop="add_time"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="是否包邮"
|
|
||||||
prop="is_postage"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
label="是否删除"
|
|
||||||
prop="is_del"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column label="成本价" prop="cost" show-overflow-tooltip />
|
<el-table-column label="成本价" prop="cost" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button v-perms="['store_product.store_product/edit']" type="primary" link
|
||||||
v-perms="['store_product.store_product/edit']"
|
@click="handleEdit(row)">
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
@click="handleEdit(row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['store_product.store_product/edit']" type="primary" link
|
||||||
v-perms="['store_product.store_product/edit']"
|
@click="handleDetail(row)">
|
||||||
type="primary"
|
|
||||||
link
|
|
||||||
@click="handleDetail(row)"
|
|
||||||
>
|
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button v-perms="['store_product.store_product/delete']" type="danger" link
|
||||||
v-perms="['store_product.store_product/delete']"
|
@click="handleDelete(row.id)">
|
||||||
type="danger"
|
|
||||||
link
|
|
||||||
@click="handleDelete(row.id)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue