Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
8f7575d3
Commit
8f7575d3
authored
Sep 12, 2023
by
邓春圆
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
53af9519
fea7e719
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
242 additions
and
56 deletions
+242
-56
collectI18nMessages.js
collectI18nMessages.js
+99
-25
en_US.json
src/i18n/languages/en_US.json
+119
-25
arrival.vue
src/views/ecw/box/shippingAir/nodePage/arrival.vue
+5
-1
index.vue
src/views/ecw/box/shippingAir/nodePage/unloading/index.vue
+8
-0
startUnloading.vue
...ecw/box/shippingAir/nodePage/unloading/startUnloading.vue
+2
-2
seaProcess.vue
src/views/ecw/box/shippingAir/seaProcess.vue
+7
-1
FeeDetail.vue
src/views/ecw/order/components/FeeDetail.vue
+2
-2
No files found.
collectI18nMessages.js
View file @
8f7575d3
const
fs
=
require
(
'
fs
'
);
const
root
=
"
./src
"
const
savePath
=
"
./src/i18n/languages/en_US.json
"
let
allFiles
=
[]
const
savePath
=
"
./src/i18n/languages/en_US.json
"
const
crypto
=
require
(
'
crypto
'
);
const
https
=
require
(
'
https
'
);
const
querystring
=
require
(
'
querystring
'
);
// 你的百度翻译API的App ID和密钥
const
appId
=
"
20230911001813245
"
const
appKey
=
"
lJlOnktUO0pn8G_MZ10O
"
const
translateText
=
(
text
,
fromLang
=
'
zh
'
,
toLang
=
'
en
'
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// 百度翻译API的接口地址
const
apiUrl
=
"
https://fanyi-api.baidu.com/api/trans/vip/translate
"
;
// 构建请求参数
const
params
=
{
q
:
text
,
from
:
fromLang
,
to
:
toLang
,
appid
:
appId
,
salt
:
Math
.
random
().
toString
().
slice
(
2
),
sign
:
''
};
// 生成签名
const
signStr
=
appId
+
text
+
params
.
salt
+
appKey
;
params
.
sign
=
require
(
'
crypto
'
).
createHash
(
'
md5
'
).
update
(
signStr
).
digest
(
'
hex
'
);
// 发送HTTP POST请求
const
options
=
{
hostname
:
'
fanyi-api.baidu.com
'
,
port
:
443
,
path
:
'
/api/trans/vip/translate
'
,
method
:
'
POST
'
,
headers
:
{
'
Content-Type
'
:
'
application/x-www-form-urlencoded
'
,
'
Content-Length
'
:
querystring
.
stringify
(
params
).
length
}
};
const
req
=
https
.
request
(
options
,
(
res
)
=>
{
let
data
=
''
;
res
.
on
(
'
data
'
,
(
chunk
)
=>
{
data
+=
chunk
;
});
res
.
on
(
'
end
'
,
()
=>
{
console
.
log
(
'
翻译结果:
'
,
data
);
resolve
(
JSON
.
parse
(
data
).
trans_result
[
0
].
dst
)
});
});
req
.
on
(
'
error
'
,
(
err
)
=>
{
console
.
error
(
err
);
});
req
.
write
(
querystring
.
stringify
(
params
));
req
.
end
();
})
};
function
getFiles
(
dir
){
let
files
=
fs
.
readdirSync
(
dir
)
...
...
@@ -14,11 +75,6 @@ function getFiles(dir){
}
getFiles
(
root
)
/* allFiles = [
'src/views/ecw/box/shippingSea/utils.js',
'src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js'
]
console.log(allFiles) */
let
messages
=
new
Set
()
allFiles
.
forEach
(
file
=>
{
let
data
=
fs
.
readFileSync
(
file
,
{
encoding
:
'
utf-8
'
})
...
...
@@ -30,11 +86,29 @@ allFiles.forEach(file => {
}
})
let
obj
=
require
(
savePath
)
Array
.
from
(
messages
).
forEach
(
word
=>
{
if
(
!
obj
[
word
])
obj
[
word
]
=
""
})
fs
.
writeFileSync
(
savePath
,
JSON
.
stringify
(
obj
,
null
,
4
))
console
.
log
(
messages
)
console
.
warn
(
`本次共提取
${
messages
.
size
}
个待翻译内容,保存于
${
savePath
}
`
)
\ No newline at end of file
let
autoTransCnt
=
0
async
function
translate
(
obj
){
// 对未翻译内容调用百度翻译进行翻译操作,有变量的不做处理
for
(
let
text
in
obj
){
if
(
obj
[
text
]
||
text
.
includes
(
'
{
'
))
continue
const
textEn
=
await
translateText
(
text
)
console
.
log
(
`
${
text
}
=>
${
textEn
}
\n`
)
obj
[
text
]
=
textEn
autoTransCnt
++
// 账号请求频率限制1ps
await
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
1000
))
}
}
translate
(
obj
).
then
(
res
=>
{
fs
.
writeFileSync
(
savePath
,
JSON
.
stringify
(
obj
,
null
,
4
))
console
.
log
(
messages
)
console
.
warn
(
`本次共提取
${
messages
.
size
}
个待翻译内容,保存于
${
savePath
}
`
)
console
.
log
(
`已调用百度api自动翻译
${
autoTransCnt
}
个内容\n`
)
console
.
log
(
"
done!
"
)
})
src/i18n/languages/en_US.json
View file @
8f7575d3
This diff is collapsed.
Click to expand it.
src/views/ecw/box/shippingAir/nodePage/arrival.vue
View file @
8f7575d3
...
...
@@ -12,7 +12,7 @@
</el-form-item>
-->
<el-form-item
:label=
"$t('实际二程起飞时间')"
prop=
"actSecondTime"
v-show=
"this.$attrs.shipmentObj.bookAirInfo.voyag
e"
>
<el-form-item
v-if=
"dtRealHeadTimeFlag"
:label=
"$t('实际二程起飞时间')"
prop=
"actSecondTim
e"
>
<el-date-picker
type=
"datetime"
:placeholder=
"$t('请选择日期')"
v-model=
"airArrivalInfo.actSecondTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('预计到港时间')"
prop=
"estTime"
>
...
...
@@ -73,6 +73,7 @@ export default {
inspectionTimeArrival
:
this
.
getDictDatas
(
this
.
DICT_TYPE
.
BOX_INSPECTION_TIME_ARRIVAL
)[
0
].
value
,
dtRealHeadTimeFlag
:
false
};
},
created
()
{
...
...
@@ -84,6 +85,9 @@ export default {
"
YYYY-MM-DD HH:mm:ss
"
);
this
.
airArrivalInfo
=
oldData
;
if
(
this
.
$attrs
.
shipmentObj
[
'
bookAirInfo
'
].
voyage
&&
this
.
$attrs
.
shipmentObj
[
'
bookAirInfo
'
].
voyage
==
2
){
this
.
dtRealHeadTimeFlag
=
true
}
},
watch
:
{
// 实际二程起飞时间
...
...
src/views/ecw/box/shippingAir/nodePage/unloading/index.vue
View file @
8f7575d3
...
...
@@ -67,6 +67,14 @@ export default {
onSubmit
(
operateType
)
{
this
.
$refs
[
"
unloadingForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
operateType
===
2
)
{
const
{
keyName
}
=
this
.
$attrs
.
currNode
;
const
ulStatus
=
this
.
$attrs
.
shipmentObj
[
keyName
];
if
(
ulStatus
!==
185
)
{
this
.
$message
.
error
(
this
.
$t
(
"
请先通过完成到仓审核
"
));
return
;
}
}
unloadCreate
({
...
this
.
unloadingObj
,
shipmentId
:
this
.
$attrs
.
shipmentObj
.
id
,
...
...
src/views/ecw/box/shippingAir/nodePage/unloading/startUnloading.vue
View file @
8f7575d3
...
...
@@ -126,11 +126,11 @@
</div>
<!-- 操作 -->
<div
v-if=
"!isUnderReview"
>
<el-button
type=
"success"
@
click=
"onSubmit"
>
{{$t('
完成到仓
')}}
</el-button>
<el-button
type=
"success"
@
click=
"onSubmit"
>
{{$t('
提交完成到仓审核
')}}
</el-button>
<el-button
plain
type=
"primary"
@
click=
"$emit('closeStart')"
>
{{$t('返回')}}
</el-button>
</div>
<div
v-if=
"isUnderReview"
>
<el-button
type=
"primary"
@
click=
"jumpReviewDetail"
>
{{$t('
卸柜
审核中')}}
</el-button>
<el-button
type=
"primary"
@
click=
"jumpReviewDetail"
>
{{$t('
到仓
审核中')}}
</el-button>
<el-button
plain
type=
"primary"
@
click=
"canclAudit"
>
{{$t('取消审核')}}
</el-button>
<el-button
plain
type=
"primary"
@
click=
"$emit('closeStart')"
>
{{$t('返回')}}
</el-button>
</div>
...
...
src/views/ecw/box/shippingAir/seaProcess.vue
View file @
8f7575d3
...
...
@@ -143,6 +143,12 @@ export default {
this
.
$message
.
error
(
this
.
$t
(
"
没有此操作的权限
"
));
return
;
}
if
(
node
.
type
==
'
checkout
'
){
if
(
this
.
shipmentObj
.
airShipmentStatus
!=
175
){
this
.
$message
.
error
(
this
.
$t
(
"
请先完成出货操作
"
));
return
;
}
}
if
(
currIndex
>
this
.
currIndex
)
{
console
.
log
(
currIndex
,
this
.
currIndex
)
this
.
$message
.
error
(
this
.
errorMsg
);
...
...
@@ -215,7 +221,7 @@ export default {
if
([
186
].
includes
(
unStatus
))
{
this
.
currentComponent
=
`reviewWidget`
;
this
.
$set
(
this
.
dialogConfig
,
"
width
"
,
"
700px
"
);
this
.
$set
(
this
.
dialogConfig
,
"
title
"
,
this
.
$t
(
"
卸柜
反审
"
));
this
.
$set
(
this
.
dialogConfig
,
"
title
"
,
this
.
$t
(
"
到仓
反审
"
));
}
break
;
}
...
...
src/views/ecw/order/components/FeeDetail.vue
View file @
8f7575d3
...
...
@@ -58,9 +58,9 @@
<span
class=
"ml-5"
>
{{
orderSummary
.
sumWeight
}}
kg
</span>
<span
class=
"ml-5"
v-if=
"orderSummary.sumQuantity"
>
{{
orderSummary
.
sumQuantity
}}{{
$t
(
'
个
'
)
}}
</span>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('是否重货')"
>
<el-descriptions-item
:label=
"$t('是否重货
/泡货
')"
>
<!--1 普货 2 重货 3 泡货-->
<dict-tag
:type=
"DICT_TYPE.
ECW_YESNO"
:value=
"orderSummary.orderType != 1 ? '1' : '0'
"
></dict-tag>
<dict-tag
:type=
"DICT_TYPE.
ORDER_TYPE"
:value=
"orderSummary.orderType
"
></dict-tag>
</el-descriptions-item>
<el-descriptions-item
:label=
"$t('原重货标准')"
v-if=
"[1,2].indexOf(orderSummary.transportId) > -1"
>
{{
orderSummary
.
orgWeightUnit
}}
KG/m³
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment