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-04-29 10:00:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ddd06ee3ba389c0e1f3a882944b1674e11b52631
ddd06ee3
1 parent
109d136c
feat: 优化
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
226 additions
and
112 deletions
.env.development
.env.pre
package.json
src/api/declareData-api.js
src/components/TablePopover/index.vue
src/store/modules/user.js
src/views/hs-code/dialog.vue
src/views/hs-code/index.vue
src/views/reportingData/index.vue
src/views/reportingData/weight-adjust.vue
.env.development
View file @
ddd06ee
...
...
@@ -6,7 +6,7 @@ VUE_APP_BASE_ENV = "dev"
VUE_APP_Version = '1.0.0'
# FedEx 在线申报工具/开发环境
VUE_APP_BASE_API = 'http://101.132.100.41:700
8
/EcomExp'
VUE_APP_BASE_API = 'http://101.132.100.41:700
1
/EcomExp'
VUE_APP_BASE_ROUTE = '/EcomDev'
...
...
.env.pre
View file @
ddd06ee
...
...
@@ -17,7 +17,7 @@ VUE_APP_BASE_ROUTE = '/EcomExp'
VUE_APP_BASE_LOGINOUT = '/EcomExp'
#后端版本校验版本号
VUE_APP_APIVERSION = '
D5B582ED9ED4002BF2BCB386A68519CF.A3889C390C14952AD666ABC3BE46BE40
'
VUE_APP_APIVERSION = '
19DD6C1CEC504AC854645F352EB03209.141F59A2AAE8300417BFCFD37FACC324
'
#iclearEmp系统地址
# VUE_APP_REDIRECT_EMP = 'https://iclearexpuat.fedex.com.cn/Emp/#/login'
...
...
package.json
View file @
ddd06ee
...
...
@@ -40,6 +40,7 @@
},
"dependencies"
:
{
"axios"
:
"0.21.1"
,
"big.js"
:
"^7.0.1"
,
"core-js"
:
"3.8.3"
,
"crypto-js"
:
"^4.2.0"
,
"docx-preview"
:
"^0.1.20"
,
...
...
src/api/declareData-api.js
View file @
ddd06ee
...
...
@@ -263,3 +263,23 @@ export function getArrivalIneList(data) {
data
:
data
,
});
}
// /declareData/getWeight/{billNo}
export
function
getWeight
(
data
)
{
return
request
({
url
:
"/bus-customer/declareData/getWeight/"
+
data
.
billNo
,
method
:
"get"
,
data
:
data
,
});
}
// POST
// /declareData/modifyWeight
// 修改重量
export
function
modifyWeight
(
data
)
{
return
request
({
url
:
"/bus-customer/declareData/modifyWeight"
,
method
:
"post"
,
data
:
data
,
});
}
...
...
src/components/TablePopover/index.vue
View file @
ddd06ee
...
...
@@ -21,6 +21,8 @@
<el-table
:pagination="false"
:border="true"
tooltip-effect="dark"
max-height="400px"
:empty-text="
loadingDatas &&
rowData &&
...
...
@@ -39,6 +41,7 @@
:label="item.name"
:align="item.align"
:width="item.width"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
...
...
src/store/modules/user.js
View file @
ddd06ee
...
...
@@ -181,10 +181,7 @@ const user = {
removeToken
();
removeTime
();
removeUserId
();
// location.replace(process.env.VUE_APP_BASE_ROUTE);
// setTimeout(() => {
window
.
location
.
reload
(
true
);
// }, 1000);
window
.
location
.
replace
(
process
.
env
.
VUE_APP_BASE_ROUTE
);
resolve
();
});
},
...
...
src/views/hs-code/dialog.vue
View file @
ddd06ee
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="
运抵单申报
"
title="
详情
"
:visible.sync="visible"
top="8vh"
width="720px"
width="850px"
:destroy-on-close="true"
@close="close()"
>
<div class="modelItem">
<el-descriptions class="margin-top" title="" :column="
3
" border>
<el-descriptions class="margin-top" title="" :column="
1
" border>
<el-descriptions-item>
<template slot="label">
用户名
</template>
kooriookami
<template slot="label">
商品编码
</template>
{{ selected.skuCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
手机号
</template>
18100000000
<template slot="label">
商品名称
</template>
{{ selected.skuname }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 居住地 </template>
苏州市
<template slot="label"> 法定计量单位 </template>
{{ selected.unitLegalFirst }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 法定计量单位(编码) </template>
{{ selected.unitLegalFirstCode }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 法定第二计量单位 </template>
{{ selected.unitLegalSecond }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 法定第二计量单位(编码) </template>
{{ selected.unitLegalSecondCode }}
</el-descriptions-item>
<el-descriptions-item :span="1">
<template slot="label"> 申报要素 </template>
{{ selected.declarationElement }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"> 备注 </template>
<el-tag size="small">学校</el-tag>
{{ selected.remark }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
联系地址
</template>
江苏省苏州市吴中区吴中大道 1188 号
<template slot="label">
更新时间
</template>
{{ selected.updateTime }}
</el-descriptions-item>
</el-descriptions>
</div>
...
...
@@ -43,9 +58,9 @@ export default {
default: false,
},
selected: {
type:
Array
,
type:
Object
,
default: () => {
return
[]
;
return
{}
;
},
},
},
...
...
src/views/hs-code/index.vue
View file @
ddd06ee
...
...
@@ -105,12 +105,6 @@
:totalCount="page.total"
@sizeChange="sizeChange"
@currentChange="currentChange"
:selection="true"
:selectFixed="false"
:rowSelectDataType="false"
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
:selected="selected"
>
<template slot="optionColumn">
<el-table-column align="center" label="操作" width="150">
...
...
@@ -138,7 +132,7 @@ export default {
},
data() {
return {
selected:
[]
,
selected:
{}
,
sreachFormData: {
skuCode: "",
skuname: "",
...
...
@@ -211,13 +205,6 @@ export default {
watch: {},
methods: {
tableSelect(val) {
this.selected = val.selection;
},
tableSelectAll(val) {
this.selected = val;
},
dateChange(val) {
if (val == "" || val == null) {
this.$nextTick(() => {
...
...
@@ -238,7 +225,6 @@ export default {
//查询
search(val) {
this.loadings.sreachLoading = true;
this.selected = [];
if (val == 0) {
this.page.pageIndex = 1;
}
...
...
@@ -295,7 +281,8 @@ export default {
console.log("finally");
});
},
detail() {
detail(record) {
this.selected = JSON.parse(JSON.stringify(record));
this.outerVisible = true;
},
...
...
src/views/reportingData/index.vue
View file @
ddd06ee
...
...
@@ -125,8 +125,8 @@
><svg-icon
class="el-icon-user-solid"
icon-class="uploadCloud"
></svg-icon
>
一键导入
></svg-icon
>
一键导入
</el-button>
<el-button
class="entrySaveButton"
...
...
@@ -149,7 +149,7 @@
class="entrySaveButton"
size="small"
icon="el-icon-edit"
@click="
batchModify
"
@click="
weightAdjustFn
"
>
重量调整
</el-button> -->
...
...
@@ -464,6 +464,12 @@
:selectedDatas="selected"
@cancelDataPreview="cancelDataPreview"
/>
<!-- 重量调整 -->
<WeightAdjust
:showDialog="weightAdjustVisible"
:selectedDatas="[]"
@cancelModify="cancelModify"
/>
</div>
</template>
...
...
@@ -487,6 +493,7 @@ import ExportDialog from "./exportDialog.vue";
import BatchModify from "./batchModify.vue";
import TimeDialog from "./time-dialog.vue";
import DataPreview from "./data-preview.vue";
import WeightAdjust from "./weight-adjust.vue";
export default {
name: "ReportingData",
components: {
...
...
@@ -497,6 +504,7 @@ export default {
BatchModify,
TimeDialog,
DataPreview,
WeightAdjust,
},
data() {
return {
...
...
@@ -680,6 +688,7 @@ export default {
dataPreviewTitle: "",
currentLoadingKey: "",
paramsOjb: {},
weightAdjustVisible: false,
};
},
created() {
...
...
@@ -1212,6 +1221,12 @@ export default {
}
this.batchModifyVisible = true;
},
weightAdjustFn() {
this.weightAdjustVisible = true;
},
cancelModify() {
this.weightAdjustVisible = false;
},
cancelBatchModify(val) {
this.batchModifyVisible = false;
if (val === 1) {
...
...
src/views/reportingData/weight-adjust.vue
View file @
ddd06ee
...
...
@@ -3,73 +3,85 @@
class="entryDialog classCUploadDialog"
title="重量调整"
:visible.sync="batchModifyVisible"
v-loading="dialogLoading"
:show-close="false"
width="
4
50px"
width="
5
50px"
:close-on-click-modal="false"
>
<div>
<el-form
class="fedexFormStyle"
ref="batchModifyForm"
:model="
batchModifyFormData
"
:rules="
batchModify
FormRules"
:model="
weightForm
"
:rules="
weight
FormRules"
label-position="left"
size="small"
>
<Formitem label="提运单号" prop="
modifyConten
t">
<Formitem label="提运单号" prop="
billNo" type="edi
t">
<el-input
type="text"
id="inputInner-edit-billNo"
class="inputShadow"
resize="none"
v-model="
batchModifyFormData.modifyContent
"
v-model="
weightForm.billNo
"
clearable
placeholder="请输入提运单号"
@change="inputChange"
></el-input>
</Formitem>
<Formitem label="件数" prop="
modifyConten
t">
<Formitem label="件数" prop="
count" type="edi
t">
<el-input
type="text"
id="inputInner-edit-count"
class="inputShadow"
resize="none"
v-model="
batchModifyFormData.modifyConte
nt"
v-model="
weightForm.cou
nt"
clearable
placeholder="请输入修改内容"
disabled
placeholder="请输入件数"
></el-input>
</Formitem>
<Formitem label="原毛重" prop="
modifyConten
t">
<Formitem label="原毛重" prop="
totalWeight" type="edi
t">
<el-input
type="text"
id="inputInner-edit-totalWeight"
class="inputShadow"
resize="none"
v-model="
batchModifyFormData.modifyConten
t"
v-model="
weightForm.totalWeigh
t"
clearable
placeholder="请输入修改内容"
disabled
placeholder="请输入原毛重"
></el-input>
</Formitem>
<Formitem label="修改后毛重" prop="
modifyData
">
<el-
selec
t
<Formitem label="修改后毛重" prop="
weight" type="edit
">
<el-
inpu
t
type="text"
v-model="batchModifyFormData.modifyData"
id="inputInner-edit-weight"
class="inputShadow"
resize="none"
v-model="weightForm.weight"
clearable
placeholder=""
>
<el-option
v-for="item in modifyDataList"
:key="item.itemValue"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
placeholder="请输入修改后毛重"
@change="weightChange"
></el-input>
</Formitem>
<Formitem label="修改内容" prop="modifyContent">
<el-input
type="text"
<Formitem label="" prop="content" type="edit">
<!-- <el-input
type="textarea"
id="inputInner-edit-content"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
:rows="3"
v-model="weightForm.content"
clearable
placeholder="请输入修改内容"
></el-input>
></el-input> -->
<div class="form-item-tips">
<h2>修改内容</h2>
<div>
{{ weightForm.content }}
</div>
</div>
</Formitem>
</el-form>
</div>
...
...
@@ -86,8 +98,8 @@
</template>
<script>
import {
bathDeclareDate
} from "@/api/declareData-api.js";
import
{ getDictData } from "@/api/system/dict-api
.js";
import {
modifyWeight, getWeight
} from "@/api/declareData-api.js";
import
Big from "big
.js";
export default {
props: {
showDialog: {
...
...
@@ -100,75 +112,121 @@ export default {
},
},
data() {
var checkQty = (rule, value, callback) => {
if (value === undefined || value === null || value === "") {
callback(new Error("请输入数值"));
return;
}
if (isNaN(value)) {
callback(new Error("请输入有效的数字"));
return;
}
if (value < 0) {
callback(new Error("数值不能为负"));
return;
}
const valueStr = value.toString();
const parts = valueStr.split(".");
const integerPart = parts[0];
const decimalPart = parts[1] || "";
// if (integerPart.length > 14) {
// callback(new Error("整数部分最多14位"));
// return;
// }
// if (decimalPart.length > 5) {
// callback(new Error("小数部分最多5位"));
// return;
// }
callback();
};
return {
batchModifyVisible: false,
batchModifyFormData: {
modifyData: "",
modifyContent: "",
dialogLoading: false,
weightForm: {
billNo: "",
count: "",
totalWeight: "",
weight: "",
content: "",
},
batchModifyFormRules: {
modifyData: [
{ required: true, message: "请选择修改数据", trigger: "change" },
],
modifyContent: [
{ required: true, message: "请输入修改内容", trigger: "blur" },
weightFormRules: {
billNo: [
{ required: true, message: "请输入提运单号", trigger: "blur" },
],
weight: [{ validator: checkQty, trigger: "blur" }],
},
modifyDataList: [
{ name: "提运单号", value: "BILLNO" },
{ name: "航班航次号", value: "FLIGHT_NUMBER" },
],
};
},
watch: {
showDialog(val) {
if (val) {
this.batchModifyVisible = val;
this.batchModifyFormData.modifyData = "";
this.batchModifyFormData.modifyContent = "";
this.weightForm.billNo = "";
this.weightForm.count = "";
this.weightForm.totalWeight = "";
this.weightForm.weight = "";
this.weightForm.content = "";
}
},
},
created() {
this.getModifyDataList();
},
created() {},
methods: {
getModifyDataList() {
getDictData({ doctCode: "DATABASE_FIELD" })
.then((res) => {
inputChange(e) {
console.log(e);
let params = {
billNo: e,
};
getWeight(params).then((res) => {
console.log(res);
if (res.code == "200") {
this.modifyDataList = res.data;
this.weightForm.count = res.data.count;
this.weightForm.totalWeight = res.data.totalWeight;
}
})
.catch((err) => {
console.error(err);
});
},
weightChange(e) {
// 总单号:02331578503,共 3000件,公斤数从5300KG改为5000KG,更改-300KG,调整比例为-5.66%
const a = new Big(this.weightForm.totalWeight);
const b = new Big(this.weightForm.weight);
this.weightForm.content = `总单号:${this.weightForm.billNo},共 ${
this.weightForm.count
}件,公斤数从 ${this.weightForm.totalWeight}KG改为${
this.weightForm.weight
}KG,更改 ${b.minus(a)}KG,调整比例为${(b.minus(a).div(a) * 100).toFixed(
2
)}%`;
},
formSubmit() {
this.$refs.batchModifyForm.validate((valid) => {
if (valid) {
this.dialogLoading = true;
let obj = {
declareIds: [],
modifyData: this.batchModifyFormData.modifyData,
modifyContent: this.batchModifyFormData.modifyContent,
billNo: this.weightForm.billNo,
weight: this.weightForm.weight,
};
this.selectedDatas.forEach((item) => {
obj.declareIds.push(item.declareId);
});
console.log("datas==", obj);
bathDeclareDate
(obj)
modifyWeight
(obj)
.then((res) => {
if (res.code === "200") {
this.msgSuccess("
批量
修改成功");
this.msgSuccess("修改成功");
this.cancelModify(1);
} else {
this.alertWarningMsg(res.message);
this.cancelModify(0);
}
})
.catch((err) => {
console.log(err);
this.alertWarningMsg(err.message);
this.cancelModify(
1
);
this.cancelModify(
0
);
});
} else {
return false;
...
...
@@ -178,7 +236,8 @@ export default {
cancelModify(val) {
this.batchModifyVisible = false;
this.$emit("cancelBatchModify", val);
this.dialogLoading = false;
this.$emit("cancelModify", val);
},
},
};
...
...
@@ -186,17 +245,34 @@ export default {
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
.modelItem {
width: 100%;
.modelItem-title {
display: flex;
justify-content: space-between;
.form-item-tips {
height: 80px;
background-color: #f2f2f2;
margin-bottom: 5px;
font-size: 14px;
font-weight: 600;
h2 {
position: relative;
font-size: 0.75rem;
font-weight: 700;
color: #333;
height: -webkit-max-content;
height: -moz-max-content;
height: max-content;
padding: 0 0 0 0.6rem;
line-height: 14px;
-webkit-transform: translate3d(0, 10px, 0);
transform: translate3d(0, 10px, 0);
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
cursor: text;
z-index: 5;
}
div {
padding: 0.4rem 0.6rem 0;
line-height: 14px;
}
}
.revokeOperation {
margin-bottom: 25px;
.revokeSubmitBtn {
...
...
Please
register
or
login
to post a comment