dislogDividePay.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. <template>
  2. <div>
  3. <BaseDialog
  4. :disabledBtn="disabledBtn"
  5. width="400px"
  6. :isShow.sync="isShow"
  7. title="分成支付"
  8. @open="init"
  9. @submit="submitForm"
  10. confirmName="支付"
  11. >
  12. <template>
  13. <template>
  14. <em>订单信息:</em>
  15. <p>
  16. 机构名称:<em>{{ info.tenantName }}</em>
  17. </p>
  18. <p>
  19. 账期类型:<em>{{
  20. ["月份", "季度", "半年", "年度"][info.billType - 1]
  21. }}</em>
  22. </p>
  23. <p>
  24. 时间:<em>{{ info.monthTime }}</em>
  25. </p>
  26. <p>
  27. 应付分成:<span class="color_red">{{
  28. info.payMoney | formatPrice
  29. }}</span>
  30. </p>
  31. </template>
  32. <el-button type="primary" plain @click="orderDialogVisible = true"
  33. >分成详细</el-button
  34. >
  35. <el-divider></el-divider>
  36. <em>收款信息:</em>
  37. <el-input
  38. style="margin-top: 10px"
  39. disabled
  40. v-model="formPay.toBankAcount"
  41. ></el-input>
  42. <el-input
  43. style="margin-top: 10px"
  44. disabled
  45. v-model="formPay.toBankName"
  46. ></el-input>
  47. <el-input
  48. style="margin-top: 10px"
  49. disabled
  50. v-model="formPay.toBankTypeName"
  51. ></el-input>
  52. </template>
  53. </BaseDialog>
  54. <!-- 订单列表 -->
  55. <dislogOrderList :info="info" :dialogVisible.sync="orderDialogVisible" />
  56. </div>
  57. </template>
  58. <script>
  59. import dislogOrderList from "./dislogOrderList";
  60. export default {
  61. name: "DislogDividePay",
  62. props: {
  63. dialogVisible: {
  64. type: Boolean,
  65. default: false,
  66. },
  67. info: {
  68. type: Object,
  69. default: () => {
  70. return {};
  71. },
  72. },
  73. },
  74. data() {
  75. return {
  76. disabledBtn: false,
  77. orderDialogVisible: false,
  78. form: {
  79. payMoney: 0,
  80. },
  81. formPay: {
  82. toBankAcount: "",
  83. toBankName: "",
  84. toBankTypeName: "",
  85. },
  86. bankList: [],
  87. };
  88. },
  89. mounted() {},
  90. methods: {
  91. fastInput(item) {
  92. this.formPay = {
  93. toBankAcount: item.proceedsAccount,
  94. toBankName: item.openingName,
  95. toBankTypeName: item.openingBank,
  96. };
  97. },
  98. init() {
  99. this.resetForm();
  100. this.$api.systemtenantbankId(this.info.tenantId).then((e) => {
  101. this.bankList = e.data || [];
  102. if (this.bankList.length > 0) {
  103. this.fastInput(this.bankList[0]);
  104. }
  105. });
  106. },
  107. resetForm() {
  108. this.form = {
  109. payMoney: 0,
  110. };
  111. },
  112. submitForm() {
  113. this.$confirm("确定支付吗?", "提示", {
  114. confirmButtonText: "确定",
  115. cancelButtonText: "取消",
  116. type: "warning",
  117. })
  118. .then(() => {
  119. this.disabledBtn = true;
  120. let c = {
  121. divideModel: this.info.checkFrom - 1,
  122. type: 1,
  123. divideLogId: this.info.id,
  124. tenantId: this.info.tenantId,
  125. ...this.formPay,
  126. };
  127. this.$api
  128. .orderbankpay(c)
  129. .then((res) => {
  130. this.isShow = false;
  131. this.$emit("search", 3);
  132. this.$message({
  133. type: "success",
  134. message: "支付成功!",
  135. });
  136. })
  137. .finally(() => {
  138. this.disabledBtn = false;
  139. });
  140. })
  141. .catch(() => {
  142. this.disabledBtn = false;
  143. this.$message({
  144. type: "info",
  145. message: "已取消删除",
  146. });
  147. });
  148. },
  149. },
  150. computed: {
  151. isShow: {
  152. get() {
  153. return this.dialogVisible;
  154. },
  155. set(val) {
  156. this.$emit("update:dialogVisible", false);
  157. },
  158. },
  159. },
  160. components: {
  161. dislogOrderList,
  162. },
  163. };
  164. </script>
  165. <style lang="scss" scoped>
  166. .color_red {
  167. font-weight: bold;
  168. color: rgb(235, 59, 59);
  169. }
  170. em {
  171. font-weight: bold;
  172. color: #000;
  173. font-style: unset;
  174. }
  175. </style>