customerFundList.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. //客户管理
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="8">
  5. <template slot="left"> </template>
  6. <template slot="left">
  7. <ws-input
  8. v-model="searchKeyWord"
  9. placeholder="可按客户名称、电话查找"
  10. clearable
  11. maxlength="500"
  12. type="input"
  13. class="findValue"
  14. ></ws-input>
  15. <ws-button class="find" type="primary" @click="find()"
  16. ><img
  17. width="16"
  18. height="16"
  19. style="
  20. vertical-align: text-top;
  21. position: relative;
  22. top: 0px;
  23. left: -2px;
  24. "
  25. src="../../../public/img/sousuo.png"
  26. alt=""
  27. /></ws-button>
  28. <!--添加客户-->
  29. <ws-button v-hasPermission=" `customerMoneyManagement.customerMoney.audit`" type="primary" @click="customerAdd()"
  30. ><img
  31. width="13"
  32. height="13"
  33. style="
  34. vertical-align: text-top;
  35. position: relative;
  36. top: 2px;
  37. left: -4px;
  38. "
  39. src="../../../public/img/header-add.png"
  40. alt=""
  41. />创建客户</ws-button
  42. >
  43. </template>
  44. <!-- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`" -->
  45. </BaseHeaderLayout>
  46. <div>
  47. <el-table
  48. class="wenzi"
  49. :data="customerList.records"
  50. style="width: 100%"
  51. height="680"
  52. >
  53. <el-table-column prop="index" label="序号" width="80">
  54. <template scope="scope">
  55. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  56. <span v-else>{{ scope.$index + 1 }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column prop="customerType" label="客户类型" width="80"></el-table-column>
  60. <el-table-column prop="compName" label="企业名称" width="200"></el-table-column>
  61. <el-table-column prop="customerName" label="客户姓名" width="120"></el-table-column>
  62. <el-table-column prop="customerPhone" label="电话" width="100"> </el-table-column>
  63. <el-table-column prop="totalDeposit" label="定金(元)" width="110"></el-table-column>
  64. <el-table-column prop="advancePayment" label="预付金(元)" width="110"></el-table-column>
  65. <el-table-column prop="securityDeposit" label="保证金(元)" width="110"></el-table-column>
  66. <el-table-column prop="bankCard" label="账号" width="200"> </el-table-column>
  67. <el-table-column prop="bankDeposit" label="开户行" width="280">
  68. <template slot-scope="scope">
  69. {{ scope.row.bankDeposit }} - {{ scope.row.bankDepositBranch }}
  70. </template>
  71. </el-table-column>
  72. <!-- <el-table-column prop="bankDepositBranch" label="开户支行" width="260">
  73. <template slot-scope="scope">
  74. {{ scope.row.bankDeposit }} - {{ scope.row.bankDepositBranch }}
  75. </template>
  76. </el-table-column> -->
  77. <el-table-column prop="payeeName" label="收款人姓名" width="150"> </el-table-column>
  78. <el-table-column prop="seller" label="操作" width="150">
  79. <template slot-scope="scope">
  80. <el-button
  81. size="medium"
  82. type="text"
  83. class="record"
  84. v-hasPermission=" `customerMoneyManagement.customerMoney.edit`"
  85. @click="customerEdit(scope.row)"
  86. >编辑</el-button
  87. >
  88. <el-button
  89. size="medium"
  90. type="text"
  91. class="record"
  92. v-hasPermission=" `customerMoneyManagement.customerMoney.delete`"
  93. @click="customerDel(scope.row)"
  94. >删除</el-button
  95. >
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. <el-pagination
  100. @size-change="handleSizeChange"
  101. @current-change="handleCurrentChange"
  102. :current-page="currentPage"
  103. :page-size="deptCircularPage.pageSize"
  104. layout="total, sizes, prev, pager, next, jumper"
  105. :total="deptBudgetTotal"
  106. >
  107. </el-pagination>
  108. </div>
  109. </div>
  110. </template>
  111. <script>
  112. import {
  113. getCustomerList,
  114. delCustomerInfo,
  115. } from '@/model/customerFundManagement/index'
  116. import Pagination from '@/components/Pagination'
  117. import WsUpload from '@/components/WsUpload'
  118. export default {
  119. name: 'viewSpareMoney',
  120. components: {
  121. WsUpload,
  122. Pagination,
  123. },
  124. watch: {
  125. vesselId(val) {
  126. this.getList()
  127. },
  128. isShow(val) {
  129. this.showType = val
  130. },
  131. },
  132. data() {
  133. return {
  134. //弹出框
  135. dialogViewSpareMoney: false,
  136. dialogApproveFormVisible: false,
  137. // 船舶类型
  138. monetaryKey: null,
  139. // 表格显示数据
  140. tableDate: [],
  141. // 是否显示
  142. showType: true,
  143. // 年
  144. year: '',
  145. currentPage: 1,
  146. pageSize: 10,
  147. deptBudgetTotal: 0,
  148. searchKeyWord: '',
  149. contractType: 2,
  150. searchType: 1,
  151. // 提交类型
  152. submitType: true,
  153. size: 10,
  154. spanArr: [],
  155. id: '',
  156. money: '',
  157. compId: sessionStorage.getItem('ws-pf_compId'),
  158. deptCircularPage: {},
  159. customerList: [],
  160. deptBudgetList: {},
  161. pickerBeginDateBefore: {
  162. disabledDate: (time) => {
  163. return time.getTime() > Date.now()
  164. },
  165. },
  166. accessoryTFs: false,
  167. customerInfo: {
  168. id: '',
  169. compId: '',
  170. flag: '',
  171. money: '',
  172. totalDeposit: 0,
  173. },
  174. totalDeposit: 0,
  175. }
  176. },
  177. activated() {
  178. this.getList()
  179. this.showType = this.isShow
  180. },
  181. methods: {
  182. //查看//传参
  183. nocomplete(row) {
  184. this.$router.push({
  185. name: 'vehicleDispatchingview',
  186. query: {
  187. id: row.id,
  188. },
  189. })
  190. },
  191. dateFormat(fmt, date) {
  192. let ret
  193. const opt = {
  194. 'Y+': date.getFullYear().toString(), // 年
  195. 'm+': (date.getMonth() + 1).toString(), // 月
  196. 'd+': date.getDate().toString(), // 日
  197. 'H+': date.getHours().toString(), // 时
  198. // "M+": date.getMinutes().toString(), // 分
  199. // "S+": date.getSeconds().toString() // 秒
  200. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  201. }
  202. for (let k in opt) {
  203. ret = new RegExp('(' + k + ')').exec(fmt)
  204. if (ret) {
  205. fmt = fmt.replace(
  206. ret[1],
  207. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  208. )
  209. }
  210. }
  211. return fmt
  212. },
  213. customerAdd() {
  214. this.$router.push({
  215. path: 'customerFundAdd',
  216. })
  217. },
  218. customerEdit(row) {
  219. this.$router.push({
  220. name: 'customerFundEdit',
  221. query: {
  222. id: row.id,
  223. },
  224. })
  225. },
  226. customerDel(row) {
  227. this.$confirm(`客户信息删除后不可恢复,是否确定删除?`, {
  228. cancelButtonText: '取消',
  229. confirmButtonText: '确定',
  230. type: 'warning',
  231. })
  232. .then(() => {
  233. delCustomerInfo({
  234. id: row.id,
  235. })
  236. .toPromise()
  237. .then((response) => {
  238. this.$notify.success({
  239. title: '成功',
  240. message: '删除成功',
  241. })
  242. this.getList()
  243. })
  244. .catch((response) => {})
  245. })
  246. .catch(() => {
  247. return false
  248. })
  249. },
  250. handleClose() {
  251. this.accessoryTFs = false
  252. },
  253. handleSizeChange(val) {
  254. console.log(`每页 ${val} 条`)
  255. this.pageSize = val
  256. this.getList()
  257. },
  258. handleCurrentChange(val) {
  259. this.currentPage = val
  260. console.log(`当前页: ${val}`)
  261. this.getList()
  262. },
  263. changestatus(state) {
  264. this.searchType = state
  265. this.getList()
  266. },
  267. whether(row) {
  268. row.identification = 'true'
  269. },
  270. //列表查询
  271. getList() {
  272. getCustomerList({
  273. compId: sessionStorage.getItem('ws-pf_compId'),
  274. currentPage: this.currentPage,
  275. pageSize: this.pageSize,
  276. searchKeyWord: this.searchKeyWord,
  277. customerTypeFlag: this.customerTypeFlag,
  278. })
  279. .toPromise()
  280. .then((response) => {
  281. for (var i = 0; i < response.records.length; i++) {
  282. response.records[i].identification = 'false'
  283. }
  284. this.customerList = response
  285. this.deptCircularPage.currentPage = response.current
  286. this.deptCircularPage.pageSize = response.size
  287. this.deptBudgetTotal = response.total
  288. })
  289. },
  290. find() {
  291. this.currentPage = 1
  292. this.getList()
  293. },
  294. },
  295. }
  296. </script>
  297. <style lang="scss" scoped>
  298. .connert {
  299. width: 90%;
  300. margin: 0 auto;
  301. }
  302. .vertical-text-left {
  303. width: 62px;
  304. text-align: right;
  305. }
  306. .el-button--primary {
  307. background-color: #5878e8;
  308. border-color: #5878e8;
  309. }
  310. .el-button--primary {
  311. background-color: #5878e8;
  312. color: #fff;
  313. }
  314. .el-button--default {
  315. color: #8890b1;
  316. border-color: #e8eaf1;
  317. }
  318. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  319. width: 30px;
  320. margin-left: 0;
  321. border-top-left-radius: 0px;
  322. border-bottom-left-radius: 0px;
  323. }
  324. /deep/.findValue .el-input__inner {
  325. border-top-right-radius: 0px;
  326. border-bottom-right-radius: 0px;
  327. }
  328. //操作按钮
  329. .record,
  330. .adjustment {
  331. display: inline-block;
  332. color: #5878e8;
  333. padding: 0 4px !important;
  334. position: relative;
  335. font-size: 14px;
  336. }
  337. .record:after {
  338. position: absolute;
  339. content: '';
  340. display: block;
  341. top: 5px;
  342. right: -2px;
  343. width: 1px;
  344. height: 12px;
  345. background: #e9ecf7;
  346. }
  347. //状态样式
  348. .executory,
  349. .inExecution,
  350. .done {
  351. width: 6px;
  352. height: 6px;
  353. display: inline-block;
  354. border-radius: 50%;
  355. position: relative;
  356. top: -1px;
  357. font-size: 14px;
  358. }
  359. .executory {
  360. background: #ff9f24;
  361. }
  362. .inExecution {
  363. background: #5878e8;
  364. }
  365. .done {
  366. background: #50cad4;
  367. }
  368. .putstorage.el-button--default,
  369. .deliverystorage.el-button--default {
  370. border-color: #8890b1;
  371. background-color: #fff;
  372. color: #8890b1;
  373. }
  374. /deep/.el-table td,
  375. /deep/.el-table th.is-leaf {
  376. border-right: 1px solid #e9ecf7;
  377. text-align: center;
  378. }
  379. /deep/.el-table tr td:first-child,
  380. /deep/.el-table tr th.is-leaf:first-child {
  381. border-left: 1px solid #e9ecf7;
  382. }
  383. .record,
  384. .adjustment {
  385. display: inline-block;
  386. color: #5878e8;
  387. padding: 0 4px !important;
  388. position: relative;
  389. }
  390. .record:after {
  391. position: absolute;
  392. content: '';
  393. display: block;
  394. top: 5px;
  395. right: -2px;
  396. width: 1px;
  397. height: 12px;
  398. background: #e9ecf7;
  399. }
  400. .el-row {
  401. height: 60px;
  402. }
  403. .base_header_layout .grid-content {
  404. margin-top: 80px;
  405. }
  406. .el-input--small .el-input__inner {
  407. margin-left: 20px;
  408. }
  409. .dialog-footer {
  410. margin-top: 33px;
  411. }
  412. .el-range-editor--small.el-input__inner {
  413. height: 32px;
  414. margin: 0 10px;
  415. }
  416. /deep/.el-pagination {
  417. text-align: center;
  418. white-space: nowrap;
  419. padding: 2px 5px;
  420. color: #303133;
  421. font-weight: 700;
  422. margin-bottom: 20px;
  423. }
  424. .el-select {
  425. width: 30%;
  426. margin-right: 10px;
  427. }
  428. /deep/.zengjia .el-textarea__inner {
  429. display: block;
  430. padding: 13px 9px;
  431. line-height: 0.5;
  432. box-sizing: border-box;
  433. width: 80%;
  434. font-size: inherit;
  435. color: #606266;
  436. background-color: #fff;
  437. background-image: none;
  438. border: 1px solid #dcdfe6;
  439. border-radius: 4px;
  440. margin-left: 180px;
  441. margin-top: 10px;
  442. }
  443. /deep/.xiugai .el-textarea__inner {
  444. display: block;
  445. padding: 13px 17px;
  446. line-height: 0.5;
  447. box-sizing: border-box;
  448. width: 105%;
  449. font-size: inherit;
  450. color: #606266;
  451. background-color: #fff;
  452. background-image: none;
  453. border: 1px solid #dcdfe6;
  454. border-radius: 4px;
  455. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  456. margin-left: 95px;
  457. }
  458. /deep/.tuihui .el-textarea__inner {
  459. display: block;
  460. padding: 13px 9px;
  461. line-height: 0.5;
  462. box-sizing: border-box;
  463. width: 80%;
  464. font-size: inherit;
  465. color: #606266;
  466. background-color: #fff;
  467. background-image: none;
  468. border: 1px solid #dcdfe6;
  469. border-radius: 4px;
  470. margin-left: 180px;
  471. margin-top: 10px;
  472. }
  473. /deep/.dingjin {
  474. width: 98px;
  475. margin-left: 30px;
  476. margin-bottom: -37px;
  477. padding-top: 20px;
  478. }
  479. /deep/.el-textarea__inner {
  480. display: block;
  481. padding: 13px 17px;
  482. line-height: 0.5;
  483. box-sizing: border-box;
  484. width: 90%;
  485. font-size: inherit;
  486. color: #606266;
  487. background-color: #fff;
  488. background-image: none;
  489. border: 1px solid #dcdfe6;
  490. border-radius: 4px;
  491. transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  492. margin-left: 155px;
  493. margin-top: 10px;
  494. }
  495. /deep/.addprice {
  496. width: 98px;
  497. margin-left: 50px;
  498. }
  499. /deep/.returnprice {
  500. width: 98px;
  501. margin-left: 50px;
  502. }
  503. /deep/.yuan {
  504. width: 10px;
  505. margin-left: 150%;
  506. margin-top: -32px;
  507. }
  508. /deep/.addpricejine {
  509. width: 98px;
  510. margin-left: 50px;
  511. margin-bottom: -37px;
  512. padding-top: 20px;
  513. }
  514. /deep/.returnpricejine {
  515. width: 98px;
  516. margin-left: 50px;
  517. margin-bottom: -37px;
  518. padding-top: 20px;
  519. }
  520. /deep/.typeselect .el-input__inner {
  521. color: #8890b1;
  522. }
  523. /deep/.yifudingjin {
  524. margin-left: 135px;
  525. width: 70px;
  526. margin-top: -19px;
  527. }
  528. .inputChenge {
  529. width: 50%;
  530. display: inline-flex;
  531. }
  532. .inputs {
  533. margin: 0 auto;
  534. }
  535. /deep/.ketuidingjin {
  536. margin-left: 135px;
  537. width: 70px;
  538. margin-top: -19px;
  539. }
  540. </style>