businessGoodsEdit.wxml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <view class="wrapper">
  2. <view class="width-690">
  3. <form bind:submit="onSubmit">
  4. <view class="photo">
  5. <label>
  6. <text>商品主图</text>
  7. <text>({{form.product_img_url.length}}/{{product_img_url_max}})</text>
  8. </label>
  9. <view class="value">
  10. <view
  11. class="van-uploader-wrap">
  12. <van-uploader
  13. file-list="{{ form.product_img_url }}"
  14. max-count="{{product_img_url_max}}"
  15. multiple="{{false}}"
  16. accept="image"
  17. data-formkey="product_img_url"
  18. bind:click-preview="uploadImg"
  19. bind:after-read="afterRead"
  20. bind:delete="delete"/>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="swiper-photo">
  25. <label>
  26. <text>商品轮播图</text>
  27. <text>({{form.product_rotation_img_list.length}}/{{product_rotation_img_list_max}})</text>
  28. </label>
  29. <view class="value">
  30. <view
  31. class="van-uploader-wrap">
  32. <van-uploader
  33. file-list="{{ form.product_rotation_img_list }}"
  34. max-count="{{product_rotation_img_list_max}}"
  35. multiple="{{true}}"
  36. accept="image"
  37. data-formkey="product_rotation_img_list"
  38. bind:click-preview="uploadImg"
  39. bind:after-read="afterRead"
  40. bind:delete="delete"/>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="swiper-photo">
  45. <label>
  46. <text>商品详情图</text>
  47. <text>({{form.product_detail_img_list.length}}/{{product_detail_img_list_max}})</text>
  48. </label>
  49. <view class="value">
  50. <view
  51. class="van-uploader-wrap">
  52. <van-uploader
  53. file-list="{{ form.product_detail_img_list }}"
  54. max-count="{{product_detail_img_list_max}}"
  55. multiple="{{true}}"
  56. accept="image"
  57. data-formkey="product_detail_img_list"
  58. bind:click-preview="uploadImg"
  59. bind:after-read="afterRead"
  60. bind:delete="delete"/>
  61. </view>
  62. </view>
  63. <view class="tip">请上传尺寸为375*375像素图片</view>
  64. </view>
  65. <view class="name">
  66. <label>
  67. <text>标题</text>
  68. </label>
  69. <view class="value">
  70. <input
  71. value="{{form.product_title}}"
  72. placeholder="输入商品标题"
  73. placeholder-class="placeholder"></input>
  74. </view>
  75. </view>
  76. <view class="describe">
  77. <view class="value">
  78. <textarea
  79. value=""
  80. placeholder="请输入商品简介"
  81. placeholder-class="placeholder"
  82. maxlength="{{200}}"
  83. auto-height="{{true}}"></textarea>
  84. </view>
  85. <view class="words-limit">0/200</view>
  86. </view>
  87. <view class="type">
  88. <label>
  89. <text>商品分类</text>
  90. </label>
  91. <view class="value placeholder">请选择商品分类</view>
  92. <image class="arrow" src="../../image/businessGoodsEdit/arrow.png"></image>
  93. </view>
  94. <view class="type">
  95. <label>
  96. <text>商品品牌</text>
  97. </label>
  98. <view class="value placeholder">请选择商品品牌</view>
  99. <image class="arrow" src="../../image/businessGoodsEdit/arrow.png"></image>
  100. </view>
  101. <view class="name">
  102. <label>
  103. <text>商品规格</text>
  104. </label>
  105. <view class="value">
  106. <input
  107. value="{{form.product_spec}}"
  108. placeholder="输入商品规格"
  109. placeholder-class="placeholder"></input>
  110. </view>
  111. </view>
  112. <view class="type">
  113. <label>
  114. <text>单 位</text>
  115. </label>
  116. <view class="value placeholder">请选择商品单位</view>
  117. <image class="arrow" src="../../image/businessGoodsEdit/arrow.png"></image>
  118. </view>
  119. <!-- todo -->
  120. <view
  121. class="name"
  122. wx:if="{{!!form.id}}">
  123. <label>
  124. <text>商品货号</text>
  125. </label>
  126. <view class="value">
  127. <input
  128. value=""
  129. placeholder="输入商品货号"
  130. placeholder-class="placeholder"></input>
  131. </view>
  132. </view>
  133. <view class="name">
  134. <label>
  135. <text>批发价</text>
  136. </label>
  137. <view class="value">
  138. <input
  139. value="{{form.product_all_price}}"
  140. placeholder="输入批发价"
  141. placeholder-class="placeholder"></input>
  142. </view>
  143. </view>
  144. <view class="name">
  145. <label>
  146. <text>零售价</text>
  147. </label>
  148. <view class="value">
  149. <input
  150. value="{{form.product_price}}"
  151. placeholder="输入零售价"
  152. placeholder-class="placeholder"></input>
  153. </view>
  154. </view>
  155. <view class="name">
  156. <label>
  157. <text>库 存</text>
  158. </label>
  159. <view class="value">
  160. <input
  161. value="{{form.product_count}}"
  162. placeholder="输入库存"
  163. placeholder-class="placeholder"></input>
  164. </view>
  165. </view>
  166. <!-- <view class="name">-->
  167. <!-- <label>-->
  168. <!-- <text>状态</text>-->
  169. <!-- </label>-->
  170. <!-- <view class="value">-->
  171. <!-- <input-->
  172. <!-- value="{{form.product_spec}}"-->
  173. <!-- placeholder=""-->
  174. <!-- placeholder-class="placeholder"></input>-->
  175. <!-- </view>-->
  176. <!-- </view>-->
  177. <!-- 编 辑: edit 发 布: send-->
  178. <button
  179. class="btn-submit edit"
  180. type="primary"
  181. form-type="submit">编 辑
  182. </button>
  183. </form>
  184. </view>
  185. </view>
  186. <van-popup
  187. show="{{ show }}"
  188. close-on-click-overlay="{{false}}"
  189. round
  190. position="bottom"
  191. bind:click-overlay="onClose"
  192. bind:close="onClose">
  193. <van-picker
  194. columns="{{ columns }}"
  195. show-toolbar
  196. default-index="{{ 2 }}"
  197. bind:change="onChange"/>
  198. </van-popup>