| | |
| | | amount: 130, |
| | | sourceType: this.editCommonConfig.sourceType, // 源单类型 1销售明细2服务合同3销售发票 |
| | | sourceId: this.editCommonConfig.infomation.id, |
| | | principalId: 0, |
| | | principalId: this.getCookie('username')||0, |
| | | planAmount: 0, // 计划金额 |
| | | firstDate: this.getCurrentDate(1), |
| | | collectionType: 1, |
| | |
| | | this.getCommonData() |
| | | }, |
| | | methods: { |
| | | getCookie(cookieName) { |
| | | var cookieValue = null; |
| | | if (document.cookie && document.cookie !== '') { |
| | | var cookies = document.cookie.split(';'); |
| | | for (var i = 0; i < cookies.length; i++) { |
| | | var cookie = cookies[i].trim(); |
| | | // 忽略不完整的cookie |
| | | if (cookie.startsWith(cookieName + '=')) { |
| | | cookieValue = cookie.substring(cookieName.length + 1, cookie.length); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return cookieValue; |
| | | }, |
| | | // 设置初始值 |
| | | setData() { |
| | | this.amount = |
| | |
| | | this.editConfig.infomation = { |
| | | collectionType: this.collectionType, |
| | | moneyType: "人民币", |
| | | amountTotal: this.editCommonConfig.infomation.amountTotal |
| | | amountTotal: this.editCommonConfig.infomation.amountTotal, |
| | | principalId:this.getCookie('username') |
| | | } |
| | | }, |
| | | getCommonData() { |