12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!--pages/goods/edit.wxml-->
- <form bindsubmit="formSubmit" report-submit="true">
- <wux-cell-group>
- <wux-cell title="商品分类" hover-class="none" is-link extra="{{categoryDisplay}}" bind:click="showCategoryPicker"></wux-cell>
- <wux-cell hover-class="none">
- <wux-input label="商品名称" data-label="商品名称" data-rules="required" error="{{goodsName_error}}" value="{{goodsName}}" controlled focus="{{goodsName_focus}}" data-name="goodsName" bind:change="inputChange" bind:error="onError" bind:blur="onBlur" clear placeholder="请输入商品名称"></wux-input>
- </wux-cell>
- <wux-cell hover-class="none">
- <wux-input label="商品编号" data-label="商品编号" data-rules="required" error="{{sn_error}}" focus="{{sn_focus}}" value="{{sn}}" controlled data-name="sn" bind:change="inputChange" bind:error="onError" bind:blur="onBlur" clear placeholder="请输入商品编号"></wux-input>
- </wux-cell>
- <wux-cell title="商品图片" hover-class="none">
- <view style="margin-top:20rpx">
- <!-- <wux-upload listType="picture-card" controlled fileList="{{fileList}}" showUploadList max="4" url="{{uploadUrl}}" bind:change="onFileChange" bind:success="onFileUploadSuccess" bind:fail="onFail" bind:complete="onFileComplete" bind:preview="onPreview"
- bind:remove="onFileRemove">
- </wux-upload> -->
- <view wx:if="{{fileList.length>0}}" >
- <block class="image_upload" wx:for="{{fileList}}" >
- <image data-action="edit" data-index="{{index}}" bindtap="navToResize" mode="aspectFit" src="{{item.url}}"></image>
- <van-icon class="image_close" name="close" size="20px"/>
- </block>
- <view data-action="add" class="image_upload" bindtap="navToResize">
- <van-icon name="plus" size="20px" />
- </view>
- </view>
- <view wx:else data-action="add" class="image_upload" bindtap="navToResize">
- <van-icon name="plus" size="20px" />
- </view>
-
- </view>
- </wux-cell>
- <wux-cell hover-class="none">
- <wux-input label="商品价格" value="{{price}}" controlled data-label="商品价格" data-rules="required" error="{{price_error}}" focus="{{price_focus}}" data-name="price" bind:change="inputChange" type="digit" bind:error="onError" bind:blur="onBlur" clear placeholder="请输入商品价格"></wux-input>
- </wux-cell>
- <wux-cell hover-class="none">
- <wux-input label="库存" value="{{stock}}" controlled data-label="库存" data-rules="required" error="{{stock_error}}" focus="{{stock_focus}}" data-name="stock" bind:change="inputChange" type="digit" bind:error="onError" bind:blur="onBlur" clear placeholder="请输入库存" disabled="{{goods_id}}"></wux-input>
- </wux-cell>
- </wux-cell-group>
- <view class="cu-bar bg-white solid-bottom">
- <view class="action text-black">商品详情</view>
- </view>
- <view class="cu-card">
- <view>
- <view wx:for="{{pics}}" wx:key="{{index}}" class="margin bg-white text-center padding shadow margin-top-sm" >
- <view class="cu-bar bg-white">
- <view class="action"></view>
- <view class="action">
- <button class="cu-btn line-green sm cuIcon-edit margin-right-sm" bindtap="changePic" data-id="{{index}}">更换</button>
- <button class="cu-btn line-orange sm cuIcon-delete" bindtap="deletePic" data-id="{{index}}">删除</button>
- </view>
- </view>
- <image mode="aspectFit" src="{{item}}" ></image>
- </view>
- </view>
-
- <view class="margin bg-white text-center padding shadow margin-top-sm">
- <view bindtap="sendImage" style="height:200rpx" class="flex justify-center align-center text-xsl text-green">
- <view class="cuIcon-roundadd"></view>
- </view>
- </view>
- </view>
- <!--分类选择弹出层-->
- <wux-cascader visible="{{ categoryShow }}" controlled value="{{ categoryValue }}" title="商品分类" defaultFieldNames="{{defaultFieldNames}}" closable options="{{ options2 }}" bind:close="closeCategoryPicker" bind:change="categoryChange" />
- <view class="operBtn">
- <van-row>
- <van-col span="12" wx:if="{{goods_id}}">
-
- <button class="van-button van-button van-button--primary van-button--primary van-button--large van-button--large van-button--square van-button--square" bindtap="offProduct" form-type="submit">下架</button>
- </van-col>
- <van-col span="{{goods_id?12:24}}">
-
- <!-- <wux-button block type="calm" bindtap="aboveProduct" formType="submit">calm</wux-button> -->
- <button class="van-button van-button van-button--danger van-button--danger van-button--large van-button--large van-button--square van-button--square" bindtap="aboveProduct" form-type="submit">上架</button>
- </van-col>
- </van-row>
- </view>
- </form>
- <!--顶部提示框-->
- <wux-toptips id="wux-toptips" />
- <wux-toast id="wux-toast" />
- <wux-loading id="wux-loading" />
- <wux-dialog id="wux-dialog" />
|