dislogArapDetails.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <template>
  2. <div class="arapDetail">
  3. <BaseDialog
  4. width="1200px"
  5. :isShow.sync="isShow"
  6. title="查看详情"
  7. :isShowFooter="false"
  8. >
  9. <el-radio-group
  10. v-model="status"
  11. @change="changeGroup"
  12. style="margin-bottom: 10px"
  13. >
  14. <el-radio-button :label="0">完单订单</el-radio-button>
  15. <el-radio-button :label="1" v-if="type !== 3">退款订单</el-radio-button>
  16. <el-radio-button :label="2">结算记录</el-radio-button>
  17. </el-radio-group>
  18. <search-box-new
  19. ref="searchBox"
  20. :formData="formData"
  21. :formList="formList"
  22. :redIcon="false"
  23. @search="search"
  24. @init="init"
  25. />
  26. <pictureList :list="showTabList[status]" />
  27. <table-list
  28. :key="type + status + ''"
  29. :tableSets="tableSet"
  30. :tableData="tableData"
  31. :navText="dialogNavText"
  32. >
  33. <template slot="btn" slot-scope="props">
  34. <el-button type="text" @click="openDialog(props.scope.row)">
  35. 查看详情
  36. </el-button>
  37. </template>
  38. </table-list>
  39. <pagination
  40. :total="total"
  41. :pageSize.sync="formData.pageSize"
  42. :currentPage.sync="formData.pageNum"
  43. @search="search"
  44. />
  45. <!-- 订单详情 -->
  46. <dislog-order-details
  47. :orderSn="activeOrderInfo.orderSn"
  48. :orderFrom="activeOrderInfo.orderFrom"
  49. :dialogVisible.sync="orderDialogVisible"
  50. />
  51. </BaseDialog>
  52. </div>
  53. </template>
  54. <script>
  55. import tableList from "@/components/tableList";
  56. import pagination from "@/components/pagination";
  57. import searchBoxNew from "@/components/searchBoxNew";
  58. import pictureList from "@/components/Comon/pictureList.vue";
  59. import dislogOrderDetails from "../components/dislogOrderDetails.vue";
  60. export default {
  61. name: "SaasMasterPlatformDislogArapDetails",
  62. props: {
  63. dialogVisible: {
  64. type: Boolean,
  65. default: false,
  66. },
  67. type: {
  68. type: Number,
  69. default: 1,
  70. },
  71. },
  72. data() {
  73. return {
  74. dialogNavText: {
  75. index: 0,
  76. num: true,
  77. border: true,
  78. choice: false,
  79. choiceRadio: false,
  80. radioKey: "specTemplateId",
  81. radioFixed: false,
  82. addHide: !false,
  83. tableHide: false,
  84. dontNum: false,
  85. headShow: false,
  86. backFatherBtn: {
  87. status: false,
  88. title: "未定义",
  89. },
  90. },
  91. tableData: [],
  92. formData: {
  93. pageSize: 10,
  94. pageNum: 1,
  95. },
  96. total: 0,
  97. status: 0,
  98. showTabList: [
  99. [
  100. {
  101. label: "待付提成",
  102. prop: "orderUncollectedTotal",
  103. img: "未收款",
  104. },
  105. {
  106. label: "已付提成",
  107. prop: "orderUncollectedTotal",
  108. img: "已收款",
  109. },
  110. ],
  111. [
  112. {
  113. label: "待扣提成",
  114. prop: "orderReceivedTotal",
  115. img: "已退款",
  116. },
  117. {
  118. label: "已扣提成",
  119. prop: "orderUncollectedTotal",
  120. img: "成本金额",
  121. },
  122. ],
  123. [
  124. {
  125. label: "结算金额",
  126. prop: "orderPriceTotal",
  127. img: "已收款",
  128. },
  129. {
  130. label: "完单提成",
  131. prop: "orderReceivedTotal",
  132. img: "已退款",
  133. },
  134. {
  135. label: "扣除提成",
  136. prop: "orderUncollectedTotal",
  137. img: "未收款",
  138. },
  139. ],
  140. ],
  141. activeOrderInfo: {},
  142. orderDialogVisible: false,
  143. loading: false,
  144. };
  145. },
  146. mounted() {},
  147. methods: {
  148. init() {},
  149. search(v) {
  150. this.loading = true;
  151. if (v === 2) {
  152. this.formData = {
  153. pageSize: 10,
  154. pageNum: 1,
  155. };
  156. }
  157. // this.getDataList(this.backData());
  158. },
  159. getDataList(data) {
  160. const fn = [orderList, tenantList, sellerList][this.type];
  161. fn(data)
  162. .then((res) => {
  163. this.tableData = res.rows;
  164. this.total = res.total;
  165. this.navText.index = res.total;
  166. })
  167. .finally(() => {
  168. this.loading = false;
  169. });
  170. },
  171. changeGroup() {},
  172. openDialog(data) {
  173. this.activeOrderInfo = data;
  174. this.orderDialogVisible = true;
  175. },
  176. },
  177. components: {
  178. tableList,
  179. pagination,
  180. searchBoxNew,
  181. pictureList,
  182. dislogOrderDetails,
  183. },
  184. computed: {
  185. isShow: {
  186. get() {
  187. if (this.dialogVisible) {
  188. this.init();
  189. }
  190. return this.dialogVisible;
  191. },
  192. set(val) {
  193. this.$emit("update:dialogVisible", false);
  194. },
  195. },
  196. text() {
  197. return ["分成", "提成", "佣金"][this.type - 1];
  198. },
  199. formList() {
  200. const key = ["完单", "退款", "结算"][this.status];
  201. let data = [
  202. {
  203. prop1: "startTime",
  204. prop2: "endTime",
  205. placeholder1: key + "开始时间",
  206. placeholder2: key + "结束时间",
  207. scope: "moreDataPicker",
  208. },
  209. ];
  210. if (this.status == 0) {
  211. data.unshift({
  212. prop: "divideStatus",
  213. placeholder: "分成状态",
  214. scope: "select",
  215. options: [
  216. { label: "待审核", value: 0 },
  217. { label: "已通过", value: 1 },
  218. { label: "未通过", value: 2 },
  219. { label: "已撤销", value: 3 },
  220. ],
  221. });
  222. }
  223. if (this.status != 2) {
  224. data.push({
  225. prop: "orderSn",
  226. placeholder: "订单单号",
  227. });
  228. }
  229. return data;
  230. },
  231. tableSet() {
  232. if (this.status == 0) {
  233. let data = [
  234. {
  235. label: "完单时间",
  236. prop: "userName",
  237. hidden: true,
  238. },
  239. {
  240. label: "订单单号",
  241. prop: "orderSn",
  242. hidden: true,
  243. },
  244. {
  245. label: `已付${this.text}(元)`,
  246. prop: "goodsName",
  247. hidden: true,
  248. },
  249. {
  250. label: `待付${this.text}(元)`,
  251. prop: "userPhone",
  252. hidden: true,
  253. },
  254. ];
  255. if (this.type != 3) {
  256. data.push(
  257. {
  258. label: "预付时间",
  259. prop: "majorName",
  260. hidden: true,
  261. },
  262. {
  263. label: "剩余天数",
  264. prop: "predictPayDay",
  265. hidden: true,
  266. }
  267. );
  268. } else {
  269. data.push({
  270. label: "佣金状态",
  271. prop: "majorName",
  272. hidden: true,
  273. });
  274. }
  275. return data;
  276. } else if (this.status == 1) {
  277. return [
  278. {
  279. label: "退款时间",
  280. prop: "userName",
  281. hidden: true,
  282. },
  283. {
  284. label: "订单单号",
  285. prop: "orderSn",
  286. hidden: true,
  287. },
  288. {
  289. label: `扣除${this.text}(元)`,
  290. prop: "goodsName",
  291. hidden: true,
  292. },
  293. {
  294. label: "扣除状态",
  295. prop: "orderSn",
  296. hidden: true,
  297. },
  298. ];
  299. } else {
  300. let data = [
  301. {
  302. label: "结算时间",
  303. prop: "userName",
  304. hidden: true,
  305. },
  306. {
  307. label: "结算金额(元)",
  308. prop: "orderSn",
  309. hidden: true,
  310. },
  311. {
  312. label: `完成${this.text}(元)`,
  313. prop: "goodsName",
  314. hidden: true,
  315. },
  316. {
  317. label: `扣除${this.text}(元)`,
  318. prop: "userPhone",
  319. hidden: true,
  320. },
  321. ];
  322. if (this.type != 3) {
  323. data.push();
  324. }
  325. return data;
  326. }
  327. },
  328. pictureList() {
  329. if (this.status == 0) {
  330. return [
  331. {
  332. label: `待付${this.text}`,
  333. prop: "orderUncollectedTotal",
  334. img: "未收款",
  335. },
  336. {
  337. label: `已付${this.text}`,
  338. prop: "orderUncollectedTotal",
  339. img: "已收款",
  340. },
  341. ];
  342. } else if (this.status == 1) {
  343. return [
  344. {
  345. label: `待扣${this.text}`,
  346. prop: "orderReceivedTotal",
  347. img: "已退款",
  348. },
  349. {
  350. label: `已扣${this.text}`,
  351. prop: "orderUncollectedTotal",
  352. img: "成本金额",
  353. },
  354. ];
  355. } else {
  356. let data = [
  357. {
  358. label: "结算金额",
  359. prop: "orderPriceTotal",
  360. img: "已收款",
  361. },
  362. ];
  363. if (this.type != 3) {
  364. data.push(
  365. {
  366. label: `完单${this.text}`,
  367. prop: "orderReceivedTotal",
  368. img: "已退款",
  369. },
  370. {
  371. label: `扣除${this.text}`,
  372. prop: "orderUncollectedTotal",
  373. img: "未收款",
  374. }
  375. );
  376. }
  377. return data;
  378. }
  379. },
  380. },
  381. };
  382. </script>
  383. <style lang="scss" scoped>
  384. .arapDetail {
  385. margin-top: 10px;
  386. #tableList {
  387. padding: 0;
  388. }
  389. }
  390. </style>