product-attribute.wxml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <!-- 顶部信息 -->
  2. <van-sticky scroll-top="0">
  3. <van-search model:value="{{ searchText }}" bind:change="onSearchText" bind:search="doSearch" placeholder="输入要素名称/备注"> </van-search>
  4. <van-dropdown-menu active-color="#1B365D">
  5. <van-dropdown-item id="status" title="{{statusItem.text }}">
  6. <dk-dropdown-switch dataList="{{statusList}}" bind:commit='dropdownSwitchCommit'></dk-dropdown-switch>
  7. </van-dropdown-item>
  8. </van-dropdown-menu>
  9. </van-sticky>
  10. <view style="display: flex;">
  11. <!-- 左侧菜单列表 -->
  12. <van-sidebar activeKey="{{sideKey}}" bindchange="changeSidebar" custom-class="left-class">
  13. <view style="height:calc({{windowHeight+'px'}} - {{'220rpx'}});overflow: scroll;">
  14. <van-sidebar-item wx:key="index" custom-class="{{sideKey - 1 == index? 'sidebar-item-before': (sideKey + 1 == index?'sidebar-item-next':'sidebar-item')}}" title="{{item.name}}" data-id="{{item.id}}" wx:for="{{leftData}}" />
  15. </view>
  16. </van-sidebar>
  17. <!-- 内容列表 -->
  18. <view style="margin-left: 140rpx;width: 100%;">
  19. <view wx:for="{{tableData}}" wx:key="index" class="main-class">
  20. <van-swipe-cell right-width="{{ 65 }}">
  21. <view bind:tap="toDetail" data-index="{{index}}" class="main-foot" style="border-radius:15rpx;">
  22. <view class="table-content">
  23. <view wx:if="{{listTitle == '商品品牌'}}">
  24. <view class="table-content-row">
  25. <view style="display: flex;">
  26. <view style="font-size: 15px;font-weight: 600;width: 80%;">
  27. {{fieldData.typeName}}
  28. </view>
  29. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  30. <text style=" font-size: 13px;color: #FFFFFF;">{{item.flagValue ? '启用' : '停用'}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="table-row">
  35. <view class="table-content-row">
  36. <view style="display: flex;">
  37. <view class="table-content-row-font">
  38. <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="品牌编码" copyValue="{{item.code}}"></dk-text>
  39. </view>
  40. <view class="table-content-class">
  41. {{item.code}}
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="table-row">
  47. <view class="table-content-row">
  48. <view style="display: flex;">
  49. <view class="table-content-row-font">
  50. <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="品牌名称" copyValue="{{item.name}}"></dk-text>
  51. </view>
  52. <view class="table-content-class">
  53. {{item.name}}
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="table-row">
  59. <view class="table-content-row">
  60. <view style="display: flex;">
  61. <view class="table-content-row-font">
  62. <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="供应商" copyValue="{{item.supplierName}}"></dk-text>
  63. </view>
  64. <view class="table-content-class">
  65. {{item.supplierName}}
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view wx:if="{{listTitle == '商品种类'}}">
  72. <view class="table-content">
  73. <view class="table-content-row">
  74. <view style="display: flex;">
  75. <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
  76. <van-icon name="{{item.arrow_1 ? 'arrow-down':'arrow'}}" color="#1B365D" />
  77. </view>
  78. <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{index}}">
  79. {{item.name}}
  80. </view>
  81. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  82. <text style=" font-size: 13px;color: #FFFFFF;">{{item.flagValue ? '启用' : '停用'}}</text>
  83. </view>
  84. </view>
  85. </view>
  86. <view style="width: 80%;flex-direction: row;margin-top: 0px;" wx:if="{{item.arrow_1}}">
  87. <view wx:for="{{item.arrow_1_list}}" wx:for-index="arrow_1_index" wx:for-item="arrow_1_item" class="table-content-row" style="width:100%;margin-left: 20rpx;">
  88. <view style="display: flex;">
  89. <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
  90. <van-icon name="{{arrow_1_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
  91. </view>
  92. <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_1_index}}">
  93. {{arrow_1_item.name}}
  94. </view>
  95. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ arrow_1_item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  96. <text style=" font-size: 13px;color: #FFFFFF;">{{arrow_1_item.flagValue ? '启用' : '停用'}}</text>
  97. </view>
  98. </view>
  99. <view class="table-row" style="width: 100%;" wx:if="{{arrow_1_item.arrow_2}}">
  100. <view wx:for="{{arrow_1_item.arrow_2_list}}" wx:for-index="arrow_2_index" wx:for-item="arrow_2_item" class="table-content-row" style="width:100%;padding-left:10px;padding-right: 2rpx;">
  101. <view style="display: flex;">
  102. <view style="width: 10%;" bind:tap="openArrow" data-index="{{index}}">
  103. <van-icon name="{{arrow_2_item.arrow_2 ? 'arrow-down':'arrow'}}" color="#1B365D" />
  104. </view>
  105. <view style="font-size: 14px;font-weight: 600;width: 80%;" bind:tap="openArrow" data-index="{{arrow_2_index}}">
  106. {{arrow_2_item.name}}
  107. </view>
  108. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ arrow_2_item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  109. <text style=" font-size: 13px;color: #FFFFFF;">{{arrow_2_item.flagValue ? '启用' : '停用'}}</text>
  110. </view>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. <view wx:if="{{listTitle == '商品系列'}}">
  119. <view class="table-content-row">
  120. <view style="display: flex;">
  121. <view style="font-size: 15px;font-weight: 600;width: 80%;">
  122. {{item.name}}
  123. </view>
  124. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  125. <text style=" font-size: 13px;color: #FFFFFF;">{{item.flagValue ? '启用' : '停用'}}</text>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view wx:if="{{listTitle == '计量单位'}}">
  131. <view class="table-content">
  132. <view class="table-content-row">
  133. <view style="display: flex;">
  134. <view style="font-size: 14px;font-weight: 600;width: 50%;">
  135. {{item.name}}
  136. </view>
  137. <view style="font-size: 14px;font-weight: 600;width: 30%;margin-left: 20rpx;">
  138. {{'小数:' +item.decimal}}
  139. </view>
  140. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ item.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  141. <text style=" font-size: 13px;color: #FFFFFF;">{{item.flagValue ? '启用' : '停用'}}</text>
  142. </view>
  143. </view>
  144. </view>
  145. <!-- <view wx:if="{{item.list && item.list.length > 0}}">
  146. <view class="table-content-row" wx:for="{{item.list}}" wx:for-index="index_" wx:for-item="item_">
  147. <view style="display: flex;">
  148. <view style="font-size: 14px;font-weight: 600;width: 50%;margin-left: 20rpx;">
  149. {{item_.name}}
  150. </view>
  151. <view style="font-size: 14px;font-weight: 600;width: 30%;margin-left: 20rpx;">
  152. {{'小数:' +item_.decimal}}
  153. </view>
  154. <view style="height: 49rpx;border-radius: 6rpx;background-color: {{ item_.flagValue ?'#77C5D5':'rgba(228, 0, 43, 1)'}};text-align: center;width: 20%;">
  155. <text style=" font-size: 13px;color: #FFFFFF;">{{item_.flagValue ? '启用' : '停用'}}</text>
  156. </view>
  157. </view>
  158. </view>
  159. </view> -->
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. <view data-index="{{index}}" bind:tap="onCloseDel" slot="right">{{item.flagValue ? '停用' : '启用'}}</view>
  165. </van-swipe-cell>
  166. </view>
  167. <!-- 保留高度 -->
  168. <view style="height: 220rpx;"></view>
  169. </view>
  170. </view>
  171. <!-- 弹窗 编辑/新建-->
  172. <van-popup show="{{showPopup}}" position="bottom" bind:close="onClosePopup" custom-class="function-pop-class">
  173. <view style="background-color:#F8F9FD;color:#1B365D;font-size: 17px;font-weight: 600;display: flex;justify-content: left;align-items: center;padding: 40rpx;">
  174. <view>{{listTitle}}</view>
  175. </view>
  176. <view wx:if="{{listTitle == '商品品牌'}}">
  177. <van-field disabled="{{false}}" disabled="{{true}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="{{'PP00001'}}" input-align="right" label="品牌编码" placeholder="{{'请输入' + '品牌编码'}}" autosize border="{{ false }}">
  178. </van-field>
  179. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" maxlength="50" value="{{'蒙娜丽莎瓷砖'}}" input-align="right" label="品牌名称" placeholder="{{'请输入' + '品牌名称'}}" autosize border="{{ false }}">
  180. </van-field>
  181. <van-field label-class="nomal-label" input-width="200rpx" input-class="dk-cell-value-class" input-align="right" data-key="supplier-list" maxlength="25" type="text" value="{{'' }}" label="供应商" placeholder="请选择" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" catchtap="openSingle" readonly="{{true}}">
  182. </van-field>
  183. </view>
  184. <view wx:if="{{listTitle == '商品种类'}}">
  185. <van-field disabled="{{false}}" disabled="{{true}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="{{'ZL00001'}}" input-align="right" label="种类编码" placeholder="{{'请输入' + '种类编码'}}" autosize border="{{ false }}">
  186. </van-field>
  187. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" maxlength="50" value="{{'浴室柜'}}" input-align="right" label="种类名称" placeholder="{{'请输入' + '种类名称'}}" autosize border="{{ false }}">
  188. </van-field>
  189. <van-field label-class="nomal-label" input-width="200rpx" input-class="dk-cell-value-class" input-align="right" data-key="product-types" maxlength="25" type="text" value="{{'' }}" label="父级" placeholder="请选择" autosize border="{{ false }}" right-icon="arrow" color="#95A8CB" catchtap="openSingle" readonly="{{true}}">
  190. </van-field>
  191. </view>
  192. <view wx:if="{{listTitle == '商品系列'}}">
  193. <van-field disabled="{{false}}" disabled="{{true}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="{{'ZL00001'}}" input-align="right" label="系列编码" placeholder="{{'请输入' + '系列编码'}}" autosize border="{{ false }}">
  194. </van-field>
  195. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" maxlength="50" value="{{'浴室柜'}}" input-align="right" label="系列名称" placeholder="{{'请输入' + '系列名称'}}" autosize border="{{ false }}">
  196. </van-field>
  197. </view>
  198. <view wx:if="{{listTitle == '计量单位'}}">
  199. <van-field disabled="{{false}}" disabled="{{true}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="{{'PP00001'}}" input-align="right" label="单位编码" placeholder="{{'请输入' + '单位编码'}}" autosize border="{{ false }}">
  200. </van-field>
  201. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" maxlength="50" value="{{'蒙娜丽莎瓷砖'}}" input-align="right" label="单位名称" placeholder="{{'请输入' + '单位名称'}}" autosize border="{{ false }}">
  202. </van-field>
  203. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" maxlength="50" value="{{'0'}}" input-align="right" label="小数位数" placeholder="{{'请输入' + '品牌名称'}}" autosize border="{{ false }}">
  204. </van-field>
  205. <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="" input-align="right" label="备注" placeholder="{{'请输入' + '备注'}}" autosize border="{{ false }}"></van-field>
  206. <!-- <view style="height: 40rpx;color:#95A8CB;font-size: 12px;text-align: center;">添加辅助单位</view>
  207. <van-field input-width="200rpx" disabled="{{true}}" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ 'JL00001' }}" input-align="right" label="辅助单位编码" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  208. </van-field>
  209. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ '浴室柜' }}" input-align="right" label="辅助单位名称" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  210. </van-field>
  211. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ '0' }}" input-align="right" label="小数位数" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  212. </van-field>
  213. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ '1' }}" input-align="right" label="单位换算" placeholder="" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  214. </van-field> -->
  215. </view>
  216. <!-- <van-field disabled="{{false}}" input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" maxlength="50" value="" input-align="right" label="备注" placeholder="{{'请输入' + '备注'}}" autosize border="{{ false }}">
  217. </van-field> -->
  218. <!-- <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="red-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.name }}" input-align="right" label="仓库名称" placeholder="请输入仓库名称" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  219. </van-field>
  220. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.value }}" input-align="right" label="仓库主管" placeholder="请输入仓库主管" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  221. </van-field>
  222. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.value }}" input-align="right" label="主管电话" placeholder="请输入主管电话" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  223. </van-field>
  224. <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ showPopupItem.remark }}" input-align="right" label="备注" placeholder="请输入备注" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  225. </van-field> -->
  226. <!-- 保留 -->
  227. <!-- <van-field input-width="200rpx" input-class="dk-cell-value-class" input-align="left" label-class="nomal-label" data-key="addressNo" maxlength="50" value="{{ form.customerForm.addressNo }}" input-align="right" label="仓库名称" placeholder="请输入仓库名称" autosize border="{{ false }}" bind:change="changeCustomerFormField">
  228. </van-field> -->
  229. <view style="display: flex; padding:35rpx 34rpx 62rpx 34rpx;">
  230. <view style="width:48%">
  231. <van-button size="large" plain round color="#1B365D" custom-style="height:88rpx;" bind:click="onClosePopup" type="default">取消
  232. </van-button>
  233. </view>
  234. <view style="width: 4%;"></view>
  235. <view style="width:48%;">
  236. <van-button size="large" round color="#1B365D" custom-style="height:88rpx;" bind:click="allClean" type="default">保存
  237. </van-button>
  238. </view>
  239. </view>
  240. </van-popup>
  241. <!-- 底部信息 -->
  242. <dk-save-bottom flagTypeName="basic-data" bottomClass="{{true}}" bind:submit="toClose" bind:allClean="toAdd" />