mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-02-05 00:49:49 +08:00
### 0.3.3 专业版:
【新增】后台新增支付单查询功能,实现支付单微信反馈支付数据,防止出现极端情况下,导致的支付数据回调失败而影响订单业务。#I4ZRMR 【新增】后台新增发票上传功能,前端小程序新增发票下载功能。#I4ZYT3 【新增】商家中心订单查询,增加发票下载查看功能。 【新增】代码生成器Controller模板的导出excel请求增加decimal类型的处理。 【优化】调整前端帮助文档默认传值问题,未指定具体分类情况下,默认取第一个栏目数据。 【修复】修复页面设计上传图片后不进行预览的问题。
This commit is contained in:
@@ -57,10 +57,7 @@
|
||||
onLoad(options) {
|
||||
if (options.cid) {
|
||||
this.cid = Number(options.cid);
|
||||
} else {
|
||||
this.cid = 1;
|
||||
}
|
||||
|
||||
this.articleList();
|
||||
if (options.current) {
|
||||
this.current = options.current;
|
||||
|
||||
@@ -201,7 +201,14 @@
|
||||
<text>{{orderInfo.invoice.taxNumber|| '无'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-text-black title-view" v-if="orderInfo.invoice.fileUrl">
|
||||
<view class="title">下载发票</view>
|
||||
<view class="coreshop-text-right coreshop-flex coreshop-justify-end">
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-tag text="保存到本地" type="success" size="mini" mode="dark" @click="saveInvoice()" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -502,6 +509,64 @@
|
||||
ladingWrite(id) {
|
||||
this.$u.route('/pages/member/merchant/takeDelivery/index?id=' + id);
|
||||
},
|
||||
// 保存发票到本地
|
||||
saveInvoice() {
|
||||
let _this = this;
|
||||
// #ifdef MP || MP-ALIPAY || APP-PLUS || APP-PLUS-NVUE
|
||||
_this.download(_this.orderInfo.invoice.fileUrl)
|
||||
// #endif
|
||||
},
|
||||
download(fileUrl) {
|
||||
let _this = this
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
uni.downloadFile({
|
||||
url: fileUrl,
|
||||
success(res) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success() {
|
||||
_this.$refs.uToast.show({ message: '操作成功', type: 'success' })
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('发票保存失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('下载失败')
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
uni.authorize({
|
||||
scope: 'scope.writePhotosAlbum',
|
||||
success() {
|
||||
// 先下载到本地
|
||||
uni.downloadFile({
|
||||
url: fileUrl,
|
||||
success(res) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success() {
|
||||
_this.$refs.uToast.show({ message: '保存成功', type: 'success' })
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('发票保存失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('下载失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
fail() {
|
||||
//console.log('授权失败')
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -230,7 +230,14 @@
|
||||
<text>{{orderInfo.invoice.taxNumber|| '无'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-text-black title-view">
|
||||
<view class="title">下载发票</view>
|
||||
<view class="coreshop-text-right coreshop-flex coreshop-justify-end">
|
||||
<view class="coreshop-width-fit-content">
|
||||
<u-tag text="保存到本地" type="success" size="mini" mode="dark" @click="saveInvoice()" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -688,6 +695,64 @@
|
||||
url: '/pages/member/invoice/index?id=' + this.orderInfo.invoice.id
|
||||
});
|
||||
}
|
||||
},
|
||||
// 保存发票到本地
|
||||
saveInvoice() {
|
||||
let _this = this;
|
||||
// #ifdef MP || MP-ALIPAY || APP-PLUS || APP-PLUS-NVUE
|
||||
_this.download(_this.orderInfo.invoice.fileUrl)
|
||||
// #endif
|
||||
},
|
||||
download(fileUrl) {
|
||||
let _this = this
|
||||
// #ifdef APP-PLUS || APP-PLUS-NVUE
|
||||
uni.downloadFile({
|
||||
url: fileUrl,
|
||||
success(res) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success() {
|
||||
_this.$refs.uToast.show({ message: '操作成功', type: 'success' })
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('图片保存失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('下载失败')
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef MP
|
||||
uni.authorize({
|
||||
scope: 'scope.writePhotosAlbum',
|
||||
success() {
|
||||
// 先下载到本地
|
||||
uni.downloadFile({
|
||||
url: fileUrl,
|
||||
success(res) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success() {
|
||||
_this.$refs.uToast.show({ message: '保存成功', type: 'success' })
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('图片保存失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
_this.$u.toast('下载失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
fail() {
|
||||
//console.log('授权失败')
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user