商品价格换算

This commit is contained in:
ctw committed 2025-01-08 12:59:08 +08:00
1 parent 40896dfb18
commit 39bc822b2c
2 files changed
+6 -6

No files matched your search

-1
View File
@@ -194,7 +194,6 @@ const uploadError = () => {
});
};
</script>
<style scoped lang="scss">
.is-error {
.upload {
+6 -5
View File
@@ -34,7 +34,7 @@
</el-col>
<el-col :span="24" class="mb20">
<el-form-item label="商品封面图" prop="picUrl">
<upload-img v-model="form.picUrl"></upload-img>
<upload-img v-model:imageUrl="form.picUrl"></upload-img>
</el-form-item>
</el-col>
<el-col :span="24" class="mb20">
@@ -75,7 +75,7 @@ import { useDict } from '/@/hooks/dict';
import { useMessage } from '/@/hooks/message';
import { getObj, addObj, putObj } from '/@/api/canteen/canteenOnlineSpu';
import { rule } from '/@/utils/validate';
import { storePrice } from '/@/utils/formatMoney';
import { displayPrice, storePrice } from '/@/utils/formatMoney';
const emit = defineEmits(['refresh']);
// 定义变量内容
@@ -159,9 +159,10 @@ const getcanteenOnlineSpuData = (id: string) => {
loading.value = true;
getObj(id)
.then((res: any) => {
// Object.assign(form, res.data, {
// res.data.
// });
Object.assign(form, res.data, {
price: displayPrice(res.data.price, ''),
marketPrice: displayPrice(res.data.marketPrice, ''),
});
})
.finally(() => {
loading.value = false;