You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.1 KiB
69 lines
2.1 KiB
|
2 months ago
|
<!-- 底部菜单--库存--新增商品 -->
|
||
|
|
<template>
|
||
|
|
<view class="page1">
|
||
|
|
<view class="formBox">
|
||
|
|
<uni-forms ref="form" :modelValue="formData" :rules="rules" labelWidth="170rpx">
|
||
|
|
<uni-forms-item label="商品名称" name="productName" required>
|
||
|
|
<uni-easyinput type="text" v-model="formData.productName" placeholder="请输入商品名称" trim="all" />
|
||
|
|
</uni-forms-item>
|
||
|
|
<uni-forms-item label="商品主图" name="productPicture">
|
||
|
|
<view v-if="formData.productPicture !=''">
|
||
|
|
<img :src="formData.productPicture" alt="" class="upload-img">
|
||
|
|
</view>
|
||
|
|
<u-upload :fileList="formData.productPicture" @afterRead="afterRead" @delete="deletePic" name="1"
|
||
|
|
multiple :maxCount="1"></u-upload>
|
||
|
|
</uni-forms-item>
|
||
|
|
<uni-forms-item label="商品分类" name="categoryId">
|
||
|
|
<view class="content-list">
|
||
|
|
<view class="list-val">
|
||
|
|
<input type="text" placeholder="请选择商品分类" disabled :value="typeItem.categoryName"
|
||
|
|
style="border-bottom: 1px solid #fff;text-align: center;" @tap="goGategoryLow">
|
||
|
|
<uni-icons type="right" size="16"
|
||
|
|
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</uni-forms-item>
|
||
|
|
<uni-forms-item label="打包盒价格" name="productName" required>
|
||
|
|
<uni-easyinput type="text" v-model="formData.productName" placeholder="请输入打包盒价格" trim="all" />
|
||
|
|
</uni-forms-item>
|
||
|
|
<uni-forms-item label="商品单位" name="productName" required>
|
||
|
|
<uni-easyinput type="text" v-model="formData.productName" placeholder="非必填,个/斤/500g" trim="all" />
|
||
|
|
</uni-forms-item>
|
||
|
|
</uni-forms>
|
||
|
|
<view>
|
||
|
|
<button @tap.stop="submit()">保存</button>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
export default {
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
formData: {
|
||
|
|
productName: '',
|
||
|
|
productPicture: '',
|
||
|
|
categoryId: '',
|
||
|
|
productPictures: []
|
||
|
|
},
|
||
|
|
}
|
||
|
|
},
|
||
|
|
onShow() {
|
||
|
|
|
||
|
|
},
|
||
|
|
onLoad(option) {
|
||
|
|
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss">
|
||
|
|
page,.page1{
|
||
|
|
font-size: 24rpx;
|
||
|
|
background: #eee;
|
||
|
|
}
|
||
|
|
</style>
|