字段修改

This commit is contained in:
zjf committed 2025-10-22 16:31:44 +08:00
1 parent 9f8d7a648a
commit 564a668344
2 files changed
+36 -15

No files matched your search

+22 -6
View File
@@ -30,11 +30,18 @@
</el-form-item>
</el-col>
<el-col :span="12" class="mb20">
<el-form-item label="计量单位" prop="unit">
<el-input v-model="form.unit" placeholder="请输入计量单位" />
</el-form-item>
</el-col>
<!-- <el-col :span="12" class="mb20">-->
<!-- <el-form-item label="计量单位" prop="unit">-->
<!-- <el-input v-model="form.unit" placeholder="请输入计量单位" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8" class="mb20">
<el-form-item label="商品性质" prop="productNature">
<el-select v-model="form.productNature" placeholder="请选择商品性质">
<el-option :value="item.value" :label="item.label" v-for="(item, index) in supermarket_nature" :key="index" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" class="mb20">
<el-form-item label="定价方式" prop="priceType">
@@ -69,6 +76,12 @@
<span class="price-tip">单位:元</span>
</el-form-item>
</el-col>
<el-col :span="12" class="mb20">
<el-form-item label="库存" prop="totalStock">
<el-input-number v-model="form.totalStock" :precision="2" :min="0" placeholder="请输入库存" style="width: 100%" />
</el-form-item>
</el-col>
</template>
<el-col :span="12" class="mb20">
@@ -240,6 +253,7 @@ import { tree as fetchCategoryTree } from "/@/api/supermarket/mallCategory"
const emit = defineEmits(["refresh"])
// 定义变量内容
const { supermarket_nature } = useDict("supermarket_nature")
const dataFormRef = ref()
const visible = ref(false)
const loading = ref(false)
@@ -272,7 +286,8 @@ const form = reactive({
priceType: 1, // 默认多SKU模式
spuPrice: 0,
originalPrice: 0,
unit: "",
totalStock: 0, // SPU模式库存
productNature: "",
status: "0", // 默认上架
saleStartTime: "",
saleEndTime: "",
@@ -387,6 +402,7 @@ const openDialog = (id: string) => {
priceType: 1,
spuPrice: 0,
originalPrice: 0,
totalStock: 0,
unit: "",
status: "0",
saleStartTime: "",
+14 -9
View File
@@ -58,7 +58,7 @@
<el-table-column type="selection" width="40" align="center" />
<el-table-column type="index" label="#" width="40" />
<el-table-column prop="title" label="商品标题" width="200" show-overflow-tooltip />
<el-table-column prop="title" label="商品标题" show-overflow-tooltip />
<el-table-column prop="merchantId" label="商户" width="150" show-overflow-tooltip>
<template #default="scope">
@@ -115,9 +115,13 @@
</div>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位" width="80" align="center" />
<el-table-column prop="productNature" label="商品性质" show-overflow-tooltip width="150">
<template #default="scope">
<dict-tag :options="supermarket_nature" :value="scope.row.productNature" />
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="100" align="center">
<template #default="scope">
<el-tag :type="scope.row.status === '0' ? 'success' : 'danger'">
@@ -130,7 +134,7 @@
<el-table-column prop="saleEndTime" label="停售时间" width="160" show-overflow-tooltip />
<el-table-column label="SKU详情" width="120" align="center">
<!-- <el-table-column label="SKU详情" width="120" align="center">
<template #default="scope">
<el-button
v-if="scope.row.priceType === 1 && scope.row.skuList && scope.row.skuList.length > 0"
@@ -142,7 +146,7 @@
</el-button>
<span v-else class="no-sku-detail">-</span>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column label="操作" width="180" fixed="right">
<template #default="scope">
@@ -167,7 +171,7 @@
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
<!-- SKU详情弹窗 -->
<el-dialog v-model="skuDetailVisible" title="SKU详情" width="80%" :close-on-click-modal="false">
<!-- <el-dialog v-model="skuDetailVisible" title="SKU详情" width="80%" :close-on-click-modal="false">
<div v-if="currentProduct">
<div class="product-info">
<h3>{{ currentProduct.title }}</h3>
@@ -201,7 +205,7 @@
<el-button @click="skuDetailVisible = false">关闭</el-button>
</span>
</template>
</el-dialog>
</el-dialog>-->
</div>
</template>
@@ -211,7 +215,8 @@ import { fetchList, delObjs } from "/@/api/supermarket/mallProduct"
import { useMessage, useMessageBox } from "/@/hooks/message"
import { tree as fetchCategoryTree } from "/@/api/supermarket/mallCategory"
import { select } from "/@/api/wallet/mch-manage"
import {useDict} from "/@/hooks/dict";
const { supermarket_nature } = useDict("supermarket_nature")
// 引入组件
const FormDialog = defineAsyncComponent(() => import("./form.vue"))