index.wxml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <navigator url="#" wx:for="{{list}}" wx:key="itemid" class="item-box">
  2. <view class="top" bindtap="changeResults" data-item="{{item}}">
  3. <view class="image">
  4. <van-image width="100%" height="100%" fit="cover" src="{{item.attinfos[0].subfiles[0].url||item.attinfos[0].url||item.cover}}" use-loading-slot use-error-slot lazy-load>
  5. <van-loading slot="loading" type="spinner" size="20" vertical />
  6. <text slot="error">加载失败</text>
  7. </van-image>
  8. </view>
  9. <view class="content">
  10. <view class="title">
  11. <text class="line-1">{{item.itemname}}</text>
  12. <text class="iconfont icon-guanlian-shanchu" catchtap="deteleItem" data-item="{{item}}" />
  13. </view>
  14. <view class="exp">编号:{{item.itemno}}</view>
  15. <view class="exp">规格:{{item.spec ||" --"}}</view>
  16. <view class="exp">型号:{{item.model ||" --"}}</view>
  17. <view class="exp">品牌:{{item.brandname ||" --"}}</view>
  18. <view class="exp">领域:{{item.tradefield_shoppingcart ||" --"}}</view>
  19. <view class="exp"><text style="font-size: 24rpx;font-weight: 600;color: #FF3B30;">{{item.showPrice}}</text></view><!-- /<text style="font-size: 20rpx;">¥{{item.oldprice}}</text> -->
  20. </view>
  21. </view>
  22. <view class="bottom">
  23. <view class="check" bindtap="changeResults" data-item="{{item}}">
  24. <van-checkbox shape='square' disabled="{{sa_brandid && sa_brandid!=item.sa_brandid}}" icon-size='24rpx' label-class='label-class' value="{{ decide.checked(item.sa_shoppingcartid,results) }}" bind:change="onChange">
  25. 起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}}
  26. </van-checkbox>
  27. </view>
  28. <van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty}}" input-class='input-class' data-index="{{index}}" bind:minus='stepperChange' bind:plus='stepperChange' bind:blur='inputBlur' />
  29. </view>
  30. </navigator>
  31. <Yl_Empty wx:if="{{list.length === 0}}" />
  32. <!-- 底部 -->
  33. <view style="height: 130rpx;" />
  34. <view class="footer">
  35. <view class="left">
  36. <view class="sum">
  37. 商品合计:<text>{{sum}}</text>
  38. </view>
  39. <view class="transport">
  40. {{logistics}}
  41. </view>
  42. </view>
  43. <picker wx:if="{{classList.length>=2}}" range='{{classList}}' range-key='name' disabled='{{!results.length}}' bindchange="submit">
  44. <van-button custom-class='but' disabled='{{!results.length}}' bind:click="clickBut">生成订单</van-button>
  45. </picker>
  46. <van-button wx:else custom-class='but' disabled='{{!results.length}}' bind:click="clickBut">生成订单</van-button>
  47. </view>
  48. <wxs module="decide">
  49. module.exports = {
  50. checked: function (id, list) {
  51. return list.some(function (v) {
  52. return v == id
  53. });
  54. }
  55. }
  56. </wxs>
  57. <wxs module="gap">
  58. module.exports.price = function (figure, defaultamount) {
  59. return (figure - defaultamount).toFixed(2)
  60. }
  61. </wxs>