main
fanfan 8 months ago
parent e4f1e0126a
commit 50fb92ff7b
  1. 17
      pages/invoice/editset.vue
  2. 2
      pages/invoice/index.vue
  3. 4
      pages/order/detail.vue
  4. 21
      pages/order/index.vue

@ -13,7 +13,7 @@
<view class="l">发票类型</view> <view class="l">发票类型</view>
<view class="r"> <view class="r">
<picker :value="index" :range="array" @change="bindPickerChange"> <picker :value="index" :range="array" @change="bindPickerChange">
<view class="lx" style="color: #888;" v-if="index == null">请选择发票类型</view> <view class="lx" style="color: #888;" v-if="index == -1">请选择发票类型</view>
<view class="lx" v-else>{{ array[index] }}</view> <view class="lx" v-else>{{ array[index] }}</view>
</picker> </picker>
</view> </view>
@ -87,7 +87,7 @@
content: "确认您的发票信息无误后再提交", content: "确认您的发票信息无误后再提交",
show: true, show: true,
toggleIndex: true, toggleIndex: true,
index: null, index: -1,
array: ['普通增值税发票'], array: ['普通增值税发票'],
tabIndex: 1, tabIndex: 1,
sourcePage: 0, sourcePage: 0,
@ -109,7 +109,7 @@
onLoad(op) { onLoad(op) {
if (op.detailObj && op.detailObj != 'null') { if (op.detailObj && op.detailObj != 'null') {
let end = JSON.parse(op.detailObj) let end = JSON.parse(op.detailObj)
this.index = 0 this.index = -1
if (end.source == 1) { if (end.source == 1) {
this.tabIndex = 1 this.tabIndex = 1
} else { } else {
@ -130,7 +130,8 @@
}, },
async addInvoice(canReset = false) { async addInvoice(canReset = false) {
const app = this const app = this
if (app.index == null || !app.obj.source) { console.log(app.index,app.obj.source)
if (app.index == -1) {
uni.showToast({ uni.showToast({
title: '请选择发票类型', title: '请选择发票类型',
icon: 'none', icon: 'none',
@ -164,7 +165,7 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
app.index = null app.index = -1
app.tabIndex = 1 app.tabIndex = 1
app.obj = app.$options.data().obj; app.obj = app.$options.data().obj;
uni.redirectTo({ uni.redirectTo({
@ -174,7 +175,7 @@
}, },
async editeInvoice() { async editeInvoice() {
const app = this const app = this
if (app.index == null || !app.obj.source) { if (app.index == -1) {
uni.showToast({ uni.showToast({
title: '请选择发票类型', title: '请选择发票类型',
icon: 'none', icon: 'none',
@ -192,7 +193,7 @@
} }
if (app.tabIndex == 2 && !app.obj.duty_no) { if (app.tabIndex == 2 && !app.obj.duty_no) {
uni.showToast({ uni.showToast({
title: '请输入抬头', title: '请输入纳税人识别号',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
@ -208,7 +209,7 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
app.index = null app.index = -1
app.tabIndex = 1 app.tabIndex = 1
app.obj = app.$options.data().obj; app.obj = app.$options.data().obj;
uni.redirectTo({ uni.redirectTo({

@ -58,7 +58,7 @@
content: '确认删除了吗?', content: '确认删除了吗?',
success(o) { success(o) {
if (o.confirm) { if (o.confirm) {
InvoiceApi.invoicingDel(Id) InvoiceApi.invoicingDelNew({id:Id})
.then(result => { .then(result => {
// //
app.$success(result.message) app.$success(result.message)

@ -265,7 +265,7 @@
</view> </view>
<view v-if="menushow" class="menuarea"> <view v-if="menushow" class="menuarea">
<view class="menulist"> <view class="menulist">
<view class="" @click="onInvoicing(order.order_id)" <view class="" @click="onInvoicing(order.order_id,order)"
v-if="order.order_status == OrderStatusEnum.COMPLETED.value"> v-if="order.order_status == OrderStatusEnum.COMPLETED.value">
申请开票 申请开票
</view> </view>
@ -581,7 +581,7 @@
}) })
}, },
// //
onInvoicing(orderId) { onInvoicing(orderId,order) {
uni.setStorageSync("orderInfor", order); uni.setStorageSync("orderInfor", order);
uni.navigateTo({ uni.navigateTo({
url: '/pages/invoice/edit?orderId=' + orderId url: '/pages/invoice/edit?orderId=' + orderId

@ -24,7 +24,8 @@
<view class="item" v-for="(item,index) in list" v-if="list.length>0"> <view class="item" v-for="(item,index) in list" v-if="list.length>0">
<view class="hd"> <view class="hd">
<view class="a"> <view class="a">
<image class="icon" v-if="item.storeInfo && item.storeInfo.image_url" :src="item.storeInfo.image_url"></image> <image class="icon" v-if="item.storeInfo && item.storeInfo.image_url"
:src="item.storeInfo.image_url"></image>
{{item.storeInfo.store_name}} {{item.storeInfo.store_name}}
</view> </view>
<view class="b" <view class="b"
@ -73,13 +74,15 @@
v-if="item.order_status == OrderStatusEnum.COMPLETED.value || (item.pay_status == PayStatusEnum.PENDING.value&&item.order_status == OrderStatusEnum.NORMAL.value)"> v-if="item.order_status == OrderStatusEnum.COMPLETED.value || (item.pay_status == PayStatusEnum.PENDING.value&&item.order_status == OrderStatusEnum.NORMAL.value)">
更多</view> 更多</view>
<view class="b"> <view class="b">
<view class="n" v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_type == DeliveryTypeEnum.EXTRACT.value" <view class="n"
v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_type == DeliveryTypeEnum.EXTRACT.value"
@click="onExtractQRCode(item.order_id)">核销码 @click="onExtractQRCode(item.order_id)">核销码
</view> </view>
<view class="n" <view class="n"
v-if="item.pay_status == PayStatusEnum.PENDING.value && item.order_status == OrderStatusEnum.NORMAL.value" v-if="item.pay_status == PayStatusEnum.PENDING.value && item.order_status == OrderStatusEnum.NORMAL.value"
@click="onPay(item.order_id)">立即支付</view> @click="onPay(item.order_id)">立即支付</view>
<view class="n" v-if="item.delivery_type == DeliveryTypeEnum.EXPRESS.value&&item.delivery_status == DeliveryStatusEnum.DELIVERED.value" <view class="n"
v-if="item.delivery_type == DeliveryTypeEnum.EXPRESS.value&&item.delivery_status == DeliveryStatusEnum.DELIVERED.value"
@click="onLogistics(item.order_id)">查看物流 @click="onLogistics(item.order_id)">查看物流
</view> </view>
<view class="n n-1" <view class="n n-1"
@ -266,12 +269,13 @@
app.getOrderList() app.getOrderList()
}, },
changeMenu(index) { changeMenu(index) {
let idList = [] this.list.forEach((item, ind) => {
this.list.forEach(item => { if (ind == index) {
item.menushow = item.menushow == false ? true : false
} else {
item.menushow = false; item.menushow = false;
idList.push(item.response.data.fileInfo.file_id) }
}); });
this.list[index].menushow = !this.list[index].menushow
}, },
toggleImage() { toggleImage() {
this.isToggle = !this.isToggle this.isToggle = !this.isToggle
@ -282,7 +286,6 @@
if (options.dataType) { if (options.dataType) {
const index = app.tabs.findIndex(item => item.value == options.dataType) const index = app.tabs.findIndex(item => item.value == options.dataType)
app.current = index > -1 ? index : 0 app.current = index > -1 ? index : 0
console.log(app.current, 'KKKKKKK')
} }
}, },
@ -498,6 +501,7 @@
white-space: nowrap; white-space: nowrap;
width: 100%; width: 100%;
height: 100rpx; height: 100rpx;
.list { .list {
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -542,6 +546,7 @@
.order-list { .order-list {
margin-top: 20rpx; margin-top: 20rpx;
} }
.receive { .receive {
width: 100%; width: 100%;
background: #F8F8F8; background: #F8F8F8;

Loading…
Cancel
Save