修改商品信息输入框类型

This commit is contained in:
luofei 2023-05-31 16:16:01 +08:00
parent c0e56f82ea
commit 196fcb9d5e
2 changed files with 12 additions and 9 deletions

View File

@ -39,28 +39,28 @@
{
id: 1,
label: '售价',
type: 'input',
type: 'number',
model: 'price',
holder: '请填写售价'
},
{
id: 2,
label: '成本价',
type: 'input',
type: 'number',
holder: '请填写成本价',
model: 'cost'
},
{
id: 3,
label: '原价',
type: 'input',
type: 'number',
holder: '请填写原价',
model: 'ot_price'
},
{
id: 4,
label: '库存',
type: 'input',
type: 'number',
holder: '请填写库存',
model: 'stock'
}
@ -76,28 +76,28 @@
{
id: 6,
label: '重量',
type: 'input',
type: 'number',
holder: '请输入重量',
model: 'weight'
},
{
id: 7,
label: '体积',
type: 'input',
type: 'number',
holder: '请输入体积',
model: 'volume'
},
{
id: 8,
label: '佣金(一级)',
type: 'input',
type: 'number',
holder: '请输入一级佣金',
model: 'extension_one'
},
{
id: 8,
label: '佣金(二级)',
type: 'input',
type: 'number',
holder: '请输入二级佣金',
model: 'extension_two'
}

View File

@ -1,7 +1,7 @@
<template>
<view class="container_input">
<view class="container_input_item" v-for="(item, index) in platformClassification" :key="index" @click="selectItem(item)" v-if="!item.DoNotShow">
<view class="select_and_input" v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch'">
<view class="select_and_input" v-if="item.type == 'select' || item.type == 'input' || item.type == 'switch' || item.type == 'number'">
<view class="container_input_item_label">
<text class="select_check" :class="{ select: item.select }" @click.stop="selectRadio(item)" v-if="Object.keys(item).indexOf('select') != -1">
<text v-if="item.select" class="iconfont">&#xe646;</text>
@ -13,6 +13,9 @@
<text v-else>{{ item.holder }}</text>
<text class="iconfont">&#xe6bd;</text>
</view>
<view class="container_input_item_value" v-if="item.type == 'number'">
<input v-model="formData[item.model]" type="number" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view>
<view class="container_input_item_value" v-if="item.type == 'input'">
<input v-model="formData[item.model]" type="text" value="" :placeholder="item.holder" placeholder-class="inputPlaceHolder" />
</view>