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-14 11:45:45 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
70a448d3acbb19ddd4c51e5abaf0b1f18480f5f5
70a448d3
2 parents
93e70759
3d7f1ec7
feat:合并代码
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
574 additions
and
52 deletions
.env.deving
.env.pre
.env.production
.env.test
.env.uat
package.json
src/api/declareData-api.js
src/views/editReportingData/RowDataEditForm.vue
src/views/editReportingData/index.vue
src/views/reportingData/data-preview.vue
src/views/reportingData/index.vue
src/views/reportingData/time-dialog.vue
src/views/reportingData/weight-adjust.vue
src/views/roleConfig/index.vue
.env.deving
View file @
70a448d
NODE_ENV = production
# 开发环境配置
ENV = 'dev
ing
'
ENV = 'dev
_erry
'
VUE_APP_BASE_ENV = "dev
ing
"
VUE_APP_BASE_ENV = "dev"
VUE_APP_Version = '1.0.0'
...
...
.env.pre
View file @
70a448d
...
...
@@ -3,7 +3,7 @@ NODE_ENV = production
# 预生产环境配置
# 文件名
ENV = 'pre'
ENV = 'pre
_fedex
'
# 没用到
VUE_APP_BASE_ENV = "pre"
...
...
.env.production
View file @
70a448d
# 生产环境配置
ENV = 'production'
ENV = 'production
_fedex
'
VUE_APP_BASE_ENV = "prod"
...
...
.env.test
View file @
70a448d
NODE_ENV = production
# 测试环境配置
ENV = 'test'
ENV = 'test
_erry
'
VUE_APP_BASE_ENV = "test"
...
...
.env.uat
View file @
70a448d
NODE_ENV = production
# 测试环境配置
ENV = 'uat'
ENV = 'uat
_erry
'
VUE_APP_BASE_ENV = "uat"
...
...
package.json
View file @
70a448d
...
...
@@ -9,8 +9,8 @@
"build:dev"
:
"vue-cli-service build --mode deving"
,
"build:test"
:
"vue-cli-service build --mode test"
,
"build:uat"
:
"vue-cli-service build --mode uat"
,
"build:pre"
:
"vue-cli-service build --mode pre"
,
"build:prod"
:
"vue-cli-service build"
,
"build:pre
:fedex
"
:
"vue-cli-service build --mode pre"
,
"build:prod
:fedex
"
:
"vue-cli-service build"
,
"preview"
:
"node build/index.js --preview"
,
"lint"
:
"eslint --ext .js,.vue src"
},
...
...
src/api/declareData-api.js
View file @
70a448d
...
...
@@ -243,3 +243,13 @@ export function declareUpload(data) {
},
});
}
// 根据提运单号 查询提运单号下的所有物流运单号
// bus-customer/declareData/checkBillNo
export
function
checkBillNo
(
data
)
{
return
request
({
url
:
"/bus-customer/declareData/checkBillNo"
,
method
:
"post"
,
data
:
data
.
declareIds
,
});
}
...
...
src/views/editReportingData/RowDataEditForm.vue
View file @
70a448d
...
...
@@ -201,6 +201,39 @@
></el-input>
</Formitem>
</el-col>
<!-- 新增 -->
<el-col :span="4">
<Formitem label="第二数量" prop="secondQty">
<el-input
type="number"
class="inputShadow"
id="inputInner--secondQty"
resize="none"
v-model="tableRowformData.secondQty"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
<el-col :span="4">
<Formitem label="第二计量单位" type="edit" prop="unitLegalSecondCode">
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-unitLegalSecondCode"
resize="none"
:disabled="true"
:value="
mapDicDatas(
$store.getters.dict.MEASUREMENT_UNIT,
tableRowformData.unitLegalSecondCode
)
"
></el-input>
</Formitem>
</el-col>
<!-- 截止 -->
<el-col :span="4">
<Formitem label="币制" prop="currency" type="edit">
<el-select
...
...
@@ -396,6 +429,10 @@ export default {
{ required: true, message: "请输入法定数量", trigger: "blur" },
{ validator: checkFractionalPart, trigger: "blur" },
],
secondQty: [
{ required: false, message: "请输入第二数量", trigger: "blur" },
{ validator: checkFractionalPart, trigger: "blur" },
],
currency: [
{ required: true, message: "请选择币制", trigger: "change" },
],
...
...
src/views/editReportingData/index.vue
View file @
70a448d
...
...
@@ -536,6 +536,14 @@
)
}}</span>
</template>
<template v-slot:unitLegalSecondCode="scope">
<span>{{
mapDicDatas(
$store.getters.dict.MEASUREMENT_UNIT,
scope.row.unitLegalSecondCode
)
}}</span>
</template>
<template v-slot:currency="scope">
<span>{{
mapCurrencyDatas($store.getters.dict.CURRENCY, scope.row.currency)
...
...
@@ -805,6 +813,19 @@ export default {
slot: true,
},
{
name: "第二数量",
value: "secondQty",
width: "",
align: "left",
},
{
name: "第二计量单位",
value: "unitLegalSecondCode",
width: "",
align: "left",
slot: true,
},
{
name: "币制",
value: "currency",
width: "",
...
...
@@ -986,6 +1007,7 @@ export default {
enterpriseProductDescribe: "",
enterpriseProductName: "",
legalQty: 0,
secondQty: 0,
model: "",
netWeight: 0,
price: 0,
...
...
src/views/reportingData/data-preview.vue
0 → 100644
View file @
70a448d
<template>
<el-dialog
class="entryDialog classCUploadDialog"
:title="dataPreviewTitle"
:visible.sync="batchModifyVisible"
:show-close="false"
width="700px"
:close-on-click-modal="false"
>
<div style="margin-bottom: 10px">
<span>
提运单号 数量:<strong>{{ tableData.length }}</strong>
</span>
<span style="margin-left: 20px">
物流运单编号 数量:<strong>{{ logisticsTotal }}</strong>
</span>
</div>
<Table
class="fedexDetialTable fedexSreachTable"
ref="entryTable"
:data="tableData"
:headerData="headerData"
:border="true"
:pagination="false"
:order="false"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
>
</Table>
<div class="dialogOption entrySave revokeOperation">
<el-button
class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
type="primary"
@click="formSubmit"
>
确定
</el-button>
<el-button class="entrySaveButton" @click="cancelModify">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { checkBillNo } from "@/api/declareData-api.js";
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
dataPreviewTitle: {
type: String,
default: "预览",
},
selectedDatas: {
type: Array,
default: () => [],
},
},
data() {
return {
headerData: [
{
name: "提运单号",
value: "billNo",
width: "180px",
align: "left",
},
{
name: "物流运单编号",
value: "logisticsWaybillNumber",
width: "",
align: "left",
},
],
tableData: [],
batchModifyVisible: false,
logisticsTotal: 0,
tableMaxheight: 200,
};
},
watch: {
showDialog(val) {
if (val) {
this.batchModifyVisible = val;
this.getBillNo();
}
},
},
created() {},
methods: {
getBillNo() {
checkBillNo({
declareIds: this.selectedDatas.map((item) => item.declareId),
}).then((res) => {
console.log(res);
if (+res.code === 200) {
this.tableData = res.data;
const { total } = this.getLogisticsWaybillDetails(this.tableData);
this.logisticsTotal = total;
this.tableMaxheight =
res.data.length >= 10 ? 500 : res.data.length * 50 + 50;
}
});
},
getLogisticsWaybillDetails(data) {
const numbers = data.reduce((acc, item) => {
const validNumbers = item.logisticsWaybillNumber
.split(",")
.filter((num) => num && num.trim());
return [...acc, ...validNumbers];
}, []);
return {
total: numbers.length,
numbers: numbers,
};
},
formSubmit() {
this.cancelModify(1);
},
cancelModify(val) {
this.batchModifyVisible = false;
this.$emit("cancelDataPreview", val);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
.revokeOperation {
margin-bottom: 25px;
.revokeSubmitBtn {
margin-right: 30px;
}
}
</style>
src/views/reportingData/index.vue
View file @
70a448d
...
...
@@ -137,6 +137,14 @@
>
批量修改
</el-button>
<!-- <el-button
class="entrySaveButton"
size="small"
icon="el-icon-edit"
@click="batchModify"
>
重量调整
</el-button> -->
<el-button
class="entrySaveButton"
size="small"
...
...
@@ -442,6 +450,13 @@
:selected="selected"
@close="dialogClose"
/>
<!-- 数据预览 -->
<DataPreview
:showDialog="dataPreviewVisible"
:dataPreviewTitle="dataPreviewTitle"
:selectedDatas="selected"
@cancelDataPreview="cancelDataPreview"
/>
</div>
</template>
...
...
@@ -464,6 +479,7 @@ import TemplateDownloadDialog from "./templateDownloadDialog.vue";
import ExportDialog from "./exportDialog.vue";
import BatchModify from "./batchModify.vue";
import TimeDialog from "./time-dialog.vue";
import DataPreview from "./data-preview.vue";
export default {
name: "ReportingData",
components: {
...
...
@@ -473,6 +489,7 @@ export default {
ExportDialog,
BatchModify,
TimeDialog,
DataPreview,
},
data() {
return {
...
...
@@ -650,6 +667,11 @@ export default {
datasExportVisible: false,
batchModifyVisible: false,
timeVisible: false,
// 数据预览
dataPreviewVisible: false,
dataPreviewTitle: "",
currentLoadingKey: "",
paramsOjb: {},
};
},
created() {
...
...
@@ -849,6 +871,39 @@ export default {
}
this.timeVisible = true;
},
// 申报
postDeclareData(obj, loadingKey) {
// 提交申报数据
declareDataUpload(obj)
.then((res) => {
if (res.code === "200") {
this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。");
} else {
this.alertWarningMsg(res.message);
}
})
.catch((err) => {
console.error(err);
this.alertWarningMsg("申报失败,请稍后重试。");
})
.finally(() => {
// 无论成功或失败,都重置加载状态并刷新数据
this.$set(this.loadings, loadingKey, false);
this.search(0);
});
},
cancelDataPreview(val) {
this.dataPreviewVisible = false;
this.dataPreviewTitle = "";
if (val === 1) {
this.postDeclareData(this.paramsOjb, this.currentLoadingKey);
} else {
this.$set(this.loadings, this.currentLoadingKey, false);
this.paramsOjb = {};
}
},
/**
* 通用申报方法
...
...
@@ -861,14 +916,21 @@ export default {
this.alertWarningMsg("请选择数据!");
return;
}
// 设置加载状态
this.$set(this.loadings, loadingKey, true);
// 构造请求参数
const obj = {
declareIds: this.selected.map((item) => item.declareId),
type: dropdownCode,
};
if (dropdownName === "一键申报" || dropdownName === "清单总分单申报") {
this.dataPreviewVisible = true;
this.dataPreviewTitle = `预览-${dropdownName}`;
this.currentLoadingKey = loadingKey;
this.paramsOjb = obj;
return;
}
// 如果是撤销单申报,显示弹窗并返回
if (dropdownName === "撤销单申报") {
...
...
@@ -878,24 +940,7 @@ export default {
return;
}
// 提交申报数据
declareDataUpload(obj)
.then((res) => {
if (res.code === "200") {
this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。");
} else {
this.alertWarningMsg(res.message);
}
})
.catch((err) => {
console.error(err);
this.alertWarningMsg("申报失败,请稍后重试。");
})
.finally(() => {
// 无论成功或失败,都重置加载状态并刷新数据
this.$set(this.loadings, loadingKey, false);
this.search(0);
});
this.postDeclareData(obj, loadingKey);
},
//切换申报模式
dropdownChange(val) {
...
...
src/views/reportingData/time-dialog.vue
View file @
70a448d
...
...
@@ -2,15 +2,24 @@
<el-dialog
class="entryDialog classCUploadDialog"
title="离境单申报"
:visible.sync="timeVisible"
:visible.sync="timeVisible
Config
"
:show-close="false"
width="
45
0px"
width="
70
0px"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
@close="close(false)"
>
<div class="modelItem">
<div style="margin-bottom: 10px">
<span>
提运单号 数量:<strong>{{ tableData.length }}</strong>
</span>
<span style="margin-left: 20px">
物流运单编号 数量:<strong>{{ logisticsTotal }}</strong>
</span>
</div>
<div class="modelItem" style="margin-bottom: 10px">
<el-form
class="fedexFormStyle"
ref="formData"
...
...
@@ -19,23 +28,8 @@
size="small"
>
<el-row :gutter="5">
<el-col :span="
24
">
<el-col :span="
18
">
<Formitem label="离境时间" prop="leaveTime" type="edit">
<!-- <el-select
type="text"
id="inputInner-edit-leaveTime"
v-model="formData.leaveTimel-date-picker"
clearable
filterable
placeholder=""
>
<el-option
v-for="item in operatorCode"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select> -->
<el-date-picker
class="inputInner--leaveTime"
id="inputInner-edit-leaveTime"
...
...
@@ -50,6 +44,19 @@
</el-row>
</el-form>
</div>
<Table
class="fedexDetialTable fedexSreachTable"
ref="entryTable"
:data="tableData"
:headerData="headerData"
:border="true"
:pagination="false"
:order="false"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
>
</Table>
<div class="dialogOption entrySave">
<el-button
class="entrySaveButton"
...
...
@@ -63,7 +70,7 @@
</template>
<script>
import { declareUpload } from "@/api/declareData-api.js";
import { declareUpload
, checkBillNo
} from "@/api/declareData-api.js";
export default {
props: {
timeVisible: {
...
...
@@ -83,15 +90,53 @@ export default {
formData: {
leaveTime: "",
},
timeVisibleConfig: false,
headerData: [
{
name: "提运单号",
value: "billNo",
width: "180px",
align: "left",
},
{
name: "物流运单编号",
value: "logisticsWaybillNumber",
width: "",
align: "left",
},
],
tableData: [],
loadings: {
dialogLoading: false,
submitLoading: false,
},
loadingText: "",
logisticsTotal: 0,
tableMaxheight: 200,
};
},
watch: {
timeVisible(val) {
if (val) {
this.timeVisibleConfig = val;
this.getBillNo();
}
},
},
methods: {
getBillNo() {
checkBillNo({
declareIds: this.selected.map((item) => item.declareId),
}).then((res) => {
if (+res.code === 200) {
this.tableData = res.data;
const { total } = this.getLogisticsWaybillDetails(this.tableData);
this.logisticsTotal = total;
this.tableMaxheight =
res.data.length >= 9 ? 500 : res.data.length * 50 + 50;
}
});
},
//数据保存
submit() {
let obj = {
...
...
@@ -105,6 +150,19 @@ export default {
}
});
},
getLogisticsWaybillDetails(data) {
const numbers = data.reduce((acc, item) => {
const validNumbers = item.logisticsWaybillNumber
.split(",")
.filter((num) => num && num.trim());
return [...acc, ...validNumbers];
}, []);
return {
total: numbers.length,
numbers: numbers,
};
},
//新增
addapi(val) {
this.loadings.dialogLoading = true;
...
...
@@ -129,6 +187,7 @@ export default {
leaveTime: "",
};
this.loadings.dialogLoading = false;
this.timeVisibleConfig = false;
this.$emit("close", flag);
},
},
...
...
src/views/reportingData/weight-adjust.vue
0 → 100644
View file @
70a448d
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="重量调整"
:visible.sync="batchModifyVisible"
:show-close="false"
width="450px"
:close-on-click-modal="false"
>
<div>
<el-form
class="fedexFormStyle"
ref="batchModifyForm"
:model="batchModifyFormData"
:rules="batchModifyFormRules"
label-position="left"
size="small"
>
<Formitem label="提运单号" prop="modifyContent">
<el-input
type="text"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
clearable
placeholder="请输入提运单号"
></el-input>
</Formitem>
<Formitem label="件数" prop="modifyContent">
<el-input
type="text"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
clearable
placeholder="请输入修改内容"
></el-input>
</Formitem>
<Formitem label="原毛重" prop="modifyContent">
<el-input
type="text"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
clearable
placeholder="请输入修改内容"
></el-input>
</Formitem>
<Formitem label="修改后毛重" prop="modifyData">
<el-select
type="text"
v-model="batchModifyFormData.modifyData"
clearable
placeholder=""
>
<el-option
v-for="item in modifyDataList"
:key="item.itemValue"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
<Formitem label="修改内容" prop="modifyContent">
<el-input
type="text"
class="inputShadow"
resize="none"
v-model="batchModifyFormData.modifyContent"
clearable
placeholder="请输入修改内容"
></el-input>
</Formitem>
</el-form>
</div>
<div class="dialogOption entrySave revokeOperation">
<el-button
class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
type="primary"
@click="formSubmit"
>确定</el-button
>
<el-button class="entrySaveButton" @click="cancelModify">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { bathDeclareDate } from "@/api/declareData-api.js";
import { getDictData } from "@/api/system/dict-api.js";
export default {
props: {
showDialog: {
type: Boolean,
default: false,
},
selectedDatas: {
type: Array,
default: () => [],
},
},
data() {
return {
batchModifyVisible: false,
batchModifyFormData: {
modifyData: "",
modifyContent: "",
},
batchModifyFormRules: {
modifyData: [
{ required: true, message: "请选择修改数据", trigger: "change" },
],
modifyContent: [
{ required: true, message: "请输入修改内容", trigger: "blur" },
],
},
modifyDataList: [
{ name: "提运单号", value: "BILLNO" },
{ name: "航班航次号", value: "FLIGHT_NUMBER" },
],
};
},
watch: {
showDialog(val) {
if (val) {
this.batchModifyVisible = val;
this.batchModifyFormData.modifyData = "";
this.batchModifyFormData.modifyContent = "";
}
},
},
created() {
this.getModifyDataList();
},
methods: {
getModifyDataList() {
getDictData({ doctCode: "DATABASE_FIELD" })
.then((res) => {
if (res.code == "200") {
this.modifyDataList = res.data;
}
})
.catch((err) => {
console.error(err);
});
},
formSubmit() {
this.$refs.batchModifyForm.validate((valid) => {
if (valid) {
let obj = {
declareIds: [],
modifyData: this.batchModifyFormData.modifyData,
modifyContent: this.batchModifyFormData.modifyContent,
};
this.selectedDatas.forEach((item) => {
obj.declareIds.push(item.declareId);
});
console.log("datas==", obj);
bathDeclareDate(obj)
.then((res) => {
if (res.code === "200") {
this.msgSuccess("批量修改成功");
this.cancelModify(1);
} else {
this.alertWarningMsg(res.message);
}
})
.catch((err) => {
console.log(err);
this.alertWarningMsg(err.message);
this.cancelModify(1);
});
} else {
return false;
}
});
},
cancelModify(val) {
this.batchModifyVisible = false;
this.$emit("cancelBatchModify", val);
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
.modelItem {
width: 100%;
.modelItem-title {
display: flex;
justify-content: space-between;
margin-bottom: 5px;
font-size: 14px;
font-weight: 600;
color: #333;
}
}
.revokeOperation {
margin-bottom: 25px;
.revokeSubmitBtn {
margin-right: 30px;
}
}
</style>
src/views/roleConfig/index.vue
View file @
70a448d
...
...
@@ -169,10 +169,10 @@ export default {
addMenuFn() {
let params = {
icon: "",
menuName: "
运抵单申报
",
order:
1
,
parentMenuId: 9
6
,
physicalUrl: "/
arrival-declar
e", //-management
menuName: "
HSCODE 管理
",
order:
6.2
,
parentMenuId: 9
0
,
physicalUrl: "/
hs-cod
e", //-management
url: "",
};
addMenu(params).then((res) => {
...
...
Please
register
or
login
to post a comment