vue如何通過(guò)某個(gè)字段獲取詳細(xì)信息
通過(guò)某個(gè)字段獲取詳細(xì)信息
新增列表后通過(guò)name獲取用戶(hù)輸入的詳細(xì)信息
用戶(hù)輸入買(mǎi)方信息后彈出聯(lián)系信息輸入,確定后列表只顯示買(mǎi)方信息,并可添加多條,要求通過(guò)點(diǎn)擊name時(shí)能顯示具體的聯(lián)系信息
//輸入信息后點(diǎn)擊下一步彈出聯(lián)系人信息模板
nextStep(){
? ? ? ? ? ? ? this.businessBuyer.company=this.receivableAccountsDetailDtos.businessBuyerName
? ? ? ? ? ? ? this.modal1=true
? ? ? },
//輸入聯(lián)系信息后點(diǎn)擊確定,將最開(kāi)始輸入的信息和模板信息分別保存在一個(gè)新數(shù)組里,保存成功后清空之前填入的信息
? ? ? confirmAdd(name){
? ? ? ? this.$refs[name].validate((valid) => {
? ? ? ? ? if (valid) {
? ? ? ? ? ?var money = Number(this.receivableAccountsDetailDtos.receivableAmount)
? ? ? ? ? ? this.financingMoney +=money
? ? ? ? ? ? seqNumlength +=1
? ? ? ? ? ? this.receivableAccountsDetailDtos.seqNum=seqNumlength
? ? ? ? ? ? this.ReceivableAccountsDetailDtos.push(this.receivableAccountsDetailDtos)
? ? ? ? ? ? this.BusinessBuyer.push(this.businessBuyer)
? ? ? ? ? ? this.modal1=false
? ? ? ? ? ? this.receivableAccountsDetailDtos={
? ? ? ? ? ? ? businessBuyerName:'',
? ? ? ? ? ? ? contractNo: '',
? ? ? ? ? ? ? invoiceAmount: null,
? ? ? ? ? ? ? invoiceAt: '',
? ? ? ? ? ? ? invoiceNumber: '',
? ? ? ? ? ? ? limitedAt: '',
? ? ? ? ? ? ? receivableAmount: null,
? ? ? ? ? ? ? seqNum: null,
? ? ? ? ? ? ? type: ''
? ? ? ? ? ? }
? ? ? ? ? ? this.businessBuyer={
? ? ? ? ? ? ? address: '',
? ? ? ? ? ? ? company: '',
? ? ? ? ? ? ? creditCode: '',
? ? ? ? ? ? ? financeManMobileNum: '',
? ? ? ? ? ? ? financeManName: '',
? ? ? ? ? ? ? financeManTelephoneNum: '',
? ? ? ? ? ? ? legalPersonName: '',
? ? ? ? ? ? ? linkManName:'',
? ? ? ? ? ? ? linkManPhone: '',
? ? ? ? ? ? ? realInstitute: '',
? ? ? ? ? ? ? regCapitalCurrency: ''
? ? ? ? ? ? }
? ? ? ? ? ? this.showButton=false
? ? ? ? ? ? this.showReceivable=false
? ? ? ? ? ? this.showButton1=false
? ? ? ? ? ? this.BuyerShow=true
? ? ? ? ? }else{
? ? ? ? ? ? this.$Message.error('請(qǐng)完善信息');
? ? ? ? ? }
? ? ? ? })
? ? ? }最后在table里設(shè)置點(diǎn)擊事件
<Table border :data="ReceivableAccountsDetailDtos" :columns="columns" v-if="ReceivableAccountsDetailDtos.length!==0"></Table>
columns:[
{
align: 'center',
title: '發(fā)運(yùn)方',
key: 'businessBuyerName',
render: (h, params) => {return h('div', {
style: {
color: '#4169E1'
},
on: {
click: () => {
this.dialogVisible=true
//在聯(lián)系信息數(shù)組里通過(guò)尋找相同name 來(lái)查詢(xún)到值
this.result=this.BusinessBuyer.find(function (obj) {
return obj.company === params.row.businessBuyerName
})
}
}
},params.row.businessBuyerName)
}
},
{
align: 'center',
title: '基礎(chǔ)交易合同及編號(hào)',
key: 'contractNo',
},
{
align: 'center',
title: '發(fā)票金額',
key:'invoiceAmount',
render: (h, params) => {
return h('div', {
style: {
color: 'red'
}
}, params.row.invoiceAmount)
}
},
{
align: 'center',
title: '發(fā)票開(kāi)具日',
key: 'invoiceAt',
render: (h, params) => {
return h('div', [
h('span', this.$moment(params.row.invoiceAt).format('YYYY-MM-DD'))
]);
}
},
{
align: 'center',
title: '發(fā)票號(hào)',
key:'invoiceNumber',
},
{
align: 'center',
title: '應(yīng)收賬款到期日',
key: 'limitedAt',
render: (h, params) => {
return h('div', [
h('span', this.$moment(params.row.limitedAt).format('YYYY-MM-DD'))
]);
}
},
{
align: 'center',
title: '應(yīng)收賬款金額',
key:'receivableAmount',
render: (h, params) => {
return h('div', {
style: {
color: 'red'
}
},params.row.receivableAmount)
}
},
{
align: 'center',
title: '應(yīng)收賬款種類(lèi)',
key:'type',
},
{
align: 'center',
title: '操作',
key:'',
render: (h, params) => {
return h('div', [
h('Button', {
props: {
type: 'error',
size: 'small'
},
style: {
marginRight: '5px'
},
on: {
click: () => {
for (var i = 0; i < this.ReceivableAccountsDetailDtos.length; i++) {
if (this.ReceivableAccountsDetailDtos[i].businessBuyerName == params.row.businessBuyerName) {
this.ReceivableAccountsDetailDtos.splice(i, 1)
}
}
if(this.ReceivableAccountsDetailDtos.length==0){
this.showReceivable =true
this.showButton =true
}
}
}
},'刪除')
]);
}
},
]vue一個(gè)字段的值按另一個(gè)字段的值 賦值

filters: {
formatTypeName(value) {
if (_this.form.applyType == '1'){
return '實(shí)體印章刻制';
}else if (_this.form.applyType == '2'){
return '電子印章刻制';
}else if (_this.form.applyType == '3'){
return '印章作廢';
}
}
}以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
相關(guān)文章
vant中l(wèi)ist的使用以及首次加載觸發(fā)兩次解決問(wèn)題
這篇文章主要介紹了vant中l(wèi)ist的使用以及首次加載觸發(fā)兩次解決問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-10-10
解決vue2+vue-router動(dòng)態(tài)路由添加及路由刷新后消失問(wèn)題
這篇文章主要介紹了解決vue2+vue-router動(dòng)態(tài)路由添加及路由刷新后消失問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2024-08-08
vue實(shí)現(xiàn)移動(dòng)端拖拽懸浮按鈕
這篇文章主要為大家詳細(xì)介紹了vue實(shí)現(xiàn)移動(dòng)端拖拽懸浮按鈕,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-07-07
vue使用自定義指令來(lái)控制頁(yè)面按鈕組的權(quán)限思想
這篇文章主要介紹了vue使用自定義指令來(lái)控制頁(yè)面按鈕組的權(quán)限思想,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-08-08

