dislogSet.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <div>
  3. <BaseDialog
  4. :disabledBtn="disabledBtn"
  5. width="600px"
  6. :isShow.sync="isShow"
  7. title="退款审核"
  8. @close="close"
  9. @submit="submitForm"
  10. :confirmName="form.checkType === 3 ? '确定支付' : '确定'"
  11. >
  12. <div v-if="formPay.toBankAcount">
  13. <em>收款信息:</em>
  14. <el-form
  15. :model="formPay"
  16. :rules="rulesPay"
  17. ref="rulesPay"
  18. label-width="100px"
  19. class="demo-ruleForm"
  20. >
  21. <el-form-item label="银行账号:" prop="toBankAcount">
  22. <el-input
  23. readonly
  24. clearable
  25. v-model="formPay.toBankAcount"
  26. ></el-input>
  27. </el-form-item>
  28. <el-form-item label="账号名称:" prop="toBankName">
  29. <el-input
  30. readonly
  31. clearable
  32. v-model="formPay.toBankName"
  33. ></el-input>
  34. </el-form-item>
  35. <el-form-item label="银行名称:" prop="toBankTypeName">
  36. <el-input
  37. readonly
  38. clearable
  39. v-model="formPay.toBankTypeName"
  40. ></el-input>
  41. </el-form-item>
  42. </el-form>
  43. <el-divider></el-divider>
  44. </div>
  45. <template v-if="form.checkType === 2">
  46. <p style="margin-top: 0">
  47. 申请时间:{{ $methodsTools.onlyForma(form.applyTime) }}
  48. </p>
  49. <p>
  50. <span class="color_1890ff">{{ form.applyName }}</span>
  51. <span>,发起退款申请</span>
  52. </p>
  53. <div class="bgc_pink">
  54. <p>
  55. 本次退款金额:<span class="color_red">¥{{ form.refundFee }}</span>
  56. </p>
  57. <p>退款理由:{{ form.refundReason }}</p>
  58. </div>
  59. <el-form
  60. :model="formData"
  61. :rules="rules"
  62. ref="formData"
  63. label-width="100px"
  64. >
  65. <el-form-item prop="checkResult" label="审核结果:">
  66. <el-radio-group v-model="formData.checkResult">
  67. <el-radio label="1">同意</el-radio>
  68. <el-radio label="-1">拒绝</el-radio>
  69. </el-radio-group>
  70. </el-form-item>
  71. <el-form-item prop="checkReason" label="审核意见:">
  72. <el-input
  73. type="textarea"
  74. placeholder="请输入审核意见"
  75. v-model="formData.checkReason"
  76. ></el-input> </el-form-item
  77. ></el-form>
  78. <template slot="slotBtn">
  79. <el-button @click="auditProgress = true">审核进度</el-button>
  80. </template>
  81. <audit-progress
  82. :auditProgress.sync="auditProgress"
  83. :checkLogVos="form.checkLogVos"
  84. ></audit-progress>
  85. </template>
  86. <template v-if="form.checkType === 3">
  87. <em>订单信息:</em>
  88. <p>
  89. 支付金额:<span
  90. class="color_red"
  91. style="font-size: 28px; font-weight: 400"
  92. >¥ {{ form.refundMoney.toFixed(2) }}</span
  93. >
  94. </p>
  95. <p>
  96. 下单时间:<em>{{ $methodsTools.onlyForma(form.applyTime) }}</em>
  97. </p>
  98. <p>
  99. 订单单号:<em>{{ form.orderSn }}</em>
  100. </p>
  101. <p>
  102. 支付方式:<el-radio disabled v-model="form.payType" :label="1"
  103. >微信支付</el-radio
  104. >
  105. <el-radio disabled v-model="form.payType" :label="2"
  106. >网银支付、对公转账</el-radio
  107. >
  108. </p>
  109. <el-divider></el-divider>
  110. <em>支付方式:</em>
  111. <el-tag type="success" v-if="form.payType === 1">原路返回</el-tag>
  112. <el-tag type="danger" v-if="form.payType === 2">网银支付</el-tag>
  113. </template>
  114. </BaseDialog>
  115. </div>
  116. </template>
  117. <script>
  118. import { baseURL } from "@/utils/request.js";
  119. import { getToken } from "@/utils/auth";
  120. import axios from "axios";
  121. import auditProgress from "./auditProgress.vue";
  122. export default {
  123. name: "DislogSet",
  124. components: {
  125. auditProgress,
  126. },
  127. props: {
  128. dialogVisible: {
  129. type: Boolean,
  130. default: false,
  131. },
  132. orderSn: {
  133. type: String,
  134. default: "",
  135. },
  136. checkRoleName: {
  137. type: String,
  138. default: "",
  139. },
  140. },
  141. data() {
  142. return {
  143. disabledBtn: false,
  144. auditProgress: false,
  145. formData: {
  146. checkResult: "",
  147. checkReason: "",
  148. },
  149. form: {
  150. checkLogVos: [],
  151. },
  152. rules: {
  153. checkResult: [
  154. { required: true, message: "请选择审核结果", trigger: "change" },
  155. ],
  156. checkReason: [
  157. { required: false, message: "请输入审核意见", trigger: "blur" },
  158. ],
  159. },
  160. formPay: {
  161. toBankAcount: "",
  162. toBankName: "",
  163. toBankTypeName: "",
  164. },
  165. rulesPay: {
  166. toBankAcount: [
  167. { required: true, message: "请输入银行账号", trigger: "blur" },
  168. ],
  169. toBankName: [
  170. { required: true, message: "请输入账号名称", trigger: "blur" },
  171. ],
  172. toBankTypeName: [
  173. { required: true, message: "请输入银行名称", trigger: "blur" },
  174. ],
  175. },
  176. };
  177. },
  178. mounted() {},
  179. methods: {
  180. init() {
  181. this.resetForm();
  182. this.$api.systemtoporderrefunddetail(this.orderSn).then((res) => {
  183. this.form = res.data;
  184. this.formPay = {
  185. toBankAcount: res.data.proceedsAccount,
  186. toBankName: res.data.openingName,
  187. toBankTypeName: res.data.openingBank,
  188. };
  189. });
  190. },
  191. close() {
  192. this.$refs[
  193. this.form.checkType === 2 ? "formData" : "rulesPay"
  194. ].resetFields();
  195. },
  196. resetForm() {
  197. this.form = {
  198. checkLogVos: [],
  199. };
  200. this.formData = {
  201. checkResult: "",
  202. checkReason: "",
  203. };
  204. this.formPay = {
  205. toBankAcount: "",
  206. toBankName: "",
  207. toBankTypeName: "",
  208. };
  209. },
  210. submitForm() {
  211. if (this.form.checkType === 3) {
  212. this.$api
  213. .systemtoporderrefundpay({
  214. orderSn: this.orderSn,
  215. payType: this.form.payType,
  216. tenantId: this.form.tenantId,
  217. ...this.formPay,
  218. })
  219. .then((res) => {
  220. this.isShow = false;
  221. this.$emit("search");
  222. });
  223. } else {
  224. this.$refs["formData"].validate((valid) => {
  225. if (valid) {
  226. this.disabledBtn = true;
  227. this.$api
  228. .systemtoporderrefundcheck({
  229. orderSn: this.orderSn,
  230. ...this.formData,
  231. })
  232. .then((res) => {
  233. this.isShow = false;
  234. this.$emit("search");
  235. })
  236. .finally(() => {
  237. this.disabledBtn = false;
  238. });
  239. } else {
  240. return false;
  241. }
  242. });
  243. }
  244. },
  245. },
  246. computed: {
  247. isShow: {
  248. get() {
  249. if (this.dialogVisible) {
  250. this.init();
  251. }
  252. return this.dialogVisible;
  253. },
  254. set(val) {
  255. this.$emit("update:dialogVisible", false);
  256. },
  257. },
  258. },
  259. };
  260. </script>
  261. <style lang="scss" scoped>
  262. .bgc_pink {
  263. padding: 10px;
  264. background-color: rgb(252, 234, 236);
  265. color: #000;
  266. }
  267. .color_red {
  268. font-weight: bold;
  269. color: rgb(235, 59, 59);
  270. }
  271. .color_1890ff {
  272. color: #1890ff;
  273. font-weight: bold;
  274. }
  275. em {
  276. font-weight: bold;
  277. color: #000;
  278. font-style: unset;
  279. }
  280. </style>