create.wxml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <Yl_Headline title='开单信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
  2. <Yl_Field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt" />
  3. <view style="height: 20rpx;"></view>
  4. <!-- Tab切换 -->
  5. <van-tabs active="{{activeTab}}" color='#3874F6' title-active-color='#3874F6' bind:change="onTabChange">
  6. <van-tab title="商品">
  7. <view class="head">
  8. <view class="count">商品明细</view>
  9. <view class="expand">
  10. <navigator url="#" class="but" bindtap="addProduct">
  11. <van-icon name="plus" />
  12. </navigator>
  13. </view>
  14. </view>
  15. <view wx:if="{{productList.length == 0}}" class="empty">
  16. <text>请添加商品</text>
  17. </view>
  18. <view wx:else class="product-list">
  19. <view wx:for="{{productList}}" wx:key="index" class="product-item">
  20. <view class="product-header">
  21. <view class="product-name">{{item.itemname}}</view>
  22. <view class="product-actions">
  23. <van-icon name="delete" bindtap="deleteProduct" data-index="{{index}}" />
  24. </view>
  25. </view>
  26. <view class="product-body">
  27. <view class="product-desc">
  28. <text>品号:{{item.itemno || '--'}}</text>
  29. <text>型号:{{item.model || '--'}}</text>
  30. </view>
  31. <view class="product-desc">
  32. <text>原价:{{item.originalPrice || item.price}}元</text>
  33. </view>
  34. <view class="product-edit">
  35. <view class="edit-item">
  36. <view class="label">单价:</view>
  37. <input class="input" type="digit" value="{{item.price}}" data-index="{{index}}" data-field="price" bindblur="onFieldBlur" />
  38. </view>
  39. <view class="edit-item">
  40. <view class="label">折扣:</view>
  41. <input class="input" type="digit" value="{{item.discount || 1}}" data-index="{{index}}" data-field="discount" bindblur="onFieldBlur" />
  42. </view>
  43. <view class="edit-item">
  44. <view class="label">数量:</view>
  45. <input class="input" type="digit" value="{{item.qty}}" data-index="{{index}}" data-field="qty" bindblur="onFieldBlur" />
  46. </view>
  47. <view class="edit-item">
  48. <view class="label">金额:</view>
  49. <input class="input" type="digit" value="{{item.amount}}" data-index="{{index}}" data-field="amount" bindblur="onFieldBlur" />
  50. </view>
  51. </view>
  52. <view class="product-remarks">
  53. <view class="label">备注:</view>
  54. <textarea class="textarea remarks-input" placeholder="请输入备注" value="{{item.remarks || ''}}" data-index="{{index}}" data-field="remarks" bindblur="onFieldBlur" auto-height />
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </van-tab>
  60. <van-tab title="附件">
  61. <view style="padding: 20rpx;">
  62. <view class="empty">
  63. <text>请添加附件</text>
  64. </view>
  65. </view>
  66. </van-tab>
  67. </van-tabs>
  68. <view style="height: 150rpx;" />
  69. <view class="new-footer">
  70. <van-button custom-class='new-submit' color='#3874F6' disabled='{{disabled || loading}}' loading='{{loading}}' bind:tap='submit'>确定</van-button>
  71. </view>