securityFeeDetails.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <template>
  2. <!-- #ifdef H5 -->
  3. <view>
  4. <zj-page-layout
  5. :hasFooter="true"
  6. :isScroll="true"
  7. :refresherTriggered="refresherTriggered"
  8. @refresherrefresh="refresherrefresh"
  9. >
  10. <template slot="header">
  11. <view class="tab-container">
  12. <u-tabs
  13. :scrollable="false"
  14. :list="tabList"
  15. :current="tabCurrent"
  16. @click="changeTab"
  17. lineColor="#3D8FFD"
  18. itemStyle="padding-left: 0; padding-right: 0; height: 88rpx;"
  19. :activeStyle="{ color: '#3D8FFD' }"
  20. :inactiveStyle="{ color: '#666666' }"
  21. >
  22. </u-tabs>
  23. </view>
  24. </template>
  25. <view class="list-container">
  26. <view
  27. class="goods-item"
  28. v-for="(item, index) in dataList.filter(
  29. item => !!~[['INSTALL_HOME', 'INSTALL_OTHER'], ['REPAIR'], ['OTHER']][tabCurrent].indexOf(item.categoryType)
  30. )"
  31. :key="index"
  32. >
  33. <view class="aItemView">
  34. <view class="aItemView_title">网点名称</view>
  35. <view class="aItemView_info">
  36. <view class="aItemView_v1 gudingkbig">{{ item.importWebsitName }}</view>
  37. </view>
  38. </view>
  39. <!-- 安装 -->
  40. <view v-if="tabCurrent == 0" class="aItemView">
  41. <view class="aItemView_title">安装品类</view>
  42. <view class="aItemView_info">
  43. <view class="aItemView_v1 gudingkbig">{{ item.category }}</view>
  44. </view>
  45. </view>
  46. <view v-if="tabCurrent == 0" class="aItemView">
  47. <view class="aItemView_title">内机条码</view>
  48. <view class="aItemView_info">
  49. <view class="aItemView_v1 gudingkbig">{{ item.insideCode }}</view>
  50. <view class="aItemView_v2 gudingk copytext" @click="copy(item.insideCode)">复制</view>
  51. </view>
  52. </view>
  53. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  54. <view class="aItemView_title">内机名称</view>
  55. <view class="aItemView_info">
  56. <view class="aItemView_v1 gudingkbig">{{ item.insideName }}</view>
  57. </view>
  58. </view>
  59. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  60. <view class="aItemView_title">基础安装费</view>
  61. <view class="aItemView_info">
  62. <view class="aItemView_v1 gudingkbig">{{ item.baseAmount }}</view>
  63. </view>
  64. </view>
  65. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  66. <view class="aItemView_title">辅材达标</view>
  67. <view class="aItemView_info">
  68. <view class="aItemView_v1 gudingkbig">{{ item.materialAmount }}</view>
  69. </view>
  70. </view>
  71. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  72. <view class="aItemView_title">回收旧机达标</view>
  73. <view class="aItemView_info">
  74. <view class="aItemView_v1 gudingkbig">{{ item.recoveryAmount }}</view>
  75. </view>
  76. </view>
  77. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  78. <view class="aItemView_title">其它</view>
  79. <view class="aItemView_info">
  80. <view class="aItemView_v1 gudingkbig">{{ item.otherAmount }}</view>
  81. </view>
  82. </view>
  83. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  84. <view class="aItemView_title">评价数据达标</view>
  85. <view class="aItemView_info">
  86. <view class="aItemView_v1 gudingkbig">{{ item.appraiseAmount }}</view>
  87. </view>
  88. </view>
  89. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  90. <view class="aItemView_title">合计金额</view>
  91. <view class="aItemView_info">
  92. <view class="aItemView_v1 gudingkbig">{{ item.totalAmount }}</view>
  93. </view>
  94. </view>
  95. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  96. <view class="aItemView_title">工单编号</view>
  97. <view class="aItemView_info">
  98. <view class="aItemView_v1 gudingkbig">{{ item.orderNo }}</view>
  99. <view class="aItemView_v2 gudingk copytext" @click="copy(item.orderNo)">复制</view>
  100. </view>
  101. </view>
  102. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  103. <view class="aItemView_title">销售单号</view>
  104. <view class="aItemView_info">
  105. <view class="aItemView_v1 gudingkbig">{{ item.salesOrderNo }}</view>
  106. </view>
  107. </view>
  108. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  109. <view class="aItemView_title">安装日期</view>
  110. <view class="aItemView_info">
  111. <view class="aItemView_v1 gudingkbig">{{ item.workDate ? item.workDate.split(' ')[0] : '' }}</view>
  112. </view>
  113. </view>
  114. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  115. <view class="aItemView_title">销售类型</view>
  116. <view class="aItemView_info">
  117. <view class="aItemView_v1 gudingkbig">{{ item.salesType }}</view>
  118. </view>
  119. </view>
  120. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  121. <view class="aItemView_title">用户姓名</view>
  122. <view class="aItemView_info">
  123. <view class="aItemView_v1 gudingkbig">{{ item.userName }}</view>
  124. </view>
  125. </view>
  126. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  127. <view class="aItemView_title">用户电话</view>
  128. <view class="aItemView_info">
  129. <view class="aItemView_v1 gudingkbig">{{ item.userMobile }}</view>
  130. </view>
  131. </view>
  132. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  133. <view class="aItemView_title">用户地址</view>
  134. <view class="aItemView_info">
  135. <view class="aItemView_v1 gudingkbig">{{ item.userAddress }}</view>
  136. </view>
  137. </view>
  138. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  139. <view class="aItemView_title">工程师1名称</view>
  140. <view class="aItemView_info">
  141. <view class="aItemView_v1 gudingkbig">{{ item.workerName1 }}</view>
  142. </view>
  143. </view>
  144. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  145. <view class="aItemView_title">工程师1电话</view>
  146. <view class="aItemView_info">
  147. <view class="aItemView_v1 gudingkbig">{{ item.workerMobile1 }}</view>
  148. </view>
  149. </view>
  150. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  151. <view class="aItemView_title">工程师1比例</view>
  152. <view class="aItemView_info">
  153. <view class="aItemView_v1 gudingkbig">{{ item.workerSettleRate1 }}</view>
  154. </view>
  155. </view>
  156. <view v-if="tabCurrent == 0" class="aItemView">
  157. <view class="aItemView_title">工程师1金额</view>
  158. <view class="aItemView_info">
  159. <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount1 }}</view>
  160. </view>
  161. </view>
  162. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  163. <view class="aItemView_title">工程师2名称</view>
  164. <view class="aItemView_info">
  165. <view class="aItemView_v1 gudingkbig">{{ item.workerName2 }}</view>
  166. </view>
  167. </view>
  168. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  169. <view class="aItemView_title">工程师2电话</view>
  170. <view class="aItemView_info">
  171. <view class="aItemView_v1 gudingkbig">{{ item.workerMobile2 }}</view>
  172. </view>
  173. </view>
  174. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  175. <view class="aItemView_title">工程师2比例</view>
  176. <view class="aItemView_info">
  177. <view class="aItemView_v1 gudingkbig">{{ item.workerSettleRate2 }}</view>
  178. </view>
  179. </view>
  180. <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
  181. <view class="aItemView_title">工程师2金额</view>
  182. <view class="aItemView_info">
  183. <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount2 }}</view>
  184. </view>
  185. </view>
  186. <!-- 维修 -->
  187. <view v-if="tabCurrent == 1" class="aItemView">
  188. <view class="aItemView_title">维修品类</view>
  189. <view class="aItemView_info">
  190. <view class="aItemView_v1 gudingkbig">{{ item.category }}</view>
  191. </view>
  192. </view>
  193. <view v-if="tabCurrent == 1" class="aItemView">
  194. <view class="aItemView_title">自编号</view>
  195. <view class="aItemView_info">
  196. <view class="aItemView_v1 gudingkbig">{{ item.repairCustomCode }}</view>
  197. </view>
  198. </view>
  199. <view v-if="tabCurrent == 1" class="aItemView">
  200. <view class="aItemView_title">条码</view>
  201. <view class="aItemView_info">
  202. <view class="aItemView_v1 gudingkbig">{{ item.insideCode }}</view>
  203. </view>
  204. </view>
  205. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  206. <view class="aItemView_title">维修费用</view>
  207. <view class="aItemView_info">
  208. <view class="aItemView_v1 gudingkbig">{{ item.baseAmount }}</view>
  209. </view>
  210. </view>
  211. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  212. <view class="aItemView_title">修复日期</view>
  213. <view class="aItemView_info">
  214. <view class="aItemView_v1 gudingkbig">{{ item.workDate ? item.workDate.split(' ')[0] : '' }}</view>
  215. </view>
  216. </view>
  217. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  218. <view class="aItemView_title">用户姓名</view>
  219. <view class="aItemView_info">
  220. <view class="aItemView_v1 gudingkbig">{{ item.userName }}</view>
  221. </view>
  222. </view>
  223. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  224. <view class="aItemView_title">用户电话</view>
  225. <view class="aItemView_info">
  226. <view class="aItemView_v1 gudingkbig">{{ item.userMobile }}</view>
  227. </view>
  228. </view>
  229. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  230. <view class="aItemView_title">用户地址</view>
  231. <view class="aItemView_info">
  232. <view class="aItemView_v1 gudingkbig">{{ item.userAddress }}</view>
  233. </view>
  234. </view>
  235. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  236. <view class="aItemView_title">维修内容</view>
  237. <view class="aItemView_info">
  238. <view class="aItemView_v1 gudingkbig">{{ item.repairContent }}</view>
  239. </view>
  240. </view>
  241. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  242. <view class="aItemView_title">工程师名称</view>
  243. <view class="aItemView_info">
  244. <view class="aItemView_v1 gudingkbig">{{ item.workerName1 }}</view>
  245. </view>
  246. </view>
  247. <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
  248. <view class="aItemView_title">工程师电话</view>
  249. <view class="aItemView_info">
  250. <view class="aItemView_v1 gudingkbig">{{ item.workerMobile1 }}</view>
  251. </view>
  252. </view>
  253. <view v-if="tabCurrent == 1" class="aItemView">
  254. <view class="aItemView_title">结算金额</view>
  255. <view class="aItemView_info">
  256. <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount1 }}</view>
  257. </view>
  258. </view>
  259. <!-- 其他 -->
  260. <view v-if="tabCurrent == 2" class="aItemView">
  261. <view class="aItemView_title">费用名称</view>
  262. <view class="aItemView_info">
  263. <view class="aItemView_v1 gudingkbig">{{ item.typeName }}</view>
  264. </view>
  265. </view>
  266. <view v-if="tabCurrent == 2" class="aItemView">
  267. <view class="aItemView_title">结算金额</view>
  268. <view class="aItemView_info">
  269. <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount1 }}</view>
  270. </view>
  271. </view>
  272. <view class="aItemView">
  273. <view class="aItemView_title">备注</view>
  274. <view class="aItemView_info">
  275. <view class="aItemView_v1 gudingkbig">{{ item.remark }}</view>
  276. </view>
  277. </view>
  278. <view v-if="tabCurrent != 2" class="shouqizhankai" @click="item.isShow = !item.isShow"
  279. >{{ item.isShow ? '收起' : '展开' }}
  280. </view>
  281. </view>
  282. </view>
  283. </zj-page-layout>
  284. </view>
  285. <!-- #endif -->
  286. <!-- #ifndef H5 -->
  287. <web-view
  288. :src="webViewHref(`/packageMine/pages/coupon/list`, pam, crossPagePam)"
  289. @message="crossPage.$listener"
  290. ></web-view>
  291. <!-- #endif -->
  292. </template>
  293. <script>
  294. // #ifdef H5
  295. import { copy } from "@/common/utils/common.js"
  296. export default {
  297. data() {
  298. return {
  299. settleMonthWagesId: "",
  300. tabList: [
  301. { name: '安装费用', value: 0 },
  302. { name: '维修费用', value: 1 },
  303. { name: '其他费用', value: 2 },
  304. ],
  305. tabCurrent: 0, // 当前选择值
  306. refresherTriggered: false, // 下拉刷新状态
  307. dataList: []
  308. }
  309. },
  310. async onLoad({ settleMonthWagesId }) {
  311. this.settleMonthWagesId = settleMonthWagesId
  312. this.getList();
  313. },
  314. methods: {
  315. copy,
  316. getList() {
  317. this.$api.post('/user/my/settle/item', {
  318. settleMonthWagesId: this.settleMonthWagesId
  319. }).then(res => {
  320. this.dataList = res.data.map(item => ({ isShow: false, ...item, }))
  321. }).catch(() => {
  322. }).finally(res => {
  323. this.refresherTriggered = false;
  324. })
  325. },
  326. // 滚动到底部
  327. scrolltolower(e) {
  328. },
  329. // 触发下拉刷新
  330. async refresherrefresh(e) {
  331. this.refresherTriggered = true;
  332. this.getList();
  333. },
  334. changeTab(e) {
  335. this.tabCurrent = e.value;
  336. },
  337. }
  338. }
  339. // #endif
  340. // #ifndef H5
  341. export default {
  342. data() {
  343. return {
  344. pam: {},
  345. }
  346. },
  347. onLoad(pam) {
  348. this.pam = pam;
  349. },
  350. }
  351. // #endif
  352. </script>
  353. <style lang="scss">
  354. .tab-container {
  355. background: #ffffff;
  356. }
  357. .list-container {
  358. padding: 20rpx 20rpx 40rpx;
  359. .goods-item {
  360. @include zj-card;
  361. padding: 20rpx;
  362. margin-top: 20rpx;
  363. display: block !important;
  364. }
  365. }
  366. .aItemView {
  367. width: 100%;
  368. display: flex;
  369. .aItemView_title {
  370. width: 250rpx;
  371. color: #aaa;
  372. }
  373. .aItemView_info {
  374. flex: 1;
  375. display: flex;
  376. justify-content: space-between;
  377. .aItemView_v1 {
  378. }
  379. .gudingk {
  380. width: 130rpx;
  381. }
  382. .gudingkbig {
  383. flex: 1;
  384. }
  385. .aItemView_v2 {
  386. }
  387. .aItemView_v3 {
  388. }
  389. }
  390. &:not(:last-child) {
  391. margin-bottom: 16rpx;
  392. }
  393. .copytext {
  394. color: blue;
  395. text-align: center;
  396. }
  397. }
  398. .shouqizhankai {
  399. width: 100%;
  400. box-sizing: border-box;
  401. padding: 16rpx 0 0;
  402. text-align: center;
  403. }
  404. </style>