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.
 
 
 
 

1 lines
6.6 KiB

<view class="index-box"><view class="add-goodsimg-box"><view class="img-box acea-row"><view data-event-opts="{{[['tap',[['uploadImgs',['$event']]]]]}}" class="upload-box" bindtap="__e"><image src="../../../static/images/upload.png"></image></view><view data-event-opts="{{[['tap',[['uploadImg',[0]]]]]}}" class="upload-box" bindtap="__e"><block wx:if="{{!slider_image[0]||slider_image[0]==''}}"><image src="../../../static/images/addimg.png"></image></block><block wx:else><image src="{{slider_image[0]}}" mode="aspectFill"></image></block></view><view data-event-opts="{{[['tap',[['uploadImg',[1]]]]]}}" class="upload-box" bindtap="__e"><block wx:if="{{!slider_image[1]||slider_image[1]==''}}"><image src="../../../static/images/addimg.png"></image></block><block wx:else><image src="{{slider_image[1]}}" mode="aspectFill"></image></block></view><view data-event-opts="{{[['tap',[['uploadImg',[2]]]]]}}" class="upload-box" bindtap="__e"><block wx:if="{{!slider_image[2]||slider_image[2]==''}}"><image src="../../../static/images/addimg.png"></image></block><block wx:else><image src="{{slider_image[2]}}" mode="aspectFill"></image></block></view></view><view class="tips acea-row row-middle"><image src="../../../static/images/tips-icon.png"></image><text>最少上传一张,最多只能上传三张图片哦!</text></view></view><view class="goodsInfo-box"><view class="goodsInfo-item"><text>商品名称<text class="colR">*</text></text><input type="text" placeholder="输入商品名称" data-event-opts="{{[['input',[['__set_model',['','store_name','$event',[]]]]]]}}" value="{{store_name}}" bindinput="__e"/></view><view class="goodsInfo-item"><text>商品单位<text class="colR">*</text></text><input type="text" placeholder="输入商品单位" data-event-opts="{{[['input',[['__set_model',['','unit_name','$event',[]]]]]]}}" value="{{unit_name}}" bindinput="__e"/></view><view class="goodsInfo-item"><text>商品详情<text class="colR">*</text></text><view data-event-opts="{{[['tap',[['toGoodsDetails',['$event']]]]]}}" class="toEdit acea-row row-middle" bindtap="__e"><text>{{description==''?'去编辑':'已编辑'}}</text><image src="../../../static/images/arror-r-s.png"></image></view></view></view><view class="set-title">规格设置</view><view class="setattr-box"><view data-event-opts="{{[['tap',[['addAttr',['$event']]]]]}}" class="attr-item colB" bindtap="__e">添加属性</view><block wx:for="{{attrArr}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['editAttr',[index]]]]]}}" class="attr-item acea-row row-between row-middle" bindtap="__e"><view class="attr-item-l">{{item.attrName+"("+item.attrOptions.length+")"}}</view><image src="../../../static/images/arror-r-s.png"></image><view data-event-opts="{{[['tap',[['delAttr',[index]]]]]}}" class="del-attr" catchtap="__e">×</view></view></block></view><view class="add-sku-box"><view class="sku-item"><view class="sku img-sku acea-row row-middle row-between"><text>价格<text class="colR">*</text></text><input type="number" placeholder="请输入售价(元)" data-event-opts="{{[['input',[['__set_model',['$0','price','$event',[]],['attrs.__$n0']],['changePrice',['$event']]]]]}}" value="{{attrs[0].price}}" bindinput="__e"/></view><view class="sku img-sku acea-row row-middle row-between"><text>库存<text class="colR">*</text></text><input type="number" placeholder="请输入库存" data-event-opts="{{[['input',[['__set_model',['$0','stock','$event',[]],['attrs.__$n0']],['changeStock',['$event']]]]]}}" value="{{attrs[0].stock}}" bindinput="__e"/></view></view></view><block wx:if="{{batchData.titleStr}}"><view class="batch-set-box"><view class="box-top acea-row row-between-wrapper"><view class="name">{{batchData.titleStr}}</view><view class="attr-name w15">库存</view><view class="attr-name w15">价格</view></view><block wx:for="{{$root.l0}}" wx:for-item="i" wx:for-index="idx" wx:key="idx"><block><view class="box-b acea-row row-between-wrapper"><view class="name line1">{{i.g0}}</view><view class="inp-box w15"><input type="number" placeholder="0" data-event-opts="{{[['input',[['__set_model',['$0','stock','$event',[]],['batchData.priceArr.'+idx+'']]]]]}}" value="{{batchData.priceArr[idx].stock}}" bindinput="__e"/></view><view class="inp-box w15"><input type="number" placeholder="0" data-event-opts="{{[['input',[['__set_model',['$0','price','$event',[]],['batchData.priceArr.'+idx+'']]]]]}}" value="{{batchData.priceArr[idx].price}}" bindinput="__e"/></view></view></block></block></view></block><view data-event-opts="{{[['tap',[['toTempList',['$event']]]]]}}" class="temp-box acea-row row-between-wrapper" bindtap="__e"><text>运费模板</text><view class="acea-row row-middle"><text>{{temp}}</text><image src="../../../static/images/arror-r-s.png"></image></view></view><view class="temp-box goods-state acea-row row-between-wrapper"><text>商品状态</text><view class="acea-row row-middle"><radio-group data-event-opts="{{[['change',[['radioChange',['$event']]]]]}}" bindchange="__e"><label><radio value="{{0}}" checked="{{state==0}}"></radio><text>上架</text></label><label><radio value="{{1}}" checked="{{state==1}}"></radio><text>下架</text></label></radio-group></view></view><view class="btn-box"><view data-event-opts="{{[['tap',[['submit',['$event']]]]]}}" class="btn" bindtap="__e">提交</view></view><block wx:if="{{maskShow==true}}"><view class="mask-box"><block wx:if="{{addOptionsDialog==true}}"><view class="addattr-dialog"><view class="dialog-top acea-row row-between row-middle"><text>规格属性</text><view data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="close" bindtap="__e">×</view></view><view><view class="a-name"><input type="text" placeholder="输入属性名称,如:颜色" data-event-opts="{{[['input',[['__set_model',['$0','attrName','$event',[]],['attr']]]]]}}" value="{{attr.attrName}}" bindinput="__e"/></view><view class="o-name-box"><block wx:for="{{attr.attrOptions}}" wx:for-item="o" wx:for-index="i" wx:key="i"><block><view class="o-item-box acea-row row-between row-middle"><input type="text" maxlength="10" placeholder="输入选项,如:红色,10个字以内" data-event-opts="{{[['input',[['__set_model',['$0',i,'$event',[]],['attr.attrOptions']]]]]}}" value="{{attr.attrOptions[i]}}" bindinput="__e"/><text data-event-opts="{{[['tap',[['delOption',[i]]]]]}}" class="close" bindtap="__e">×</text></view></block></block><view data-event-opts="{{[['tap',[['addOption',['$event']]]]]}}" class="add-option-btn" bindtap="__e">+选项</view></view></view><view data-event-opts="{{[['tap',[['submitAddAttr',['$event']]]]]}}" class="s-btn" bindtap="__e">确定</view></view></block></view></block></view>