发票
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
init(vm){
|
||||
return {
|
||||
return {
|
||||
// 获取首页轮播
|
||||
getIndexSwiper() {
|
||||
return vm.$u.post('adv/indexadv');
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 订单步骤2:发起订单,返回订单信息
|
||||
sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id, is_selfraising }) {
|
||||
sendOrder({ ifcart, cart_id, address_id, buy_city_id, pintuan_id, pintuangroup_id, voucher_id, is_selfraising, invoice_id }) {
|
||||
return vm.$u.post('buy/buy_step2', {
|
||||
ifcart: ifcart,
|
||||
cart_id: cart_id,
|
||||
@@ -149,6 +149,7 @@ export default {
|
||||
pintuangroup_id: pintuangroup_id,
|
||||
voucher_id: voucher_id, // 优惠券信息
|
||||
is_selfraising: is_selfraising, // 是否自提
|
||||
invoice_id: invoice_id,
|
||||
});
|
||||
},
|
||||
// 订单步骤3:发起支付(第三方统一下单)
|
||||
@@ -373,8 +374,11 @@ export default {
|
||||
//内容
|
||||
tipsinfo({document_code}){
|
||||
return vm.$u.post('Shop/tipInfo',{document_code})
|
||||
}
|
||||
}
|
||||
},
|
||||
advClick({ adv_id }) {
|
||||
return vm.$u.post('adv/advClick',{ adv_id })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -479,8 +479,26 @@ export default {
|
||||
return vm.$u.post("Expertapply/expertApply", {
|
||||
name, mobile, address, industry, hobby
|
||||
})
|
||||
}
|
||||
},
|
||||
getInvoiceList() {
|
||||
return vm.$u.post("Invoice/invoiceList")
|
||||
},
|
||||
getInvoiceInfo({ invoice_id }) {
|
||||
return vm.$u.post("Invoice/invoiceInfo", { invoice_id })
|
||||
},
|
||||
invoiceAdd({ invoice_type, invoice_title, invoice_code, invoice_goto_addr, invoice_rec_mobphone, invoice_reg_bname, invoice_reg_baccount }) {
|
||||
return vm.$u.post("Invoice/invoiceAdd", {
|
||||
invoice_type, invoice_title, invoice_code, invoice_goto_addr, invoice_rec_mobphone, invoice_reg_bname, invoice_reg_baccount
|
||||
})
|
||||
},
|
||||
invoiceEdit({ invoice_id, invoice_title, invoice_code, invoice_goto_addr, invoice_rec_mobphone, invoice_reg_bname, invoice_reg_baccount, invoice_type }) {
|
||||
return vm.$u.post("Invoice/invoiceEdit", {
|
||||
invoice_id, invoice_title, invoice_code, invoice_goto_addr, invoice_rec_mobphone, invoice_reg_bname, invoice_reg_baccount, invoice_type
|
||||
})
|
||||
},
|
||||
invoiceDel({ invoice_id }) {
|
||||
return vm.$u.post("Invoice/invoiceDel", { invoice_id })
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,10 @@ const store = new Vuex.Store({
|
||||
showLoginModel: false, // 登录框
|
||||
question: {}, // 帮助与反馈
|
||||
showCoupons: true, // 是否显示新人领取优惠券
|
||||
invoiceInfo: { // 是否选择发票
|
||||
invoice_type: '',
|
||||
invoice_id: 0,
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
getOrderAddress(state) {
|
||||
@@ -31,8 +35,15 @@ const store = new Vuex.Store({
|
||||
},
|
||||
getGoodsInfo(state) {
|
||||
return state.goodsDetails.goods;
|
||||
},
|
||||
hasInvoice(state) {
|
||||
const type = state.invoiceInfo.invoice_type;
|
||||
return type ? type : 0;
|
||||
},
|
||||
getInvoiceId(state) {
|
||||
return state.invoiceInfo.invoice_id || 0;
|
||||
}
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
// 登录
|
||||
loginIn(state, token) {
|
||||
@@ -83,6 +94,9 @@ const store = new Vuex.Store({
|
||||
},
|
||||
updateShowCoupons(state, status) {
|
||||
state.showCoupons = status;
|
||||
},
|
||||
setInvoiceInfo(state, invoice = {}) {
|
||||
state.invoiceInfo = invoice;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user