123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- <view class="wrapper">
- <view class="width-690">
- <form bind:submit="onSubmit">
- <view class="photo">
- <label>
- <text>商品主图</text>
- <text>({{form.product_img_url.length}}/{{product_img_url_max}})</text>
- </label>
- <view class="value">
- <view
- class="van-uploader-wrap">
- <van-uploader
- file-list="{{ form.product_img_url }}"
- max-count="{{product_img_url_max}}"
- multiple="{{false}}"
- accept="image"
- image-fit="aspectFit"
- data-formkey="product_img_url"
- bind:after-read="afterRead"
- bind:delete="delete"/>
- </view>
- </view>
- </view>
- <view class="photo">
- <label>
- <text>商品轮播图</text>
- <text>({{form.product_rotation_img_list.length}}/{{product_rotation_img_list_max}})</text>
- </label>
- <view class="value">
- <view
- class="van-uploader-wrap">
- <van-uploader
- file-list="{{ form.product_rotation_img_list }}"
- max-count="{{product_rotation_img_list_max}}"
- multiple="{{true}}"
- accept="image"
- image-fit="aspectFit"
- data-formkey="product_rotation_img_list"
- bind:after-read="afterRead"
- bind:delete="delete"/>
- </view>
- </view>
- </view>
- <view class="photo">
- <label>
- <text>商品详情图</text>
- <text>({{form.product_detail_img_list.length}}/{{product_detail_img_list_max}})</text>
- </label>
- <view class="value">
- <view
- class="van-uploader-wrap">
- <van-uploader
- file-list="{{ form.product_detail_img_list }}"
- max-count="{{product_detail_img_list_max}}"
- multiple="{{true}}"
- accept="image"
- image-fit="aspectFit"
- data-formkey="product_detail_img_list"
- bind:after-read="afterRead"
- bind:delete="delete"/>
- </view>
- </view>
- <view class="tip border-bottom-2">请上传尺寸为375*375像素图片</view>
- </view>
- <view class="form-item">
- <label>
- <text>标题</text>
- </label>
- <view class="value">
- <input
- value="{{form.product_title}}"
- placeholder="输入商品标题"
- placeholder-class="placeholder"
- data-formkey="product_title"
- bind:input="setFormValue"></input>
- </view>
- </view>
- <view class="describe">
- <view class="value">
- <textarea
- value="{{form.product_desc}}"
- placeholder="请输入商品简介"
- placeholder-class="placeholder"
- maxlength="{{200}}"
- auto-height="{{true}}"
- data-formkey="product_desc"
- bind:input="setFormValue"></textarea>
- <view class="words-limit">{{form.product_desc.length}}/200</view>
- </view>
- </view>
- <view
- class="form-item border-bottom-2"
- bind:tap="categoryShow">
- <label>
- <text>商品分类</text>
- </label>
- <view class="value">
- <view
- class="{{!!form.product_category_id.id ? '' : 'placeholder'}}">
- {{form.product_category_id.category_name || '请选择商品分类'}}
- </view>
- <image class="arrow" src="../../image/businessGoodsEdit/arrow.png"></image>
- </view>
- </view>
- <view
- class="form-item"
- bind:tap="brandShow">
- <label>
- <text>商品品牌</text>
- </label>
- <view class="value">
- <view class="{{!!form.product_brand_id.id ? '' : 'placeholder'}}">
- {{form.product_brand_id.brand_name || '请选择商品品牌'}}
- </view>
- <image class="arrow" src="../../image/businessGoodsEdit/arrow.png"></image>
- </view>
- </view>
- <view class="form-item">
- <label>
- <text>商品规格</text>
- </label>
- <view class="value">
- <input
- value="{{form.product_spec}}"
- placeholder="输入商品规格"
- placeholder-class="placeholder"
- data-formkey="product_spec"
- bind:input="setFormValue"></input>
- </view>
- </view>
- <view class="form-item" bind:tap="unitShow">
- <label>
- <text>单 位</text>
- </label>
- <view class="value">
- <view class="{{!!form.product_unit ? '' : 'placeholder'}}">{{form.product_unit || '请选择商品单位'}}</view>
- <image class="arrow" src="../../image/businessGoodsEdit/arrow.png"></image>
- </view>
- </view>
- <view class="form-item">
- <label>
- <text>批发价(元)</text>
- </label>
- <view class="value">
- <input
- value="{{form.product_all_price}}"
- placeholder="输入批发价"
- placeholder-class="placeholder"
- data-formkey="product_all_price"
- bind:input="setFormValue"></input>
- </view>
- </view>
- <view class="form-item">
- <label>
- <text>零售价(元)</text>
- </label>
- <view class="value">
- <input
- value="{{form.product_price}}"
- placeholder="输入零售价"
- placeholder-class="placeholder"
- data-formkey="product_price"
- bind:input="setFormValue"></input>
- </view>
- </view>
- <view class="form-item">
- <label>
- <text>库 存</text>
- </label>
- <view class="value">
- <input
- value="{{form.product_count}}"
- placeholder="输入库存"
- placeholder-class="placeholder"
- data-formkey="product_count"
- bind:input="setFormValue"></input>
- </view>
- </view>
- <view
- class="form-item border-bottom-2"
- bind:tap="saleAtTypeShow">
- <label>
- <text>发售时间</text>
- </label>
- <view class="value">
- <view
- class="{{!!form.product_sale_at ? '' : 'placeholder'}}">
- <block
- wx:if="{{!!form.product_sale_at}}">
- {{form.product_sale_at === '现货' ? form.product_sale_at : '预售时间:' + form.product_sale_at}}
- </block>
- <block wx:else>请选择预售时间</block>
- </view>
- <image class="arrow" src="../../image/businessGoodsEdit/arrow.png"></image>
- </view>
- </view>
- <button
- class="btn-submit"
- type="primary"
- form-type="submit">保存
- </button>
- </form>
- </view>
- </view>
- <!--弹窗:分类选择-->
- <van-popup
- show="{{ booCategory }}"
- close-on-click-overlay="{{false}}"
- round
- position="bottom"
- bind:click-overlay="categoryHide">
- <van-picker
- id="picker-category"
- columns="{{ categoryList }}"
- show-toolbar
- default-index="{{ categoryInDefaultIndex }}"
- bind:cancel="categoryHide"
- bind:confirm="categoryConfirm"/>
- </van-popup>
- <!--弹窗:品牌选择-->
- <van-popup
- show="{{ booBrand }}"
- close-on-click-overlay="{{false}}"
- round
- position="bottom"
- bind:click-overlay="brandHide">
- <van-picker
- id="picker-brand"
- columns="{{ brandList }}"
- show-toolbar
- default-index="{{ brandInDefaultIndex }}"
- bind:cancel="brandHide"
- bind:confirm="brandConfirm"/>
- </van-popup>
- <!--弹窗:单位选择-->
- <van-popup
- show="{{ booUnit }}"
- close-on-click-overlay="{{false}}"
- round
- position="bottom"
- bind:click-overlay="unitHide">
- <van-picker
- id="picker-unit"
- columns="{{ unitInColumns }}"
- show-toolbar
- default-index="{{ unitInDefaultIndex }}"
- bind:cancel="unitHide"
- bind:confirm="unitConfirm"/>
- </van-popup>
- <!--弹窗:预售选择-->
- <van-popup
- show="{{ booSaleAtType }}"
- close-on-click-overlay="{{false}}"
- position="bottom"
- bind:click-overlay="saleAtTypeHide">
- <view class="sale-at">
- <view
- class="time-0"
- data-type="0"
- bind:tap="handleSaleAtType">
- <view class="select-wrap">
- <image
- class="select"
- wx:if="{{saleAtType !== '0'}}"
- src="../../image/common/unselected.png"></image>
- <image
- class="select"
- wx:if="{{saleAtType === '0'}}"
- src="../../image/common/selected.png"></image>
- </view>
- <text>现货</text>
- <view
- class="arrow-wrap"
- style="visibility:hidden;">
- <image
- class="arrow"
- src="../../image/common/arrow_1.png"></image>
- </view>
- </view>
- <view
- class="time-1"
- data-type="1"
- bind:tap="handleSaleAtType">
- <view class="select-wrap">
- <image
- class="select"
- wx:if="{{saleAtType !== '1'}}"
- src="../../image/common/unselected.png"></image>
- <image
- class="select"
- wx:if="{{saleAtType === '1'}}"
- src="../../image/common/selected.png"></image>
- </view>
- <text
- class="placeholder">{{form.product_sale_at === '现货' || form.product_sale_at === '' ? '选择预售时间' : '预售时间:' + form.product_sale_at}}
- </text>
- <view class="arrow-wrap">
- <image
- class="arrow"
- src="../../image/common/arrow_1.png"></image>
- </view>
- </view>
- </view>
- </van-popup>
- <!--弹窗:预售时间选择-->
- <van-popup
- show="{{ booSaleAt }}"
- close-on-click-overlay="{{false}}"
- round
- position="bottom"
- bind:click-overlay="saleAtHide">
- <van-datetime-picker
- id="picker-datetime"
- type="date"
- value="{{ currentDate }}"
- min-date="{{ minDate }}"
- max-date="{{ maxDate }}"
- bind:cancel="saleAtHide"
- bind:confirm="saleAtConfirm"/>
- </van-popup>
|