发票细节

main
fanfan 11 months ago
parent 8e095ce99e
commit f974b8c26b
  1. 16
      api/invoice.js
  2. 76
      pages/invoice/edit.vue
  3. 831
      pages/invoice/editset.vue
  4. 26
      pages/invoice/index.vue
  5. 2
      pages/invoice/list.vue
  6. 3009
      pages/order/detail.vue
  7. 4
      pages/order/index.vue

@ -15,17 +15,11 @@ const api = {
export const invoicingDelNew = (data) => { export const invoicingDelNew = (data) => {
return request.get(api.invoicingDelNew,data) return request.get(api.invoicingDelNew,data)
} }
export const invoicingEdit = (orderGoodsId, data) => { export const invoicingEdit = (data) => {
return request.post(api.invoicingEdit, { return request.post(api.invoicingEdit,data)
orderGoodsId, }
form: data export const invoicingAdd = (data) => {
}) return request.post(api.invoicingAdd,data)
}
export const invoicingAdd = (orderGoodsId, data) => {
return request.post(api.invoicingAdd, {
orderGoodsId,
form: data
})
} }
export const addInvoicing = (data) => { export const addInvoicing = (data) => {
return request.post(api.addInvoicing,data) return request.post(api.addInvoicing,data)

@ -1,6 +1,6 @@
<template> <template>
<view class="invoice"> <view class="invoice">
<view class="invoice-goods" v-if="sourcePage==0 && orderDetail"> <view class="invoice-goods" v-if="orderDetail">
<view class="b" v-if="orderDetail"> <view class="b" v-if="orderDetail">
<view class="r">订单编号{{orderDetail.order_no}}<text @click="handleCopy(orderDetail.order_no)">复制</text> <view class="r">订单编号{{orderDetail.order_no}}<text @click="handleCopy(orderDetail.order_no)">复制</text>
</view> </view>
@ -24,7 +24,7 @@
<view class="li" :class="tabIndex == 2?'li-on':''" @click="tabItem(2)">单位</view> <view class="li" :class="tabIndex == 2?'li-on':''" @click="tabItem(2)">单位</view>
</view> </view>
</view> </view>
<view class="item"> <view class="item" v-if="tabIndex == 1">
<view class="l">发票抬头</view> <view class="l">发票抬头</view>
<view class="r"> <view class="r">
<input type="text" v-model="obj.header" placeholder="请输入个人姓名" /> <input type="text" v-model="obj.header" placeholder="请输入个人姓名" />
@ -33,14 +33,14 @@
<view class="item" v-if="tabIndex == 2"> <view class="item" v-if="tabIndex == 2">
<view class="l">发票抬头</view> <view class="l">发票抬头</view>
<view class="r"> <view class="r">
<input type="text" v-model="array1[index1]" placeholder="请输入单位名称" /> <input type="text" disabled v-model="obj.header" placeholder="单位名称" />
<view class="tt" @click="bindPickerChange1" style="color: rgb(58, 134, 255;">选择发票抬头</view> <view class="tt" @click="bindPickerChange1" style="color: rgb(58, 134, 255;">选择发票抬头</view>
</view> </view>
</view> </view>
<view class="item" v-if="tabIndex == 2"> <view class="item" v-if="tabIndex == 2">
<view class="l">单位税号</view> <view class="l">单位税号</view>
<view class="r"> <view class="r">
<input type="text" v-model="obj.duty_no" placeholder="请输入纳税人识别号" /> <input type="text" v-model="obj.duty_no" disabled placeholder="纳税人识别号" />
</view> </view>
</view> </view>
</view> </view>
@ -53,31 +53,31 @@
<view class="item"> <view class="item">
<view class="l">开户银行</view> <view class="l">开户银行</view>
<view class="r"> <view class="r">
<input type="text" v-model="obj.bank_name" placeholder="请输入开户银行名称" /> <input type="text" disabled v-model="obj.bank_name" placeholder="开户银行名称" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="l">银行账号</view> <view class="l">银行账号</view>
<view class="r"> <view class="r">
<input type="number" v-model="obj.bank_no" placeholder="请输入银行账号" /> <input type="number" disabled v-model="obj.bank_no" placeholder="银行账号" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="l">单位地址</view> <view class="l">单位地址</view>
<view class="r"> <view class="r">
<input type="text" v-model="obj.address" placeholder="请输入单位地址" /> <input type="text" disabled v-model="obj.address" placeholder="单位地址" />
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="l">单位电话</view> <view class="l">单位电话</view>
<view class="r"> <view class="r">
<input type="number" v-model="obj.phone" placeholder="请输入单位电话" /> <input type="number" disabled v-model="obj.phone" placeholder="单位电话" />
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="invoice-fd" @click="toDetail()"> <view class="invoice-fd" @click="toDetail()">
{{(sourcePage==0 ||sourcePage==1)?'申请发票':'编辑发票'}} 申请发票
</view> </view>
<u-modal v-model="show" :content="content" :show-cancel-button="true" :show-title="false" <u-modal v-model="show" :content="content" :show-cancel-button="true" :show-title="false"
confirm-color="#F55349"></u-modal> confirm-color="#F55349"></u-modal>
@ -97,9 +97,7 @@
index1: -1, index1: -1,
array1: [], array1: [],
tabIndex: 2, tabIndex: 2,
sourcePage: 0,
orderDetail: '', orderDetail: '',
orderId: '',
obj: { obj: {
header: '', header: '',
gongsi: '', gongsi: '',
@ -111,23 +109,18 @@
type: '', type: '',
source: 2 source: 2
} }
}; };
}, },
onLoad(op) { onLoad(op) {
let app = this; let app = this;
app.orderId = op.orderId this.orderDetail = uni.getStorageSync("orderInfor");
app.sourcePage = op.source == 1 ? op.source : 0 if (op.source == 1) {
if (op.source == 0) {
app.orderDetail = op.order ? JSON.parse(op.order) : '';
}
if (op.source == 2 || op.source == 1) {
let detail = op.detail ? JSON.parse(op.detail) : ''; let detail = op.detail ? JSON.parse(op.detail) : '';
app.index = detail.type == 1 ? 0 : 1; app.index = detail.type == 1 ? 0 : 1;
app.tabIndex = detail.source app.tabIndex = detail.source
app.obj = detail app.obj = detail
} }
console.log(app.obj,this.orderDetail)
}, },
methods: { methods: {
// //
@ -143,43 +136,18 @@
} }
if (!app.obj.header) { if (!app.obj.header) {
uni.showToast({ uni.showToast({
title: '请输入抬头', title: '请选择发票抬头',
icon: 'none',
duration: 2000
})
return
}
if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({
title: '请输入抬头',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
return return
} }
app.isLoading = true; app.isLoading = true;
if (app.tabIndex == 1) { let parames = {
app.obj.gongsi = ''; order_id: app.orderDetail.order_id,
app.obj.duty_no = ''; invoice_id: app.obj.id
app.obj.bank_name = '';
app.obj.bank_no = '';
app.obj.address = '';
app.obj.phone = '';
}
app.obj.type = app.index == 0 ? 1 : 2;
app.obj.source = app.tabIndex;
let url = ''
if (app.sourcePage == 0) { //addInvoicing editInvoicing invoicingAdd
url = InvoiceApi.invoicingAdd(app.orderId, app.obj)
}
if (app.sourcePage == 1) { //使
app.obj.invoice_id = app.obj.id; //
url = InvoiceApi.invoicingAdd(app.orderId, app.obj)
} }
if (app.sourcePage == 2) { // InvoiceApi.invoicingAdd(parames).then(result => {
url = InvoiceApi.invoicingEdit(app.orderId, app.obj)
}
url.then(result => {
if (result.status == 200) { if (result.status == 200) {
uni.showToast({ uni.showToast({
title: result.message, title: result.message,
@ -221,11 +189,6 @@
}) => app.$toast('复制失败 ' + errMsg) }) => app.$toast('复制失败 ' + errMsg)
}) })
}, },
//
handleInvoice() {
const app = this
},
onClose() {},
tabItem(i) { tabItem(i) {
this.tabIndex = i; this.tabIndex = i;
}, },
@ -238,7 +201,7 @@
}, },
bindPickerChange1() { bindPickerChange1() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/index?orderId=" + this.orderId +'&order='+(this.orderDetail?JSON.stringify(this.orderDetail):'') url: "/pages/invoice/index"
}) })
} }
} }
@ -246,9 +209,10 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
page{ page {
margin-bottom: 50rpx; margin-bottom: 50rpx;
} }
.invoice { .invoice {
&-goods { &-goods {
padding: 0 20rpx 0 40rpx; padding: 0 20rpx 0 40rpx;

@ -75,456 +75,433 @@
提交 提交
</view> </view>
</view> </view>
<!-- <u-modal v-model="show" :content="content" :show-cancel-button="true" :show-title="false"
confirm-color="#F55349"></u-modal> -->
</view> </view>
</template> </template>
<script> <script>
import * as InvoiceApi from '@/api/invoice' import * as InvoiceApi from '@/api/invoice'
export default { export default {
data() { data() {
return { return {
id: '', id: '',
content: "确认您的发票信息无误后再提交", content: "确认您的发票信息无误后再提交",
show: true, show: true,
toggleIndex: true, toggleIndex: true,
index: null, index: null,
array: ['普通增值税发票'], array: ['普通增值税发票'],
tabIndex: null, tabIndex: 1,
sourcePage: 0, sourcePage: 0,
orderDetail: '', orderDetail: '',
orderId: '', orderId: '',
obj: { obj: {
header: '', header: '',
duty_no: '', duty_no: '',
bank_name: '', bank_name: '',
bank_no: '', bank_no: '',
address: '', address: '',
phone: '', phone: '',
type: 1, type: 1,
source: '' source: ''
} }
}; };
},
onLoad(op) {
if (op.detailObj && op.detailObj != 'null') {
let end = JSON.parse(op.detailObj)
this.index = 0
if (end.source == 1) {
this.tabIndex = 1
} else {
this.tabIndex = 2
}
this.obj = end
}
// let app = this;
// app.orderId = op.orderId
// app.sourcePage = op.source == 1 ? op.source : 0
// if (op.source == 0) {
// app.orderDetail = op.order ? JSON.parse(op.order) : '';
// }
// if (op.source == 2 || op.source == 1) {
// let detail = op.detail ? JSON.parse(op.detail) : '';
// app.index = detail.type == 1 ? 0 : 1;
// app.tabIndex = detail.source
// app.obj = detail
// }
},
methods: {
//
onSubmit() {
if (this.obj.id) {
this.editeInvoice()
} else {
this.addInvoice()
}
}, },
async addInvoice(canReset = false) { onLoad(op) {
const app = this if (op.detailObj && op.detailObj != 'null') {
if (app.index == null || !app.obj.source) { let end = JSON.parse(op.detailObj)
uni.showToast({ this.index = 0
title: '请选择发票类型', if (end.source == 1) {
icon: 'none', this.tabIndex = 1
duration: 2000 } else {
}) this.tabIndex = 2
return }
} this.obj = end
if (!app.obj.header) {
uni.showToast({
title: '请输入抬头',
icon: 'none',
duration: 2000
})
return
}
if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({
title: '请输入纳税人识别号',
icon: 'none',
duration: 2000
})
return
}
let {
status,
data
} = await InvoiceApi.addInvoicing(app.obj);
if (status == 200) {
uni.showToast({
title: '新增成功!',
icon: 'none',
duration: 2000
})
app.index = null
app.tabIndex =null
app.obj = app.$options.data().obj
} }
}, },
async editeInvoice() { methods: {
const app = this //
if (app.index == null || !app.obj.source) { onSubmit() {
uni.showToast({ if (this.obj.id) {
title: '请选择发票类型', this.editeInvoice()
icon: 'none', } else {
duration: 2000 this.addInvoice()
}) }
return },
} async addInvoice(canReset = false) {
if (!app.obj.header) { const app = this
uni.showToast({ if (app.index == null || !app.obj.source) {
title: '请输入抬头', uni.showToast({
icon: 'none', title: '请选择发票类型',
duration: 2000 icon: 'none',
}) duration: 2000
return })
} return
if (app.tabIndex == 2 && !app.obj.duty_no) { }
uni.showToast({ if (!app.obj.header) {
title: '请输入抬头', uni.showToast({
icon: 'none', title: '请输入抬头',
duration: 2000 icon: 'none',
duration: 2000
})
return
}
if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({
title: '请输入纳税人识别号',
icon: 'none',
duration: 2000
})
return
}
let {
status,
data
} = await InvoiceApi.addInvoicing(app.obj);
if (status == 200) {
uni.showToast({
title: '新增成功!',
icon: 'none',
duration: 2000
})
app.index = null
app.tabIndex = 1
app.obj = app.$options.data().obj;
uni.redirectTo({
url: "/pages/invoice/index"
})
}
},
async editeInvoice() {
const app = this
if (app.index == null || !app.obj.source) {
uni.showToast({
title: '请选择发票类型',
icon: 'none',
duration: 2000
})
return
}
if (!app.obj.header) {
uni.showToast({
title: '请输入抬头',
icon: 'none',
duration: 2000
})
return
}
if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({
title: '请输入抬头',
icon: 'none',
duration: 2000
})
return
}
let {
status,
data
} = await InvoiceApi.editInvoicing(app.obj);
if (status == 200) {
uni.showToast({
title: '编辑成功!',
icon: 'none',
duration: 2000
})
app.index = null
app.tabIndex = 1
app.obj = app.$options.data().obj;
uni.redirectTo({
url: "/pages/invoice/index"
})
}
},
//
handleCopy(value) {
const app = this
uni.setClipboardData({
data: value,
success: () => app.$toast('复制成功'),
fail: ({
errMsg
}) => app.$toast('复制失败 ' + errMsg)
}) })
return },
} //
let { handleInvoice() {
status, const app = this
data },
} = await InvoiceApi.editInvoicing(app.obj); onClose() {},
if (status == 200) { tabItem(i) {
uni.showToast({ this.tabIndex = i;
title: '编辑成功!', this.obj.source = i
icon: 'none', },
duration: 2000 toggleItem(i) {
this.toggleIndex = !this.toggleIndex;
},
bindPickerChange(e) {
this.index = e.detail.value;
},
bindPickerChange1() {
uni.navigateTo({
url: "/pages/invoice/index"
}) })
app.index = null
app.tabIndex =null
app.obj = app.$options.data().obj
} }
},
//
handleCopy(value) {
const app = this
uni.setClipboardData({
data: value,
success: () => app.$toast('复制成功'),
fail: ({
errMsg
}) => app.$toast('复制失败 ' + errMsg)
})
},
//
handleInvoice() {
const app = this
},
onClose() { },
tabItem(i) {
this.tabIndex = i;
this.obj.source = i
},
toggleItem(i) {
this.toggleIndex = !this.toggleIndex;
},
bindPickerChange(e) {
this.index = e.detail.value;
},
bindPickerChange1() {
uni.navigateTo({
url: "/pages/invoice/index?orderId=" + this.orderId + '&order=' + (app.orderDetail ? JSON.stringify(app.orderDetail) : '')
})
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.invoice-btn { .invoice-btn {
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
padding: 30rpx 44rpx; padding: 30rpx 44rpx;
z-index: 8; z-index: 8;
background: #fafafa; background: #fafafa;
} }
.invoice-company {
margin-bottom: 170rpx;
}
.invoice {
padding-bottom: 1rpx;
&-goods {
padding: 0 20rpx 0 40rpx;
overflow: hidden;
background-color: #fff;
padding: 30rpx;
box-sizing: border-box;
display: flex;
align-items: center;
.a {
width: 145rpx;
height: 135rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
border-radius: 10rpx;
}
}
.b { .invoice-company {
flex: 1; margin-bottom: 170rpx;
overflow: hidden; }
.l { .invoice {
white-space: nowrap; padding-bottom: 1rpx;
text-overflow: ellipsis;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #262626;
overflow: hidden;
}
.r { &-goods {
font-size: 30rpx; padding: 0 20rpx 0 40rpx;
font-family: PingFang SC, PingFang SC; overflow: hidden;
font-weight: 400; background-color: #fff;
color: #838383; padding: 30rpx;
display: flex; box-sizing: border-box;
align-items: center; display: flex;
justify-content: space-between; align-items: center;
margin-top: 20rpx;
text { .a {
display: block; width: 145rpx;
width: 104rpx; height: 135rpx;
line-height: 60rpx; margin-right: 20rpx;
background: #FFFFFF;
border-radius: 4rpx; image {
text-align: center; width: 100%;
border: 1px solid #CACACA; height: 100%;
font-size: 28rpx; border-radius: 10rpx;
color: #555;
} }
} }
}
}
&-info { .b {
margin-top: 20rpx; flex: 1;
background-color: #fff; overflow: hidden;
overflow: hidden;
.a { .l {
display: flex; white-space: nowrap;
align-items: center; text-overflow: ellipsis;
justify-content: space-between; font-size: 32rpx;
padding: 20rpx 30rpx 20rpx 60rpx; font-family: PingFang SC, PingFang SC;
box-sizing: border-box; font-weight: 500;
border-bottom: 1px solid #F3F3F3; color: #262626;
font-size: 32rpx; overflow: hidden;
font-weight: 500; }
color: #262626;
.r {
text { font-size: 30rpx;
color: #006AFF; font-family: PingFang SC, PingFang SC;
padding-right: 40rpx; font-weight: 400;
position: relative; color: #838383;
display: flex;
&::after { align-items: center;
content: ""; justify-content: space-between;
width: 16rpx; margin-top: 20rpx;
height: 16rpx;
border-top: 1px solid #006AFF; text {
border-left: 1px solid #006AFF; display: block;
position: absolute; width: 104rpx;
right: 0; line-height: 60rpx;
top: 14rpx; background: #FFFFFF;
z-index: 1; border-radius: 4rpx;
transform: rotate(135deg); text-align: center;
border: 1px solid #CACACA;
font-size: 28rpx;
color: #555;
}
} }
} }
} }
.b { &-info {
padding: 0 30rpx 0 45rpx; margin-top: 20rpx;
box-sizing: border-box; background-color: #fff;
overflow: hidden; overflow: hidden;
.item { .a {
padding: 30rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 20rpx 30rpx 20rpx 60rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #F3F3F3; border-bottom: 1px solid #F3F3F3;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #262626; color: #262626;
overflow: hidden;
&:first-child { text {
border-top-color: #fff; color: #006AFF;
} padding-right: 40rpx;
position: relative;
.l { &::after {
width: 180rpx; content: "";
font-size: 32rpx; width: 16rpx;
font-weight: 400; height: 16rpx;
color: #656565; border-top: 1px solid #006AFF;
border-left: 1px solid #006AFF;
position: absolute;
right: 0;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
} }
}
.r { .b {
flex: 1; padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
overflow: hidden;
.item {
padding: 30rpx 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 500;
color: #262626; color: #262626;
overflow: hidden;
.li { &:first-child {
width: 150rpx; border-top-color: #fff;
height: 78rpx;
background: #F3F3F3;
border-radius: 8rpx;
text-align: center;
line-height: 78rpx;
font-size: 32rpx;
font-weight: 400;
color: #262626;
margin-right: 12rpx;
&-on {
background: #FDF4F4;
background: url(/static/invoice/select-active.png) center top no-repeat;
background-size: contain;
}
} }
input { .l {
flex: 1; width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #656565;
} }
picker { .r {
flex: 1; flex: 1;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #262626;
.tt { .li {
width: 180rpx; width: 150rpx;
position: relative; height: 78rpx;
color: #4894FF; background: #F3F3F3;
text-align: right; border-radius: 8rpx;
text-align: center;
&::after { line-height: 78rpx;
content: ""; font-size: 32rpx;
width: 16rpx; font-weight: 400;
height: 16rpx; color: #262626;
border-top: 1px solid #4894FF; margin-right: 12rpx;
border-left: 1px solid #4894FF;
position: absolute; &-on {
right: -50rpx; background: #FDF4F4;
top: 14rpx; background: url(/static/invoice/select-active.png) center top no-repeat;
z-index: 1; background-size: contain;
transform: rotate(135deg);
} }
} }
.lx { input {
width: 100%; flex: 1;
position: relative; }
&::after { picker {
content: ""; flex: 1;
width: 16rpx;
height: 16rpx; .tt {
border-top: 1px solid #B8B8B8; width: 180rpx;
border-left: 1px solid #B8B8B8; position: relative;
position: absolute; color: #4894FF;
right: 20rpx; text-align: right;
top: 14rpx;
z-index: 1; &::after {
transform: rotate(135deg); content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #4894FF;
border-left: 1px solid #4894FF;
position: absolute;
right: -50rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
}
.lx {
width: 100%;
position: relative;
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #B8B8B8;
border-left: 1px solid #B8B8B8;
position: absolute;
right: 20rpx;
top: 14rpx;
z-index: 1;
transform: rotate(135deg);
}
} }
} }
} }
} }
}
}
} }
}
&-fd { &-fd {
height: 104rpx; height: 104rpx;
background: #F55349; background: #F55349;
border-radius: 8rpx; border-radius: 8rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
&-company {
overflow: hidden;
.a {
padding: 35rpx 50rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 500;
color: #FFFFFF;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: center;
color: #262626; }
text { &-company {
width: 70rpx; overflow: hidden;
color: #888888;
margin-right: 30rpx; .a {
position: relative; padding: 35rpx 50rpx;
font-size: 32rpx;
&::after { font-weight: 400;
content: ""; display: flex;
width: 16rpx; align-items: center;
height: 16rpx; justify-content: space-between;
border-top: 1px solid #888888; color: #262626;
border-left: 1px solid #888888;
position: absolute; text {
right: -30rpx; width: 70rpx;
top: 10rpx; color: #888888;
z-index: 1; margin-right: 30rpx;
transform: rotate(225deg); position: relative;
}
&.on {
&::after { &::after {
content: ""; content: "";
width: 16rpx; width: 16rpx;
@ -533,58 +510,72 @@ export default {
border-left: 1px solid #888888; border-left: 1px solid #888888;
position: absolute; position: absolute;
right: -30rpx; right: -30rpx;
top: 20rpx; top: 10rpx;
z-index: 1; z-index: 1;
transform: rotate(45deg); transform: rotate(225deg);
}
&.on {
&::after {
content: "";
width: 16rpx;
height: 16rpx;
border-top: 1px solid #888888;
border-left: 1px solid #888888;
position: absolute;
right: -30rpx;
top: 20rpx;
z-index: 1;
transform: rotate(45deg);
}
} }
} }
} }
}
.b { .b {
padding: 0 30rpx 0 45rpx; padding: 0 30rpx 0 45rpx;
box-sizing: border-box;
background-color: #fff;
overflow: hidden;
.item {
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #F3F3F3; background-color: #fff;
font-size: 32rpx;
font-weight: 500;
color: #262626;
overflow: hidden; overflow: hidden;
&:first-child { .item {
border-top-color: #fff; padding: 30rpx 0;
}
.l {
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #656565;
}
.r {
flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between;
box-sizing: border-box;
border-top: 1px solid #F3F3F3;
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 500;
color: #262626; color: #262626;
overflow: hidden;
input { &:first-child {
border-top-color: #fff;
}
.l {
width: 180rpx;
font-size: 32rpx;
font-weight: 400;
color: #656565;
}
.r {
flex: 1; flex: 1;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 400;
color: #262626;
input {
flex: 1;
}
} }
} }
}
}
} }
} }
} </style>
</style>

@ -3,9 +3,9 @@
<view class="invoice-bd"> <view class="invoice-bd">
<view class="item" :class="tabIndex == index?'item-on':''" v-for="(item,index) in invoicList" :key="index"> <view class="item" :class="tabIndex == index?'item-on':''" v-for="(item,index) in invoicList" :key="index">
<view class="hd"> <view class="hd">
<view class="l" @click="toDetail(item.id)"> <view class="l" @click="toDetail(item.id,item)">
<view class="a"> <view class="a">
<text>单位</text>{{item.header}} <text>{{item.source==2?'单位':'个人'}}</text>{{item.header}}
</view> </view>
<view class="b"> <view class="b">
<text>税号</text>{{item.duty_no}} <text>税号</text>{{item.duty_no}}
@ -15,12 +15,11 @@
</view> </view>
<view class="bd"> <view class="bd">
<view class="c" @click.stop="selectItem(index,item.id)"> <view class="c" @click.stop="selectItem(index,item.id)">
<image v-if="tabIndex == i" src="/static/invoice/select-on.png"></image> <u-icon :name="tabMo == index?'checkmark-circle-fill':'checkmark-circle'" :color="tabMo == index?'#E02E24':'#999'" customStyle="margin-right:6rpx" size="45"></u-icon>
<image v-else src="/static/invoice/select.png"></image> {{tabMo == index?'已设为默认':'设为默认'}}
{{tabIndex == i?'已设为默认':'设为默认'}}
</view> </view>
<view class="d"> <view class="d">
<text @click.stop="toDetail(item.id)">编辑</text> <text @click.stop="toDetail(item.id,item)">编辑</text>
<text @click.stop="onDel(item.id)">删除</text> <text @click.stop="onDel(item.id)">删除</text>
</view> </view>
</view> </view>
@ -43,11 +42,10 @@
isShow: true, isShow: true,
invoicList: [], invoicList: [],
orderId: '', orderId: '',
order: '' tabMo:0
}; };
}, },
onLoad(op) { onLoad(op) {
this.order = op.order ? JSON.parse(op.order) : '';
this.orderId = op.orderId this.orderId = op.orderId
this.getMyInvoicing() this.getMyInvoicing()
}, },
@ -80,18 +78,16 @@
}) })
}, },
selectItem(i, Id) { selectItem(i, Id) {
this.tabIndex = i this.tabMo = i
}, },
onUse(item) { onUse(item) {
uni.navigateTo({ uni.redirectTo({
url: "/pages/invoice/edit?detail=" + JSON.stringify(item) + '&source=' + 1 + '&orderId=' + this url: "/pages/invoice/edit?detail=" + JSON.stringify(item) + '&source=' + 1 + '&orderId=' + this.orderId
.orderId + '&order=' + (this.order ? JSON.stringify(this.order) : '')
.orderId
}) })
}, },
toDetail(id) { toDetail(id,item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/editset?id=" + id url: "/pages/invoice/editset?id=" + id+'&detailObj='+JSON.stringify(item)
}) })
}, },
onAddInvoice() { onAddInvoice() {

@ -74,7 +74,7 @@
methods: { methods: {
toEdit(item) { toEdit(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/edit?detail=" + JSON.stringify(item) + '&source=' + 2 url: "/pages/invoice/editset?id=" + item.id
}) })
}, },
onTab(e) { onTab(e) {

File diff suppressed because it is too large Load Diff

@ -416,9 +416,9 @@
}, },
// //
onInvoicing(orderId, order) { onInvoicing(orderId, order) {
uni.setStorageSync("orderInfor", order);
uni.navigateTo({ uni.navigateTo({
url: '/pages/invoice/edit?orderId=' + orderId + '&source=' + 0 + "&order=" + JSON.stringify( url: '/pages/invoice/edit?orderId=' + orderId
order)
}) })
}, },
// 退 // 退

Loading…
Cancel
Save