批量开票、批量来款
This commit is contained in:
@@ -109,6 +109,7 @@ import { addZero } from '../../../utils/util'
|
||||
import { addPayBill } from '../../../api/incomePaymentsApi'
|
||||
import SelectContacts from '../../../components/company/SelectContacts'
|
||||
import { getContactsById } from '../../../api/api'
|
||||
import pick from 'lodash.pick'
|
||||
|
||||
export default {
|
||||
name: 'BatchInvoicingModule',
|
||||
@@ -266,6 +267,20 @@ export default {
|
||||
this.clearThisTimeAmount()
|
||||
this.calculateThisTimeAmount()
|
||||
},
|
||||
/**
|
||||
* 邮寄联系人变化
|
||||
* @param value
|
||||
*/
|
||||
postContactChange(value) {
|
||||
console.log(value)
|
||||
getContactsById({ id: value }).then(res => {
|
||||
let obj = {
|
||||
postalCode: res.result.postalCode,
|
||||
contactAddress: res.result.contactAddress
|
||||
}
|
||||
this.form.setFieldsValue(pick(obj, 'postalCode', 'contactAddress'))
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 清空本次开票金额
|
||||
* @returns {Promise<unknown>}
|
||||
@@ -301,15 +316,6 @@ export default {
|
||||
this.$set(this.dataSource, index, item)
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取联系人信息
|
||||
* @param value
|
||||
*/
|
||||
postContactChange(value) {
|
||||
getContactsById({id: value}).then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
@@ -326,7 +332,6 @@ export default {
|
||||
})
|
||||
let param = values
|
||||
param.bmpList = bmpList
|
||||
console.log(param)
|
||||
addPayBill(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -343,12 +348,14 @@ export default {
|
||||
this.close()
|
||||
},
|
||||
open() {
|
||||
console.log(this.selectedData)
|
||||
this.dataSource = this.selectedData
|
||||
this.loadData()
|
||||
},
|
||||
close() {
|
||||
this.form.resetFields()
|
||||
this.clearThisTimeAmount()
|
||||
this.dataSource = []
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user