Initial commit (code only without large binaries)
This commit is contained in:
5
EdgeAdmin/web/views/@default/finance/orders/@menu.html
Normal file
5
EdgeAdmin/web/views/@default/finance/orders/@menu.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<first-menu>
|
||||
<menu-item href="/finance/orders" code="order">订单列表</menu-item>
|
||||
<menu-item href="/finance/orders/methods" code="method">支付方式</menu-item>
|
||||
<menu-item href="/finance/orders/setting" code="setting">订单设置</menu-item>
|
||||
</first-menu>
|
||||
69
EdgeAdmin/web/views/@default/finance/orders/index.html
Normal file
69
EdgeAdmin/web/views/@default/finance/orders/index.html
Normal file
@@ -0,0 +1,69 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<p class="ui message warning" v-if="!enablePay">暂时未启用在线支付,去<a href="/finance/orders/setting">设置</a>。</p>
|
||||
|
||||
|
||||
<div class="margin"></div>
|
||||
<form class="ui form" action="/finance/orders">
|
||||
<div class="ui fields inline">
|
||||
<div class="ui field">
|
||||
<finance-user-selector :v-user-id="userId"></finance-user-selector>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<select class="ui dropdown" name="status" v-model="status">
|
||||
<option value="">[状态]</option>
|
||||
<option v-for="statusDef in statusList" :value="statusDef.code">{{statusDef.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<input type="text" placeholder="订单号" name="keyword" v-model="keyword"/>
|
||||
</div>
|
||||
<div class="ui field">
|
||||
<button class="ui button" type="submit">搜索</button>
|
||||
|
||||
<a href="/finance/orders" v-if="userId > 0 || status.length > 0 || keyword.length > 0">[清除条件]</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<not-found-box v-if="orders.length == 0">暂时还没有订单。</not-found-box>
|
||||
|
||||
<table class="ui table selectable celled" v-if="orders.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 12em">订单号</th>
|
||||
<th>订单金额</th>
|
||||
<th style="width: 12em">创建时间</th>
|
||||
<th>类型</th>
|
||||
<th>状态</th>
|
||||
<th>支付方式</th>
|
||||
<th>用户</th>
|
||||
<th class="one op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="order in orders">
|
||||
<td><a :href="'/finance/orders/order?orderCode=' + order.code"><keyword :v-word="keyword">{{order.code}}</keyword></a></td>
|
||||
<td>¥{{order.amount}}</td>
|
||||
<td>{{order.createdTime}}</td>
|
||||
<td>
|
||||
<span>{{order.typeName}}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span :class="{green: order.status == 'finished', disabled: order.status == 'cancelled'}">{{order.statusName}}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span v-if="order.method.id > 0">{{order.method.name}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
<td>
|
||||
<user-link :v-user="order.user" v-if="order.user.id > 0"></user-link>
|
||||
<span v-if="order.user.id == 0" class="disabled">[已删除]</span>
|
||||
</td>
|
||||
<td>
|
||||
<a :href="'/finance/orders/order?orderCode=' + order.code">详情</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<page-box></page-box>
|
||||
@@ -0,0 +1,121 @@
|
||||
{$layout "layout_popup"}
|
||||
|
||||
<h3>添加支付方式</h3>
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">支付方式名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="30" ref="focus"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>
|
||||
<select name="parentCode" class="ui dropdown auto-width" v-model="parentCode">
|
||||
<option value="">[自定义支付方式]</option>
|
||||
<option v-for="presetMethod in presetMethods" :value="presetMethod.code">{{presetMethod.name}}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式代号 *</td>
|
||||
<td>
|
||||
<input type="text" name="code" maxlength="60"/>
|
||||
<p class="comment">只能包含数字、字母和下划线;自定义支付页面可以根据此代号判断订单来自哪种支付方式。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式说明 *</td>
|
||||
<td>
|
||||
<textarea rows="3" name="description" maxlength="100"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支持终端</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="clientType" v-model="clientTypeCode">
|
||||
<option v-for="clientType in clientTypes" :value="clientType.code">{{clientType.name}}</option>
|
||||
</select>
|
||||
<p class="comment" v-for="clientType in clientTypes" v-if="clientType.code == clientTypeCode">{{clientType.description}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="clientTypeCode == 'mobile'">
|
||||
<td>二维码扫描提示</td>
|
||||
<td>
|
||||
<input type="text" name="qrcodeTitle" maxlength="100"/>
|
||||
<p class="comment">用来提示用户使用App扫描二维码,类似于"请使用支付宝APP扫描下方二维码完成支付:"。</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 自定义支付方式 -->
|
||||
<tbody v-if="parentCode == ''">
|
||||
<tr>
|
||||
<td>自定义支付URL *</td>
|
||||
<td>
|
||||
<input type="text" name="url" maxlength="200"/>
|
||||
<p class="comment">用户选择此支付方式后,系统会将订单信息放在此URL参数中。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- 支付宝 -->
|
||||
<tbody v-if="parentCode == 'alipay'">
|
||||
<tr>
|
||||
<td>APPID *</td>
|
||||
<td>
|
||||
<input type="text" name="paramsAlipayAppId" maxlength="20"/>
|
||||
<p class="comment">签约的支付宝应用ID,为一组数字。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>私钥 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayPrivateKey" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>应用公钥证书 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayAppPublicCert" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付宝公钥证书 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayPublicCert" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付宝根证书 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayRootCert" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>产品代号 *</td>
|
||||
<td>
|
||||
<input type="text" name="paramsAlipayProductCode" maxlength="100" value="QUICK_WAP_WAY"/>
|
||||
<p class="comment">和支付宝签约的产品代号。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>沙箱应用</td>
|
||||
<td>
|
||||
<checkbox name="paramsAlipayIsSandbox"></checkbox>
|
||||
<p class="comment">选中后,表示当前支付宝应用为沙箱应用,仅用来模拟测试。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,4 @@
|
||||
Tea.context(function () {
|
||||
this.parentCode = ""
|
||||
this.clientTypeCode = this.clientTypes[0].code
|
||||
})
|
||||
@@ -0,0 +1,42 @@
|
||||
{$layout}
|
||||
{$template "../menu"}
|
||||
|
||||
<second-menu>
|
||||
<menu-item @click.prevent="createMethod">[添加支付方式]</menu-item>
|
||||
</second-menu>
|
||||
|
||||
<p class="ui message warning" v-if="!enablePay">暂时未启用在线支付,去<a href="/finance/orders/setting">设置</a>。</p>
|
||||
|
||||
<div v-if="methods.length == 0">
|
||||
<not-found-box>暂时还没有支付方式。</not-found-box>
|
||||
</div>
|
||||
|
||||
<table class="ui table selectable celled" v-if="methods.length > 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="three wide">支付方式</th>
|
||||
<th class="three wide">代号</th>
|
||||
<th>描述</th>
|
||||
<th class="width6">状态</th>
|
||||
<th class="two op">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="method in methods">
|
||||
<td>
|
||||
<a :href="'/finance/orders/methods/method?methodId=' + method.id">{{method.name}}</a>
|
||||
<div v-if="method.parentName.length > 0 || (method.clientType.length > 0 && method.clientType != 'all')">
|
||||
<grey-label v-if="method.parentName.length > 0">{{method.parentName}}</grey-label>
|
||||
<grey-label v-if="method.clientType.length > 0 && method.clientType != 'all'">{{method.clientTypeName}}</grey-label>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{method.code}}</td>
|
||||
<td>{{method.description}}</td>
|
||||
<td>
|
||||
<label-on :v-is-on="method.isOn"></label-on>
|
||||
</td>
|
||||
<td>
|
||||
<a :href="'/finance/orders/methods/method?methodId=' + method.id">详情</a>
|
||||
<a href="" @click.prevent="deleteMethod(method.id)">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
24
EdgeAdmin/web/views/@default/finance/orders/methods/index.js
Normal file
24
EdgeAdmin/web/views/@default/finance/orders/methods/index.js
Normal file
@@ -0,0 +1,24 @@
|
||||
Tea.context(function () {
|
||||
this.createMethod = function () {
|
||||
teaweb.popup("/finance/orders/methods/createPopup", {
|
||||
height: "27em",
|
||||
callback: function () {
|
||||
teaweb.successRefresh("保存成功")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.deleteMethod = function (methodId) {
|
||||
let that = this
|
||||
|
||||
teaweb.confirm("确定要删除此支付方式吗?", function () {
|
||||
that.$post("/finance/orders/methods/method/delete")
|
||||
.params({
|
||||
methodId: methodId
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.successRefresh("删除成功")
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
<first-menu>
|
||||
<menu-item href="/finance/orders/methods">支付方式</menu-item>
|
||||
<span class="item disabled" style="padding: 0">»</span>
|
||||
<menu-item :href="'/finance/orders/methods/method?methodId=' + method.id" code="index">"{{method.name}}"详情</menu-item>
|
||||
<menu-item :href="'/finance/orders/methods/method/update?methodId=' + method.id" code="update">修改</menu-item>
|
||||
</first-menu>
|
||||
@@ -0,0 +1,4 @@
|
||||
.scroll-box {
|
||||
max-height: 10em;
|
||||
}
|
||||
/*# sourceMappingURL=index.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,gBAAA","file":"index.css"}
|
||||
@@ -0,0 +1,121 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">支付方式名称</td>
|
||||
<td>
|
||||
{{method.name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>状态</td>
|
||||
<td>
|
||||
<label-on :v-is-on="method.isOn"></label-on>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式代号</td>
|
||||
<td>
|
||||
{{method.code}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式说明</td>
|
||||
<td>
|
||||
{{method.description}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支持终端</td>
|
||||
<td>
|
||||
{{method.clientTypeName}}
|
||||
<p class="comment">{{method.clientTypeDescription}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>密钥</td>
|
||||
<td>{{method.secret}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>
|
||||
<span v-if="method.parentCode.length == 0">自定义</span>
|
||||
<span v-else>{{method.parentName}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr v-show="method.clientType == 'mobile'">
|
||||
<td>二维码扫描提示</td>
|
||||
<td>
|
||||
<div v-if="method.qrcodeTitle.length > 0">
|
||||
{{method.qrcodeTitle}}
|
||||
<p class="comment">用来提示用户使用App扫描二维码,类似于"请使用支付宝APP扫描下方二维码完成支付:"。</p>
|
||||
</div>
|
||||
<div v-else><span class="title disabled">没有设置</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 自定义支付 -->
|
||||
<tr v-show="method.parentCode.length == 0">
|
||||
<td class="color-border">自定义支付URL</td>
|
||||
<td>
|
||||
{{method.url}}
|
||||
<p class="comment">用户点击此支付方式后,系统将会跳转到这个支付URL并传递<code-label class="grey">{{urlArgs}}</code-label>。</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 支付宝 -->
|
||||
<tbody v-if="method.parentCode == 'alipay'">
|
||||
<tr>
|
||||
<td class="color-border">APPID</td>
|
||||
<td>
|
||||
{{method.params.appId}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">私钥</td>
|
||||
<td>
|
||||
<pre class="scroll-box">{{method.params.privateKey}}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">应用公钥证书</td>
|
||||
<td>
|
||||
<pre class="scroll-box">{{method.params.appPublicCert}}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">支付宝公钥证书</td>
|
||||
<td>
|
||||
<pre class="scroll-box">{{method.params.alipayPublicCert}}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">支付宝根证书</td>
|
||||
<td>
|
||||
<pre class="scroll-box">{{method.params.alipayRootCert}}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">产品代号</td>
|
||||
<td>
|
||||
{{method.params.productCode}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">沙箱应用</td>
|
||||
<td>
|
||||
<span v-if="method.params.isSandbox" class="green">Y</span>
|
||||
<span v-else class="disabled">N</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<tr v-if="method.payNotifyURL.length > 0">
|
||||
<td class="color-border">支付结果通知URL</td>
|
||||
<td>{{method.payNotifyURL}}
|
||||
<p class="comment">前缀部分默认使用用户节点的第一个访问地址,<a href="/settings/userNodes">修改 »</a> </p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,7 @@
|
||||
Tea.context(function () {
|
||||
this.urlArgs = ""
|
||||
if (this.method.url.indexOf("?") < 0) {
|
||||
this.urlArgs += "?"
|
||||
}
|
||||
this.urlArgs += "EdgeOrderMethod=" + this.method.code + "&EdgeOrderCode=$订单号&EdgeOrderAmount=$支付金额&EdgeOrderTimestamp=$时间戳&EdgeOrderSign=$参数签名"
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
.scroll-box {
|
||||
max-height: 10em;
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<input type="hidden" name="methodId" :value="method.id"/>
|
||||
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">支付方式名称 *</td>
|
||||
<td>
|
||||
<input type="text" name="name" maxlength="30" ref="focus" v-model="method.name"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>
|
||||
<span v-if="method.parentName.length == 0">自定义</span>
|
||||
<span v-else>{{method.parentName}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式代号 *</td>
|
||||
<td>
|
||||
<input type="text" name="code" maxlength="60" v-model="method.code"/>
|
||||
<p class="comment">只能包含数字、字母和下划线;自定义支付页面可以根据此代号判断订单来自哪种支付方式。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式说明 *</td>
|
||||
<td>
|
||||
<textarea rows="3" name="description" maxlength="100" v-model="method.description"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支持终端</td>
|
||||
<td>
|
||||
<select class="ui dropdown auto-width" name="clientType" v-model="method.clientType">
|
||||
<option v-for="clientType in clientTypes" :value="clientType.code">{{clientType.name}}</option>
|
||||
</select>
|
||||
<p class="comment" v-for="clientType in clientTypes" v-if="clientType.code == method.clientType">{{clientType.description}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="method.clientType == 'mobile'">
|
||||
<td>二维码扫描提示</td>
|
||||
<td>
|
||||
<input type="text" name="qrcodeTitle" maxlength="100" v-model="method.qrcodeTitle"/>
|
||||
<p class="comment">用来提示用户使用App扫描二维码,类似于"请使用支付宝APP扫描下方二维码完成支付:"。</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- 自定义 -->
|
||||
<tbody v-if="method.parentCode == ''">
|
||||
<tr>
|
||||
<td>自定义支付URL *</td>
|
||||
<td>
|
||||
<input type="text" name="url" maxlength="200" v-model="method.url"/>
|
||||
<p class="comment">用户选择此支付方式后,系统会将订单信息放在此URL参数中。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- 支付宝 -->
|
||||
<tbody v-if="method.parentCode == 'alipay'">
|
||||
<tr>
|
||||
<td>APPID *</td>
|
||||
<td>
|
||||
<input type="text" name="paramsAlipayAppId" maxlength="20" v-model="method.params.appId"/>
|
||||
<p class="comment">签约的支付宝应用ID,为一组数字。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>私钥 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayPrivateKey" v-model="method.params.privateKey" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>应用公钥证书 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayAppPublicCert" v-model="method.params.appPublicCert" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付宝公钥证书 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayPublicCert" v-model="method.params.alipayPublicCert" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付宝根证书 *</td>
|
||||
<td>
|
||||
<textarea name="paramsAlipayRootCert" v-model="method.params.alipayRootCert" spellcheck="false"></textarea>
|
||||
<p class="comment">如果你获得的是证书文件,你需要将文件内容拷贝到这里。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>产品代号 *</td>
|
||||
<td>
|
||||
<input type="text" name="paramsAlipayProductCode" v-model="method.params.productCode" maxlength="100" value=""/>
|
||||
<p class="comment">和支付宝签约的产品代号。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>沙箱应用</td>
|
||||
<td>
|
||||
<checkbox name="paramsAlipayIsSandbox" v-model="method.params.isSandbox"></checkbox>
|
||||
<p class="comment">选中后,表示当前支付宝应用为沙箱应用,仅用来模拟测试。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tr>
|
||||
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
||||
</tr>
|
||||
<tbody v-show="moreOptionsVisible">
|
||||
<tr >
|
||||
<td>启用</td>
|
||||
<td>
|
||||
<checkbox name="isOn" v-model="method.isOn"></checkbox>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
@@ -0,0 +1,8 @@
|
||||
Tea.context(function () {
|
||||
this.success = function () {
|
||||
let that = this
|
||||
teaweb.success("保存成功", function () {
|
||||
window.location = "/finance/orders/methods/method?methodId=" + that.method.id
|
||||
})
|
||||
}
|
||||
})
|
||||
60
EdgeAdmin/web/views/@default/finance/orders/order/index.html
Normal file
60
EdgeAdmin/web/views/@default/finance/orders/order/index.html
Normal file
@@ -0,0 +1,60 @@
|
||||
{$layout}
|
||||
{$template "../menu"}
|
||||
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">订单号</td>
|
||||
<td>{{order.code}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单金额</td>
|
||||
<td>¥{{order.amount}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>创建时间</td>
|
||||
<td>{{order.createdTime}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>类型</td>
|
||||
<td>
|
||||
{{order.typeName}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>状态</td>
|
||||
<td>
|
||||
<span v-if="order.status == 'none' && order.isExpired" class="red">已过期</span>
|
||||
<span v-else>
|
||||
<span :class="{green: order.status == 'finished', disabled: order.status == 'cancelled'}">{{order.statusName}}</span>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="order.status == 'finished'">
|
||||
<td>支付时间</td>
|
||||
<td>{{order.finishedTime}}</td>
|
||||
</tr>
|
||||
<tr v-if="order.status == 'cancelled'">
|
||||
<td>取消时间</td>
|
||||
<td>{{order.cancelledTime}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>支付方式</td>
|
||||
<td>
|
||||
<span v-if="order.method.id > 0">{{order.method.name}}</span>
|
||||
<span v-else class="disabled">-</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>用户</td>
|
||||
<td>
|
||||
<user-link :v-user="order.user" v-if="order.user.id > 0"></user-link>
|
||||
<span v-if="order.user.id == 0" class="disabled">[已删除]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="order.status == 'none'">
|
||||
<td>操作</td>
|
||||
<td>
|
||||
<a href="" @click.prevent="finishOrder">[完成支付]</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
16
EdgeAdmin/web/views/@default/finance/orders/order/index.js
Normal file
16
EdgeAdmin/web/views/@default/finance/orders/order/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
Tea.context(function () {
|
||||
this.finishOrder = function () {
|
||||
let that = this
|
||||
teaweb.confirm("html:确定要将此订单设置为完成状态吗?<br/>订单完成后对应的账户余额和服务状态将会发生变化。", function () {
|
||||
that.$post("/finance/orders/order/finish")
|
||||
.params({
|
||||
orderCode: that.order.code
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.success("操作成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
4
EdgeAdmin/web/views/@default/finance/orders/setting.css
Normal file
4
EdgeAdmin/web/views/@default/finance/orders/setting.css
Normal file
@@ -0,0 +1,4 @@
|
||||
textarea.disabled {
|
||||
color: #ddd !important;
|
||||
}
|
||||
/*# sourceMappingURL=setting.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["setting.less"],"names":[],"mappings":"AAAA,QAAQ;EACP,WAAA","file":"setting.css"}
|
||||
32
EdgeAdmin/web/views/@default/finance/orders/setting.html
Normal file
32
EdgeAdmin/web/views/@default/finance/orders/setting.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{$layout}
|
||||
{$template "menu"}
|
||||
|
||||
<form class="ui form" data-tea-action="$" data-tea-success="success">
|
||||
<csrf-token></csrf-token>
|
||||
|
||||
<table class="ui table selectable definition">
|
||||
<tr>
|
||||
<td class="title">启用在线支付</td>
|
||||
<td>
|
||||
<checkbox name="enablePay" v-model="config.enablePay"></checkbox>
|
||||
<p class="comment">启用后,用户在用户系统中在线创建和支付订单。此功能需要你已经添加了支付方式。<span v-if="!hasValidMethods" class="red">暂时没有添加可用的支付方式,此功能将不可用。</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>不启用支付时的提示</td>
|
||||
<td>
|
||||
<textarea name="disablePageHTML" v-model="config.disablePageHTML" :class="{disabled: config.enablePay}" rows="3"></textarea>
|
||||
<p class="comment">在没有启用在线支付或者没有可用的在线支付方式时的提示文字。支持HTML。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>订单过期时间</td>
|
||||
<td>
|
||||
<time-duration-box :v-name="'orderLifeJSON'" :v-value="config.orderLife"></time-duration-box>
|
||||
<p class="comment">超过这个时间订单不能再支付。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<submit-btn></submit-btn>
|
||||
</form>
|
||||
3
EdgeAdmin/web/views/@default/finance/orders/setting.js
Normal file
3
EdgeAdmin/web/views/@default/finance/orders/setting.js
Normal file
@@ -0,0 +1,3 @@
|
||||
Tea.context(function () {
|
||||
this.success = NotifyReloadSuccess("保存成功")
|
||||
})
|
||||
3
EdgeAdmin/web/views/@default/finance/orders/setting.less
Normal file
3
EdgeAdmin/web/views/@default/finance/orders/setting.less
Normal file
@@ -0,0 +1,3 @@
|
||||
textarea.disabled {
|
||||
color: #ddd!important;
|
||||
}
|
||||
Reference in New Issue
Block a user