index.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. <template>
  2. <div class="operation">
  3. <search-box-new
  4. class="search_box_page"
  5. ref="searchBox"
  6. :redIcon="false"
  7. :formData="formData"
  8. :formList="formList"
  9. @search="search(3)"
  10. @init="init"
  11. />
  12. <picture-list ref="pictureList" :list="showTabList"></picture-list>
  13. <table-list
  14. ref="tableList"
  15. :tableSets="tableSet"
  16. :tableData="tableData"
  17. :navText="navText"
  18. :loading="loading"
  19. >
  20. <template slot="customize">
  21. <el-button type="primary" @click="openDialog({ ctype: 2 }, 1)"
  22. >自动催款</el-button
  23. >
  24. <el-button @click="openDialog({}, 2)" type="primary">
  25. 坏账设置
  26. </el-button>
  27. </template>
  28. <template slot="noteType" slot-scope="props">
  29. <div v-if="!props.scope.row.noteId || props.scope.row.noteType == 1">
  30. --
  31. </div>
  32. <div v-else>
  33. <div :class="'tip' + props.scope.row.noteType">
  34. <span v-for="(text, idx) in backText(props.scope.row)" :key="idx">
  35. <span v-if="props.scope.row.noteType == 3">周</span>
  36. {{ text }}
  37. <span v-if="props.scope.row.noteType == 4">日</span>
  38. <i></i>
  39. </span>
  40. </div>
  41. <div>{{ props.scope.row.dayTime }}</div>
  42. </div>
  43. </template>
  44. <template slot="predictPayTime" slot-scope="props">
  45. <span
  46. :style="{ color: props.scope.row.predictReceiveDay < 0 ? 'red' : '' }"
  47. >
  48. {{ props.scope.row.predictReceiveDay || "--" }}
  49. </span>
  50. </template>
  51. <template slot="btn" slot-scope="props">
  52. <el-button type="text" @click="openDialog(props.scope.row, 0)">
  53. 详情
  54. </el-button>
  55. <el-button
  56. type="text"
  57. :disabled="props.scope.row.creditStatus == 1"
  58. @click="openDialog({ ...props.scope.row, ctype: 1 }, 1)"
  59. >
  60. 催款
  61. </el-button>
  62. </template>
  63. </table-list>
  64. <pagination1
  65. :total="total"
  66. :pageSize.sync="formData.pageSize"
  67. :currentPage.sync="formData.pageNum"
  68. @search="search(3)"
  69. />
  70. <!-- 催款 -->
  71. <dislog-tip
  72. :dialogVisible.sync="tipDialogVisible"
  73. :orderInfo="activeOrderInfo"
  74. @search="search(3)"
  75. />
  76. <!-- 订单详情 -->
  77. <dislog-order-details
  78. :ShowStatus="1"
  79. :orderSn="activeOrderInfo.orderSn"
  80. :orderFrom="activeOrderInfo.orderFrom"
  81. :dialogVisible.sync="orderDialogVisible"
  82. />
  83. <!-- 坏账设置 -->
  84. <dislog-bad-bill :dialogVisible.sync="badBillDialogVisible" />
  85. </div>
  86. </template>
  87. <script>
  88. import pictureList from "@/components/Comon/pictureList.vue";
  89. import dislogBadBill from "../components/dislogBadBill.vue";
  90. import dislogOrderDetails from "../../components/dislogOrderDetails.vue";
  91. import dislogTip from "../components/dislogTip.vue";
  92. import { orderList } from "@/api/financed/index";
  93. export default {
  94. name: "SaasMasterPlatformIndex",
  95. data() {
  96. return {
  97. showTabList: [
  98. {
  99. label: "未收账款",
  100. prop: "orderUncollectedTotal",
  101. img: "未收款",
  102. },
  103. ],
  104. navText: {
  105. title: "应收应付",
  106. index: 0,
  107. ch: "条",
  108. num: true,
  109. choice: false,
  110. addHide: true,
  111. dontNum: false,
  112. openCheckMore: false,
  113. changeWidth: "240px",
  114. custom: false,
  115. },
  116. formList: [
  117. {
  118. prop: "tenantId",
  119. placeholder: "机构选择",
  120. scope: "systemtenantlist",
  121. },
  122. {
  123. prop: "badBill",
  124. placeholder: "坏账选择",
  125. scope: "select",
  126. options: [
  127. { label: "是", value: 1 },
  128. { label: "否", value: 2 },
  129. ],
  130. },
  131. {
  132. prop1: "startTime",
  133. prop2: "endTime",
  134. placeholder1: "订单开始时间",
  135. placeholder2: "订单结束时间",
  136. scope: "moreDataPicker",
  137. },
  138. {
  139. prop: "orderSn",
  140. placeholder: "订单单号",
  141. },
  142. {
  143. prop: "keyNo",
  144. placeholder: "业务号",
  145. },
  146. ],
  147. tableSet: [
  148. {
  149. label: "坏账",
  150. prop: "badBill",
  151. hidden: true,
  152. scope: "isOptions",
  153. options: [
  154. {
  155. label: "否",
  156. value: false,
  157. },
  158. {
  159. label: "是",
  160. value: true,
  161. style: {
  162. color: "red",
  163. },
  164. },
  165. ],
  166. },
  167. {
  168. label: "下单时间",
  169. prop: "buyTime",
  170. hidden: true,
  171. scope: "aTimeList",
  172. },
  173. {
  174. label: "订单单号",
  175. prop: "orderSn",
  176. hidden: true,
  177. },
  178. {
  179. label: "机构名称",
  180. prop: "tenantName",
  181. hidden: true,
  182. },
  183. {
  184. label: "业务员",
  185. prop: "createUsername",
  186. hidden: true,
  187. },
  188. {
  189. label: "业务号",
  190. prop: "createNo",
  191. hidden: true,
  192. },
  193. {
  194. label: "合同金额(元)",
  195. prop: "orderPrice",
  196. hidden: true,
  197. scope: "formatPrice",
  198. },
  199. {
  200. label: "已收账款(元)",
  201. prop: "orderReceived",
  202. hidden: true,
  203. scope: "formatPrice",
  204. },
  205. {
  206. label: "已退金额(元)",
  207. prop: "orderRefunded",
  208. hidden: true,
  209. scope: "formatPrice",
  210. },
  211. {
  212. label: "未收账款(元)",
  213. prop: "orderUncollected",
  214. hidden: true,
  215. scope: "formatPrice",
  216. },
  217. {
  218. label: "预收时间",
  219. hidden: true,
  220. prop: "predictReceiveTime",
  221. scope: "aTimeList",
  222. },
  223. {
  224. label: "剩余天数",
  225. prop: "predictReceiveDay",
  226. hidden: true,
  227. scope: "solt",
  228. soltName: "predictPayTime",
  229. },
  230. {
  231. label: "提醒设置",
  232. prop: "noteType",
  233. scope: "solt",
  234. soltName: "noteType",
  235. hidden: true,
  236. },
  237. {
  238. label: "最新提醒",
  239. prop: "lastTime",
  240. hidden: true,
  241. scope: "aTimeList",
  242. },
  243. ],
  244. formData: {},
  245. tableData: [],
  246. total: 0,
  247. loading: false,
  248. badBillDialogVisible: false,
  249. orderDialogVisible: false,
  250. tipDialogVisible: false,
  251. activeOrderInfo: {},
  252. };
  253. },
  254. created() {
  255. this.init();
  256. },
  257. methods: {
  258. async search(v) {
  259. this.loading = true;
  260. if (v === 2) {
  261. this.tableData = [];
  262. this.formData = {
  263. pageSize: 10,
  264. pageNum: 1,
  265. };
  266. }
  267. this.getDataList();
  268. },
  269. init() {
  270. this.search(2);
  271. },
  272. getDataList() {
  273. orderList(this.formData)
  274. .then((res) => {
  275. this.tableData = res.rows;
  276. this.total = res.total;
  277. this.navText.index = res.total;
  278. })
  279. .finally(() => {
  280. this.loading = false;
  281. });
  282. },
  283. backText(row) {
  284. const type = row.noteType;
  285. if (type == 2) {
  286. return ["每天"];
  287. }
  288. const key = ["weekTime", "monthTime"][type - 3];
  289. let data = row[key].split(",").sort((a, b) => a - b);
  290. return data;
  291. },
  292. openDialog(data, type) {
  293. data.checkFrom = 1;
  294. this.activeOrderInfo = data;
  295. this[["order", "tip", "badBill"][type] + "DialogVisible"] = true;
  296. },
  297. },
  298. components: {
  299. pictureList,
  300. dislogBadBill,
  301. dislogOrderDetails,
  302. dislogTip,
  303. },
  304. };
  305. </script>
  306. <style lang="scss" scoped>
  307. .search_box_page {
  308. /deep/ .el-select {
  309. width: 120px;
  310. }
  311. /deep/ .el-date-editor {
  312. width: 140px;
  313. }
  314. /deep/ .el-form-item__content > .el-input {
  315. width: 190px;
  316. }
  317. }
  318. </style>