index.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <template>
  2. <zj-page-container>
  3. <zj-page-fill class="neibuview">
  4. <template v-if="payData.length">
  5. <zj-form-container :formAttributes="{ 'label-position': 'top' }">
  6. <template v-for="(item, index) in payData.length">
  7. <zj-form-module :title="'支付费用' + (index + 1)" :form-data="payData[index]" :form-items="formItems" />
  8. </template>
  9. </zj-form-container>
  10. </template>
  11. <el-empty v-else description="暂时没有支付信息"></el-empty>
  12. </zj-page-fill>
  13. </zj-page-container>
  14. </template>
  15. <script>
  16. import { listPageV2 } from "@/api/workOrder/appraise";
  17. import { tableDataParsing } from "@/utils/common.js"
  18. import { changeOrderGetOrderList } from "@/api/workOrderPool.js";
  19. export default {
  20. props: {
  21. id: {
  22. type: [String, Number],
  23. default: null,
  24. }
  25. },
  26. data() {
  27. return {
  28. payData: []
  29. }
  30. },
  31. watch: {
  32. id: {
  33. handler(newVal, oldVal) {
  34. if (this.id) {
  35. changeOrderGetOrderList({
  36. id: this.id
  37. }).then(res => {
  38. this.payData = res.data
  39. })
  40. }
  41. },
  42. deep: true,
  43. immediate: true,
  44. },
  45. },
  46. computed: {
  47. formItems() {
  48. return [{
  49. md: 24,
  50. name: 'slot-component',
  51. formItemAttributes: {
  52. label: '维修费用信息',
  53. },
  54. render: (h, { props, onInput }) => {
  55. var { formData } = props
  56. return (
  57. <el-descriptions border title="" column={3} colon={false} labelStyle={{ width: '10%' }} contentStyle={{ width: '23.3%' }}>
  58. <el-descriptions-item label="网点名称">
  59. {formData.websitName}
  60. </el-descriptions-item>
  61. <el-descriptions-item label="工单号">
  62. {formData.workerOrderId}
  63. </el-descriptions-item>
  64. <el-descriptions-item label="流水号">
  65. {formData.wechatOrder}
  66. </el-descriptions-item>
  67. <el-descriptions-item label="工程师名称">
  68. {formData.workerName}
  69. </el-descriptions-item>
  70. <el-descriptions-item label="工程师联系电话">
  71. {formData.workerMobile}
  72. </el-descriptions-item>
  73. <el-descriptions-item label="支付方式">
  74. 微信
  75. </el-descriptions-item>
  76. <el-descriptions-item label="客户名称">
  77. {formData.userName}
  78. </el-descriptions-item>
  79. <el-descriptions-item label="电话号码">
  80. {formData.userMobile}
  81. </el-descriptions-item>
  82. <el-descriptions-item label="支付状态">
  83. {formData.payStatus}
  84. </el-descriptions-item>
  85. <el-descriptions-item label="支付总金额">
  86. {formData.totalAmount}
  87. </el-descriptions-item>
  88. <el-descriptions-item label="总手续费">
  89. {formData.commissionAmount}
  90. </el-descriptions-item>
  91. <el-descriptions-item label="支付时间">
  92. {formData.payTime}
  93. </el-descriptions-item>
  94. </el-descriptions>
  95. )
  96. }
  97. }, {
  98. md: 24,
  99. name: 'slot-component',
  100. formItemAttributes: {
  101. label: '支付明细',
  102. },
  103. render: (h, { props, onInput }) => {
  104. var { formData } = props
  105. return (
  106. <zj-table
  107. columns={[{
  108. columnAttributes: {
  109. label: '费用名称',
  110. prop: 'goodsName',
  111. }
  112. }, {
  113. columnAttributes: {
  114. label: '单价',
  115. prop: 'goodsAmount',
  116. }
  117. }, {
  118. columnAttributes: {
  119. label: '数量',
  120. prop: 'num',
  121. }
  122. }, {
  123. columnAttributes: {
  124. label: '费用金额',
  125. prop: 'totalAmount',
  126. }
  127. }, {
  128. columnAttributes: {
  129. label: '师傅分账金额',
  130. prop: 'workerAmount',
  131. }
  132. }, {
  133. columnAttributes: {
  134. label: '师傅手续费',
  135. prop: 'workerProceAmount',
  136. }
  137. }, {
  138. columnAttributes: {
  139. label: '网点分账金额',
  140. prop: 'websitAmount',
  141. }
  142. }, {
  143. columnAttributes: {
  144. label: '网点手续费',
  145. prop: 'websitProceAmount',
  146. }
  147. }]}
  148. table-data={formData.workerOrderItems}
  149. />
  150. )
  151. }
  152. }, {
  153. name: 'el-input',
  154. md: 24,
  155. attributes: { disabled: true, type: "textarea", placeholder: '' },
  156. formItemAttributes: { label: '备注', prop: 'remark' },
  157. }, {
  158. md: 24,
  159. name: 'slot-component',
  160. formItemAttributes: {
  161. label: '交易记录',
  162. },
  163. render: (h, { props, onInput }) => {
  164. var { formData } = props
  165. return (
  166. <zj-table
  167. columns={[{
  168. columnAttributes: {
  169. label: 'id',
  170. prop: 'orderId',
  171. }
  172. }, {
  173. columnAttributes: {
  174. label: '交易类型',
  175. prop: 'goodsType',
  176. }
  177. }, {
  178. columnAttributes: {
  179. label: '交易金额',
  180. prop: 'totalAmount',
  181. }
  182. }, {
  183. columnAttributes: {
  184. label: '交易状态',
  185. prop: 'payStatus',
  186. }
  187. }, {
  188. columnAttributes: {
  189. label: '交易时间',
  190. prop: 'payTime',
  191. }
  192. }, {
  193. columnAttributes: {
  194. label: '创建时间',
  195. prop: 'createTime',
  196. }
  197. }]}
  198. table-data={[formData]}
  199. />
  200. )
  201. }
  202. }]
  203. }
  204. },
  205. }
  206. </script>
  207. <style lang="scss" scoped>
  208. .neibuview {
  209. box-sizing: border-box;
  210. padding-left: 16px;
  211. ::v-deep &>.zj-page-fill-scroll {
  212. box-sizing: border-box;
  213. padding-right: 16px;
  214. &>div:nth-child(1) {
  215. margin-top: 20px;
  216. }
  217. }
  218. }
  219. </style>