|
@@ -255,9 +255,11 @@ export default {
|
|
|
if(res.data){
|
|
|
this.infoMap.code = res.data.orderCodes?res.data.orderCodes:''
|
|
|
this.infoMap.price = res.data.money?res.data.money/100:0
|
|
|
+ this.initEnt(res.data.company_name)
|
|
|
if(res.data.invoice){
|
|
|
this.$router.replace({ path:'/invoice/viewInvoice', query:{ onlyIdentifying:this.onlyIdentifying,invoiceMoney:this.invoiceMoney,operator:this.operator}})
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
this.initshowModule()
|
|
|
})
|
|
@@ -510,6 +512,7 @@ export default {
|
|
|
},
|
|
|
ajaxEntList (str) {
|
|
|
if (str.length <= 2) {
|
|
|
+ this.isAssociateShow = false
|
|
|
return
|
|
|
}
|
|
|
ajaxGetCompanyAssociation({
|
|
@@ -527,6 +530,27 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ initEnt(str){
|
|
|
+ if(!str){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.infoMap.company = str
|
|
|
+ ajaxGetCompanyAssociation({
|
|
|
+ name: str,
|
|
|
+ typ: 'ent',
|
|
|
+ num: 10
|
|
|
+ }).then(res => {
|
|
|
+ const { error_code: code, data } = res
|
|
|
+ if (code === 0) {
|
|
|
+ const result = data?.list || []
|
|
|
+ if (Array.isArray(result) && result.length === 1) {
|
|
|
+ if(result[0].name === str){
|
|
|
+ this.infoMap.dutyparagraph = result[0].taxCode
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
initshowModule(){
|
|
|
if(this.infoMap.type === '2' || this.infoMap.type === '4'){
|
|
|
this.infoMap.invoiceHeader = '2'
|