|
|
@@ -72,7 +72,7 @@
|
|
|
:maskClosable="false"
|
|
|
@cancel="modalCancel"
|
|
|
@click="modifyModalClick"
|
|
|
- width="90%"
|
|
|
+ width="96%"
|
|
|
:title="modifyTitle + '分类'"
|
|
|
padding="40rpx"
|
|
|
>
|
|
|
@@ -126,6 +126,24 @@
|
|
|
</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="form-group">
|
|
|
+ <view class="form-label">
|
|
|
+ <text class="label-text">分类类型</text>
|
|
|
+ <text class="required-mark">*</text>
|
|
|
+ </view>
|
|
|
+ <view class="form-radio-group">
|
|
|
+ <label class="radio-label" v-for="item in flowerTypes" :key="item.value">
|
|
|
+ <radio
|
|
|
+ :value="item.value"
|
|
|
+ :checked="modifyForm.flower == item.value"
|
|
|
+ @click="modifyForm.flower = item.value"
|
|
|
+ color="#52c41a"
|
|
|
+ />
|
|
|
+ <text class="radio-text">{{ item.label }}</text>
|
|
|
+ </label>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
</modal-module>
|
|
|
@@ -155,13 +173,19 @@ export default {
|
|
|
categoryId: 0,
|
|
|
categoryName: '',
|
|
|
inTurn: '',
|
|
|
- status: 1
|
|
|
+ status: 1,
|
|
|
+ flower: 0
|
|
|
},
|
|
|
delModal: false,
|
|
|
operateData: {},
|
|
|
operateIndex: null,
|
|
|
operateTop: 0,
|
|
|
- catDisabled: false
|
|
|
+ catDisabled: false,
|
|
|
+ flowerTypes: [
|
|
|
+ { label: '鲜花', value: 0 },
|
|
|
+ { label: '绿植', value: 1 },
|
|
|
+ { label: '仿真花', value: 2 }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
|
@@ -191,7 +215,7 @@ export default {
|
|
|
edit(item) {
|
|
|
this.modifyModal = true;
|
|
|
this.modifyTitle = '编辑';
|
|
|
- this.modifyForm = { categoryId: item.id, categoryName: item.categoryName, inTurn: item.inTurn, status: item.status };
|
|
|
+ this.modifyForm = { categoryId: item.id, categoryName: item.categoryName, inTurn: item.inTurn, status: item.status, flower: item.flower };
|
|
|
this.catDisabled = true;
|
|
|
},
|
|
|
addCategoryFn() {
|
|
|
@@ -201,7 +225,7 @@ export default {
|
|
|
this.catDisabled = false;
|
|
|
},
|
|
|
resetForm() {
|
|
|
- this.modifyForm = { categoryId: 0, categoryName: '', inTurn: '', status: 1 }
|
|
|
+ this.modifyForm = { categoryId: 0, categoryName: '', inTurn: '', status: 1, flower: 0 }
|
|
|
},
|
|
|
async init() {
|
|
|
this._list();
|
|
|
@@ -394,7 +418,7 @@ export default {
|
|
|
font-weight: 500;
|
|
|
|
|
|
&.active {
|
|
|
- color: #34C759;
|
|
|
+ color: #383a39;
|
|
|
}
|
|
|
|
|
|
&:not(.active) {
|
|
|
@@ -558,6 +582,39 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .form-radio-group {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ gap: 20rpx;
|
|
|
+ justify-content: space-between;
|
|
|
+
|
|
|
+ .radio-label {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex: 1;
|
|
|
+ padding: 12rpx 16rpx;
|
|
|
+ border: 1rpx solid #e0e0e0;
|
|
|
+ border-radius: 8rpx;
|
|
|
+ background: #fff;
|
|
|
+ transition: all 0.2s ease;
|
|
|
+ justify-content: center;
|
|
|
+
|
|
|
+ &:active {
|
|
|
+ background: #f5f5f5;
|
|
|
+ }
|
|
|
+
|
|
|
+ radio {
|
|
|
+ margin-right: 8rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .radio-text {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #333;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|