parent
410ae883b1
commit
cc836a7cd5
@ -0,0 +1,25 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIELjCCAxagAwIBAgIUL3BGpENxaOOyw7pbzx/5QVJq1N0wDQYJKoZIhvcNAQEL
|
||||||
|
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
|
||||||
|
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
|
||||||
|
Q0EwHhcNMjQwMzExMDkwMjA4WhcNMjkwMzEwMDkwMjA4WjCBhzETMBEGA1UEAwwK
|
||||||
|
MTY2ODUyNzk1MzEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTMwMQYDVQQL
|
||||||
|
DCrkuIrmtbfplb/msZ/kupHmga/mlbDlrZfnp5HmioDmnInpmZDlhazlj7gxCzAJ
|
||||||
|
BgNVBAYTAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQAD
|
||||||
|
ggEPADCCAQoCggEBAOKEZU4HFlimKzHLOgEV8lwJxkJrifWYSSo6l8SbNcv4lEgZ
|
||||||
|
mXha5y3a2XqzCAX3DIfXb5KiV1LP/QyWSAgsTV+g7ryyyP5i9JWvTiyWC8tHLGj5
|
||||||
|
cp58V7ifq6UrXIWSeSt81r33ZHnngDIWYTtHPy3DfU+1+yLlKP3t+5UCWRp7w+DC
|
||||||
|
UZKen9ygAMW9ZXSIB/LasAu6d3h9CVZQd/cVG7pslvO/Iedf1jvVATNx5d08XLSY
|
||||||
|
bQGgenNpRrAIgnWzapa2fiBlHR7vmTI8GimmXEkHXLBy6GUbwrMOuLJ/qVWNtgGs
|
||||||
|
OZ5QKYyAufWfp8nf4ZibU0Mk/ZELr3iWAiJap1UCAwEAAaOBuTCBtjAJBgNVHRME
|
||||||
|
AjAAMAsGA1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDov
|
||||||
|
L2V2Y2EuaXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUw
|
||||||
|
REJDMDRCMDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJF
|
||||||
|
MTJCMjdBOUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IB
|
||||||
|
AQCt9QtqT/i2d6aJx4TNjuh3CF6WKjphFVAKqnse+3qr6PQR4D8NzgdbAECdBbJt
|
||||||
|
U0R20n4UGMZNijoIy1CaOqJCuLavuU+wZxvQnzFJihjCKWmn8NRs9vYtDaDpbns5
|
||||||
|
X+9Dt/uw1tuvXZbRqg0X+bfPNBDUU/WBFqwQ2XpawVa2v5+BIvYovuOeI01VxuiF
|
||||||
|
MXqs6Lteg3FiMnOFgTYSPq5jcFZK/FvhPGVu8pmPkmDeRoc0jPPNDryvhVeR91cQ
|
||||||
|
kdEgYktuprSWJlXGP+Og4S7DLOBenLnwoB2MzN/E/jE2gHwxfff/ckyGVZ5nC2CJ
|
||||||
|
za+em1H7eL+LTMqdqHRckg0N
|
||||||
|
-----END CERTIFICATE-----
|
@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDihGVOBxZYpisx
|
||||||
|
yzoBFfJcCcZCa4n1mEkqOpfEmzXL+JRIGZl4Wuct2tl6swgF9wyH12+SoldSz/0M
|
||||||
|
lkgILE1foO68ssj+YvSVr04slgvLRyxo+XKefFe4n6ulK1yFknkrfNa992R554Ay
|
||||||
|
FmE7Rz8tw31Ptfsi5Sj97fuVAlkae8PgwlGSnp/coADFvWV0iAfy2rALund4fQlW
|
||||||
|
UHf3FRu6bJbzvyHnX9Y71QEzceXdPFy0mG0BoHpzaUawCIJ1s2qWtn4gZR0e75ky
|
||||||
|
PBopplxJB1ywcuhlG8KzDriyf6lVjbYBrDmeUCmMgLn1n6fJ3+GYm1NDJP2RC694
|
||||||
|
lgIiWqdVAgMBAAECggEAMY2nH8+7Gr+XWXhNAynK8EmPHr6p2plrABr7Up5lwW5q
|
||||||
|
+e7nvQWd51EmHIqH6c4m5pzBosFy+wHXKObDcU5HyvDI6WzvPX9mZEyKfISCpgC2
|
||||||
|
/Wv8oCExi4kaorJ+thXZ/iJ8U+iICYcUa2Cr+qzWbGuEwWhdPUAGnK5wSCPQXFNn
|
||||||
|
oAuC86dD/IWsDgT5UreofNl0Sd4aepq3gNzAqpCKG16golkwMD0vybpaPc4uiwKv
|
||||||
|
CZt06GRfgwOzI4S5kqM/HYptgBQiO6+SKbiS2MKVmamadsN/NIpd/24xH6IYaiMX
|
||||||
|
sXYVd1gYxE8bQ79XdZ6xthLYoLGspGPfYWabym2CLQKBgQD1jITwJ+oVHyDscBan
|
||||||
|
TEJhOaVv7n1dMFka9JAouYYJrhTF2LAwSTmqf3Yp0YrY/ucv9WXRpzO6YBN2bWO+
|
||||||
|
9PCgqgCEFirBEftfaC0CA2D2bpED5iBe6Y09ueJBIWSgzCFDiMlDhVKy0+ZraUZ3
|
||||||
|
WkYNW9CEd3LnhQMnIiEEhsdMywKBgQDsKIIbog39E0hAY/02edH+tVEDjyJrdb2m
|
||||||
|
kqv65sH3NmFsWGWEeZLS0KJomgQdCuEOmdWWFqOIrfs6Ugmu/3g1hzC8O01xJEJr
|
||||||
|
XrI3Nnn+sghsdgHvorRYsb8pRZbPQD24p2MmbQcanPbO2HB8ydeD6G5WYju7Me6l
|
||||||
|
RvnjgHJ4XwKBgFEYE19tDzXijfEII7Mk0Fdjvmt1DBoWuZbZZjLM8qOHxnyAz89i
|
||||||
|
n5Tbe57cAUshBCEmnnXbDo5i5IqcHfEW29Fz06/L0lrpIWek9BhSHVfFtEbhXZd6
|
||||||
|
8paMKVjxOlaQk/vF1RJjmahNqy+WGRuZyMDorbjR6jTkDOKDtvvTt0Z5AoGABPC4
|
||||||
|
ABH8zu2HVmmBE5Gq1fQ/FJ767lqRNBnfZSlMp3pIwXZ78TCF5MkejKekLGNc3+xR
|
||||||
|
7ojctPBG0CqFL1cC0cPZPibTcOl8Rji966/FD5Hz4Sj602OI+E4HnLpq9Dz4zZMa
|
||||||
|
3OPtAR6Ff0BB4ipqysSjAkWd0EW0I1r/wUWfn2sCgYEA3OZ6OBEZ/sTJMGke9/CL
|
||||||
|
3k2mS9jKpqJTZfIUbNtwwhPah/vL13zVfT2srOzL0IPX7SIQGowHhg6NjxUTOayd
|
||||||
|
AGDQs65NfKkyt9+8bf4F93afo9fFQAxcRJ1rqXranscqDRfzdJFCubGIkYq9cN0J
|
||||||
|
6kUN10GoZtQZnCvSdMB8SSs=
|
||||||
|
-----END PRIVATE KEY-----
|
@ -0,0 +1,24 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIEFDCCAvygAwIBAgIUNon6eDh9zWbnHpoqqgjkYsyCPAowDQYJKoZIhvcNAQEL
|
||||||
|
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
|
||||||
|
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
|
||||||
|
Q0EwHhcNMjQwMzA4MDcxMDU3WhcNMjkwMzA3MDcxMDU3WjBuMRgwFgYDVQQDDA9U
|
||||||
|
ZW5wYXkuY29tIHNpZ24xEzARBgNVBAoMClRlbnBheS5jb20xHTAbBgNVBAsMFFRl
|
||||||
|
bnBheS5jb20gQ0EgQ2VudGVyMQswCQYDVQQGEwJDTjERMA8GA1UEBwwIU2hlblpo
|
||||||
|
ZW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDJUqXCOnWQmrpqLyy6
|
||||||
|
0HfdYezdBfe66CPyAIeqV7sTReRNZvYVONjkhOzVlZ88d0+PmPADGmPskPCrhFCX
|
||||||
|
K5sN5TBfCog+FZPQJ+Ol0JAZKvQkK+smPt2pmVfBth020DCKlc8U0LPAE0nxqF0E
|
||||||
|
30b9NQLdoD77kE0duIpK/b9ASb9UPlR2vcQobXXehzaZph6Wd3ys2rHI2ZbKNicP
|
||||||
|
XqSXtTb86+x734ufKbeGQd0MrV/+LaMc1qNdjx3pjpvbw9WDSQH99nwjGoqOFvU7
|
||||||
|
IhHz5KzIKnJf4ZqLBvkRzK/L5r4MUxrOfWPS3x6yvDNBRqO5d2rCoXAtdAl9LefA
|
||||||
|
G1jDAgMBAAGjgbkwgbYwCQYDVR0TBAIwADALBgNVHQ8EBAMCA/gwgZsGA1UdHwSB
|
||||||
|
kzCBkDCBjaCBiqCBh4aBhGh0dHA6Ly9ldmNhLml0cnVzLmNvbS5jbi9wdWJsaWMv
|
||||||
|
aXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0QjA2QUQzOTc1NDk4NDZDMDFDM0U4
|
||||||
|
RUJEMiZzZz1IQUNDNDcxQjY1NDIyRTEyQjI3QTlEMzNBODdBRDFDREY1OTI2RTE0
|
||||||
|
MDM3MTANBgkqhkiG9w0BAQsFAAOCAQEATvBq6b8Zvvz+ld8MZ3VFy61DY5iUALlN
|
||||||
|
Nn2IAan0iVP3bb1FCeYdFJsgGo3hc1C3o2mPbq5FPTO6qYW3fP3bKYlmivNL/tQW
|
||||||
|
IGAWDI1ynhAs/RZZD5ASrzpcJigfXrkh7imMxJO55dEXP2XQfFRMvbeYlcvEIrMt
|
||||||
|
I48TESeHB59/TGI2GTUwt51bXk3k3QJd8iji0w6ZKLtk1Pu0Jx3o2KOw9GEJX47/
|
||||||
|
CkQDl/1i73Q4UPA1GpfR+2X9WPOIHnmznvUzTJATZHwUfJaIrlaY7ky7x20S43xZ
|
||||||
|
YXWK6++q9Pf62QixKUE7WvxtGDnYYWGh7xrAu/aENZ/OxcqieQMeKA==
|
||||||
|
-----END CERTIFICATE-----
|
@ -0,0 +1,42 @@
|
|||||||
|
package jnpf.config;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.ijpay.core.kit.PayKit;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import java.security.cert.X509Certificate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信支付配置
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Slf4j
|
||||||
|
@Configuration
|
||||||
|
@ConfigurationProperties(prefix = "wx.pay.v3")
|
||||||
|
public class WxPayProperties {
|
||||||
|
private String appId;//小程序id
|
||||||
|
private String mchId;//商户号
|
||||||
|
private String mchSerialNo;//api证书序列号
|
||||||
|
private String keyPath;//商户私钥
|
||||||
|
private String certPath;//商户公钥 给别人用的
|
||||||
|
private String platformSerialNo;//微信平台 序列号
|
||||||
|
private String platformCertPath;//微信平台 公钥
|
||||||
|
private String apiKey3;//v3秘钥
|
||||||
|
private String notify;//支付回调地址
|
||||||
|
|
||||||
|
public String getSerialNumber() {
|
||||||
|
X509Certificate certificate = PayKit.getCertificate(this.getCertPath());
|
||||||
|
if (certificate == null) {
|
||||||
|
throw new RuntimeException("商户证书序列号获取失败!");
|
||||||
|
}
|
||||||
|
String serialNo = certificate.getSerialNumber().toString(16).toUpperCase();
|
||||||
|
// 提前两天检查证书是否有效
|
||||||
|
boolean isValid = PayKit.checkCertificateIsValid(certificate, this.mchId, -2);
|
||||||
|
log.info("证书是否可用 {} 证书有效期为 {}", isValid, DateUtil.format(certificate.getNotAfter(), DatePattern.NORM_DATETIME_PATTERN));
|
||||||
|
return serialNo;
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,12 @@
|
|||||||
|
package jnpf.model.paymentlog;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PaymentVO {
|
||||||
|
|
||||||
|
private String enterpriseId;
|
||||||
|
private BigDecimal amount;
|
||||||
|
}
|
@ -0,0 +1,152 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="详情"
|
||||||
|
:close-on-click-modal="false" append-to-body
|
||||||
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
||||||
|
width="600px">
|
||||||
|
<el-row :gutter="15" class="">
|
||||||
|
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
|
||||||
|
<template v-if="!loading">
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="公司名称"
|
||||||
|
prop="enterpriseId" >
|
||||||
|
<p>{{dataForm.enterpriseId}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="订单编号"
|
||||||
|
prop="orderNo" >
|
||||||
|
<p>{{dataForm.orderNo}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="订单类型"
|
||||||
|
prop="orderTypeId" >
|
||||||
|
<p>{{ dataForm.orderTypeId }} </p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="金额"
|
||||||
|
prop="amount" >
|
||||||
|
<p>{{dataForm.amount}}元</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="订单状态"
|
||||||
|
prop="orderStatus" >
|
||||||
|
<p>{{ dataForm.orderStatus }} </p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="交易人"
|
||||||
|
prop="openId" >
|
||||||
|
<p>{{dataForm.openId}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="备注"
|
||||||
|
prop="remark" >
|
||||||
|
<p>{{dataForm.remark}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="创建人"
|
||||||
|
prop="creatorUserId" >
|
||||||
|
<p>{{dataForm.creatorUserId}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="创建时间"
|
||||||
|
prop="creatorTime" >
|
||||||
|
<p>{{dataForm.creatorTime}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false"> 取 消</el-button>
|
||||||
|
</span>
|
||||||
|
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||||
|
import jnpf from '@/utils/jnpf'
|
||||||
|
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||||
|
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||||
|
export default {
|
||||||
|
components: { Detail},
|
||||||
|
props: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
detailVisible: false,
|
||||||
|
loading: false,
|
||||||
|
|
||||||
|
dataForm: {
|
||||||
|
id :'',
|
||||||
|
enterpriseId : "",
|
||||||
|
orderNo : '',
|
||||||
|
orderTypeId : "1",
|
||||||
|
amount : '',
|
||||||
|
orderStatus : "",
|
||||||
|
openId : '',
|
||||||
|
remark : '',
|
||||||
|
creatorUserId : "",
|
||||||
|
creatorTime : "",
|
||||||
|
},
|
||||||
|
enterpriseIdProps:{"label":"f_full_name","value":"f_id" },
|
||||||
|
orderTypeIdOptions:[{"fullName":"充值","id":"1"}],
|
||||||
|
orderTypeIdProps:{"label":"fullName","value":"id" },
|
||||||
|
orderStatusOptions:[{"fullName":"未支付","id":"NOTPAY"},{"fullName":"成功","id":"SUCCESS"},{"fullName":"已取消","id":"CLOSED"}],
|
||||||
|
orderStatusProps:{"label":"fullName","value":"id" },
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
toDetail(defaultValue, modelId) {
|
||||||
|
if (!defaultValue) return
|
||||||
|
getConfigData(modelId).then(res => {
|
||||||
|
if (!res.data || !res.data.formData) return
|
||||||
|
let formData = JSON.parse(res.data.formData)
|
||||||
|
formData.popupType = 'general'
|
||||||
|
this.detailVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.Detail.init(formData, modelId, defaultValue)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
dataInfo(dataAll){
|
||||||
|
let _dataAll =dataAll
|
||||||
|
this.dataForm = _dataAll
|
||||||
|
},
|
||||||
|
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || 0;
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if(this.dataForm.id){
|
||||||
|
this.loading = true
|
||||||
|
request({
|
||||||
|
url: '/api/scm/Payment/detail/'+this.dataForm.id,
|
||||||
|
method: 'get'
|
||||||
|
}).then(res => {
|
||||||
|
this.dataInfo(res.data)
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,542 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-dialog :title="!dataForm.id ? '新建' :'编辑'"
|
||||||
|
:close-on-click-modal="false" append-to-body
|
||||||
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
||||||
|
width="600px">
|
||||||
|
<el-row :gutter="15" class="">
|
||||||
|
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right" >
|
||||||
|
<template v-if="!loading">
|
||||||
|
<!-- 具体表单 -->
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="公司名称" prop="enterpriseId" >
|
||||||
|
<JnpfSelect v-model="dataForm.enterpriseId" @change="changeData('enterpriseId',-1)"
|
||||||
|
placeholder="请选择" clearable :style='{"width":"100%"}' :options="enterpriseIdOptions" :props="enterpriseIdProps" >
|
||||||
|
</JnpfSelect>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="订单编号" prop="orderNo" >
|
||||||
|
<JnpfInput v-model="dataForm.orderNo" @change="changeData('orderNo',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="订单类型" prop="orderTypeId" >
|
||||||
|
<JnpfSelect v-model="dataForm.orderTypeId" @change="changeData('orderTypeId',-1)"
|
||||||
|
placeholder="请选择" clearable :style='{"width":"100%"}' :options="orderTypeIdOptions" :props="orderTypeIdProps" >
|
||||||
|
</JnpfSelect>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="金额" prop="amount" >
|
||||||
|
<JnpfInput v-model="dataForm.amount" @change="changeData('amount',-1)"
|
||||||
|
placeholder="请输入" addonAfter="元" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="订单状态" prop="orderStatus" >
|
||||||
|
<JnpfSelect v-model="dataForm.orderStatus" @change="changeData('orderStatus',-1)"
|
||||||
|
placeholder="请选择" clearable :style='{"width":"100%"}' :options="orderStatusOptions" :props="orderStatusProps" >
|
||||||
|
</JnpfSelect>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="交易人" prop="openId" >
|
||||||
|
<JnpfInput v-model="dataForm.openId" @change="changeData('openId',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="备注" prop="remark" >
|
||||||
|
<JnpfInput v-model="dataForm.remark" @change="changeData('remark',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="创建人" prop="creatorUserId" >
|
||||||
|
<JnpfOpenData v-model="dataForm.creatorUserId" @change="changeData('creatorUserId',-1)"
|
||||||
|
placeholder="系统自动生成" readonly :style='{"width":"100%"}' type="currUser" >
|
||||||
|
</JnpfOpenData>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="创建时间" prop="creatorTime" >
|
||||||
|
<JnpfOpenData v-model="dataForm.creatorTime" @change="changeData('creatorTime',-1)"
|
||||||
|
placeholder="系统自动生成" readonly :style='{"width":"100%"}' type="currTime" >
|
||||||
|
</JnpfOpenData>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- 表单结束 -->
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
|
||||||
|
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/>
|
||||||
|
</el-row>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<div class="upAndDown-button" v-if="dataForm.id">
|
||||||
|
<el-button @click="prev" :disabled='prevDis'>
|
||||||
|
{{'上一条'}}
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="next" :disabled='nextDis'>
|
||||||
|
{{'下一条'}}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
|
||||||
|
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button>
|
||||||
|
<el-button @click="visible = false"> 取 消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> 确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '@/utils/request'
|
||||||
|
import {mapGetters} from "vuex";
|
||||||
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||||
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||||
|
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
|
||||||
|
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
|
||||||
|
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
|
||||||
|
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||||
|
export default {
|
||||||
|
components: { },
|
||||||
|
props: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataFormSubmitType: 0,
|
||||||
|
continueBtnLoading: false,
|
||||||
|
index: 0,
|
||||||
|
prevDis: false,
|
||||||
|
nextDis: false,
|
||||||
|
allList: [],
|
||||||
|
visible: false,
|
||||||
|
loading: false,
|
||||||
|
btnLoading: false,
|
||||||
|
formRef: 'formRef',
|
||||||
|
setting:{},
|
||||||
|
eventType: '',
|
||||||
|
userBoxVisible:false,
|
||||||
|
selectDialogVisible: false,
|
||||||
|
currTableConf:{},
|
||||||
|
dataValueAll:{},
|
||||||
|
addTableConf:{
|
||||||
|
},
|
||||||
|
//可选范围默认值
|
||||||
|
ableAll:{
|
||||||
|
},
|
||||||
|
tableRows:{
|
||||||
|
},
|
||||||
|
Vmodel:"",
|
||||||
|
currVmodel:"",
|
||||||
|
dataForm: {
|
||||||
|
enterpriseId : undefined,
|
||||||
|
orderNo : undefined,
|
||||||
|
orderTypeId : "1",
|
||||||
|
amount : undefined,
|
||||||
|
orderStatus : undefined,
|
||||||
|
openId : undefined,
|
||||||
|
remark : undefined,
|
||||||
|
creatorUserId : undefined,
|
||||||
|
creatorTime : undefined,
|
||||||
|
version: 0,
|
||||||
|
},
|
||||||
|
tableRequiredData: {},
|
||||||
|
dataRule:
|
||||||
|
{
|
||||||
|
enterpriseId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择',
|
||||||
|
trigger: 'change'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
orderNo: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入',
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
orderTypeId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请至少选择一个',
|
||||||
|
trigger: 'change'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
amount: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入',
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||||
|
message: '请输入正确的金额',
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
orderStatus: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择',
|
||||||
|
trigger: 'change'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
enterpriseIdOptions:[],
|
||||||
|
enterpriseIdProps:{"label":"f_full_name","value":"f_id" },
|
||||||
|
orderTypeIdOptions:[{"fullName":"充值","id":"1"}],
|
||||||
|
orderTypeIdProps:{"label":"fullName","value":"id" },
|
||||||
|
orderStatusOptions:[{"fullName":"未支付","id":"NOTPAY"},{"fullName":"成功","id":"SUCCESS"},{"fullName":"已取消","id":"CLOSED"}],
|
||||||
|
orderStatusProps:{"label":"fullName","value":"id" },
|
||||||
|
childIndex:-1,
|
||||||
|
isEdit:false,
|
||||||
|
interfaceRes: {
|
||||||
|
enterpriseId:[] ,
|
||||||
|
orderNo:[] ,
|
||||||
|
orderTypeId:[] ,
|
||||||
|
amount:[] ,
|
||||||
|
orderStatus:[] ,
|
||||||
|
openId:[] ,
|
||||||
|
remark:[] ,
|
||||||
|
creatorUserId:[] ,
|
||||||
|
creatorTime:[] ,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userInfo'])
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.dataAll()
|
||||||
|
this.initDefaultData()
|
||||||
|
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
prev() {
|
||||||
|
this.index--
|
||||||
|
if (this.index === 0) {
|
||||||
|
this.prevDis = true
|
||||||
|
}
|
||||||
|
this.nextDis = false
|
||||||
|
for (let index = 0; index < this.allList.length; index++) {
|
||||||
|
const element = this.allList[index];
|
||||||
|
if (this.index == index) {
|
||||||
|
this.getInfo(element.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
next() {
|
||||||
|
this.index++
|
||||||
|
if (this.index === this.allList.length - 1) {
|
||||||
|
this.nextDis = true
|
||||||
|
}
|
||||||
|
this.prevDis = false
|
||||||
|
for (let index = 0; index < this.allList.length; index++) {
|
||||||
|
const element = this.allList[index];
|
||||||
|
if (this.index == index) {
|
||||||
|
this.getInfo(element.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getInfo(id) {
|
||||||
|
request({
|
||||||
|
url: '/api/scm/Payment/'+ id,
|
||||||
|
method: 'get'
|
||||||
|
}).then(res => {
|
||||||
|
this.dataInfo(res.data)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goBack() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList', true)
|
||||||
|
},
|
||||||
|
changeData(model, index) {
|
||||||
|
this.isEdit = false
|
||||||
|
this.childIndex = index
|
||||||
|
let modelAll = model.split("-");
|
||||||
|
let faceMode = "";
|
||||||
|
for (let i = 0; i < modelAll.length; i++) {
|
||||||
|
faceMode += modelAll[i];
|
||||||
|
}
|
||||||
|
for (let key in this.interfaceRes) {
|
||||||
|
if (key != faceMode) {
|
||||||
|
let faceReList = this.interfaceRes[key]
|
||||||
|
for (let i = 0; i < faceReList.length; i++) {
|
||||||
|
if (faceReList[i].relationField == model) {
|
||||||
|
let options = 'get' + key + 'Options';
|
||||||
|
if(this[options]){
|
||||||
|
this[options]()
|
||||||
|
}
|
||||||
|
this.changeData(key, index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeDataFormData(type, data, model,index,defaultValue) {
|
||||||
|
if(!this.isEdit) {
|
||||||
|
if (type == 2) {
|
||||||
|
for (let i = 0; i < this.dataForm[data].length; i++) {
|
||||||
|
if (index == -1) {
|
||||||
|
this.dataForm[data][i][model] = defaultValue
|
||||||
|
} else if (index == i) {
|
||||||
|
this.dataForm[data][i][model] = defaultValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dataForm[data] = defaultValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataAll(){
|
||||||
|
this.getenterpriseIdOptions();
|
||||||
|
},
|
||||||
|
getenterpriseIdOptions() {
|
||||||
|
const index = this.childIndex
|
||||||
|
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.enterpriseId))
|
||||||
|
for (let i = 0; i < templateJsonList.length; i++) {
|
||||||
|
let json = templateJsonList[i];
|
||||||
|
if(json.relationField){
|
||||||
|
let relationFieldAll = json.relationField.split("-");
|
||||||
|
let val = json.defaultValue;
|
||||||
|
if(relationFieldAll.length>1 && index>-1){
|
||||||
|
val = this.dataForm[relationFieldAll[0]+'List']&&this.dataForm[relationFieldAll[0]+'List'].length?this.dataForm[relationFieldAll[0]+'List'][index][relationFieldAll[1]]:''
|
||||||
|
}else {
|
||||||
|
val = this.dataForm[relationFieldAll]
|
||||||
|
}
|
||||||
|
json.defaultValue = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let template ={
|
||||||
|
paramList:templateJsonList
|
||||||
|
}
|
||||||
|
getDataInterfaceRes('563326097714841605',template).then(res => {
|
||||||
|
let data = res.data
|
||||||
|
this.enterpriseIdOptions = data
|
||||||
|
this.changeDataFormData(1,'enterpriseId','enterpriseId',index,'')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
clearData(){
|
||||||
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
||||||
|
},
|
||||||
|
init(id,isDetail,allList) {
|
||||||
|
this.prevDis = false
|
||||||
|
this.nextDis = false
|
||||||
|
this.allList = allList || []
|
||||||
|
if (allList.length) {
|
||||||
|
this.index = this.allList.findIndex(item => item.id === id)
|
||||||
|
if (this.index == 0) {
|
||||||
|
this.prevDis = true
|
||||||
|
}
|
||||||
|
if (this.index == this.allList.length - 1) {
|
||||||
|
this.nextDis = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.prevDis = true
|
||||||
|
this.nextDis = true
|
||||||
|
}
|
||||||
|
this.dataForm.id = id || 0;
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if(this.dataForm.id){
|
||||||
|
this.loading = true
|
||||||
|
request({
|
||||||
|
url: '/api/scm/Payment/'+this.dataForm.id,
|
||||||
|
method: 'get'
|
||||||
|
}).then(res => {
|
||||||
|
this.dataInfo(res.data)
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.clearData()
|
||||||
|
this.initDefaultData()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||||
|
},
|
||||||
|
//初始化默认数据
|
||||||
|
initDefaultData() {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit(type) {
|
||||||
|
this.dataFormSubmitType = type ? type : 0
|
||||||
|
this.$refs['formRef'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.request()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
request() {
|
||||||
|
let _data =this.dataList()
|
||||||
|
if (this.dataFormSubmitType == 2) {
|
||||||
|
this.continueBtnLoading = true
|
||||||
|
} else {
|
||||||
|
this.btnLoading = true
|
||||||
|
}
|
||||||
|
if (!this.dataForm.id) {
|
||||||
|
request({
|
||||||
|
url: '/api/scm/Payment',
|
||||||
|
method: 'post',
|
||||||
|
data: _data
|
||||||
|
}).then((res) => {
|
||||||
|
this.$message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1000,
|
||||||
|
onClose: () => {
|
||||||
|
if (this.dataFormSubmitType == 2) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.clearData()
|
||||||
|
this.initDefaultData()
|
||||||
|
})
|
||||||
|
this.continueBtnLoading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.visible = false
|
||||||
|
this.btnLoading = false
|
||||||
|
this.$emit('refresh', true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(()=>{
|
||||||
|
this.btnLoading = false
|
||||||
|
this.continueBtnLoading = false
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
request({
|
||||||
|
url: '/api/scm/Payment/'+this.dataForm.id,
|
||||||
|
method: 'PUT',
|
||||||
|
data: _data
|
||||||
|
}).then((res) => {
|
||||||
|
this.$message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1000,
|
||||||
|
onClose: () => {
|
||||||
|
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
|
||||||
|
this.visible = false
|
||||||
|
this.btnLoading = false
|
||||||
|
this.$emit('refresh', true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(()=>{
|
||||||
|
this.btnLoading = false
|
||||||
|
this.continueBtnLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openSelectDialog(key) {
|
||||||
|
this.currTableConf=this.addTableConf[key]
|
||||||
|
this.currVmodel=key
|
||||||
|
this.selectDialogVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.selectDialog.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addForSelect(data) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
let t = data[i]
|
||||||
|
if(this['get'+this.currVmodel]){
|
||||||
|
this['get'+this.currVmodel](t)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||||
|
let timeDataValue = null;
|
||||||
|
let timeValue = Number(timeValueData)
|
||||||
|
if (timeRule) {
|
||||||
|
if (timeType == 1) {
|
||||||
|
timeDataValue = timeValue
|
||||||
|
} else if (timeType == 2) {
|
||||||
|
timeDataValue = dataValue
|
||||||
|
} else if (timeType == 3) {
|
||||||
|
timeDataValue = new Date().getTime()
|
||||||
|
} else if (timeType == 4) {
|
||||||
|
let previousDate = '';
|
||||||
|
if (timeTarget == 1 || timeTarget == 2) {
|
||||||
|
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else if (timeTarget == 3) {
|
||||||
|
previousDate = getBeforeData(timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else {
|
||||||
|
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
|
||||||
|
}
|
||||||
|
} else if (timeType == 5) {
|
||||||
|
let previousDate = '';
|
||||||
|
if (timeTarget == 1 || timeTarget == 2) {
|
||||||
|
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else if (timeTarget == 3) {
|
||||||
|
previousDate = getLaterData(timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else {
|
||||||
|
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return timeDataValue;
|
||||||
|
},
|
||||||
|
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||||
|
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
|
||||||
|
let timeDataValue = null
|
||||||
|
if (timeRule) {
|
||||||
|
if (timeType == 1) {
|
||||||
|
timeDataValue = timeValue || '00:00:00'
|
||||||
|
if (timeDataValue.split(':').length == 3) {
|
||||||
|
timeDataValue = timeDataValue
|
||||||
|
} else {
|
||||||
|
timeDataValue = timeDataValue + ':00'
|
||||||
|
}
|
||||||
|
} else if (timeType == 2) {
|
||||||
|
timeDataValue = dataValue
|
||||||
|
} else if (timeType == 3) {
|
||||||
|
timeDataValue = this.jnpf.toDate(new Date(), format)
|
||||||
|
} else if (timeType == 4) {
|
||||||
|
let previousDate = '';
|
||||||
|
previousDate = getBeforeTime(timeTarget, timeValue)
|
||||||
|
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||||
|
} else if (timeType == 5) {
|
||||||
|
let previousDate = '';
|
||||||
|
previousDate = getLaterTime(timeTarget, timeValue)
|
||||||
|
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return timeDataValue;
|
||||||
|
},
|
||||||
|
dataList(){
|
||||||
|
var _data = this.dataForm;
|
||||||
|
return _data;
|
||||||
|
},
|
||||||
|
dataInfo(dataAll){
|
||||||
|
let _dataAll =dataAll
|
||||||
|
this.dataForm = _dataAll
|
||||||
|
this.isEdit = true
|
||||||
|
this.dataAll()
|
||||||
|
this.childIndex=-1
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,160 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="详情"
|
||||||
|
:close-on-click-modal="false" append-to-body
|
||||||
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
||||||
|
width="600px">
|
||||||
|
<el-row :gutter="15" class="">
|
||||||
|
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
|
||||||
|
<template v-if="!loading">
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="订单编号"
|
||||||
|
prop="orderNo" >
|
||||||
|
<p>{{dataForm.orderNo}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="微信订单号"
|
||||||
|
prop="transactionId" >
|
||||||
|
<p>{{dataForm.transactionId}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="支付方式"
|
||||||
|
prop="paymentType" >
|
||||||
|
<p>{{ dataForm.paymentType }} </p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="交易类型"
|
||||||
|
prop="tradeType" >
|
||||||
|
<p>{{ dataForm.tradeType }} </p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="交易状态"
|
||||||
|
prop="tradeState" >
|
||||||
|
<p>{{ dataForm.tradeState }} </p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="交易用户"
|
||||||
|
prop="openId" >
|
||||||
|
<p>{{dataForm.openId}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="交易金额(分)"
|
||||||
|
prop="payerTotal" >
|
||||||
|
<p>{{dataForm.payerTotal}}分</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="通知参数"
|
||||||
|
prop="content" >
|
||||||
|
<p>{{dataForm.content}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="创建用户"
|
||||||
|
prop="creatorUserId" >
|
||||||
|
<p>{{dataForm.creatorUserId}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item label="创建时间"
|
||||||
|
prop="creatorTime" >
|
||||||
|
<p>{{dataForm.creatorTime}}</p>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="visible = false"> 取 消</el-button>
|
||||||
|
</span>
|
||||||
|
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
import { getConfigData } from '@/api/onlineDev/visualDev'
|
||||||
|
import jnpf from '@/utils/jnpf'
|
||||||
|
import Detail from '@/views/basic/dynamicModel/list/detail'
|
||||||
|
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||||
|
export default {
|
||||||
|
components: { Detail},
|
||||||
|
props: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
detailVisible: false,
|
||||||
|
loading: false,
|
||||||
|
|
||||||
|
dataForm: {
|
||||||
|
id :'',
|
||||||
|
orderNo : '',
|
||||||
|
transactionId : '',
|
||||||
|
paymentType : "WXPAY",
|
||||||
|
tradeType : "NATIVE",
|
||||||
|
tradeState : "",
|
||||||
|
openId : '',
|
||||||
|
payerTotal : '',
|
||||||
|
content : '',
|
||||||
|
creatorUserId : '',
|
||||||
|
creatorTime : '',
|
||||||
|
},
|
||||||
|
paymentTypeOptions:[{"fullName":"微信支付","id":"WXPAY"}],
|
||||||
|
paymentTypeProps:{"label":"fullName","value":"id" },
|
||||||
|
tradeTypeOptions:[{"fullName":"扫码支付","id":"NATIVE"}],
|
||||||
|
tradeTypeProps:{"label":"fullName","value":"id" },
|
||||||
|
tradeStateOptions:[{"fullName":"成功","id":"SUCCESS"},{"fullName":"未支付","id":"NOTPAY"},{"fullName":"已关闭","id":"CLOSED"}],
|
||||||
|
tradeStateProps:{"label":"fullName","value":"id" },
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
toDetail(defaultValue, modelId) {
|
||||||
|
if (!defaultValue) return
|
||||||
|
getConfigData(modelId).then(res => {
|
||||||
|
if (!res.data || !res.data.formData) return
|
||||||
|
let formData = JSON.parse(res.data.formData)
|
||||||
|
formData.popupType = 'general'
|
||||||
|
this.detailVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.Detail.init(formData, modelId, defaultValue)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
dataInfo(dataAll){
|
||||||
|
let _dataAll =dataAll
|
||||||
|
this.dataForm = _dataAll
|
||||||
|
},
|
||||||
|
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || 0;
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if(this.dataForm.id){
|
||||||
|
this.loading = true
|
||||||
|
request({
|
||||||
|
url: '/api/scm/PaymentLog/detail/'+this.dataForm.id,
|
||||||
|
method: 'get'
|
||||||
|
}).then(res => {
|
||||||
|
this.dataInfo(res.data)
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,492 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-dialog :title="!dataForm.id ? '新建' :'编辑'"
|
||||||
|
:close-on-click-modal="false" append-to-body
|
||||||
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
||||||
|
width="600px">
|
||||||
|
<el-row :gutter="15" class="">
|
||||||
|
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right" >
|
||||||
|
<template v-if="!loading">
|
||||||
|
<!-- 具体表单 -->
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="订单编号" prop="orderNo" >
|
||||||
|
<JnpfInput v-model="dataForm.orderNo" @change="changeData('orderNo',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="微信订单号" prop="transactionId" >
|
||||||
|
<JnpfInput v-model="dataForm.transactionId" @change="changeData('transactionId',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="支付方式" prop="paymentType" >
|
||||||
|
<JnpfSelect v-model="dataForm.paymentType" @change="changeData('paymentType',-1)"
|
||||||
|
placeholder="请选择" clearable :style='{"width":"100%"}' :options="paymentTypeOptions" :props="paymentTypeProps" >
|
||||||
|
</JnpfSelect>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="交易类型" prop="tradeType" >
|
||||||
|
<JnpfSelect v-model="dataForm.tradeType" @change="changeData('tradeType',-1)"
|
||||||
|
placeholder="请选择" clearable :style='{"width":"100%"}' :options="tradeTypeOptions" :props="tradeTypeProps" >
|
||||||
|
</JnpfSelect>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="交易状态" prop="tradeState" >
|
||||||
|
<JnpfSelect v-model="dataForm.tradeState" @change="changeData('tradeState',-1)"
|
||||||
|
placeholder="请选择" clearable :style='{"width":"100%"}' :options="tradeStateOptions" :props="tradeStateProps" >
|
||||||
|
</JnpfSelect>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="交易用户" prop="openId" >
|
||||||
|
<JnpfInput v-model="dataForm.openId" @change="changeData('openId',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="交易金额(分)" prop="payerTotal" >
|
||||||
|
<JnpfInput v-model="dataForm.payerTotal" @change="changeData('payerTotal',-1)"
|
||||||
|
placeholder="请输入" addonAfter="分" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="通知参数" prop="content" >
|
||||||
|
<JnpfTextarea v-model="dataForm.content" @change="changeData('content',-1)"
|
||||||
|
placeholder="请输入" :style='{"width":"100%"}' true type="textarea" :autosize='{"minRows":4,"maxRows":4}' >
|
||||||
|
</JnpfTextarea>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="创建用户" prop="creatorUserId" >
|
||||||
|
<JnpfInput v-model="dataForm.creatorUserId" @change="changeData('creatorUserId',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" >
|
||||||
|
<jnpf-form-tip-item
|
||||||
|
label="创建时间" prop="creatorTime" >
|
||||||
|
<JnpfInput v-model="dataForm.creatorTime" @change="changeData('creatorTime',-1)"
|
||||||
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||||
|
</JnpfInput>
|
||||||
|
</jnpf-form-tip-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- 表单结束 -->
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
|
||||||
|
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/>
|
||||||
|
</el-row>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<div class="upAndDown-button" v-if="dataForm.id">
|
||||||
|
<el-button @click="prev" :disabled='prevDis'>
|
||||||
|
{{'上一条'}}
|
||||||
|
</el-button>
|
||||||
|
<el-button @click="next" :disabled='nextDis'>
|
||||||
|
{{'下一条'}}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit(2)" :loading="continueBtnLoading">
|
||||||
|
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-button>
|
||||||
|
<el-button @click="visible = false"> 取 消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"> 确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import request from '@/utils/request'
|
||||||
|
import {mapGetters} from "vuex";
|
||||||
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||||
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||||
|
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
|
||||||
|
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
|
||||||
|
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
|
||||||
|
import { thousandsFormat } from "@/components/Generator/utils/index"
|
||||||
|
export default {
|
||||||
|
components: { },
|
||||||
|
props: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataFormSubmitType: 0,
|
||||||
|
continueBtnLoading: false,
|
||||||
|
index: 0,
|
||||||
|
prevDis: false,
|
||||||
|
nextDis: false,
|
||||||
|
allList: [],
|
||||||
|
visible: false,
|
||||||
|
loading: false,
|
||||||
|
btnLoading: false,
|
||||||
|
formRef: 'formRef',
|
||||||
|
setting:{},
|
||||||
|
eventType: '',
|
||||||
|
userBoxVisible:false,
|
||||||
|
selectDialogVisible: false,
|
||||||
|
currTableConf:{},
|
||||||
|
dataValueAll:{},
|
||||||
|
addTableConf:{
|
||||||
|
},
|
||||||
|
//可选范围默认值
|
||||||
|
ableAll:{
|
||||||
|
},
|
||||||
|
tableRows:{
|
||||||
|
},
|
||||||
|
Vmodel:"",
|
||||||
|
currVmodel:"",
|
||||||
|
dataForm: {
|
||||||
|
orderNo : undefined,
|
||||||
|
transactionId : undefined,
|
||||||
|
paymentType : "WXPAY",
|
||||||
|
tradeType : "NATIVE",
|
||||||
|
tradeState : undefined,
|
||||||
|
openId : undefined,
|
||||||
|
payerTotal : undefined,
|
||||||
|
content : undefined,
|
||||||
|
creatorUserId : undefined,
|
||||||
|
creatorTime : undefined,
|
||||||
|
},
|
||||||
|
tableRequiredData: {},
|
||||||
|
dataRule:
|
||||||
|
{
|
||||||
|
payerTotal: [
|
||||||
|
{
|
||||||
|
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
|
||||||
|
message: '请输入正确的金额',
|
||||||
|
trigger: 'blur'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
paymentTypeOptions:[{"fullName":"微信支付","id":"WXPAY"}],
|
||||||
|
paymentTypeProps:{"label":"fullName","value":"id" },
|
||||||
|
tradeTypeOptions:[{"fullName":"扫码支付","id":"NATIVE"}],
|
||||||
|
tradeTypeProps:{"label":"fullName","value":"id" },
|
||||||
|
tradeStateOptions:[{"fullName":"成功","id":"SUCCESS"},{"fullName":"未支付","id":"NOTPAY"},{"fullName":"已关闭","id":"CLOSED"}],
|
||||||
|
tradeStateProps:{"label":"fullName","value":"id" },
|
||||||
|
childIndex:-1,
|
||||||
|
isEdit:false,
|
||||||
|
interfaceRes: {
|
||||||
|
orderNo:[] ,
|
||||||
|
transactionId:[] ,
|
||||||
|
paymentType:[] ,
|
||||||
|
tradeType:[] ,
|
||||||
|
tradeState:[] ,
|
||||||
|
openId:[] ,
|
||||||
|
payerTotal:[] ,
|
||||||
|
content:[] ,
|
||||||
|
creatorUserId:[] ,
|
||||||
|
creatorTime:[] ,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userInfo'])
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.dataAll()
|
||||||
|
this.initDefaultData()
|
||||||
|
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
prev() {
|
||||||
|
this.index--
|
||||||
|
if (this.index === 0) {
|
||||||
|
this.prevDis = true
|
||||||
|
}
|
||||||
|
this.nextDis = false
|
||||||
|
for (let index = 0; index < this.allList.length; index++) {
|
||||||
|
const element = this.allList[index];
|
||||||
|
if (this.index == index) {
|
||||||
|
this.getInfo(element.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
next() {
|
||||||
|
this.index++
|
||||||
|
if (this.index === this.allList.length - 1) {
|
||||||
|
this.nextDis = true
|
||||||
|
}
|
||||||
|
this.prevDis = false
|
||||||
|
for (let index = 0; index < this.allList.length; index++) {
|
||||||
|
const element = this.allList[index];
|
||||||
|
if (this.index == index) {
|
||||||
|
this.getInfo(element.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getInfo(id) {
|
||||||
|
request({
|
||||||
|
url: '/api/scm/PaymentLog/'+ id,
|
||||||
|
method: 'get'
|
||||||
|
}).then(res => {
|
||||||
|
this.dataInfo(res.data)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goBack() {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList', true)
|
||||||
|
},
|
||||||
|
changeData(model, index) {
|
||||||
|
this.isEdit = false
|
||||||
|
this.childIndex = index
|
||||||
|
let modelAll = model.split("-");
|
||||||
|
let faceMode = "";
|
||||||
|
for (let i = 0; i < modelAll.length; i++) {
|
||||||
|
faceMode += modelAll[i];
|
||||||
|
}
|
||||||
|
for (let key in this.interfaceRes) {
|
||||||
|
if (key != faceMode) {
|
||||||
|
let faceReList = this.interfaceRes[key]
|
||||||
|
for (let i = 0; i < faceReList.length; i++) {
|
||||||
|
if (faceReList[i].relationField == model) {
|
||||||
|
let options = 'get' + key + 'Options';
|
||||||
|
if(this[options]){
|
||||||
|
this[options]()
|
||||||
|
}
|
||||||
|
this.changeData(key, index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeDataFormData(type, data, model,index,defaultValue) {
|
||||||
|
if(!this.isEdit) {
|
||||||
|
if (type == 2) {
|
||||||
|
for (let i = 0; i < this.dataForm[data].length; i++) {
|
||||||
|
if (index == -1) {
|
||||||
|
this.dataForm[data][i][model] = defaultValue
|
||||||
|
} else if (index == i) {
|
||||||
|
this.dataForm[data][i][model] = defaultValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dataForm[data] = defaultValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dataAll(){
|
||||||
|
},
|
||||||
|
clearData(){
|
||||||
|
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
|
||||||
|
},
|
||||||
|
init(id,isDetail,allList) {
|
||||||
|
this.prevDis = false
|
||||||
|
this.nextDis = false
|
||||||
|
this.allList = allList || []
|
||||||
|
if (allList.length) {
|
||||||
|
this.index = this.allList.findIndex(item => item.id === id)
|
||||||
|
if (this.index == 0) {
|
||||||
|
this.prevDis = true
|
||||||
|
}
|
||||||
|
if (this.index == this.allList.length - 1) {
|
||||||
|
this.nextDis = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.prevDis = true
|
||||||
|
this.nextDis = true
|
||||||
|
}
|
||||||
|
this.dataForm.id = id || 0;
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if(this.dataForm.id){
|
||||||
|
this.loading = true
|
||||||
|
request({
|
||||||
|
url: '/api/scm/PaymentLog/'+this.dataForm.id,
|
||||||
|
method: 'get'
|
||||||
|
}).then(res => {
|
||||||
|
this.dataInfo(res.data)
|
||||||
|
this.loading = false
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.clearData()
|
||||||
|
this.initDefaultData()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||||
|
},
|
||||||
|
//初始化默认数据
|
||||||
|
initDefaultData() {
|
||||||
|
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit(type) {
|
||||||
|
this.dataFormSubmitType = type ? type : 0
|
||||||
|
this.$refs['formRef'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.request()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
request() {
|
||||||
|
let _data =this.dataList()
|
||||||
|
if (this.dataFormSubmitType == 2) {
|
||||||
|
this.continueBtnLoading = true
|
||||||
|
} else {
|
||||||
|
this.btnLoading = true
|
||||||
|
}
|
||||||
|
if (!this.dataForm.id) {
|
||||||
|
request({
|
||||||
|
url: '/api/scm/PaymentLog',
|
||||||
|
method: 'post',
|
||||||
|
data: _data
|
||||||
|
}).then((res) => {
|
||||||
|
this.$message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1000,
|
||||||
|
onClose: () => {
|
||||||
|
if (this.dataFormSubmitType == 2) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.clearData()
|
||||||
|
this.initDefaultData()
|
||||||
|
})
|
||||||
|
this.continueBtnLoading = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.visible = false
|
||||||
|
this.btnLoading = false
|
||||||
|
this.$emit('refresh', true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(()=>{
|
||||||
|
this.btnLoading = false
|
||||||
|
this.continueBtnLoading = false
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
request({
|
||||||
|
url: '/api/scm/PaymentLog/'+this.dataForm.id,
|
||||||
|
method: 'PUT',
|
||||||
|
data: _data
|
||||||
|
}).then((res) => {
|
||||||
|
this.$message({
|
||||||
|
message: res.msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1000,
|
||||||
|
onClose: () => {
|
||||||
|
if (this.dataFormSubmitType == 2) return this.continueBtnLoading = false
|
||||||
|
this.visible = false
|
||||||
|
this.btnLoading = false
|
||||||
|
this.$emit('refresh', true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(()=>{
|
||||||
|
this.btnLoading = false
|
||||||
|
this.continueBtnLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
openSelectDialog(key) {
|
||||||
|
this.currTableConf=this.addTableConf[key]
|
||||||
|
this.currVmodel=key
|
||||||
|
this.selectDialogVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.selectDialog.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addForSelect(data) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
let t = data[i]
|
||||||
|
if(this['get'+this.currVmodel]){
|
||||||
|
this['get'+this.currVmodel](t)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
|
||||||
|
let timeDataValue = null;
|
||||||
|
let timeValue = Number(timeValueData)
|
||||||
|
if (timeRule) {
|
||||||
|
if (timeType == 1) {
|
||||||
|
timeDataValue = timeValue
|
||||||
|
} else if (timeType == 2) {
|
||||||
|
timeDataValue = dataValue
|
||||||
|
} else if (timeType == 3) {
|
||||||
|
timeDataValue = new Date().getTime()
|
||||||
|
} else if (timeType == 4) {
|
||||||
|
let previousDate = '';
|
||||||
|
if (timeTarget == 1 || timeTarget == 2) {
|
||||||
|
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else if (timeTarget == 3) {
|
||||||
|
previousDate = getBeforeData(timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else {
|
||||||
|
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
|
||||||
|
}
|
||||||
|
} else if (timeType == 5) {
|
||||||
|
let previousDate = '';
|
||||||
|
if (timeTarget == 1 || timeTarget == 2) {
|
||||||
|
previousDate = getDateDay(timeTarget, timeType, timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else if (timeTarget == 3) {
|
||||||
|
previousDate = getLaterData(timeValue)
|
||||||
|
timeDataValue = new Date(previousDate).getTime()
|
||||||
|
} else {
|
||||||
|
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return timeDataValue;
|
||||||
|
},
|
||||||
|
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
|
||||||
|
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
|
||||||
|
let timeDataValue = null
|
||||||
|
if (timeRule) {
|
||||||
|
if (timeType == 1) {
|
||||||
|
timeDataValue = timeValue || '00:00:00'
|
||||||
|
if (timeDataValue.split(':').length == 3) {
|
||||||
|
timeDataValue = timeDataValue
|
||||||
|
} else {
|
||||||
|
timeDataValue = timeDataValue + ':00'
|
||||||
|
}
|
||||||
|
} else if (timeType == 2) {
|
||||||
|
timeDataValue = dataValue
|
||||||
|
} else if (timeType == 3) {
|
||||||
|
timeDataValue = this.jnpf.toDate(new Date(), format)
|
||||||
|
} else if (timeType == 4) {
|
||||||
|
let previousDate = '';
|
||||||
|
previousDate = getBeforeTime(timeTarget, timeValue)
|
||||||
|
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||||
|
} else if (timeType == 5) {
|
||||||
|
let previousDate = '';
|
||||||
|
previousDate = getLaterTime(timeTarget, timeValue)
|
||||||
|
timeDataValue = this.jnpf.toDate(previousDate, format)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return timeDataValue;
|
||||||
|
},
|
||||||
|
dataList(){
|
||||||
|
var _data = this.dataForm;
|
||||||
|
return _data;
|
||||||
|
},
|
||||||
|
dataInfo(dataAll){
|
||||||
|
let _dataAll =dataAll
|
||||||
|
this.dataForm = _dataAll
|
||||||
|
this.isEdit = true
|
||||||
|
this.dataAll()
|
||||||
|
this.childIndex=-1
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue