dislogOrderDetails.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <template>
  2. <div class="orderDetail">
  3. <BaseDialog
  4. width="1200px"
  5. :isShow.sync="isShow"
  6. title="订单详情"
  7. @close="close"
  8. :isShowFooter="false"
  9. >
  10. <div class="head">
  11. 订单号:<span>{{ detailInfo.orderSn }}</span> 退款状态:<span>{{
  12. refundStatus(detailInfo.refundStatus)
  13. }}</span>
  14. <span v-if="orderFrom === 3"
  15. >审核状态:{{ checkStatus(detailInfo.checkStatus) }}</span
  16. >
  17. <i
  18. v-if="ShowStatus && detailInfo.checkStatus === 0"
  19. style="float: right"
  20. >
  21. <el-button
  22. type="success"
  23. size="small"
  24. @click="success"
  25. :disabled="orderFrom !== 3"
  26. >订单审核通过</el-button
  27. >
  28. <el-button
  29. type="danger"
  30. size="small"
  31. @click="error"
  32. :disabled="orderFrom !== 3"
  33. >订单审核不通过</el-button
  34. >
  35. </i>
  36. </div>
  37. <div class="mian">
  38. <el-descriptions class="margin-top" :column="3" border>
  39. <el-descriptions-item
  40. :label="desc.label"
  41. v-for="(desc, index) in descList"
  42. :key="index"
  43. >
  44. <div v-if="desc.type">
  45. <el-link
  46. :underline="false"
  47. :disabled="detailInfo['link'] ? false : true"
  48. v-if="desc.type === 'dowm'"
  49. :href="detailInfo['link']"
  50. target="_blank"
  51. >资料下载</el-link
  52. >
  53. <el-image
  54. v-if="desc.type === 'image'"
  55. style="width: 40px; height: 20px"
  56. :src="detailInfo[desc.key][0]"
  57. :preview-src-list="detailInfo[desc.key]"
  58. >
  59. </el-image>
  60. <div v-if="desc.type === 'pretax'">
  61. <span style="margin-right: 20px"
  62. >税前佣金:{{ detailInfo["pretaxBrokerage"] }}</span
  63. ><span>税占比:{{ detailInfo["pretaxStr"] }}</span>
  64. </div>
  65. <div v-if="desc.type === 'time'">
  66. {{ $methodsTools.onlyForma(detailInfo[desc.key]) }}
  67. </div>
  68. <div v-if="desc.type === 'options'">
  69. <template v-for="(i, k) in desc.options">
  70. <span v-if="i.value === detailInfo[desc.key]">
  71. {{ i.label }}
  72. </span>
  73. </template>
  74. </div>
  75. </div>
  76. <div v-else>
  77. {{ detailInfo[desc.key] }}
  78. <span
  79. v-if="desc.key === '888'"
  80. :style="{ color: true ? '#409eff' : '#f56c6c' }"
  81. >【{{ true ? "盈" : "亏" }}】</span
  82. >
  83. <span
  84. v-if="desc.key === '999'"
  85. :style="{ color: false ? '#409eff' : '#f56c6c' }"
  86. >({{ true ? "已结清" : "未结清" }})</span
  87. >
  88. </div>
  89. </el-descriptions-item>
  90. </el-descriptions>
  91. </div>
  92. <student-details
  93. v-if="isShow"
  94. :orderSn="orderSn"
  95. :orderFrom="orderFrom"
  96. :ShowStatus="ShowStatus"
  97. ></student-details>
  98. </BaseDialog>
  99. </div>
  100. </template>
  101. <script>
  102. import studentDetails from "./studentDetails.vue";
  103. export default {
  104. name: "dislogOrderDetails",
  105. props: {
  106. dialogVisible: {
  107. type: Boolean,
  108. default: false,
  109. },
  110. orderSn: {
  111. type: String,
  112. },
  113. orderFrom: {
  114. type: Number,
  115. },
  116. ShowStatus: {
  117. type: Boolean,
  118. default: false,
  119. },
  120. },
  121. data() {
  122. return {
  123. descList: [
  124. { label: "机构名称", key: "tenantName" },
  125. { label: "业务员", key: "createUsername" },
  126. { label: "业务号", key: "createNo" },
  127. { label: "业务分类", key: "schemeName" },
  128. { label: "订单来源", key: "orderOrg" },
  129. { label: "申请时间", key: "buyTime", type: "time" },
  130. { label: "盈亏(元)", key: "orderProfit" },
  131. { label: "成本(元)", key: "orderCost" },
  132. { label: "合同金额(元)", key: "orderPrice" },
  133. { label: "已收账款(元)", key: "orderReceived" },
  134. { label: "申请退款", key: "orderRefund" },
  135. { label: "已退账款(元)", key: "orderRefunded" },
  136. { label: "未收账款(元)", key: "orderUncollected" },
  137. { label: "实际账款(元)", key: "orderPractical" },
  138. { label: "下单企业", key: "tenantName" },
  139. { label: "转账开户名", key: "openingName" },
  140. { label: "转账凭证", key: "attachmentList", type: "image" },
  141. {
  142. label: "发票状态",
  143. key: "invoiceStatus",
  144. type: "options",
  145. options: [
  146. {
  147. label: "未开票",
  148. value: 0,
  149. },
  150. {
  151. label: "已开票",
  152. value: 1,
  153. },
  154. ],
  155. },
  156. { label: "备注", key: "remark" },
  157. { label: "附件", type: "dowm" },
  158. { label: "佣金", key: "pretax", type: "pretax" },
  159. ],
  160. detailInfo: {
  161. attachmentList: [],
  162. },
  163. };
  164. },
  165. mounted() {},
  166. methods: {
  167. //退款状态
  168. refundStatus(i) {
  169. var str = "";
  170. switch (i) {
  171. case 0:
  172. str = "待审核";
  173. break;
  174. case 1:
  175. str = "正常";
  176. break;
  177. case 2:
  178. str = "未退款";
  179. break;
  180. case 3:
  181. str = "已完成";
  182. break;
  183. case 4:
  184. str = "未通过";
  185. break;
  186. default:
  187. break;
  188. }
  189. return str;
  190. },
  191. //审核状态
  192. checkStatus(i) {
  193. var str = "";
  194. switch (i) {
  195. case 0:
  196. str = "待审核";
  197. break;
  198. case 1:
  199. str = "已通过";
  200. break;
  201. case 2:
  202. str = "未通过";
  203. break;
  204. case 3:
  205. str = "已撤销";
  206. break;
  207. default:
  208. break;
  209. }
  210. return str;
  211. },
  212. init() {
  213. this.getOrderDetail();
  214. },
  215. getOrderDetail() {
  216. this.$api.systemtoporderid(this.orderSn).then((res) => {
  217. if (res.data.attachmentList?.length > 0) {
  218. let a1 = [];
  219. for (let i = 0; i < res.data.attachmentList.length; i++) {
  220. if (res.data.attachmentList[i].attachmentType === 1) {
  221. a1.push(res.data.attachmentList[i].attachmentUrl);
  222. }
  223. if (res.data.attachmentList[i].attachmentType === 2) {
  224. res.data.link = res.data.attachmentList[i].attachmentUrl;
  225. }
  226. }
  227. res.data.attachmentList = a1;
  228. } else {
  229. res.data.attachmentList = [];
  230. }
  231. console.log(res.data);
  232. this.detailInfo = res.data;
  233. });
  234. },
  235. close() {},
  236. submit() {},
  237. submitForm() {
  238. this.isShow = false;
  239. this.$emit("search");
  240. },
  241. success() {
  242. this.$confirm("确定审核通过吗?", "提示", {
  243. confirmButtonText: "确定",
  244. cancelButtonText: "取消",
  245. type: "warning",
  246. })
  247. .then(() => {
  248. this.$api
  249. .systemtopordercheck({
  250. checkStatus: 1,
  251. orderSn: this.orderSn,
  252. })
  253. .then((res) => {
  254. this.init();
  255. this.$message.success("操作成功");
  256. });
  257. })
  258. .catch(() => {});
  259. },
  260. error() {
  261. this.$prompt("确定审核不通过吗?", "提示", {
  262. confirmButtonText: "确定",
  263. cancelButtonText: "取消",
  264. inputPlaceholder: "输入不通过原因",
  265. })
  266. .then(({ value }) => {
  267. this.$api
  268. .systemtopordercheck({
  269. checkReason: value || "",
  270. checkStatus: 2,
  271. orderSn: this.orderSn,
  272. })
  273. .then((res) => {
  274. this.init();
  275. this.$message.success("操作成功");
  276. });
  277. })
  278. .catch(() => {});
  279. },
  280. },
  281. computed: {
  282. isShow: {
  283. get() {
  284. if (this.dialogVisible) {
  285. this.init();
  286. }
  287. return this.dialogVisible;
  288. },
  289. set(val) {
  290. this.$emit("update:dialogVisible", false);
  291. },
  292. },
  293. },
  294. components: { studentDetails },
  295. };
  296. </script>
  297. <style lang="scss" scoped>
  298. .orderDetail {
  299. .head {
  300. margin-bottom: 20px;
  301. span {
  302. padding-right: 20px;
  303. color: #409eff;
  304. }
  305. }
  306. }
  307. </style>