diff --git a/src/api/cabinet/cabinet-cell.ts b/src/api/cabinet/cabinet-cell.ts index 095e9c5..352f55f 100644 --- a/src/api/cabinet/cabinet-cell.ts +++ b/src/api/cabinet/cabinet-cell.ts @@ -36,6 +36,8 @@ export interface CabinetCellDTO { stock?: number; /** 历史订单数量 */ orderCount?: number; + /** 商品价格 */ + cellPrice?: number; } export interface AddCabinetCellCommand { diff --git a/src/views/cabinet/cabinet-cell/cell-edit-modal.vue b/src/views/cabinet/cabinet-cell/cell-edit-modal.vue index e0eff53..b743ec5 100644 --- a/src/views/cabinet/cabinet-cell/cell-edit-modal.vue +++ b/src/views/cabinet/cabinet-cell/cell-edit-modal.vue @@ -16,6 +16,7 @@ export interface FormDTO { availableStatus: number; usageStatus: number; stock: number; + cellPrice?: number; } const props = defineProps({ @@ -26,6 +27,10 @@ const props = defineProps({ row: { type: Object, default: null + }, + mode: { + type: Number, + default: null } }); @@ -40,7 +45,8 @@ const formData = reactive({ cellType: 1, availableStatus: 1, usageStatus: 1, - stock: 0 + stock: 0, + cellPrice: 0 }); const rules = reactive({ @@ -129,6 +135,10 @@ watch(() => props.row, (val) => { + + + 元 + @@ -143,7 +153,7 @@ watch(() => props.row, (val) => { - + @@ -161,4 +171,14 @@ watch(() => props.row, (val) => { .save-btn, .clear-btn { margin-right: 10px; } +.price-input-item .el-input__wrapper { + border-radius: 6px; + border-color: #dcdfe6; + box-shadow: 0 0 0 0 rgba(144, 147, 153, 0); + transition: all 0.3s; +} +.price-input-item .el-input__wrapper:focus-within { + border-color: #409eff; + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2); +} \ No newline at end of file diff --git a/src/views/cabinet/smart-cabinet-card/detail.vue b/src/views/cabinet/smart-cabinet-card/detail.vue index b5e435b..fcc3f29 100644 --- a/src/views/cabinet/smart-cabinet-card/detail.vue +++ b/src/views/cabinet/smart-cabinet-card/detail.vue @@ -310,7 +310,8 @@ onMounted(() => {
- + 编辑柜体
@@ -320,11 +321,13 @@ onMounted(() => { {{ CabinetImgMap[cabinetInfo.templateNo]?.name || '-' }} {{ cabinetInfo.shopName || '-' }} - + 配置 {{ cabinetInfo.mqttServerId || '-' }} - + 配置 {{ getBalanceEnableText(shopInfo.balanceEnable) @@ -369,7 +372,7 @@ onMounted(() => {
-
价格: {{ item.price }}
+
价格: {{ shopInfo?.mode == 3 ? item.cellPrice : item.price }}
库存: {{ item.stock }}
@@ -380,16 +383,19 @@ onMounted(() => { {{ item.cellNo }}
- + 商品配置 - {{ item.goodsName }} + + 格口配置 +