Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
EcomWeb
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
zhanbo.xu
2025-03-18 15:42:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
47f7adcc2ac6e91c3ef96b83cbd516f02347d7c8
47f7adcc
1 parent
9167639a
增加详情接口
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
529 additions
and
266 deletions
src/api/custom-api.js
src/api/system/customer-ai.js
src/views/arrival-declare/dialog.vue
src/views/customerConfig/dialog.vue
src/views/customerConfig/index.vue
src/api/custom-api.js
View file @
47f7adc
import
request
from
'@/utils/request'
import
request
from
"@/utils/request"
;
//获取自定义设置数据
/**
...
...
@@ -6,11 +6,15 @@ import request from '@/utils/request'
* @param queryType * 查询分类(1#查询条件,2#显示及导出)
*/
export
function
getCustomData
(
data
)
{
return
request
({
url
:
'/bus-employees/custom/setting/pool/query/'
+
data
.
queryType
+
'/'
+
data
.
belongBizType
,
method
:
'get'
,
data
:
data
,
})
return
request
({
url
:
"/bus-employees/custom/setting/pool/query/"
+
data
.
queryType
+
"/"
+
data
.
belongBizType
,
method
:
"get"
,
data
:
data
,
});
}
//保存自定义设置数据
...
...
@@ -25,11 +29,11 @@ export function getCustomData(data) {
* poolCode 对应在待选池里的ID(source.poolCode) } }
*/
export
function
setCustomData
(
data
)
{
return
request
({
url
:
'/bus-employees/custom/setting/pool/merge'
,
method
:
'post'
,
data
:
data
,
})
return
request
({
url
:
"/bus-employees/custom/setting/pool/merge"
,
method
:
"post"
,
data
:
data
,
});
}
//获取查询条件数据
...
...
@@ -37,11 +41,11 @@ export function setCustomData(data) {
* @param belongBizType * 所属业务功能类型(11#员工端预审,12#员工端站点,13#员工端口岸,14#员工端运单查询)
*/
export
function
getSreachFormData
(
data
)
{
return
request
({
url
:
'/bus-employees/custom/setting/condition/'
+
data
.
belongBizType
,
method
:
'get'
,
data
:
data
,
})
return
request
({
url
:
"/bus-employees/custom/setting/condition/"
+
data
.
belongBizType
,
method
:
"get"
,
data
:
data
,
});
}
//获取表头数据
...
...
@@ -49,11 +53,11 @@ export function getSreachFormData(data) {
* @param belongBizType * 所属业务功能类型(11#员工端预审,12#员工端站点,13#员工端口岸,14#员工端运单查询)
*/
export
function
getTableData
(
data
)
{
return
request
({
url
:
'/bus-employees/custom/setting/display/'
+
data
.
belongBizType
,
method
:
'get'
,
data
:
data
,
})
return
request
({
url
:
"/bus-employees/custom/setting/display/"
+
data
.
belongBizType
,
method
:
"get"
,
data
:
data
,
});
}
//自定义查询接口
...
...
@@ -72,18 +76,18 @@ export function getTableData(data) {
* @param osprVaildFlag 站点页面操作ospr功能
*/
export
function
auditionEntrySreachCustomData
(
data
)
{
return
request
({
url
:
'/bus-employees'
+
data
.
url
,
method
:
'post'
,
data
:
data
.
data
,
})
return
request
({
url
:
"/bus-employees"
+
data
.
url
,
method
:
"post"
,
data
:
data
.
data
,
});
}
//获取查询导出是否完成
export
function
getdownloadExlFileType
(
data
)
{
return
request
({
url
:
'/bus-employees/export/custom/exportResult?exportSign='
+
data
,
method
:
'get'
,
data
:
data
,
})
}
\ No newline at end of file
return
request
({
url
:
"/bus-employees/export/custom/exportResult?exportSign="
+
data
,
method
:
"get"
,
data
:
data
,
});
}
...
...
src/api/system/customer-ai.js
View file @
47f7adc
import
request
from
'@/utils/request'
import
request
from
"@/utils/request"
;
import
axios
from
"axios"
;
const
baseUrl
=
process
.
env
.
VUE_APP_BASE_API
;
//接口地址
...
...
@@ -15,11 +15,11 @@ const baseUrl = process.env.VUE_APP_BASE_API; //接口地址
* @param pageSize *
*/
export
function
getCustomerList
(
data
)
{
return
request
({
url
:
'/bus-customer/customers/getCustomerList'
,
method
:
'post'
,
data
:
data
})
return
request
({
url
:
"/bus-customer/customers/getCustomerList"
,
method
:
"post"
,
data
:
data
,
});
}
// 新增客户数据
...
...
@@ -37,123 +37,118 @@ export function getCustomerList(data) {
* @param qingdaoUserId 青岛用户ID
*/
export
function
addCustomerData
(
data
)
{
// let formData = new FormData
// formData.append("beijingDxpid", data.beijingDxpid);
// formData.append("certificare", data.certificare);
// formData.append("clientId", data.clientId);
// formData.append("ecomEntCode", data.ecomEntCode);
// formData.append("ecomEntEmail", data.ecomEntEmail);
// formData.append("orderRequester", data.orderRequester);
// formData.append("qingdaoDanyiUserDxpid", data.qingdaoDanyiUserDxpid);
// formData.append("qingdaoKey", data.qingdaoKey);
// formData.append("qingdaoUserDxpid", data.qingdaoUserDxpid);
// formData.append("qingdaoUserId", data.qingdaoUserId);
console
.
log
(
data
);
return
request
({
url
:
'/bus-customer/customers/add'
,
method
:
'post'
,
data
:
data
})
// let formData = new FormData
// formData.append("beijingDxpid", data.beijingDxpid);
// formData.append("certificare", data.certificare);
// formData.append("clientId", data.clientId);
// formData.append("ecomEntCode", data.ecomEntCode);
// formData.append("ecomEntEmail", data.ecomEntEmail);
// formData.append("orderRequester", data.orderRequester);
// formData.append("qingdaoDanyiUserDxpid", data.qingdaoDanyiUserDxpid);
// formData.append("qingdaoKey", data.qingdaoKey);
// formData.append("qingdaoUserDxpid", data.qingdaoUserDxpid);
// formData.append("qingdaoUserId", data.qingdaoUserId);
console
.
log
(
data
);
return
request
({
url
:
"/bus-customer/customers/add"
,
method
:
"post"
,
data
:
data
,
});
}
//上传证书
export
function
uploadCertificate
(
ecomEntCode
,
certificate
)
{
const
formData
=
new
FormData
();
formData
.
append
(
'certificate'
,
certificate
);
formData
.
append
(
'ecomEntCode'
,
ecomEntCode
);
return
request
({
url
:
'/bus-customer/customers/uploadCertificate'
,
method
:
'post'
,
data
:
formData
,
});
const
formData
=
new
FormData
();
formData
.
append
(
"certificate"
,
certificate
);
formData
.
append
(
"ecomEntCode"
,
ecomEntCode
);
return
request
({
url
:
"/bus-customer/customers/uploadCertificate"
,
method
:
"post"
,
data
:
formData
,
});
}
//上传青岛证书
export
function
uploadQingdaoCertificate
(
ecomEntCode
,
certificate
)
{
const
formData
=
new
FormData
();
formData
.
append
(
'certificate'
,
certificate
);
formData
.
append
(
'ecomEntCode'
,
ecomEntCode
);
return
request
({
url
:
'/bus-customer/customers/uploadQingDaoCertificate'
,
method
:
'post'
,
data
:
formData
,
});
const
formData
=
new
FormData
();
formData
.
append
(
"certificate"
,
certificate
);
formData
.
append
(
"ecomEntCode"
,
ecomEntCode
);
return
request
({
url
:
"/bus-customer/customers/uploadQingDaoCertificate"
,
method
:
"post"
,
data
:
formData
,
});
}
//删除证书
export
function
delCertificate
(
id
,
certificate
)
{
return
request
({
url
:
'/bus-customer/customers/deleteCertificate'
,
method
:
'post'
,
params
:
{
id
:
id
,
certificate
:
certificate
},
});
return
request
({
url
:
"/bus-customer/customers/deleteCertificate"
,
method
:
"post"
,
params
:
{
id
:
id
,
certificate
:
certificate
},
});
}
//删除青岛证书
export
function
delQingdaoCertificate
(
id
,
certificate
)
{
return
request
({
url
:
'/bus-customer/customers/deleteQingdaoCertificate'
,
method
:
'post'
,
params
:
{
id
:
id
,
certificatePath
:
certificate
},
});
return
request
({
url
:
"/bus-customer/customers/deleteQingdaoCertificate"
,
method
:
"post"
,
params
:
{
id
:
id
,
certificatePath
:
certificate
},
});
}
//下载证书
export
function
downloadCertificate
(
id
,
filename
)
{
console
.
log
(
"fileName"
+
filename
);
return
new
Promise
((
resolve
,
reject
)
=>
{
// axios({
// method: "get",
// url: '/bus-customer/customers/getCertificate/' + id,
// responseType: "blob",
// })
var
url
=
baseUrl
+
'/bus-customer/customers/getCertificate/'
+
id
;
request
({
url
:
url
,
method
:
'get'
,
responseType
:
'blob'
,
// 确保响应类型为 blob
params
:
id
,
})
.
then
((
res
)
=>
{
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
URL
.
createObjectURL
(
res
);
aLink
.
setAttribute
(
"download"
,
filename
);
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
);
aLink
.
click
();
document
.
body
.
removeChild
(
aLink
);
resolve
(
res
);
})
.
catch
((
err
)
=>
{
reject
(
err
);
});
export
function
downloadCertificate
(
id
,
filename
)
{
console
.
log
(
"fileName"
+
filename
);
return
new
Promise
((
resolve
,
reject
)
=>
{
// axios({
// method: "get",
// url: '/bus-customer/customers/getCertificate/' + id,
// responseType: "blob",
// })
var
url
=
baseUrl
+
"/bus-customer/customers/getCertificate/"
+
id
;
request
({
url
:
url
,
method
:
"get"
,
responseType
:
"blob"
,
// 确保响应类型为 blob
params
:
id
,
})
.
then
((
res
)
=>
{
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
URL
.
createObjectURL
(
res
);
aLink
.
setAttribute
(
"download"
,
filename
);
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
);
aLink
.
click
();
document
.
body
.
removeChild
(
aLink
);
resolve
(
res
);
})
.
catch
((
err
)
=>
{
reject
(
err
);
});
});
}
//下载青岛证书
export
function
downloadQingdaoCertificate
(
id
,
filename
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
url
=
baseUrl
+
'/bus-customer/customers/getQingDaoCertificate/'
+
id
;
request
({
url
:
url
,
method
:
'get'
,
responseType
:
'blob'
,
// 确保响应类型为 blob
params
:
id
,
})
.
then
((
res
)
=>
{
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
URL
.
createObjectURL
(
res
);
aLink
.
setAttribute
(
"download"
,
filename
);
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
);
aLink
.
click
();
document
.
body
.
removeChild
(
aLink
);
resolve
(
res
);
})
.
catch
((
err
)
=>
{
reject
(
err
);
});
export
function
downloadQingdaoCertificate
(
id
,
filename
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
var
url
=
baseUrl
+
"/bus-customer/customers/getQingDaoCertificate/"
+
id
;
request
({
url
:
url
,
method
:
"get"
,
responseType
:
"blob"
,
// 确保响应类型为 blob
params
:
id
,
})
.
then
((
res
)
=>
{
const
aLink
=
document
.
createElement
(
"a"
);
aLink
.
href
=
URL
.
createObjectURL
(
res
);
aLink
.
setAttribute
(
"download"
,
filename
);
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
);
aLink
.
click
();
document
.
body
.
removeChild
(
aLink
);
resolve
(
res
);
})
.
catch
((
err
)
=>
{
reject
(
err
);
});
});
}
// 修改客户数据
...
...
@@ -172,21 +167,39 @@ export function downloadQingdaoCertificate(id,filename) {
* @param qingdaoUserId 青岛用户ID
*/
export
function
updateCustomerData
(
data
)
{
// let formData = new FormData
// formData.append("id", data.id);
// formData.append("beijingDxpid", data.beijingDxpid);
// formData.append("certificare", data.certificare);
// formData.append("clientId", data.clientId);
// formData.append("ecomEntCode", data.ecomEntCode);
// formData.append("ecomEntEmail", data.ecomEntEmail);
// formData.append("orderRequester", data.orderRequester);
// formData.append("qingdaoDanyiUserDxpid", data.qingdaoDanyiUserDxpid);
// formData.append("qingdaoKey", data.qingdaoKey);
// formData.append("qingdaoUserDxpid", data.qingdaoUserDxpid);
// formData.append("qingdaoUserId", data.qingdaoUserId);
return
request
({
url
:
'/bus-customer/customers/update'
,
method
:
'put'
,
data
:
data
})
}
\ No newline at end of file
// let formData = new FormData
// formData.append("id", data.id);
// formData.append("beijingDxpid", data.beijingDxpid);
// formData.append("certificare", data.certificare);
// formData.append("clientId", data.clientId);
// formData.append("ecomEntCode", data.ecomEntCode);
// formData.append("ecomEntEmail", data.ecomEntEmail);
// formData.append("orderRequester", data.orderRequester);
// formData.append("qingdaoDanyiUserDxpid", data.qingdaoDanyiUserDxpid);
// formData.append("qingdaoKey", data.qingdaoKey);
// formData.append("qingdaoUserDxpid", data.qingdaoUserDxpid);
// formData.append("qingdaoUserId", data.qingdaoUserId);
return
request
({
url
:
"/bus-customer/customers/update"
,
method
:
"put"
,
data
:
data
,
});
}
// /portInfo
export
function
getPortInfo
(
data
)
{
return
request
({
url
:
"/bus-customer/portInfo"
,
method
:
"get"
,
data
:
data
,
});
}
// GET
// /customers/customerDetails/{id}
// 获取客户详情
export
function
getCustomerDetails
(
data
)
{
return
request
({
url
:
"/bus-customer/customers/customerDetails/"
+
data
.
id
,
method
:
"get"
,
});
}
...
...
src/views/arrival-declare/dialog.vue
View file @
47f7adc
...
...
@@ -4,7 +4,7 @@
title="运抵单申报"
:visible.sync="outerVisible"
:show-close="false"
width="
40%
"
width="
720px
"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
...
...
@@ -31,9 +31,9 @@
>
<el-option
v-for="item in operatorCode"
:key="item"
:label="item"
:value="item"
:key="item
.operatorCode
"
:label="item
.operatorName
"
:value="item
.operatorCode
"
></el-option>
</el-select>
</Formitem>
...
...
src/views/customerConfig/dialog.vue
View file @
47f7adc
...
...
@@ -26,14 +26,26 @@
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-ecomEntCode"
id="inputInner-edit-ecomEntCode
Rule
"
resize="none"
v-model="formData.ecomEntCode"
clearable
placeholder=""
></el-input>
</Formitem>
<!-- <Formitem label="电商企业代码" prop="ecomEntCode">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-ecomEntCode"
resize="none"
v-model="formData.ecomEntCode"
clearable
placeholder=""
></el-input>
</Formitem> -->
</el-col>
<!-- 电商企业名称 -->
<el-col :span="8">
<Formitem label="电商企业名称" prop="ecomEntName" type="edit">
...
...
@@ -50,15 +62,15 @@
</el-col>
<!-- 电商企业邮箱 -->
<el-col :span="8">
<Formitem label="电商企业邮箱" prop="ecomEntEmail" type="edit">
<Formitem label="电商企业邮箱" prop="ecomEntEmail
Rule
" type="edit">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-ecomEntEmail"
id="inputInner-edit-ecomEntEmail
Rule
"
resize="none"
v-model="formData.ecomEntEmail"
clearable
maxlength="
18
"
maxlength="
50
"
placeholder=""
></el-input>
</Formitem>
...
...
@@ -202,20 +214,16 @@
<el-option
v-for="(item, index) in portCodeList"
:key="index"
:label="item"
:value="item"
:label="item
.portName
"
:value="item
.portCode
"
></el-option>
</el-select>
</Formitem>
</el-col>
</el-row>
<div v-if="choosePortCode.includes('TAO')">
<div class="dlTitle">
<!-- <el-checkbox v-model="formData.qdCheck" @change="changeQDCheckBox()"></el-checkbox>-->
青岛
</div>
<div class="dlTitle">青岛</div>
<el-row :gutter="5">
<!-- <div v-if="isCipherMachine">-->
<!-- 公服DXPID -->
<el-col :span="8">
<Formitem label="公服DXPID" prop="qingdaoUserDxpid" type="edit">
...
...
@@ -306,6 +314,28 @@
></el-input>
</Formitem>
</el-col>
<!-- 加签方式 -->
<el-col :span="8">
<Formitem label="加签方式" prop="methodOfSignature" type="edit">
<el-select
type="text"
id="inputInner-edit-methodOfSignature"
v-model="portConfig.TAO.methodOfSignature"
clearable
maxlength="4"
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict
.METHOD_OF_SIGNATURE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
<el-col :span="16" style="padding-right: 5px">
<div class="uploadItem">
<div class="uploadbox">
...
...
@@ -361,27 +391,7 @@
</div>
</div>
</el-col>
<!-- 加签方式 -->
<el-col :span="8">
<Formitem label="加签方式" prop="methodOfSignature" type="edit">
<el-select
type="text"
id="inputInner-edit-methodOfSignature"
v-model="portConfig.TAO.methodOfSignature"
clearable
maxlength="4"
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict
.METHOD_OF_SIGNATURE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
<!-- 加密方式 -->
<!-- <el-col :span="8">-->
<!-- <Formitem label="加密方式" prop="methodOfSignature" type="edit">-->
...
...
@@ -427,6 +437,199 @@
</el-col>
</el-row>
</div>
<div v-if="choosePortCode.includes('CAN')">
<div class="dlTitle">广州</div>
<el-row :gutter="5">
<!-- DXPID -->
<el-col :span="8">
<Formitem label="DXPID" prop="guangzhouUserDxpid" type="edit">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-guangzhouUserDxpid"
resize="none"
v-model="portConfig.CAN.dxpId"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<!-- Client ID -->
<el-col :span="8">
<Formitem label="Client ID" prop="guangzhouClientId" type="edit">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-guangzhouClientId"
resize="none"
v-model="portConfig.CAN.clientId"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<!-- Key -->
<el-col :span="8">
<Formitem label="Key" prop="guangzhouKey" type="edit">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-guangzhouKey"
resize="none"
v-model="portConfig.CAN.key"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<el-col :span="8">
<Formitem label="用户名称" prop="guangzhouUserName" type="edit">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-guangzhouUserName"
resize="none"
v-model="portConfig.CAN.userName"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<!-- 加签方式 -->
<el-col :span="8">
<Formitem label="加密方式" prop="guangzhouSignature" type="edit">
<el-select
type="text"
id="inputInner-edit-guangzhouSignature"
v-model="portConfig.CAN.methodOfSignature"
clearable
maxlength="4"
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict
.METHOD_OF_SIGNATURE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-col>
<el-col :span="16" style="padding-right: 5px">
<div class="uploadItem">
<div class="uploadbox">
<el-button
size="mini"
type="text"
v-loading="loadings.gzUploadLoading"
@click="gzUploadFile"
>上传公钥
</el-button>
<el-upload
class="upload-demo"
ref="gzUploadFile"
action="/manager-server/attachment/picImg"
:http-request="gzFileUpload"
:auto-upload="true"
:show-file-list="false"
:data="{}"
:file-list="gzFileList"
>
</el-upload>
</div>
<div
class="fileList"
v-if="
portConfig.CAN.publicKeyBase64 != '' ||
portConfig.CAN.publicKeyName
"
>
<div class="fileList-item">
<div class="uploadbox-fileName">
<svg-icon
class="el-icon-user-solid"
icon-class="exl"
style="font-size: 18px; color: #de002e"
/>
<Tooltip
:content="portConfig.CAN.publicKeyName"
:refName="portConfig.CAN.publicKeyName"
/>
</div>
<div class="uploadbox-option">
<el-popconfirm
:title="$t('entry.upload.delTip')"
@confirm="delQingdaoTypeDFile"
>
<el-button slot="reference" type="text"
>{{ $t("entry.upload.del") }}
</el-button>
</el-popconfirm>
</div>
</div>
</div>
</div>
</el-col>
<el-col :span="16" style="padding-right: 5px">
<div class="uploadItem">
<div class="uploadbox">
<el-button
size="mini"
type="text"
v-loading="loadings.gzRivateKeyLoading"
@click="gzRivateKeyUploadFile"
>上传私钥
</el-button>
<el-upload
class="upload-demo"
ref="gzRivateKeyUploadFile"
action="/manager-server/attachment/picImg"
:http-request="gzRivateKeyFileUpload"
:auto-upload="true"
:show-file-list="false"
:data="{}"
:file-list="gzRivateKeyFileList"
>
</el-upload>
</div>
<div
class="fileList"
v-if="
portConfig.CAN.privateKeyBase64 != '' ||
portConfig.CAN.privateKeyName
"
>
<div class="fileList-item">
<div class="uploadbox-fileName">
<svg-icon
class="el-icon-user-solid"
icon-class="exl"
style="font-size: 18px; color: #de002e"
/>
<Tooltip
:content="portConfig.CAN.privateKeyName"
:refName="portConfig.CAN.privateKeyName"
/>
</div>
<div class="uploadbox-option">
<el-popconfirm
:title="$t('entry.upload.delTip')"
@confirm="gzRivateKeyTypeDFile"
>
<el-button slot="reference" type="text"
>{{ $t("entry.upload.del") }}
</el-button>
</el-popconfirm>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
</div>
<section class="dlTitle">
<h3>密码机管理</h3>
...
...
@@ -581,7 +784,7 @@ import {
uploadQingdaoCertificate,
updateCustomerData,
delCertificate,
delQingdaoCertificate
,
getCustomerDetails
,
} from "@/api/system/customer-ai.js";
export default {
...
...
@@ -629,6 +832,17 @@ export default {
certificateBase64: "",
methodOfSignature: "",
},
CAN: {
clientId: "", // 申报企业电子口岸备案号
key: "", // 接口调用密钥
userName: "", // 用户名
privateKeyBase64: "", //私钥base64
privateKeyName: "", //私钥名称
publicKeyBase64: "", //公钥base64
publicKeyName: "", //公钥名称
dxpId: "", // dxpId
methodOfSignature: "", // 加签方式
},
},
choosePortCode: [],
formData: {
...
...
@@ -655,21 +869,21 @@ export default {
ecomEntCode: [
{
required: true,
trigger: "
blur
",
trigger: "
change
",
message: "电商企业代码不能为空!",
},
],
ecomEntName: [
{
required: true,
trigger: "
blur
",
trigger: "
change
",
message: "电商企业名称不能为空!",
},
],
orderRequester: [
{
required: true,
trigger: "
blur
",
trigger: "
change
",
message: "订单申报方不能为空!",
},
],
...
...
@@ -727,10 +941,14 @@ export default {
uploadLoading: false,
submitLoading: false,
qingdaoUploadLoading: false,
gzUploadLoading: false,
gzRivateKeyLoading: false,
},
loadingText: "",
fileList: [],
qingdaoFileList: [],
gzFileList: [],
gzRivateKeyFileList: [],
};
},
watch: {
...
...
@@ -738,19 +956,20 @@ export default {
if (val) {
this.loadings.dialogLoading = false;
if (this.type == "update") {
this.formData = this.active;
//
this.formData = this.active;
// this.formData.file=null;
// this.parseCheckboxState(this.active.checkboxState);
this.fetchInfo(this.active);
} else {
// this.formData.orderRequester = "1";
}
}
if (this.active?.config != null) {
this.choosePortCode = Object.keys(this.active.config);
Object.keys(this.active.config).forEach((key) => {
this.portConfig[key] = this.active.config[key];
});
}
//
if (this.active?.config != null) {
//
this.choosePortCode = Object.keys(this.active.config);
//
Object.keys(this.active.config).forEach((key) => {
//
this.portConfig[key] = this.active.config[key];
//
});
//
}
},
// type(newVal) {
// if (newVal === "add") {
...
...
@@ -781,6 +1000,22 @@ export default {
// }
},
methods: {
fetchInfo(ojb) {
getCustomerDetails({
id: ojb.id,
}).then((res) => {
console.log(res);
if (res.code === "200") {
this.formData = res.data;
this.choosePortCode = Object.keys(this.formData.config);
Object.keys(this.formData.config).forEach((key) => {
this.portConfig[key] = this.formData.config[key];
});
} else {
this.alertWarningMsg(res.message);
}
});
},
// getDefaultMethodOfSignature() {
// const methodOfSignatureDict = this.$store.getters.dict.METHOD_OF_SIGNATURE;
// if (methodOfSignatureDict.length > 0) {
...
...
@@ -813,6 +1048,12 @@ export default {
qingdaoUploadFile() {
this.$refs.qingdaoUploadFile.$refs["upload-inner"].handleClick();
},
gzUploadFile() {
this.$refs.gzUploadFile.$refs["upload-inner"].handleClick();
},
gzRivateKeyUploadFile() {
this.$refs.gzRivateKeyUploadFile.$refs["upload-inner"].handleClick();
},
//文件校验
// beforeUpload(val) {
// // if (
...
...
@@ -855,24 +1096,27 @@ export default {
// this.formData.qingdaoFile = obj;
};
},
// fileChange(val) {
// },
// qingdaoFileChange(val) {
// },
// handleSuccess() {
// },
// qingdaoHandleSuccess() {
// },
// clearFile() {
// },
// clearqingdaoFile() {
// },
// handleRemove() {
// this.fileList = [];
// },
// qingdaoHandleRemove() {
// this.qingdaoFileList = [];
// },
gzFileUpload({ file }) {
const reader = new FileReader();
reader.readAsDataURL(file);
console.log(file);
reader.onload = (e) => {
console.log(e);
this.portConfig.CAN.publicKeyName = file.name;
this.portConfig.CAN.publicKeyBase64 = e.target.result;
};
},
gzRivateKeyFileUpload({ file }) {
const reader = new FileReader();
reader.readAsDataURL(file);
console.log(file);
reader.onload = (e) => {
console.log(e);
this.portConfig.CAN.privateKeyName = file.name;
this.portConfig.CAN.privateKeyBase64 = e.target.result;
};
},
//删除文件
delTypeDFile() {
this.delCertificate();
...
...
@@ -880,7 +1124,14 @@ export default {
delQingdaoTypeDFile() {
this.delQingdaoCertificate();
},
delGzTypeDFile() {
this.portConfig.CAN.publicKeyName = null;
this.portConfig.CAN.publicKeyBase64 = null;
},
gzRivateKeyTypeDFile() {
this.portConfig.CAN.privateKeyName = null;
this.portConfig.CAN.privateKeyBase64 = null;
},
//删除证书
delCertificate() {
if (this.formData.id && this.formData.certificare) {
...
...
@@ -906,23 +1157,6 @@ export default {
//删除青岛证书
delQingdaoCertificate() {
// if (this.formData.id && this.formData.qingdaoCertificatePath) {
// delQingdaoCertificate(this.formData.id, this.formData.qingdaoCertificatePath).then((res) => {
// if (res.code == 200) {
// this.formData.qingdaoFile = null;
// this.formData.qingdaoCertificatePath = "";
// // this.msgSuccess("证书删除成功!");
// } else {
// this.alertErrorMsg("证书删除失败,请联系管理员!");
// }
// }).catch((err) => {
// console.log(err);
// this.alertErrorMsg("证书删除失败,请联系管理员!");
// })
// } else {
// this.formData.qingdaoFile = null;
// this.formData.qingdaoCertificatePath = "";
// }
this.portConfig.TAO.certificateBase64 = null;
this.portConfig.TAO.certificateName = null;
},
...
...
src/views/customerConfig/index.vue
View file @
47f7adc
...
...
@@ -9,7 +9,7 @@
>
<el-row class="row-border">
<!-- Client ID -->
<el-col :span="5">
<
!-- <
el-col :span="5">
<Formitem label="Client ID" prop="clientId">
<el-input
type="text"
...
...
@@ -21,14 +21,14 @@
placeholder=""
></el-input>
</Formitem>
</el-col>
</el-col>
-->
<!-- 电商企业名称 -->
<el-col :span="5">
<Formitem label="电商企业名称" prop="ecomEntName">
<el-input
type="text"
class="inputShadow"
id="inputInner--ecomEntName"
id="inputInner-
edit
-ecomEntName"
resize="none"
v-model="sreachFormData.ecomEntName"
clearable
...
...
@@ -42,7 +42,7 @@
<el-input
type="text"
class="inputShadow"
id="inputInner--ecomEntCode"
id="inputInner-
edit
-ecomEntCode"
resize="none"
v-model="sreachFormData.ecomEntCode"
clearable
...
...
@@ -55,7 +55,7 @@
<Formitem label="创建日期" prop="creationTime" :activeType="true">
<el-date-picker
class="inputInner--creationTime"
id="inputInner--creationTime"
id="inputInner-
edit
-creationTime"
v-model="sreachFormData.creationTime"
type="daterange"
format="yyyy-MM-dd"
...
...
@@ -66,6 +66,19 @@
/>
</Formitem>
</el-col>
<el-col :span="5">
<Formitem label="电商企业邮箱" prop="ecomEntEmail">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-ecomEntEmail"
resize="none"
v-model="sreachFormData.ecomEntEmail"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<el-col :span="2">
<el-form-item class="textCenter">
<el-button
...
...
@@ -91,22 +104,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- 电商企业邮箱 -->
<el-col :span="5">
<Formitem label="电商企业邮箱" prop="ecomEntEmail">
<el-input
type="text"
class="inputShadow"
id="inputInner--ecomEntEmail"
resize="none"
v-model="sreachFormData.ecomEntEmail"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
</el-row>
</el-form>
<div class="optionButton">
<div>
...
...
@@ -162,7 +159,7 @@
:title="dialogTitle"
:type="editType"
:active="activeData"
:portCodeList="
dict.por
t"
:portCodeList="
portLis
t"
@close="dialogClose"
/>
</div>
...
...
@@ -173,8 +170,10 @@ import {
getCustomerList,
downloadCertificate,
downloadQingdaoCertificate,
getPortInfo,
} from "@/api/system/customer-ai.js";
import { getPortList } from "@/api/system/user.js";
import { getDictData } from "@/api/system/dict-api.js";
import DialogVue from "./dialog.vue";
export default {
name: "PortConfig",
...
...
@@ -198,12 +197,12 @@ export default {
activeData: null,
tableData: [],
headerData: [
{
name: "Client ID",
value: "clientId",
width: "",
align: "left",
},
//
{
//
name: "Client ID",
//
value: "clientId",
//
width: "",
//
align: "left",
//
},
{
name: "电商企业代码",
value: "ecomEntCode",
...
...
@@ -262,6 +261,7 @@ export default {
dict: {
port: [],
},
portList: [],
// dict: {
// orderRequester: [
// { name: "企业", code: "ENTERPRISE_DECLARATION", value: "1" },
...
...
@@ -275,6 +275,8 @@ export default {
outerVisible: false,
dialogTitle: "",
editType: "",
// 加密方式list
encryptionTypeList: [],
};
},
created() {
...
...
@@ -327,15 +329,25 @@ export default {
},
//获取口岸子字典
searchPortDictData() {
getPort
List
()
getPort
Info
()
.then((res) => {
console.log(res);
if (res.code === "200") {
this.
dict.por
t = res.data;
this.
portLis
t = res.data;
}
})
.catch((err) => {
console.log(err);
});
getDictData({ doctCode: "METHOD_OF_SIGNATURE" })
.then((res) => {
if (res.code == "200") {
this.encryptionTypeList = res.data;
}
})
.catch((err) => {
console.error(err);
});
},
clear() {
this.$refs.sreachForm.resetFields();
...
...
Please
register
or
login
to post a comment