1.1.13 • Published 5 years ago

tripg-invoices v1.1.13

Weekly downloads
84
License
MIT
Repository
-
Last release
5 years ago

tripg-invoices

A Vue.js project

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

发票组件

注: 各个项目引入后 全局css样式表中mint-ui.css中修改mint-toast层级
	.mint-toast{
	  z-index: 99999 !important;
	} 
其他样式冲突==>自行调试 

依赖安装后 在main.js中 添加

import invoices from 'tripg-invoices'
Vue.use(invoices)
import invmask from 'tripg-invoices'
Vue.use(invmask)

####在需要引入发票组件的页面加入

发票内容展示页面
<invoices  
  ref="invoices"
  :invoicesObj.sync = "invoicesObj"
  :checkinvoicesIndex.sync = "checkinvoicesIndex"
  :checkinvoicesflag.sync = 'checkinvoicesflag'
  :ajaxObj = "ajaxObj"
  :travelType='isYg'
  ></invoices>
  

发票弹框展示页面
 <invmask 
  ref="inmask"
  :invoicesObj.sync = "invoicesObj"
  :checkinvoicesIndex.sync = "checkinvoicesIndex"
  :checkinvoicesflag.sync = 'checkinvoicesflag'
  :ajaxObj = "ajaxObj"
  ></invmask>
  
  

data里加入 userInfo:{},//开局发票人员信息(登陆信息) ajaxObj:null, //发票请求ajax参数 invoicesObj:{},//发票信息 checkinvoicesIndex:null,//点击发票内容组件的项 checkinvoicesflag:null, isYg:null, //true or false 因公因私 传Boolean类型

created() {
    this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
    this.ajaxObj = {
      userInfo: this.userInfo,
      product_id: '11' //产品线id 机票11 酒店12 租车13 火车票14 国际机票28 具体与产品线一致
    }
  }


  

###(提交发票。提交发票走原tripg发票的逻辑)

在计算属性 computed中获取

this.$refs.invoice.$data.popVisible;//该值是判断发票开关是否打开(下单时判断)

###下单按钮事件中添加 // 验证发票信息是否完整

if (this.$refs.invoices.checkInvoice() == false) {
  return;
}

###下单成功后添加

this.allinvoiceInfo = []; //所有发票信息
["下单成功后返回的订单号"].forEach(v => {
  //这里是给李发的值,具体添加什么李发提供 businessinfo,
  //下面是机票线的,其它线修改一下。
  v.businessinfo = {
    product_id: v.product_id, //产品线ID
    order_no: v.tradeCode, //订单号
    ...this.paramsObj[0], //其它航班信息等
    money: v.pay_money //价格
  };
  this.allinvoiceInfo.push(v);
});

//下单后记录综合订单号。
this.mainOrderCode = order_info.Result.mainOrderCode;

最后一步提交,添加在订单成功后,跳路由之前。

await this.$refs.invoices.invoiceInfo_post( allinvoiceInfo, mainOrderCode );

1.1.13

5 years ago

1.1.12

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago