dk-list.wxml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
  2. <view wx:for="{{list}}" data-item="{{item}}" wx:key="index" wx:for-index='fIndex' class="{{simpleFlag?'main-simple-class':'main-class' }}">
  3. <!-- 默认无法停用 -->
  4. <van-swipe-cell right-width="{{ 65 }}" disabled="{{swipeDisabled || (defaultFlag && item[defaultFlagKey])}}" data-index="{{fIndex}}" data-item="{{item}}" async-close bind:close="onCloseSwipe">
  5. <view class="main-foot" style="position: relative;">
  6. <view class="table-content" catchtap="toDetail" data-item="{{item}}" data-index="{{fIndex}}">
  7. <!-- 标题行 -->
  8. <view class="{{simpleFlag?'table-title-simple-row':'table-title-row'}}">
  9. <view class="table-content-row-title-two" style="display: flex;width: 100%;justify-content: space-between;">
  10. <view style="display: flex;align-items: center;">
  11. <!-- 标题图标 -->
  12. <view catchtap="toTitle" wx:if="{{titleImageFlag}}" data-item="{{item}}" data-index="{{fIndex}}" style="width: 39rpx;height: 39rpx;background-color: #95A8CB;border-radius:50%;">
  13. <view style="width: 39rpx;height: 39rpx;text-align: center;">
  14. <van-image round width="100%" height="100%" fit="fill" src="{{imageUrl + titleImage}}" />
  15. </view>
  16. </view>
  17. <!-- 选择框-->
  18. <van-checkbox wx:if="{{chooseFlag}}" checked-color="#E4002B" value="{{ item.checked }}" data-index="{{fIndex}}" catchtap="chooseData" icon-size="16px"></van-checkbox>
  19. <!-- 标题 -->
  20. <view class="title-class" style="width: {{(statusFlag && item[status] || switchFlag || flgPoint)?'100%':'100%'}}">
  21. <dk-text catchtap="toTitle" data-item="{{item}}" data-index="{{fIndex}}" textDecoration="underline" fontSize="15px" value="{{item[title]}}"></dk-text>
  22. <view wx:if="{{item && item[roleValue]}}" type="warning" class="tag-view" plain style="margin-left: 15rpx;" size="large">负责人</view>
  23. <!-- 原来的弯角 -->
  24. <view class="corner-view" style="margin-left:12rpx;" wx:if="{{item[titleCorner]}}">
  25. <view class="corner-view-text">{{item[titleCorner]}}</view>
  26. </view>
  27. </view>
  28. </view>
  29. <view style="display: flex; align-items: center;">
  30. <!-- subMainTitle -->
  31. <view style="width: auto;padding-top: 5rpx;" wx:if="{{subMainTitle}}">
  32. <dk-text data-item="{{item}}" textDecoration="underline" fontSize="15px" value="{{subMainTitlelabel + item[subMainTitle]}}"></dk-text>
  33. </view>
  34. <view style="width: auto;padding-top: 5rpx" wx:if="{{subTitle}}">
  35. <dk-text data-item="{{item}}" fontSize="11px" fontWeight="400" color="#95A8CB" value="{{item[subTitle]}}"></dk-text>
  36. </view>
  37. <!-- defaultFlagKey -->
  38. <view wx:if="{{defaultFlag && item[defaultFlagKey]}}" class="corner-view" style="width: 100rpx; border-radius: 10rpx;margin-right: 1vw;">
  39. <view class="corner-view-text">{{'默认'}}
  40. </view>
  41. </view>
  42. <!-- 红边框 -->
  43. <view wx:if="{{item[customText]}}" style="display: flex; align-items: center; justify-content: flex-end; font-size: 13px;">
  44. <view style="color: red; border: 1px solid #EA4444; border-radius: 11rpx; padding: 5rpx 10rpx; text-align: center;">
  45. {{item[customText]}}
  46. </view>
  47. </view>
  48. <!-- 状态 -->
  49. <view wx:if="{{statusFlag && item[status]}}" class="status-class" data-item="{{item}}" catchtap="toStatus">
  50. <view class="status-detail-class" style="{{item.color?'color:' + item.color:null }}">{{item[status]}}
  51. </view>
  52. </view>
  53. <!-- 启用/停用标识-->
  54. <view wx:if="{{switchFlag}}" style="text-align: right; display: flex; justify-content: flex-end; align-items: center;">
  55. <view wx:if="{{flgValidOnFlag && !item['flgValid']}}" class="status-detail-class" style="display: flex; justify-content: center; align-items: center; color: red; width: 66rpx; height: 66rpx; border: 1px solid #EA4444; border-radius: 11rpx;">
  56. {{item['flgValid'] ? '' : $t['disable']}}
  57. </view>
  58. </view>
  59. <!--按钮-->
  60. <view wx:if="{{titleBtnText}}" class="status-class" data-item="{{item}}" catchtap="handleTitleBtn">
  61. <view class="{{item[roleValue]?'btn-detail-class-gray':'btn-detail-class'}}">{{titleBtnText}}
  62. </view>
  63. </view>
  64. <!-- 三个小点 -->
  65. <view wx:if="{{ flgPoint && (item.flgPoint == null || item.flgPoint)}}" class="oas-title-value" data-item="{{item}}" catchtap="toPoint">
  66. <van-icon size="25" name="ellipsis" color="#1B365D" />
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- 图标-作废 收款 -->
  72. <view wx:if="{{!switchFlag && item['flgValid'] !=null && !item['flgValid']}}" class="status-view">
  73. <van-image round width="150rpx" height="150rpx" src="{{imageUrl + statusImage}}" />
  74. </view>
  75. <!-- 图标自定义 -->
  76. <view wx:if="{{statusImageFlag && item[statusImageFlagValue]}}" class="status-view">
  77. <van-image round width="150rpx" height="150rpx" src="{{imageUrl + statusImage}}" />
  78. </view>
  79. <view wx:if="{{ !detailReportFlag}}" style="margin-top: 20rpx; margin-bottom: 20rpx;">
  80. <!-- 内容 -->
  81. <view wx:if="{{!contentCol && !simpleFlag}}" class="table-content-row" wx:for="{{content}}" wx:for-item="col" wx:for-index="{{fc}}" data-item="{{col}}">
  82. <view style="display: flex;">
  83. <view class="table-content-row-font" style="display: flex;justify-content: center;align-items: center;">
  84. <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="{{col.title}}" copyValue="{{wxmlUtil.setItemValue(item,col.name)}}"></dk-text>
  85. </view>
  86. <view wx:if="{{col.type === 'number'}}" style="width:100%;">
  87. <dk-number-input class="number-class" sign="" fontSize="14" height="36rpx" data-key="{{col.name}}" placeholder="{{col.placeholder}}" center="left" data-index="{{fIndex}}" fontWeight="600" inputValue="{{item[col.name]}}" bind:triggerBindValue="changeNumberInput">
  88. </dk-number-input>
  89. </view>
  90. <view wx:if="{{col.type === 'amount'}}" style="width:100%;">
  91. <dk-number-input readonly= "{{true}}" class="number-class" fontSize="14" height="36rpx" data-key="{{col.name}}" placeholder="{{col.placeholder}}" center="left" data-index="{{fIndex}}" formatThousandth="{{true}}" fontWeight="600" inputValue="{{item[col.name]}}" bind:triggerBindValue="changeNumberInput" inputColor="#FF7B1A">
  92. </dk-number-input>
  93. </view>
  94. <!-- <view wx:if="{{col.name === 'warningUpperLimit' || col.name === 'warningLowerLimit'}}">
  95. <dk-number-input sign="" fontSize="14" center="center" data-key="{{col.name}}" placeholder="{{col.name === 'warningUpperLimit' ? '请输入警戒上限': '请输入警戒下限'}}" center="left" data-index="{{fIndex}}" maxFlag="{{false}}" minFlag="{{false}}" fontWeight="600" inputValue="{{item[col.name]}}" bind:triggerBindValue="changeAmount">
  96. </dk-number-input>
  97. </view> -->
  98. <view wx:else class="table-content-class" catchtap="openTelPhone" data-item="{{item}}" data-col="{{col}}" data-index="{{fIndex}}" data-phone="{{col.phone}}" data-value="{{item[col.name]}}">
  99. {{wxmlUtil.setItemValue(item,col.name)}}
  100. </view>
  101. </view>
  102. </view>
  103. <!-- 内容变动 -->
  104. <view wx:if="{{contentCol && !simpleFlag}}" class="table-content-row" wx:for="{{contentObj[item[contentCol]]}}" wx:for-item="col" data-item="{{col}}">
  105. <view style="display: flex;">
  106. <view class="table-content-row-font">
  107. <dk-text fontSize="14px" color="#95A8CB" fontWeight="nomal" value="{{col.title}}" copyValue="{{wxmlUtil.setItemValue(item,col.name)}}"></dk-text>
  108. </view>
  109. <view class="table-content-class" catchtap="openTelPhone" data-item="{{item}}" data-col="{{col}}" data-index="{{fIndex}}" data-phone="{{col.phone}}" data-value="{{item[col.name]}}">
  110. {{wxmlUtil.setItemValue(item,col.name)}}
  111. </view>
  112. </view>
  113. </view>
  114. <!--内容标签-->
  115. <view style="display: flex;margin: 12rpx 32rpx;" wx:if="{{item.tags && item.tags.length > 0}}">
  116. <view style="font-size: 13px;" wx:for="{{item.tags}}" wx:key="indext" wx:for-index="indext" wx:for-item="itemt">
  117. <dk-tag border="1rpx solid #606EB2" height="32rpx" color="transparent" textColor="#606EB2" radius="5rpx" roundFlag="{{true}}" marginRight="12rpx" value="{{item.tags[indext]}}"></dk-tag>
  118. </view>
  119. </view>
  120. </view>
  121. <!--明细报表-->
  122. <view wx:if="{{ detailReportFlag}}" style="margin-top: 10rpx;">
  123. <view wx:if="{{!contentCol}}" class="table-content-row-detail" wx:for="{{content}}" wx:for-item="col" wx:for-index="index_" data-item="{{col}}">
  124. <view style="display: flex;justify-content: space-between;align-items: center;">
  125. <!--左侧-->
  126. <view class="table-content-class">
  127. <dk-title wx:if="{{col.left.type == 'title'}}" titleTag="{{item[col.left.tag]}}" title="{{item[col.left.title]}}"></dk-title>
  128. <dk-cell wx:if="{{col.left.type == 'price'}}" left="0rpx" height="50rpx" contentRight="{{false}}" contentFontSize="17" contentColor="#FF7B1A" contentFontWeight="bold" content="{{item[col.left.name]?item[col.left.name]:0}}"></dk-cell>
  129. <view wx:if="{{col.left.type != 'title' && col.left.type != 'price'}}" style="display: flex; color:{{col.left.type == 'qty'?'#95A8CB':'002340'}}">
  130. <view wx:if="{{col.left.type == 'qty'}}">x</view>
  131. {{ item[col.left.isLeftShowKey] == true ? '' : (item[col.left.name]?(col.left.title?col.left.title:'') + item[col.left.name]:'')}}
  132. <!-- {{item[col.left.name]?(col.left.title?col.left.title:'') + item[col.left.name]:''}} -->
  133. </view>
  134. </view>
  135. <!--右侧-->
  136. <view class="table-content-class" style="display: flex;color:{{col.right.type == 'qty'?'#95A8CB':'#002340'}}">
  137. <view style="display: flex;" wx:if="{{col.right.type == 'price'}}">
  138. <view style="display: flex;align-items: center;">
  139. {{col.right.title}}
  140. </view>
  141. <dk-number-input inputWidthFlag="{{true}}" fontSize="19" center="right" data-key="{{col.right.name}}" inputColor="#FF7B1A" fontWeight="600" inputValue="{{item[col.right.name]?item[col.right.name]:0}}" data-index="{{fIndex}}" bind:triggerBindValue="changeNumberInput">
  142. </dk-number-input>
  143. </view>
  144. <view wx:if="{{col.right.type !== 'price'}}" style="display: flex;">
  145. <view wx:if="{{col.right.type == 'qty'}}">x</view>{{item[col.right.name]?item[col.right.name]:''}}
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. <!--根据contentCol切换-->
  151. <view wx:if="{{contentCol}}" class="table-content-row-detail" wx:for="{{contentObj[item[contentCol]]}}" wx:for-item="col" data-item="{{col}}">
  152. <view style="display: flex;justify-content: space-between;align-items: center;">
  153. <!--左侧-->
  154. <view class="table-content-class">
  155. <dk-title wx:if="{{col.left.type == 'title'}}" titleTag="{{item[col.left.tag]}}" title="{{item[col.left.title]}}"></dk-title>
  156. <dk-cell wx:if="{{col.left.type == 'price'}}" left="0rpx" height="50rpx" contentRight="{{false}}" contentFontSize="17" contentColor="#FF7B1A" contentFontWeight="bold" content="{{item[col.left.name]?item[col.left.name]:0}}"></dk-cell>
  157. <view wx:if="{{col.left.type != 'title' && col.left.type != 'price'}}" style="display: flex; color:{{col.left.type == 'qty'?'#95A8CB':'002340'}}">
  158. <view wx:if="{{col.left.type == 'qty'}}">x</view>
  159. {{ item[col.left.isLeftShowKey] == true ? '' : (item[col.left.name]?(col.left.title?col.left.title:'') + item[col.left.name]:'')}}
  160. </view>
  161. </view>
  162. <!--右侧-->
  163. <view class="table-content-class" style="display: flex;color:{{col.right.type == 'qty'?'#95A8CB':'002340'}}">
  164. <view wx:if="{{col.right.type == 'qty'}}">x</view>{{item[col.right.name]?item[col.right.name]:''}}
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. <!-- 分割线 -->
  170. <view style="padding-left:25rpx;padding-right:25rpx;" wx:if="{{footerInfo && footerInfo.length > 0}}">
  171. <view style="border: 1rpx solid #E9F0FE;height: 0px;"></view>
  172. </view>
  173. <!-- 底部 -->
  174. <view class="table-content-row" style="padding-top: 0rpx;" wx:if="{{footerInfo && footerInfo.length > 0}}">
  175. <view style="display: flex; justify-content: space-between;">
  176. <view class="category-class">
  177. {{(wxmlUtil.setFooterItemValue(item,footerInfo) == 'undefined')?'':wxmlUtil.setFooterItemValue(item,footerInfo) }}
  178. </view>
  179. <view class="footer-tag-class" wx:if="{{footerTag && item[footerTag]}}">
  180. <dk-tag border="1rpx solid #437FF8" height="44rpx" color="transparent" textColor="#437FF8" radius="10rpx" roundFlag="{{true}}" value="{{item[footerTag]}}"></dk-tag>
  181. </view>
  182. <view wx:if="{{footerAmount}}" class="totalamount-class">
  183. <dk-cell center="{{(footerInfo && footerInfo.length > 0)?'space-around':'space-between'}}" contentRight="{{false}}" fontSize="15" contentFontSize="17" contentColor="#FF7B1A" titleColor="#002340" contentFontWeight="bold" title="{{footerAmount.title}}" content="{{item[footerAmount.name]?item[footerAmount.name]:0}}"></dk-cell>
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. <!-- 侧拉 catchtap="onCloseSwipe" -->
  190. <view style="font-size: 14px;" data-index="{{fIndex}}" data-item="{{item}}" slot="right">{{swipeDeleteFlag?$t['delete']:(item['flgValid'] ? $t['disable'] : $t['enable']) }}</view>
  191. </van-swipe-cell>
  192. </view>
  193. <!-- 暂无数据 -->
  194. <van-empty wx:if="{{list.length<=0}}" description="{{$t['nodata']}}" />
  195. <van-popup show="{{show}}" position="bottom" bind:close="closePop" custom-class="function-pop-class">
  196. <van-cell-group border="{{false}}" custom-class="function-cell-group">
  197. <van-grid square border="{{false}}" icon-size="42px">
  198. <!--按钮-->
  199. <van-grid-item use-slot catchtap="clickButton" wx:for="{{buttonList}}" data-item="{{item}}" wx:key="index">
  200. <view>
  201. <van-image custom-class="function-pop-image" fit="fill" src="{{imageUrl + routeUrl[routeObjName][item.name].image}}"></van-image>
  202. </view>
  203. <view style="margin-top: -18rpx;">
  204. <dk-text fontSize="12px" fontWeight="400" value="{{item.title?item.title:$t[item.name]}}"></dk-text>
  205. </view>
  206. </van-grid-item>
  207. </van-grid>
  208. </van-cell-group>
  209. <view class="popup-button" catchtap="closePop">
  210. <dk-text fontSize="14px" fontWeight="400" value="{{$t['cancel']}}"></dk-text>
  211. </view>
  212. </van-popup>