This commit is contained in:
zmj 2024-05-11 14:03:42 +08:00
parent 17e66d6a10
commit a33172e67e
3 changed files with 36 additions and 130 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@ dist
dist-ssr
coverage
*.local
build
# unplugin-auto-import
auto-imports.d.ts

View File

@ -1,27 +1,11 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="80%"
@confirm="handleSubmit"
@close="handleClose"
>
<el-form
ref="formRef"
:model="formData"
label-width="90px"
:rules="formRules"
>
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="商品名称" prop="name">
<el-input
v-model="formData.name"
clearable
placeholder="请输入商品名称"
/>
<el-input v-model="formData.name" clearable placeholder="请输入商品名称" />
</el-form-item>
</el-col>
<!-- <el-col :span="8"
@ -36,183 +20,104 @@
</el-col> -->
<el-col :span="8">
<el-form-item label="商品编号" prop="number">
<el-input
v-model="formData.number"
clearable
placeholder="请输入商品编号"
/>
<el-input v-model="formData.number" clearable placeholder="请输入商品编号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="规格型号" prop="spec">
<el-input
v-model="formData.spec"
clearable
placeholder="请输入规格型号"
/>
<el-input v-model="formData.spec" clearable placeholder="请输入规格型号" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商品分类" prop="class">
<el-cascader
style="width: 100%"
v-model="formData.class"
:props="props"
placeholder="请选择商品分类"
/>
<el-cascader style="width: 100%" v-model="formData.class" :props="props" placeholder="请选择商品分类" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商品品牌" prop="brand">
<el-cascader
style="width: 100%"
v-model="formData.brand"
:options="brandList"
:props="{
<el-cascader style="width: 100%" v-model="formData.brand" :options="brandList" :props="{
value: 'id',
label: 'name',
emitPath: false,
}"
placeholder="请选择商品品牌"
/>
}" placeholder="请选择商品品牌" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商品单位" prop="unit">
<el-cascader
style="width: 100%"
v-model="formData.unit"
:options="unitList"
:props="{
<el-cascader style="width: 100%" v-model="formData.unit" :options="unitList" :props="{
value: 'id',
label: 'name',
emitPath: false,
}"
placeholder="请选择商品单位"
/>
}" placeholder="请选择商品单位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="购货价格" prop="buy">
<el-input
v-model="formData.buy"
clearable
placeholder="请输入购货价格"
/>
<el-input v-model="formData.buy" clearable placeholder="请输入购货价格" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="销货价格" prop="sell">
<el-input
v-model="formData.sell"
clearable
placeholder="请输入销货价格"
/>
<el-input v-model="formData.sell" clearable placeholder="请输入销货价格" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="零售价格" prop="retail">
<el-input
v-model="formData.retail"
clearable
placeholder="请输入零售价格"
/>
<el-input v-model="formData.retail" clearable placeholder="请输入零售价格" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="兑换积分" prop="integral">
<el-input
v-model="formData.integral"
clearable
placeholder="请输入兑换积分"
/>
<el-input v-model="formData.integral" clearable placeholder="请输入兑换积分" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="税率" prop="tax_rate">
<el-input
v-model="formData.tax_rate"
clearable
placeholder="请输入税率"
/>
<el-input v-model="formData.tax_rate" clearable placeholder="请输入税率" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="条形码" prop="code">
<el-input
v-model="formData.code"
clearable
placeholder="请输入条形码"
/>
<el-input v-model="formData.code" clearable placeholder="请输入条形码" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="默认仓库" prop="warehouse">
<el-cascader
style="width: 100%"
v-model="formData.warehouse"
:options="warehouseList"
:props="{
<el-cascader style="width: 100%" v-model="formData.warehouse" :options="warehouseList" :props="{
value: 'id',
label: 'name',
emitPath: false,
}"
placeholder="请选择仓库"
/>
}" placeholder="请选择仓库" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="商品货位" prop="location">
<el-input
v-model="formData.location"
clearable
placeholder="请输入商品货位"
/>
<el-input v-model="formData.location" clearable placeholder="请输入商品货位" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="库存阈值" prop="stocktip">
<el-input
v-model="formData.stocktip"
clearable
placeholder="请输入库存阈值"
/>
<el-input v-model="formData.stocktip" clearable placeholder="请输入库存阈值" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="零售名称" prop="retail_name">
<el-input
v-model="formData.retail_name"
clearable
placeholder="请输入零售名称"
/>
<el-input v-model="formData.retail_name" clearable placeholder="请输入零售名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="扩展信息" prop="more">
<el-input
v-model="formData.more"
clearable
placeholder="请输入扩展信息"
/>
<el-input v-model="formData.more" clearable placeholder="请输入扩展信息" />
</el-form-item>
</el-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<el-form-item label="排序" prop="sort">
<el-input
v-model="formData.sort"
clearable
placeholder="请输入排序"
/>
<el-input v-model="formData.sort" clearable placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col :span="24">

View File

@ -68,7 +68,7 @@
<el-table-column label="零售名称" prop="retail_name" show-overflow-tooltip />
<el-table-column label="备注信息" prop="data" 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="170" fixed="right">
<template #default="{ row }">
<el-button v-perms="['goods.goods/edit']" type="primary" link @click="handleEdit(row)">
编辑