[update]-代码优化
This commit is contained in:
@@ -108,8 +108,8 @@
|
||||
|
||||
<a @click="handleDetail(record)">查看</a>
|
||||
|
||||
<!-- 已绑定的证书不能续费 已支付已缴费的不能续费 需要流程走完才能续费 v-has="'vin:renew'"-->
|
||||
<a v-if="(Number(record.certificateStatus) === 4 ||Number(record.certificateStatus) === 5 || Number(record.certificateStatus) === 7) && isMemberFlag " @click="renewCharge(record)">续费</a>
|
||||
<!-- 已绑定的证书不能续费 已支付已缴费的不能续费 需要流程走完才能续费 -->
|
||||
<a v-if="(Number(record.certificateStatus) === 4 || Number(record.certificateStatus) === 5) && isMemberFlag " @click="renewCharge(record)">续费</a>
|
||||
|
||||
<a v-if="(isMemberFlag && (record.certificateStatus == 6 && record.chargeType == 2) || record.certificateStatus == 0) && record.paymentStatus !== 4" @click="handleEditRenew(record)">编辑</a>
|
||||
<!-- 会员 只有企业证书才 正常使用 已绑定的证书 可授权申请-->
|
||||
@@ -159,7 +159,7 @@
|
||||
<!-- 换证 窗口--已弃用---->
|
||||
<replace-ment-model ref="replaceMentModelForm" @ok="modalFormOk" @affirm="handleAffirm"></replace-ment-model>
|
||||
|
||||
<!-- 换证确认 窗口-->
|
||||
<!-- 换证确认 窗口--已弃用-->
|
||||
<replace-ment-affirm-model ref="replaceMentAffirmModelForm"></replace-ment-affirm-model>
|
||||
|
||||
<!-- 新建VIN证书申请 免费额度内 窗口-->
|
||||
@@ -171,7 +171,7 @@
|
||||
<!-- 免费证书申请编辑 窗口-->
|
||||
<free-certificate-edit-model ref="freeCertificateEditModel" @ok="modalFormOk"></free-certificate-edit-model>
|
||||
|
||||
<!-- 免费证书申请换证 窗口-->
|
||||
<!-- 免费证书申请换证 窗口 --已弃用-->
|
||||
<free-certificate-replace-edit-model
|
||||
ref="FreeCertificateReplaceEditModel"
|
||||
@ok="modalFormOk"
|
||||
@@ -519,11 +519,7 @@ export default {
|
||||
},
|
||||
// 续费
|
||||
renewCharge: function (record) {
|
||||
// if(!(record.chargeType != 1 && record.certificateModality == 3 && record.certificateStatus == 5)){
|
||||
// return;
|
||||
// }
|
||||
this.$refs.renewChargeModelForm.edit(record)
|
||||
|
||||
},
|
||||
// 换证
|
||||
replacement: function (record) {
|
||||
|
||||
@@ -1095,11 +1095,6 @@ export default {
|
||||
that.form.validateFields(async(err, values) => {
|
||||
if (!err) {
|
||||
// 校验缴费凭证 或打包协议必填
|
||||
// if(this.paymentMethodFlag && !values.paymentRecord){
|
||||
// // 选择了打包协议
|
||||
// this.$message.warning('请上传打包协议')
|
||||
// return
|
||||
// }
|
||||
if(!this.paymentMethodFlag && !values.paymentRecord) {
|
||||
this.$message.warning('请上传缴费凭证/付款说明')
|
||||
return
|
||||
@@ -1169,7 +1164,7 @@ export default {
|
||||
// this.model.paymentStatus = 1
|
||||
}
|
||||
|
||||
const formData = Object.assign(this.model, values)
|
||||
const formData = Object.assign({}, this.model, values)
|
||||
// 客户要去掉网员服务费字段,但是后端没有去掉校验,所以前端写死
|
||||
formData.serviceCharge = 0
|
||||
if (this.typeFlag) {
|
||||
@@ -1217,7 +1212,7 @@ export default {
|
||||
}
|
||||
|
||||
this.model.paymentStatus = 0
|
||||
const formData = Object.assign(this.model, values)
|
||||
const formData = Object.assign({}, this.model, values)
|
||||
// 客户要去掉网员服务费字段,但是后端没有去掉校验,所以前端写死
|
||||
formData.serviceCharge = 0
|
||||
if (this.typeFlag) {
|
||||
@@ -1225,6 +1220,10 @@ export default {
|
||||
} else {
|
||||
formData.paymentType = 0
|
||||
}
|
||||
//todo 如果有 证书缴费的金额,暂存的时候 certificateStatus = 0 目前后端并没有作用
|
||||
if(formData.certificatePaymentAmount) {
|
||||
formData.certificateStatus = 0
|
||||
}
|
||||
console.log('表单提交数据', formData)
|
||||
httpAction(httpurl, formData, method).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -80,16 +80,12 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-5 column">
|
||||
<p></p>
|
||||
<b><p>证书历史信息</p></b>
|
||||
<p>--------------------------------------------------</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-divider orientation="left">
|
||||
证书历史信息
|
||||
</a-divider>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="table-page-search-wrapper">
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-11 column">
|
||||
@@ -135,7 +131,7 @@ export default {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
pageType: 1,
|
||||
width: 1350,
|
||||
form: this.$form.createForm(this),
|
||||
// 角色码
|
||||
isMember: Vue.ls.get(USER_INFO).roleCode,
|
||||
@@ -175,7 +171,7 @@ export default {
|
||||
dataIndex: 'effectDate',
|
||||
customRender: function(text) {
|
||||
if (text == null) {
|
||||
return '------------'
|
||||
return '--'
|
||||
} else {
|
||||
return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
}
|
||||
@@ -187,7 +183,7 @@ export default {
|
||||
dataIndex: 'invalidDate',
|
||||
customRender: function(text) {
|
||||
if (text == null) {
|
||||
return '------------'
|
||||
return '--'
|
||||
} else {
|
||||
return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text)
|
||||
}
|
||||
@@ -196,15 +192,14 @@ export default {
|
||||
{
|
||||
title: '快递公司',
|
||||
align: 'center',
|
||||
dataIndex: 'sendMethod',
|
||||
customRender: function(text) {
|
||||
if (text === 1) {
|
||||
return 'EMS'
|
||||
} else if (text === 2) {
|
||||
return '顺丰'
|
||||
}
|
||||
}
|
||||
}],
|
||||
dataIndex: 'sendMethod_dictText'
|
||||
},
|
||||
{
|
||||
title: '快递单号',
|
||||
align: 'center',
|
||||
dataIndex: 'postNo'
|
||||
}
|
||||
],
|
||||
// VIN证书历史数据源
|
||||
vinCertificateHistoryDataSource: [],
|
||||
// 页面分页信息
|
||||
@@ -221,18 +216,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
if (this.pageType === 14) {
|
||||
return 400
|
||||
}
|
||||
if (this.pageType !== 4) {
|
||||
return 1350
|
||||
} else {
|
||||
return 650
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
check(val) {
|
||||
this.form.resetFields()
|
||||
@@ -240,7 +223,7 @@ export default {
|
||||
this.paymentSearchQuery()
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model, 'certificateImg', 'certificateValidDate', 'companyName', 'certificationDate', 'certificateType', 'certificateStatus', 'code',))
|
||||
this.form.setFieldsValue(pick(this.model, 'companyName', 'certificateType', 'code', 'certificateValidDate', 'certificateImg'))
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
@@ -249,7 +232,6 @@ export default {
|
||||
// 获取证书历史数据源
|
||||
paymentSearchQuery() {
|
||||
const params = `certificateId=${this.model.id}&pageNo=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`
|
||||
// const params = 'certificateId=' + this.vinCertificate.id + '&pageNo=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
|
||||
getAction('/vinCertificateHistory/vinCertificateHistory/list?' + params).then((res) => {
|
||||
this.vinCertificateHistoryDataSource = res.result.records
|
||||
this.ipagination.total = res.result.total
|
||||
@@ -331,19 +313,4 @@ export default {
|
||||
background: #8a8c8e;
|
||||
}
|
||||
|
||||
.transalte-y-10 {
|
||||
transform: translateY(10px);
|
||||
}
|
||||
|
||||
.apply-notice {
|
||||
color: #f5222d;
|
||||
}
|
||||
|
||||
.apply-code-notice {
|
||||
color: #f5222d;
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
left: 25%
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -72,7 +72,7 @@
|
||||
<a-form-item label="联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
:maxLength="50"
|
||||
:disabled="selectTypeDisabled"
|
||||
disabled
|
||||
v-model="model.liaisonMan"
|
||||
placeholder="请输入联系人"></a-input>
|
||||
</a-form-item>
|
||||
@@ -84,7 +84,7 @@
|
||||
<a-form-item label="手机" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
:maxLength="50"
|
||||
:disabled="selectTypeDisabled"
|
||||
disabled
|
||||
v-model="model.mobile"
|
||||
placeholder="请输入手机号"
|
||||
></a-input>
|
||||
@@ -94,7 +94,7 @@
|
||||
<a-form-item label="缴费日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-date
|
||||
date-format="YYYY-MM-DD HH:mm:ss"
|
||||
placeholder="请选择缴费时间"
|
||||
placeholder="请选择缴费日期"
|
||||
v-decorator="['submissionTime',validatorRules.submissionTime]"
|
||||
:trigger-change="true"
|
||||
style="width: 100%"/>
|
||||
@@ -292,7 +292,7 @@ export default {
|
||||
confirmLoading: false,
|
||||
// 验证单位名称与发票抬头是否一致
|
||||
validateCompanyNameFlag:false,
|
||||
pageType: 7,
|
||||
width: 1350,
|
||||
// 记录续费证书选择
|
||||
selectType: 1,
|
||||
// 当前选中的发票类型
|
||||
@@ -315,15 +315,6 @@ export default {
|
||||
// 所有获取的相关信息
|
||||
model: {},
|
||||
validatorRules: {
|
||||
defaultRules: {
|
||||
rules: [{ required: true, message: '请选择' },
|
||||
{ min: 1, max: 50, message: '长度不超过50个字符', validateTrigger: 'blur' }
|
||||
]
|
||||
},
|
||||
unBindId: {
|
||||
rules: [{ required: true, message: '请选择要解绑的证书' }
|
||||
]
|
||||
},
|
||||
companyName: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入单位全称!' },
|
||||
@@ -463,11 +454,7 @@ export default {
|
||||
depositBank: { rules: [{ required: true, message: '请输入开户银行' }], validateTrigger: 'blur' },
|
||||
bankAccount: { rules: [{ required: true, message: '请输入银行账户' }], validateTrigger: 'blur' },
|
||||
linkBankNumber: { rules: [{ required: true, message: '请输入联行号' }], validateTrigger: 'blur' },
|
||||
reasonsRenewal: {
|
||||
rules: [{
|
||||
required: true, message: '请至少选择一个换证原因!'
|
||||
}]
|
||||
},
|
||||
|
||||
sendMethod: { rules: [{ required: false, message: '请选择快递公司' }], validateTrigger: 'change' },
|
||||
postNo: { rules: [{ required: false, message: '请输入邮寄单号' }], validateTrigger: 'blur' }
|
||||
},
|
||||
@@ -521,24 +508,6 @@ export default {
|
||||
validateCompanyName() {
|
||||
this.validateCompanyNameFlag = this.form.getFieldValue('headerName') === this.model.companyName
|
||||
},
|
||||
/*
|
||||
* 续费选择换证
|
||||
* */
|
||||
selectcertificateType(val) {
|
||||
this.selectType = val
|
||||
// 记录原始的证书形式
|
||||
const originType = this.model.certificateType
|
||||
// 记录原始的证书代码
|
||||
this.form.resetFields('reasonsRenewal')
|
||||
const originCode = this.model.code
|
||||
if (val !== originType.toString()) {
|
||||
this.selectTypeDisabled = false
|
||||
this.model.code = ''
|
||||
} else {
|
||||
this.selectTypeDisabled = true
|
||||
this.model.code = originCode
|
||||
}
|
||||
},
|
||||
// 提交- 证书续费
|
||||
renewChargeCertificate() {
|
||||
this.handleRenewChargeCertificateOk()
|
||||
@@ -660,18 +629,6 @@ export default {
|
||||
this.visible = false
|
||||
this.currentSelectInvoiceType = ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
if (this.pageType === 14) {
|
||||
return 400
|
||||
}
|
||||
if (this.pageType !== 4) {
|
||||
return 1350
|
||||
} else {
|
||||
return 650
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user