This commit is contained in:
Gdpao
2020-09-04 19:52:43 +08:00
parent c4114bcfc5
commit 0824d97080
4 changed files with 200 additions and 14 deletions

View File

@@ -52,6 +52,13 @@
<view>
<view class="title">派送方式</view>
<view class="value u-line-1">{{ cur == 0 ? "快递" : cur == 1 ? "骑手" : "自提" }}</view>
</view>
<view @click="showInvoice">
<view class="title">开具发票</view>
<view class="invoice">
<text>{{ is_invoice ? "是" : "否" }}</text>
<u-icon name="arrow-right" color="#999" size="20" style="margin-left: 10rpx;"></u-icon>
</view>
</view>
</view>
</view>
@@ -148,6 +155,42 @@
<view class="determine" @click="confirm">确定</view>
</view>
</u-popup>
<u-popup class="invoice-box" v-model="show_invoice" :mask-close-able="false" mode="center" length="540rpx" border-radius="10">
<view class="title">
<text>发票信息</text>
<u-icon class="close" name="close" @click="show_invoice=false"></u-icon>
</view>
<view class="info">
<view>
<text>发票抬头</text>
<text>{{ invoiceList.invoice_title }}</text>
</view>
<view v-if="invoice_type!=2">
<text>税号</text>
<text>{{ invoiceList.invoice_code }}</text>
</view>
<view v-if="invoice_type!=2">
<text>单位地址</text>
<view class="u-line-2">{{ invoiceList.invoice_goto_addr }}</view>
</view>
<view>
<text>电话号码</text>
<text>{{ invoiceList.invoice_reg_mobphone }}</text>
</view>
<view v-if="invoice_type!=2">
<text>开户银行</text>
<text>{{ invoiceList.invoice_reg_bname }}</text>
</view>
<view v-if="invoice_type!=2">
<text>银行账户</text>
<text>{{ invoiceList.invoice_reg_baccount }}</text>
</view>
<view v-if="invoice_type==2">
<text>省份证号</text>
<text>111</text>
</view>
</view>
</u-popup>
<u-toast ref="uToast" />
</view>
</template>
@@ -157,6 +200,7 @@ export default {
return {
status: 1, // 订单状态
cur: null,
show_invoice: false, // 发票
showDelivery: false, // 填写骑手信息
showExpress: false, // 填写快递单号
showRefunds: false, // 平台退货处理
@@ -186,7 +230,10 @@ export default {
companyidA: null, //物流派送公司id
companyidB: null, //骑手派送公司id
value:"",
refundid:null
refundid:null,
is_invoice: 0, // 判断发票
invoice_type: null,
invoiceList: {}, // 发票数据
};
},
onLoad(option) {
@@ -271,6 +318,14 @@ export default {
}
});
},
// 查询物流
getcarinfo() {
this.$u.api.getcarinfo({
order_id: this.orderid
}).then(res => {
console.log(res);
})
},
// 保存订单号
saveDelivery() {
if (!this.pushid) {
@@ -437,6 +492,12 @@ export default {
})
}
},
// 显示发票
showInvoice() {
if (this.is_invoice) {
this.show_invoice = true;
}
},
// 选择骑手
getselect(e) {
this.selctcar = this.list[e[0].value];
@@ -455,6 +516,10 @@ export default {
} else {
this.info = res.data;
this.cur = res.data.is_selfraising;
this.invoiceList = res.data.extend_order_common.invoice_info;
this.is_invoice = this.invoiceList.invoice_id || false;
this.invoice_type = this.invoiceList.invoice_type;
// console.log(this.invoiceList,this.is_invoice,this.invoice_type);
}
});
this.$u.api.takeawayerlist({}).then(res => {
@@ -591,6 +656,11 @@ export default {
font-size: 26rpx;
flex: 1;
}
.invoice {
margin-left: auto;
font-size: 26rpx;
color: #333;
}
image{
width: 40rpx;
height: 40rpx;
@@ -766,5 +836,35 @@ export default {
}
}
}
.invoice-box {
.title {
display: flex;
align-items: center;
justify-content: flex-end;
padding: 20rpx 20rpx 0 20rpx;
text-align: center;
.close {
margin-left: 180rpx;
}
}
.info {
padding: 30rpx;
& > view {
display: flex;
margin: 10rpx 0;
& > text:first-child {
flex-shrink: 0;
width: 140rpx !important;
text-align: right;
}
& > text:last-child {
width: 320rpx !important;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
}
}
</style>

View File

@@ -294,7 +294,7 @@ export default {
getshiftlist() {
let that = this;
this.$u.api.getshiftlist({}).then(res => {
console.log(JSON.stringify(res));
// console.log(JSON.stringify(res));
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,