mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:33:27 +08:00
### 0.3.3 专业版:
【新增】后台新增支付单查询功能,实现支付单微信反馈支付数据,防止出现极端情况下,导致的支付数据回调失败而影响订单业务。#I4ZRMR 【新增】后台新增发票上传功能,前端小程序新增发票下载功能。#I4ZYT3 【新增】商家中心订单查询,增加发票下载查看功能。 【新增】代码生成器Controller模板的导出excel请求增加decimal类型的处理。 【优化】调整前端帮助文档默认传值问题,未指定具体分类情况下,默认取第一个栏目数据。 【修复】修复页面设计上传图片后不进行预览的问题。
This commit is contained in:
@@ -398,6 +398,12 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
//{{field.ColumnDescription}} {{field.DataType}}
|
//{{field.ColumnDescription}} {{field.DataType}}
|
||||||
var {{field.DbColumnName}} = Request.Form["{{field.DbColumnName}}"].FirstOrDefault().ObjectToInt(0);
|
var {{field.DbColumnName}} = Request.Form["{{field.DbColumnName}}"].FirstOrDefault().ObjectToInt(0);
|
||||||
if ({{field.DbColumnName}} > 0)
|
if ({{field.DbColumnName}} > 0)
|
||||||
|
{
|
||||||
|
where = where.And(p => p.{{field.DbColumnName}} == {{field.DbColumnName}});
|
||||||
|
}{% elsif field.DataType == 'decimal' %}
|
||||||
|
//{{field.ColumnDescription}} {{field.DataType}}
|
||||||
|
var {{field.DbColumnName}} = Request.Form["{{field.DbColumnName}}"].FirstOrDefault().ObjectToDecimal(0);
|
||||||
|
if ({{field.DbColumnName}} > 0)
|
||||||
{
|
{
|
||||||
where = where.And(p => p.{{field.DbColumnName}} == {{field.DbColumnName}});
|
where = where.And(p => p.{{field.DbColumnName}} == {{field.DbColumnName}});
|
||||||
}{% elsif field.DataType == 'datetime' %}
|
}{% elsif field.DataType == 'datetime' %}
|
||||||
|
|||||||
@@ -3,11 +3,13 @@
|
|||||||
* ProjectName: 核心内容管理系统
|
* ProjectName: 核心内容管理系统
|
||||||
* Web: https://www.corecms.net
|
* Web: https://www.corecms.net
|
||||||
* Author: 大灰灰
|
* Author: 大灰灰
|
||||||
* Email: jianweie@163.com
|
* Email: jianweie@163.com
|
||||||
* CreateTime: 2021-06-08 22:14:58
|
* CreateTime: 2022/3/29 13:39:43
|
||||||
* Description: 暂无
|
* Description: 暂无
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace CoreCms.Net.Model.Entities
|
namespace CoreCms.Net.Model.Entities
|
||||||
@@ -15,100 +17,172 @@ namespace CoreCms.Net.Model.Entities
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发票表
|
/// 发票表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarTable("CoreCmsInvoice",TableDescription = "发票表")]
|
|
||||||
public partial class CoreCmsInvoice
|
public partial class CoreCmsInvoice
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发票表
|
/// 构造函数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public CoreCmsInvoice()
|
public CoreCmsInvoice()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 序列
|
/// 序列
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "序列")]
|
[Display(Name = "序列")]
|
||||||
[SugarColumn(ColumnDescription = "序列", IsPrimaryKey = true, IsIdentity = true)]
|
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public System.Int32 id { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.Int32 id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开票类型
|
/// 开票类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "开票类型")]
|
[Display(Name = "开票类型")]
|
||||||
[SugarColumn(ColumnDescription = "开票类型")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public System.Int32 category { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.Int32 category { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 资源ID
|
/// 资源ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "资源ID")]
|
[Display(Name = "资源ID")]
|
||||||
[SugarColumn(ColumnDescription = "资源ID", IsNullable = true)]
|
|
||||||
[StringLength(32, ErrorMessage = "【{0}】不能超过{1}字符长度")]
|
|
||||||
public System.String sourceId { get; set; }
|
[StringLength(maximumLength:32,ErrorMessage = "{0}不能超过{1}字")]
|
||||||
|
|
||||||
|
|
||||||
|
public System.String sourceId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 所属用户ID
|
/// 所属用户ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "所属用户ID")]
|
[Display(Name = "所属用户ID")]
|
||||||
[SugarColumn(ColumnDescription = "所属用户ID")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public System.Int32 userId { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.Int32 userId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发票类型
|
/// 发票类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "发票类型")]
|
[Display(Name = "发票类型")]
|
||||||
[SugarColumn(ColumnDescription = "发票类型")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public System.Int32 type { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.Int32 type { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发票抬头
|
/// 发票抬头
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "发票抬头")]
|
[Display(Name = "发票抬头")]
|
||||||
[SugarColumn(ColumnDescription = "发票抬头")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
[StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
|
[StringLength(maximumLength:255,ErrorMessage = "{0}不能超过{1}字")]
|
||||||
public System.String title { get; set; }
|
|
||||||
|
|
||||||
|
public System.String title { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发票税号
|
/// 发票税号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "发票税号")]
|
[Display(Name = "发票税号")]
|
||||||
[SugarColumn(ColumnDescription = "发票税号")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
[StringLength(32, ErrorMessage = "【{0}】不能超过{1}字符长度")]
|
[StringLength(maximumLength:32,ErrorMessage = "{0}不能超过{1}字")]
|
||||||
public System.String taxNumber { get; set; }
|
|
||||||
|
|
||||||
|
public System.String taxNumber { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发票金额
|
/// 发票金额
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "发票金额")]
|
[Display(Name = "发票金额")]
|
||||||
[SugarColumn(ColumnDescription = "发票金额")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public System.Decimal amount { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.Decimal amount { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开票状态
|
/// 开票状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "开票状态")]
|
[Display(Name = "开票状态")]
|
||||||
[SugarColumn(ColumnDescription = "开票状态")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public System.Int32 status { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.Int32 status { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开票备注
|
/// 开票备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "开票备注")]
|
[Display(Name = "开票备注")]
|
||||||
[SugarColumn(ColumnDescription = "开票备注", IsNullable = true)]
|
|
||||||
[StringLength(2000, ErrorMessage = "【{0}】不能超过{1}字符长度")]
|
|
||||||
public System.String remarks { get; set; }
|
[StringLength(maximumLength:2000,ErrorMessage = "{0}不能超过{1}字")]
|
||||||
|
|
||||||
|
|
||||||
|
public System.String remarks { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "创建时间")]
|
[Display(Name = "创建时间")]
|
||||||
[SugarColumn(ColumnDescription = "创建时间")]
|
|
||||||
[Required(ErrorMessage = "请输入{0}")]
|
[Required(ErrorMessage = "请输入{0}")]
|
||||||
public System.DateTime createTime { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.DateTime createTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新时间
|
/// 更新时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Display(Name = "更新时间")]
|
[Display(Name = "更新时间")]
|
||||||
[SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
|
|
||||||
public System.DateTime? updateTime { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public System.DateTime? updateTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发票下载地址
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "发票下载地址")]
|
||||||
|
|
||||||
|
|
||||||
|
[StringLength(maximumLength:500,ErrorMessage = "{0}不能超过{1}字")]
|
||||||
|
|
||||||
|
|
||||||
|
public System.String fileUrl { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ namespace CoreCms.Net.Repository
|
|||||||
remarks = p.remarks,
|
remarks = p.remarks,
|
||||||
createTime = p.createTime,
|
createTime = p.createTime,
|
||||||
updateTime = p.updateTime,
|
updateTime = p.updateTime,
|
||||||
|
fileUrl = p.fileUrl,
|
||||||
userNickName = sc.nickName
|
userNickName = sc.nickName
|
||||||
})
|
})
|
||||||
.MergeTable()
|
.MergeTable()
|
||||||
@@ -88,6 +89,7 @@ namespace CoreCms.Net.Repository
|
|||||||
remarks = p.remarks,
|
remarks = p.remarks,
|
||||||
createTime = p.createTime,
|
createTime = p.createTime,
|
||||||
updateTime = p.updateTime,
|
updateTime = p.updateTime,
|
||||||
|
fileUrl = p.fileUrl,
|
||||||
userNickName = sc.nickName
|
userNickName = sc.nickName
|
||||||
})
|
})
|
||||||
.MergeTable()
|
.MergeTable()
|
||||||
|
|||||||
@@ -57,10 +57,7 @@
|
|||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if (options.cid) {
|
if (options.cid) {
|
||||||
this.cid = Number(options.cid);
|
this.cid = Number(options.cid);
|
||||||
} else {
|
|
||||||
this.cid = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.articleList();
|
this.articleList();
|
||||||
if (options.current) {
|
if (options.current) {
|
||||||
this.current = options.current;
|
this.current = options.current;
|
||||||
|
|||||||
@@ -201,7 +201,14 @@
|
|||||||
<text>{{orderInfo.invoice.taxNumber|| '无'}}</text>
|
<text>{{orderInfo.invoice.taxNumber|| '无'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -502,6 +509,64 @@
|
|||||||
ladingWrite(id) {
|
ladingWrite(id) {
|
||||||
this.$u.route('/pages/member/merchant/takeDelivery/index?id=' + 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>
|
</script>
|
||||||
|
|||||||
@@ -230,7 +230,14 @@
|
|||||||
<text>{{orderInfo.invoice.taxNumber|| '无'}}</text>
|
<text>{{orderInfo.invoice.taxNumber|| '无'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -688,6 +695,64 @@
|
|||||||
url: '/pages/member/invoice/index?id=' + this.orderInfo.invoice.id
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,13 @@ using CoreCms.Net.Model.FromBody;
|
|||||||
using CoreCms.Net.Model.ViewModels.UI;
|
using CoreCms.Net.Model.ViewModels.UI;
|
||||||
using CoreCms.Net.Utility.Extensions;
|
using CoreCms.Net.Utility.Extensions;
|
||||||
using CoreCms.Net.Utility.Helper;
|
using CoreCms.Net.Utility.Helper;
|
||||||
|
using Essensoft.Paylink.WeChatPay;
|
||||||
|
using Essensoft.Paylink.WeChatPay.V2;
|
||||||
|
using Essensoft.Paylink.WeChatPay.V2.Request;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
using NPOI.HSSF.UserModel;
|
using NPOI.HSSF.UserModel;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
@@ -44,17 +48,24 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
{
|
{
|
||||||
private readonly ICoreCmsBillPaymentsServices _coreCmsBillPaymentsServices;
|
private readonly ICoreCmsBillPaymentsServices _coreCmsBillPaymentsServices;
|
||||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||||
|
private readonly IWeChatPayClient _client;
|
||||||
|
private readonly IOptions<WeChatPayOptions> _optionsAccessor;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 构造函数
|
/// 构造函数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="webHostEnvironment"></param>
|
/// <param name="webHostEnvironment"></param>
|
||||||
/// <param name="coreCmsBillPaymentsServices"></param>
|
/// <param name="coreCmsBillPaymentsServices"></param>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="optionsAccessor"></param>
|
||||||
public CoreCmsBillPaymentsController(IWebHostEnvironment webHostEnvironment
|
public CoreCmsBillPaymentsController(IWebHostEnvironment webHostEnvironment
|
||||||
, ICoreCmsBillPaymentsServices coreCmsBillPaymentsServices)
|
, ICoreCmsBillPaymentsServices coreCmsBillPaymentsServices, IWeChatPayClient client, IOptions<WeChatPayOptions> optionsAccessor)
|
||||||
{
|
{
|
||||||
_webHostEnvironment = webHostEnvironment;
|
_webHostEnvironment = webHostEnvironment;
|
||||||
_coreCmsBillPaymentsServices = coreCmsBillPaymentsServices;
|
_coreCmsBillPaymentsServices = coreCmsBillPaymentsServices;
|
||||||
|
_client = client;
|
||||||
|
_optionsAccessor = optionsAccessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 获取列表============================================================
|
#region 获取列表============================================================
|
||||||
@@ -475,5 +486,71 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 更新微信支付数据
|
||||||
|
|
||||||
|
// POST: Api/CoreCmsBillPayments/DoRefresh/10
|
||||||
|
/// <summary>
|
||||||
|
/// 更新微信支付数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entity"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Description("更新微信支付数据")]
|
||||||
|
public async Task<AdminUiCallBack> DoRefresh([FromBody] FMStringId entity)
|
||||||
|
{
|
||||||
|
var jm = new AdminUiCallBack();
|
||||||
|
|
||||||
|
var model = await _coreCmsBillPaymentsServices.QueryByClauseAsync(p => p.paymentId == entity.id);
|
||||||
|
if (model == null)
|
||||||
|
{
|
||||||
|
jm.msg = "不存在此信息";
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
if (model.paymentCode != GlobalEnumVars.PaymentsTypes.wechatpay.ToString())
|
||||||
|
{
|
||||||
|
jm.msg = "此更新暂时仅支持微信支付查询";
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.status == (int)GlobalEnumVars.BillPaymentsStatus.Payed)
|
||||||
|
{
|
||||||
|
jm.msg = "订单已经支付成功,无需更新";
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var request = new WeChatPayOrderQueryRequest
|
||||||
|
{
|
||||||
|
//微信订单号
|
||||||
|
//TransactionId = model.TransactionId,
|
||||||
|
//商户订单号
|
||||||
|
OutTradeNo = model.paymentId
|
||||||
|
};
|
||||||
|
var response = await _client.ExecuteAsync(request, _optionsAccessor.Value);
|
||||||
|
|
||||||
|
if (response is { ReturnCode: WeChatPayCode.Success, ResultCode: WeChatPayCode.Success, TradeState: WeChatPayCode.Success })
|
||||||
|
{
|
||||||
|
var money = Math.Round((decimal)response.TotalFee / 100, 2);
|
||||||
|
await _coreCmsBillPaymentsServices.ToUpdate(response.OutTradeNo,
|
||||||
|
(int)GlobalEnumVars.BillPaymentsStatus.Payed,
|
||||||
|
GlobalEnumVars.PaymentsTypes.wechatpay.ToString(), money, response.ResultCode,
|
||||||
|
response.TransactionId);
|
||||||
|
|
||||||
|
jm.code = 0;
|
||||||
|
jm.msg = "刷新成功";
|
||||||
|
jm.data = response;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jm.code = 1;
|
||||||
|
jm.msg = response.TradeStateDesc;
|
||||||
|
}
|
||||||
|
return jm;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,49 +75,22 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
var where = PredicateBuilder.True<CoreCmsInvoice>();
|
var where = PredicateBuilder.True<CoreCmsInvoice>();
|
||||||
//获取排序字段
|
//获取排序字段
|
||||||
var orderField = Request.Form["orderField"].FirstOrDefault();
|
var orderField = Request.Form["orderField"].FirstOrDefault();
|
||||||
Expression<Func<CoreCmsInvoice, object>> orderEx;
|
Expression<Func<CoreCmsInvoice, object>> orderEx = orderField switch
|
||||||
switch (orderField)
|
|
||||||
{
|
{
|
||||||
case "id":
|
"id" => p => p.id,
|
||||||
orderEx = p => p.id;
|
"category" => p => p.category,
|
||||||
break;
|
"sourceId" => p => p.sourceId,
|
||||||
case "category":
|
"userId" => p => p.userId,
|
||||||
orderEx = p => p.category;
|
"type" => p => p.type,
|
||||||
break;
|
"title" => p => p.title,
|
||||||
case "sourceId":
|
"taxNumber" => p => p.taxNumber,
|
||||||
orderEx = p => p.sourceId;
|
"amount" => p => p.amount,
|
||||||
break;
|
"status" => p => p.status,
|
||||||
case "userId":
|
"remarks" => p => p.remarks,
|
||||||
orderEx = p => p.userId;
|
"createTime" => p => p.createTime,
|
||||||
break;
|
"updateTime" => p => p.updateTime,
|
||||||
case "type":
|
_ => p => p.id
|
||||||
orderEx = p => p.type;
|
};
|
||||||
break;
|
|
||||||
case "title":
|
|
||||||
orderEx = p => p.title;
|
|
||||||
break;
|
|
||||||
case "taxNumber":
|
|
||||||
orderEx = p => p.taxNumber;
|
|
||||||
break;
|
|
||||||
case "amount":
|
|
||||||
orderEx = p => p.amount;
|
|
||||||
break;
|
|
||||||
case "status":
|
|
||||||
orderEx = p => p.status;
|
|
||||||
break;
|
|
||||||
case "remarks":
|
|
||||||
orderEx = p => p.remarks;
|
|
||||||
break;
|
|
||||||
case "createTime":
|
|
||||||
orderEx = p => p.createTime;
|
|
||||||
break;
|
|
||||||
case "updateTime":
|
|
||||||
orderEx = p => p.updateTime;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
orderEx = p => p.id;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
//设置排序方式
|
//设置排序方式
|
||||||
var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
|
var orderDirection = Request.Form["orderDirection"].FirstOrDefault();
|
||||||
@@ -144,6 +117,9 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
//发票类型 int
|
//发票类型 int
|
||||||
var type = Request.Form["type"].FirstOrDefault().ObjectToInt(0);
|
var type = Request.Form["type"].FirstOrDefault().ObjectToInt(0);
|
||||||
if (type > 0) where = where.And(p => p.type == type);
|
if (type > 0) where = where.And(p => p.type == type);
|
||||||
|
//开票状态 int
|
||||||
|
var status = Request.Form["status"].FirstOrDefault().ObjectToInt(0);
|
||||||
|
if (status > 0) where = where.And(p => p.status == status);
|
||||||
//发票抬头 nvarchar
|
//发票抬头 nvarchar
|
||||||
var title = Request.Form["title"].FirstOrDefault();
|
var title = Request.Form["title"].FirstOrDefault();
|
||||||
if (!string.IsNullOrEmpty(title)) where = where.And(p => p.title.Contains(title));
|
if (!string.IsNullOrEmpty(title)) where = where.And(p => p.title.Contains(title));
|
||||||
@@ -299,6 +275,7 @@ namespace CoreCms.Net.Web.Admin.Controllers
|
|||||||
oldModel.status = entity.status;
|
oldModel.status = entity.status;
|
||||||
oldModel.remarks = entity.remarks;
|
oldModel.remarks = entity.remarks;
|
||||||
oldModel.updateTime = DateTime.Now;
|
oldModel.updateTime = DateTime.Now;
|
||||||
|
oldModel.fileUrl = entity.fileUrl;
|
||||||
|
|
||||||
//事物处理过程结束
|
//事物处理过程结束
|
||||||
var bl = await _coreCmsInvoiceServices.UpdateAsync(oldModel);
|
var bl = await _coreCmsInvoiceServices.UpdateAsync(oldModel);
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ var allWidget = {
|
|||||||
"icon": "icon-shangpin",
|
"icon": "icon-shangpin",
|
||||||
"value": {
|
"value": {
|
||||||
"title": '商品组名称',
|
"title": '商品组名称',
|
||||||
|
"lookTitle": "true",
|
||||||
"lookMore": "true",
|
"lookMore": "true",
|
||||||
"type": "auto", //auto自动获取 choose 手动选择
|
"type": "auto", //auto自动获取 choose 手动选择
|
||||||
"classifyId": '', //所选分类id
|
"classifyId": '', //所选分类id
|
||||||
@@ -542,6 +543,18 @@ Vue.component('upload-img', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Vue.component('upload-video', {
|
||||||
|
template: "#upload-video",
|
||||||
|
data: function () {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
props: ['index', "item"],
|
||||||
|
methods: {
|
||||||
|
upload: function () {
|
||||||
|
this.$emit('upload-video');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
Vue.component('upload-topslide-bg-img', {
|
Vue.component('upload-topslide-bg-img', {
|
||||||
template: "#upload-topslide-bg-img",
|
template: "#upload-topslide-bg-img",
|
||||||
data: function () {
|
data: function () {
|
||||||
@@ -1054,6 +1067,30 @@ Vue.component('layout-config', {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
upVideo: function (index, item) {
|
||||||
|
var _that = this;
|
||||||
|
layui.use(['form', 'table'], function () {
|
||||||
|
layui.admin.popup({
|
||||||
|
title: '上传视频',
|
||||||
|
area: ['800px', '300px'],
|
||||||
|
id: 'LAY-app-CoreCmsCommon-GetNoticeIds',
|
||||||
|
success: function (layero, indexChild) {
|
||||||
|
layui.view(this.id).render('common/getUpLoadVideo', null).done(function () {
|
||||||
|
layui.form.on('submit(LAY-app-getUpLoad-submit)',
|
||||||
|
function (data) {
|
||||||
|
console.log(data);
|
||||||
|
_that.$set(_that.selectWg.value.list[index], 'url', data.field.url)
|
||||||
|
layer.close(indexChild);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
, btn: ['确定', '取消']
|
||||||
|
, yes: function (index, layero) {
|
||||||
|
layero.contents().find("#LAY-app-getUpLoad-submit").click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
upTopSlideBgImage: function (index, item) {
|
upTopSlideBgImage: function (index, item) {
|
||||||
var _that = this;
|
var _that = this;
|
||||||
layui.use(['admin', 'coreHelper', 'cropperImg'],
|
layui.use(['admin', 'coreHelper', 'cropperImg'],
|
||||||
|
|||||||
@@ -51,11 +51,11 @@
|
|||||||
, url: layui.setter.apiUrl + 'Api/Tools/UploadFiles'
|
, url: layui.setter.apiUrl + 'Api/Tools/UploadFiles'
|
||||||
, before: function (obj) {
|
, before: function (obj) {
|
||||||
obj.preview(function (index, file, result) {
|
obj.preview(function (index, file, result) {
|
||||||
$('#viewImgBox').attr('src', result);
|
$('#viewImgBoximageUrl').attr('src', result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
, done: function (res) {
|
, done: function (res) {
|
||||||
if (res.code > 0) { return layer.msg('上传失败'); }
|
if (res.code > 0) { return layer.msg(res.msg); }
|
||||||
layer.msg('上传成功');
|
layer.msg('上传成功');
|
||||||
$("#imagesUrl").val(res.data.fileUrl);
|
$("#imagesUrl").val(res.data.fileUrl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
<script type="text/html" template lay-done="layui.data.done(d);">
|
||||||
|
<div class="layui-form coreshop-form layui-form-pane">
|
||||||
|
<blockquote class="layui-elem-quote">
|
||||||
|
请选择小于10M的视频进行裁剪上传
|
||||||
|
</blockquote>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">地址:</label>
|
||||||
|
<div class="layui-input-inline layui-inline-8">
|
||||||
|
<input name="url" id="url" type="text" class="layui-input" lay-verify="required|url" lay-reqText="可手动输入地址或点击上传" />
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<button type="button" class="layui-btn" id="upBtn" lay-active="doCropperImg">上传附件</button>
|
||||||
|
<div id="viewTextBox"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item core-hidden">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="layui-footer">
|
||||||
|
<input type="button" class="layui-btn" lay-submit lay-filter="LAY-app-getUpLoad-submit" id="LAY-app-getUpLoad-submit" value="确认添加">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var debug = layui.setter.debug;
|
||||||
|
layui.data.done = function (d) {
|
||||||
|
//开启调试情况下获取接口赋值数据
|
||||||
|
if (debug) { console.log(d); }
|
||||||
|
layui.use(['index', 'table', 'laydate', 'upload', 'coreHelper'],
|
||||||
|
function () {
|
||||||
|
var $ = layui.$
|
||||||
|
, admin = layui.admin
|
||||||
|
, table = layui.table
|
||||||
|
, form = layui.form
|
||||||
|
, laydate = layui.laydate
|
||||||
|
, setter = layui.setter
|
||||||
|
, coreHelper = layui.coreHelper
|
||||||
|
, upload = layui.upload
|
||||||
|
, view = layui.view;
|
||||||
|
|
||||||
|
//普通图片上传
|
||||||
|
var uploadInst = upload.render({
|
||||||
|
elem: '#upBtn',
|
||||||
|
accept: 'video'
|
||||||
|
, url: layui.setter.apiUrl + 'Api/Tools/UploadFiles'
|
||||||
|
, before: function (obj) {
|
||||||
|
obj.preview(function (index, file, result) {
|
||||||
|
// $('#viewImgBox').attr('src', result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
, done: function (res) {
|
||||||
|
if (res.code > 0) { return layer.msg(res.msg); }
|
||||||
|
layer.msg('上传成功');
|
||||||
|
$("#url").val(res.data.fileUrl);
|
||||||
|
}
|
||||||
|
, error: function () {
|
||||||
|
var viewTextBox = $('#viewTextBox');
|
||||||
|
viewTextBox.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
||||||
|
viewTextBox.find('.demo-reload').on('click', function () {
|
||||||
|
uploadInst.upload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//重载form
|
||||||
|
form.render();
|
||||||
|
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
/* 重写样式 */
|
/* 重写样式 */
|
||||||
</style>
|
</style>
|
||||||
<script type="text/html" template lay-type="Post" lay-url="{{ layui.setter.apiUrl }}Api/CoreCmsBillPayments/GetIndex" lay-done="layui.data.done(d);">
|
<script type="text/html" template lay-type="Post" lay-url="{{ layui.setter.apiUrl }}Api/CoreCmsBillPayments/GetIndex" lay-done="layui.data.done(d);">
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<div class="table-body">
|
<div class="table-body">
|
||||||
<table id="LAY-app-CoreCmsBillPayments-tableBox" lay-filter="LAY-app-CoreCmsBillPayments-tableBox"></table>
|
<table id="LAY-app-CoreCmsBillPayments-tableBox" lay-filter="LAY-app-CoreCmsBillPayments-tableBox"></table>
|
||||||
@@ -69,6 +69,9 @@
|
|||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="LAY-app-CoreCmsBillPayments-tableBox-bar">
|
<script type="text/html" id="LAY-app-CoreCmsBillPayments-tableBox-bar">
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||||
|
{{# if(d.paymentCode == 'wechatpay' && d.status !=2){ }}
|
||||||
|
<a class="layui-btn layui-btn-xs" lay-event="doRefresh">刷新</a>
|
||||||
|
{{# } }}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -91,7 +94,7 @@
|
|||||||
, util = layui.util
|
, util = layui.util
|
||||||
, view = layui.view;
|
, view = layui.view;
|
||||||
|
|
||||||
|
|
||||||
//重载form
|
//重载form
|
||||||
form.render();
|
form.render();
|
||||||
var searchwhere;
|
var searchwhere;
|
||||||
@@ -126,7 +129,7 @@
|
|||||||
field: 'userNickName', title: '用户', sort: false, width: 105, templet: function (d) {
|
field: 'userNickName', title: '用户', sort: false, width: 105, templet: function (d) {
|
||||||
return d.userNickName + '(' + d.userId + ')';
|
return d.userNickName + '(' + d.userId + ')';
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
field: 'type', title: '单据类型', sort: false, width: 105,
|
field: 'type', title: '单据类型', sort: false, width: 105,
|
||||||
templet: function (data) {
|
templet: function (data) {
|
||||||
for (var i = 0; i < d.data.paymentsResourceTypes.length; i++) {
|
for (var i = 0; i < d.data.paymentsResourceTypes.length; i++) {
|
||||||
@@ -149,7 +152,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'paymentCode', title: '支付状态', sort: false, width: 105,
|
field: 'paymentCode', title: '支付方式', sort: false, width: 105,
|
||||||
templet: function (data) {
|
templet: function (data) {
|
||||||
for (var i = 0; i < d.data.paymentCode.length; i++) {
|
for (var i = 0; i < d.data.paymentCode.length; i++) {
|
||||||
if (data.paymentCode == d.data.paymentCode[i].title) {
|
if (data.paymentCode == d.data.paymentCode[i].title) {
|
||||||
@@ -163,7 +166,7 @@
|
|||||||
{ field: 'payedMsg', title: '支付备注', sort: false },
|
{ field: 'payedMsg', title: '支付备注', sort: false },
|
||||||
{ field: 'createTime', title: '创建时间', width: 130, sort: false },
|
{ field: 'createTime', title: '创建时间', width: 130, sort: false },
|
||||||
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
||||||
{ width: 82, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsBillPayments-tableBox-bar' }
|
{ width: 120, align: 'center', title: '操作', fixed: 'right', toolbar: '#LAY-app-CoreCmsBillPayments-tableBox-bar' }
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -194,13 +197,16 @@
|
|||||||
function (obj) {
|
function (obj) {
|
||||||
if (obj.event === 'detail') {
|
if (obj.event === 'detail') {
|
||||||
doDetails(obj);
|
doDetails(obj);
|
||||||
|
} else if (obj.event === 'doRefresh') {
|
||||||
|
doRefresh(obj);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//执行预览操作
|
//执行预览操作
|
||||||
function doDetails(obj) {
|
function doDetails(obj) {
|
||||||
coreHelper.Post("Api/CoreCmsBillPayments/GetDetails", { id: obj.data.paymentId }, function (e) {
|
coreHelper.Post("Api/CoreCmsBillPayments/GetDetails", { id: obj.data.paymentId }, function (e) {
|
||||||
if (e.code === 0) {
|
if (e.code === 0) {
|
||||||
admin.popup({ shadeClose: false,
|
admin.popup({
|
||||||
|
shadeClose: false,
|
||||||
title: '查看详情',
|
title: '查看详情',
|
||||||
area: ['600px', '550px'],
|
area: ['600px', '550px'],
|
||||||
id: 'LAY-popup-CoreCmsBillPayments-details',
|
id: 'LAY-popup-CoreCmsBillPayments-details',
|
||||||
@@ -215,6 +221,12 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//执行刷新操作
|
||||||
|
function doRefresh(obj) {
|
||||||
|
coreHelper.Post("Api/CoreCmsBillPayments/doRefresh", { id: obj.data.paymentId }, function (e) {
|
||||||
|
layer.msg(e.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//执行查询条件导出excel
|
//执行查询条件导出excel
|
||||||
function doQueryExportexcel() {
|
function doQueryExportexcel() {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<label for="category" class="layui-form-label">开票类型</label>
|
<label for="category" class="layui-form-label">开票类型</label>
|
||||||
<div class="layui-input-inline layui-inline-3">
|
<div class="layui-input-inline layui-inline-3">
|
||||||
|
|
||||||
<select name="category" id="category" lay-search lay-verType="tips" disabled="disabled">
|
<select name="category" id="category" lay-search disabled="disabled">
|
||||||
{{# layui.each(d.params.data.orderTaxCategory, function(index, item){ }}
|
{{# layui.each(d.params.data.orderTaxCategory, function(index, item){ }}
|
||||||
<option value="{{item.value}}" {{item.value===d.params.data.model.category?'selected="selected"':''}}>{{item.description}}</option>
|
<option value="{{item.value}}" {{item.value===d.params.data.model.category?'selected="selected"':''}}>{{item.description}}</option>
|
||||||
{{# }); }}
|
{{# }); }}
|
||||||
@@ -14,14 +14,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<label for="sourceId" class="layui-form-label">资源ID</label>
|
<label for="sourceId" class="layui-form-label">资源ID</label>
|
||||||
<div class="layui-input-inline layui-inline-3">
|
<div class="layui-input-inline layui-inline-3">
|
||||||
<input name="sourceId" id="sourceId" lay-verType="tips" lay-verify="required|verifytitle" class="layui-input" value="{{d.params.data.model.sourceId || '' }}" disabled="disabled" />
|
<input name="sourceId" id="sourceId" lay-verify="required|verifytitle" class="layui-input" value="{{d.params.data.model.sourceId || '' }}" disabled="disabled" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label for="status" class="layui-form-label">开票状态</label>
|
<label for="status" class="layui-form-label">开票状态</label>
|
||||||
<div class="layui-input-inline layui-inline-3">
|
<div class="layui-input-inline layui-inline-3">
|
||||||
<select name="status" id="status" lay-search lay-verType="tips" lay-verify="required|verifylogiCode">
|
<select name="status" id="status" lay-search lay-verify="required|verifylogiCode">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
{{# layui.each(d.params.data.orderTaxStatus, function(index, item){ }}
|
{{# layui.each(d.params.data.orderTaxStatus, function(index, item){ }}
|
||||||
<option value="{{item.value}}" {{item.value===d.params.data.model.status?'selected="selected"':''}}>{{item.description}}</option>
|
<option value="{{item.value}}" {{item.value===d.params.data.model.status?'selected="selected"':''}}>{{item.description}}</option>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<label for="type" class="layui-form-label">发票类型</label>
|
<label for="type" class="layui-form-label">发票类型</label>
|
||||||
<div class="layui-input-inline layui-inline-3">
|
<div class="layui-input-inline layui-inline-3">
|
||||||
<select name="type" id="type" lay-search lay-verType="tips" lay-verify="required">
|
<select name="type" id="type" lay-search lay-verify="required">
|
||||||
<option value="">请选择</option>
|
<option value="">请选择</option>
|
||||||
<option value="2" {{d.params.data.model.type===2?'selected="selected"':''}}>个人发票</option>
|
<option value="2" {{d.params.data.model.type===2?'selected="selected"':''}}>个人发票</option>
|
||||||
<option value="3" {{d.params.data.model.type===3?'selected="selected"':''}}>公司发票</option>
|
<option value="3" {{d.params.data.model.type===3?'selected="selected"':''}}>公司发票</option>
|
||||||
@@ -41,21 +41,32 @@
|
|||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label for="title" class="layui-form-label">发票抬头</label>
|
<label for="title" class="layui-form-label">发票抬头</label>
|
||||||
<div class="layui-input-inline layui-inline-8">
|
<div class="layui-input-inline layui-inline-8">
|
||||||
<input name="title" id="title" lay-verType="tips" lay-verify="required|verifytitle" class="layui-input" placeholder="请输入发票抬头" lay-reqText="请输入发票抬头" value="{{d.params.data.model.title || '' }}" />
|
<input name="title" id="title" lay-verify="required|verifytitle" class="layui-input" placeholder="请输入发票抬头" lay-reqText="请输入发票抬头" value="{{d.params.data.model.title || '' }}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layui-form-item" lay-size="sm">
|
<div class="layui-form-item" lay-size="sm">
|
||||||
<label for="taxNumber" class="layui-form-label">发票税号</label>
|
<label for="taxNumber" class="layui-form-label">发票税号</label>
|
||||||
<div class="layui-input-inline layui-inline-3">
|
<div class="layui-input-inline layui-inline-3">
|
||||||
<input name="taxNumber" id="taxNumber" lay-verType="tips" class="layui-input" placeholder="请输入发票税号" lay-reqText="请输入发票税号" value="{{d.params.data.model.taxNumber || '' }}" />
|
<input name="taxNumber" id="taxNumber" class="layui-input" placeholder="请输入发票税号" lay-reqText="请输入发票税号" value="{{d.params.data.model.taxNumber || '' }}" />
|
||||||
</div>
|
</div>
|
||||||
<label for="amount" class="layui-form-label">发票金额</label>
|
<label for="amount" class="layui-form-label">发票金额</label>
|
||||||
<div class="layui-input-inline layui-inline-3">
|
<div class="layui-input-inline layui-inline-3">
|
||||||
<input name="amount" id="amount" lay-verType="tips" lay-verify="required" class="layui-input" placeholder="请输入发票金额" lay-reqText="请输入发票金额" value="{{d.params.data.model.amount || '' }}" />
|
<input name="amount" id="amount" lay-verify="required" class="layui-input" placeholder="请输入发票金额" lay-reqText="请输入发票金额" value="{{d.params.data.model.amount || '' }}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label for="fileUrl" class="layui-form-label">发票下载地址</label>
|
||||||
|
<div class="layui-input-inline layui-inline-5">
|
||||||
|
<input name="fileUrl" id="fileUrl" class="layui-input" placeholder="请输入发票下载地址" lay-reqText="请输入发票下载地址" value="{{d.params.data.model.fileUrl || '' }}" />
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<button type="button" class="layui-btn" id="upBtn">上传发票</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="layui-form-item layui-form-text">
|
<div class="layui-form-item layui-form-text">
|
||||||
<label for="remarks" class="layui-form-label">开票备注</label>
|
<label for="remarks" class="layui-form-label">开票备注</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
@@ -86,6 +97,25 @@
|
|||||||
, upload = layui.upload
|
, upload = layui.upload
|
||||||
, coreHelper = layui.coreHelper;
|
, coreHelper = layui.coreHelper;
|
||||||
|
|
||||||
|
//普通图片上传
|
||||||
|
var uploadInst = upload.render({
|
||||||
|
elem: '#upBtn'
|
||||||
|
, accept: 'file'
|
||||||
|
, url: layui.setter.apiUrl + 'Api/Tools/UploadFiles'
|
||||||
|
, done: function (res) {
|
||||||
|
if (res.code > 0) { return layer.msg(res.msg); }
|
||||||
|
layer.msg('上传成功');
|
||||||
|
$("#fileUrl").val(res.data.fileUrl);
|
||||||
|
}
|
||||||
|
, error: function () {
|
||||||
|
var viewTextBox = $('#viewTextBox');
|
||||||
|
viewTextBox.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
||||||
|
viewTextBox.find('.demo-reload').on('click', function () {
|
||||||
|
uploadInst.upload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
form.verify({
|
form.verify({
|
||||||
|
|
||||||
verifysourceId: [/^[\S]{0,32}$/, '资源ID最大只允许输入32位字符,且不能出现空格'],
|
verifysourceId: [/^[\S]{0,32}$/, '资源ID最大只允许输入32位字符,且不能出现空格'],
|
||||||
|
|||||||
@@ -184,6 +184,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{ field: 'fileUrl', title: '发票下载地址', sort: false},
|
||||||
{ field: 'remarks', title: '开票备注', sort: false, width: 105 },
|
{ field: 'remarks', title: '开票备注', sort: false, width: 105 },
|
||||||
{ field: 'createTime', title: '创建时间', width: 130, sort: false },
|
{ field: 'createTime', title: '创建时间', width: 130, sort: false },
|
||||||
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
{ field: 'updateTime', title: '更新时间', width: 130, sort: false },
|
||||||
@@ -229,7 +230,7 @@
|
|||||||
admin.popup({
|
admin.popup({
|
||||||
shadeClose: false,
|
shadeClose: false,
|
||||||
title: '编辑数据',
|
title: '编辑数据',
|
||||||
area: ['600px', '500px'],
|
area: ['600px', '90%'],
|
||||||
id: 'LAY-popup-CoreCmsInvoice-edit',
|
id: 'LAY-popup-CoreCmsInvoice-edit',
|
||||||
success: function (layero, index) {
|
success: function (layero, index) {
|
||||||
view(this.id).render('financial/invoice/edit', { data: e.data }).done(function () {
|
view(this.id).render('financial/invoice/edit', { data: e.data }).done(function () {
|
||||||
|
|||||||
@@ -841,7 +841,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content-item">
|
<div class="content-item">
|
||||||
<span class="item-label">视频地址:</span>
|
<span class="item-label">视频地址:</span>
|
||||||
<el-input size="mini" placeholder="请输入视频地址" v-model="item.url"></el-input>
|
<!--<el-input size="mini" placeholder="请输入视频地址" v-model="item.url"></el-input>-->
|
||||||
|
<upload-video @upload-video="upVideo(index,item)" :index="index" :item="item"></upload-video>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -1103,6 +1104,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template id="upload-video">
|
||||||
|
<div style="margin-bottom: 10px; width: 70%;">
|
||||||
|
<el-input size="mini" placeholder="请输入视频地址" v-model="item.url"></el-input>
|
||||||
|
<button type="button" class="layui-btn layui-btn-sm" @click="upload" style="margin-top: 10px;">上传视频</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template id="upload-img">
|
<template id="upload-img">
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="layui-btn layui-btn-sm" @click="upload">上传图片</button>
|
<button type="button" class="layui-btn layui-btn-sm" @click="upload">上传图片</button>
|
||||||
|
|||||||
@@ -8,12 +8,16 @@
|
|||||||
* Description: 暂无
|
* Description: 暂无
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CoreCms.Net.Auth.HttpContextUser;
|
using CoreCms.Net.Auth.HttpContextUser;
|
||||||
using CoreCms.Net.IServices;
|
using CoreCms.Net.IServices;
|
||||||
|
using CoreCms.Net.Model.Entities;
|
||||||
|
using CoreCms.Net.Model.Entities.Expression;
|
||||||
using CoreCms.Net.Model.FromBody;
|
using CoreCms.Net.Model.FromBody;
|
||||||
using CoreCms.Net.Model.ViewModels.UI;
|
using CoreCms.Net.Model.ViewModels.UI;
|
||||||
|
using Essensoft.Paylink.Alipay.Domain;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
@@ -77,25 +81,37 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
|||||||
{
|
{
|
||||||
var jm = new WebApiCallBack();
|
var jm = new WebApiCallBack();
|
||||||
|
|
||||||
var list = await _articleServices.QueryPageAsync(p => p.isDel == false && p.typeId == entity.id, p => p.createTime, OrderByType.Desc,
|
|
||||||
entity.page, entity.limit);
|
|
||||||
|
|
||||||
var articleType = await _articleTypeServices.QueryAsync();
|
var articleType = await _articleTypeServices.QueryAsync();
|
||||||
var typeName = string.Empty;
|
|
||||||
if (articleType.Any())
|
if (articleType.Any())
|
||||||
{
|
{
|
||||||
var type = articleType.Find(p => p.id == entity.id);
|
var where = PredicateBuilder.True<Model.Entities.CoreCmsArticle>();
|
||||||
typeName = type != null ? type.name : "";
|
if (entity.id > 0)
|
||||||
|
{
|
||||||
|
where = where.And(p => p.isDel == false && p.typeId == entity.id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var typeId = articleType.FirstOrDefault()!.id;
|
||||||
|
where = where.And(p => p.isDel == false && p.typeId == typeId);
|
||||||
|
}
|
||||||
|
var list = await _articleServices.QueryPageAsync(where, p => p.createTime, OrderByType.Desc, entity.page, entity.limit);
|
||||||
|
jm.data = new
|
||||||
|
{
|
||||||
|
list,
|
||||||
|
articleType,
|
||||||
|
count = list.TotalCount
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jm.data = new
|
||||||
|
{
|
||||||
|
list = new List<CoreCmsArticle>(),
|
||||||
|
articleType,
|
||||||
|
count = 0
|
||||||
|
};
|
||||||
}
|
}
|
||||||
jm.status = true;
|
jm.status = true;
|
||||||
jm.data = new
|
|
||||||
{
|
|
||||||
list,
|
|
||||||
articleType,
|
|
||||||
type_name = typeName,
|
|
||||||
count = list.TotalCount
|
|
||||||
};
|
|
||||||
|
|
||||||
return jm;
|
return jm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
14892
数据库/MySql/20220329/coreshop20220329完整数据库.sql
Normal file
14892
数据库/MySql/20220329/coreshop20220329完整数据库.sql
Normal file
File diff suppressed because one or more lines are too long
1
数据库/MySql/20220329/升级脚本.sql
Normal file
1
数据库/MySql/20220329/升级脚本.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE CoreCmsInvoice ADD COLUMN fileUrl VARCHAR(500) DEFAULT NULL COMMENT '发票下载地址' AFTER updateTime;
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
2022-03-29
|
||||||
|
【新增】表【CoreCmsInvoice】 新增 【fileUrl】发票下载地址字段
|
||||||
|
|
||||||
2022-03-25
|
2022-03-25
|
||||||
【新增】表【WeChatTransactionComponentBrandAudit】【WeChatTransactionComponentBrandAuditLog】实现自定义交易组件上传品牌信息,及品牌审核回调
|
【新增】表【WeChatTransactionComponentBrandAudit】【WeChatTransactionComponentBrandAuditLog】实现自定义交易组件上传品牌信息,及品牌审核回调
|
||||||
|
|
||||||
|
|||||||
BIN
数据库/SqlServer/20220329/CoreShop20220329完整数据库.rar
Normal file
BIN
数据库/SqlServer/20220329/CoreShop20220329完整数据库.rar
Normal file
Binary file not shown.
2
数据库/SqlServer/20220329/增加发票附件下载地址字段.sql
Normal file
2
数据库/SqlServer/20220329/增加发票附件下载地址字段.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE [dbo].[CoreCmsInvoice] ADD [fileUrl] NVARCHAR (500) NULL;
|
||||||
|
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'<EFBFBD><EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ַ', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'CoreCmsInvoice', @level2type = N'COLUMN', @level2name = N'fileUrl';
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
2022-03-29
|
||||||
|
【新增】表【CoreCmsInvoice】 新增 【fileUrl】发票下载地址字段
|
||||||
|
|
||||||
2022-03-21
|
2022-03-21
|
||||||
【新增】表【WeChatTransactionComponentBrandAudit】【WeChatTransactionComponentBrandAuditLog】实现自定义交易组件上传品牌信息,及品牌审核回调
|
【新增】表【WeChatTransactionComponentBrandAudit】【WeChatTransactionComponentBrandAuditLog】实现自定义交易组件上传品牌信息,及品牌审核回调
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user