zhanbo.xu

feat: 开发新增功能

......@@ -223,3 +223,23 @@ export function bathDeclareDate(data) {
data,
});
}
// GET
// ​/operatorPlace​/getCurrUserOperatorCode
// 获取当前用户监管场所代码
export function getCurrUserOperatorCode() {
return request({
url: "/bus-customer/operatorPlace/getCurrUserOperatorCode",
method: "get",
});
}
export function declareUpload(data) {
return request({
url: "/bus-customer/declareData/" + data.type,
method: "post",
data: {
...data,
},
});
}
......
......@@ -5,7 +5,7 @@ import request from "@/utils/request";
// 新增监管场所
export function addOperatorPlace(data) {
return request({
url: "/bus-customer/operatorPlace/addOperatorPlace",
url: "/bus-customer/operatorPlace/addOperatorPlace",
method: "post",
data: data,
});
......@@ -16,7 +16,7 @@ export function addOperatorPlace(data) {
// 查询监管场所列表
export function getOperatorPlaceList(data) {
return request({
url: "/bus-customer/operatorPlace/getOperatorPlaceList",
url: "/bus-customer/operatorPlace/getOperatorPlaceList",
method: "post",
data: data,
});
......@@ -27,7 +27,7 @@ export function getOperatorPlaceList(data) {
// 修改监管场所
export function updateOperatorPlace(data) {
return request({
url: "/bus-customer/operatorPlace/updateOperatorPlace",
url: "/bus-customer/operatorPlace/updateOperatorPlace",
method: "post",
data: data,
});
......
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="运抵单申报"
:visible.sync="outerVisible"
:show-close="false"
width="40%"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
@close="close"
>
<div class="modelItem">
<el-form
class="fedexFormStyle"
ref="formData"
:model="formData"
label-position="top"
size="small"
>
<el-row :gutter="5">
<el-col :span="8">
<Formitem label="监管场所" prop="operatorCode" type="edit">
<el-select
type="text"
id="inputInner-edit-operatorCode"
v-model="formData.operatorCode"
clearable
filterable
placeholder=""
>
<el-option
v-for="item in operatorCode"
:key="item"
:label="item"
:value="item"
></el-option>
</el-select>
</Formitem>
</el-col>
<el-col :span="8">
<Formitem
label="境内运输工具编码"
prop="domesticTrafNo"
type="edit"
>
<el-input
type="text"
class="inputShadow"
id="inputInner-edit-domesticTrafNo"
resize="none"
v-model="formData.domesticTrafNo"
clearable
placeholder=""
></el-input>
</Formitem>
</el-col>
</el-row>
</el-form>
</div>
<div class="dialogOption entrySave">
<el-button
class="entrySaveButton"
:disabled="loadings.submitLoading"
@click="submit"
>确 定</el-button
>
<el-button class="entrySaveButton" @click="close">关 闭</el-button>
</div>
</el-dialog>
</template>
<script>
import {
getCurrUserOperatorCode,
declareUpload,
} from "@/api/declareData-api.js";
export default {
props: {
outerVisible: {
type: Boolean,
default: false,
},
selected: {
type: Array,
default: () => {
return [];
},
},
},
watch: {
outerVisible(val) {
if (val) {
this.loadings.dialogLoading = false;
this.fetchOperatorCode();
}
},
},
data() {
return {
formData: {
operatorCode: "",
domesticTrafNo: "",
},
loadings: {
dialogLoading: false,
submitLoading: false,
},
loadingText: "",
operatorCode: [],
};
},
methods: {
fetchOperatorCode() {
getCurrUserOperatorCode().then((res) => {
if (res.code === "200") {
this.operatorCode = res.data;
}
});
},
//数据保存
submit() {
this.loadings.dialogLoading = true;
let obj = {
...this.formData,
declareIds: this.selected.map((item) => item.declareId),
type: "arrivalIn",
};
this.$refs.formData.validate((valid) => {
if (valid) {
this.addapi(obj);
} else {
this.loadings.dialogLoading = false;
}
});
},
//新增
addapi(val) {
declareUpload(val)
.then((res) => {
if (res.code === "200") {
this.msgSuccess(res.message);
this.close();
} else {
this.alertWarningMsg(res.message);
this.loadings.dialogLoading = false;
}
})
.catch((err) => {
console.log(err);
this.loadings.dialogLoading = false;
});
},
close() {
this.formData = {
operatorCode: "",
domesticTrafNo: "",
};
this.loadings.dialogLoading = false;
this.$emit("close");
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
</style>
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
......@@ -126,7 +126,8 @@
ref="entryTable"
:data="tableData"
:headerData="headerData"
:maxHeight="tableMaxheight"
:height="tableMaxheight + 'px'"
:maxHeight="tableMaxheight + 'px'"
:border="true"
:pagination="true"
:order="true"
......@@ -144,7 +145,12 @@
<template slot="optionColumn">
<el-table-column align="left" label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="downloadFile(scope.row)" :disabled="!scope.row.certificare">下载证书</el-button>
<el-button
type="text"
@click="downloadFile(scope.row)"
:disabled="!scope.row.certificare"
>下载证书</el-button
>
<!-- <el-button type="text" @click="downloadQingdaoFile(scope.row)" :disabled="!scope.row.certificare">下载青岛证书</el-button> -->
<el-button type="text" @click="update(scope.row)"> 修改 </el-button>
</template>
......@@ -163,7 +169,11 @@
</template>
<script>
import { getCustomerList,downloadCertificate, downloadQingdaoCertificate } from "@/api/system/customer-ai.js";
import {
getCustomerList,
downloadCertificate,
downloadQingdaoCertificate,
} from "@/api/system/customer-ai.js";
import { getPortList } from "@/api/system/user.js";
import DialogVue from "./dialog.vue";
export default {
......@@ -249,8 +259,8 @@ export default {
align: "left",
},
],
dict:{
port:[]
dict: {
port: [],
},
// dict: {
// orderRequester: [
......@@ -261,7 +271,7 @@ export default {
loadings: {
searchLoading: false,
},
tableMaxheight: null,
tableMaxheight: 500,
outerVisible: false,
dialogTitle: "",
editType: "",
......@@ -270,18 +280,25 @@ export default {
created() {
this.searchPortDictData();
this.search(0);
this.calculateTableHeight();
},
mounted() {
this.tableMaxheight = window.innerHeight - 300;
window.addEventListener("resize", this.calculateTableHeight);
},
beforeDestroy() {
window.removeEventListener("resize", this.calculateTableHeight);
},
methods: {
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
//查询
search(val) {
this.loadings.searchLoading = true;
if (val == 0) {
this.page.pageIndex = 1;
}
let obj = {...this.sreachFormData};
let obj = { ...this.sreachFormData };
obj.pageIndex = this.page.pageIndex;
obj.pageSize = this.page.pageSize;
obj.endCreationTime = "";
......@@ -325,21 +342,21 @@ export default {
},
//下载证书
downloadFile(val) {
downloadCertificate(val.id,val.certificare).then((res)=>{
}).catch((err)=>{
downloadCertificate(val.id, val.certificare)
.then((res) => {})
.catch((err) => {
console.log(err);
this.alertErrorMsg("证书下载失败,请联系管理员!");
})
});
},
//下载青岛证书
downloadQingdaoFile(val) {
downloadQingdaoCertificate(val.id,val.certificare).then((res)=>{
}).catch((err)=>{
downloadQingdaoCertificate(val.id, val.certificare)
.then((res) => {})
.catch((err) => {
console.log(err);
this.alertErrorMsg("证书下载失败,请联系管理员!");
})
});
},
addCustomer() {
this.dialogTitle = "新增客户";
......@@ -347,11 +364,11 @@ export default {
this.outerVisible = true;
},
update(val) {
let data={
let data = {
...val,
file:null,
qingdaoFile:null
}
file: null,
qingdaoFile: null,
};
this.dialogTitle = "修改客户";
this.editType = "update";
this.outerVisible = true;
......
......@@ -4,7 +4,7 @@
title="新增模拟回执管理"
:visible.sync="outerVisible"
:show-close="false"
width="40%"
width="45%"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
......@@ -287,7 +287,7 @@ export default {
.order-select-warp-ol {
::v-deep {
.el-select__input {
width: 40px !important;
width: 35px !important;
padding-top: 0 !important;
}
}
......
......@@ -182,7 +182,7 @@
</el-dropdown-menu>
</el-dropdown>
<!-- 运抵单申报按钮 -->
<el-button
<!-- <el-button
size="small"
type="primary"
class="dropdown-style-button"
......@@ -194,7 +194,7 @@
icon-class="fedexDeclareIcon"
></svg-icon>
运抵单申报
</el-button>
</el-button> -->
<!-- 离境单申报按钮 -->
<el-button
size="small"
......@@ -202,7 +202,11 @@
class="dropdown-style-button"
:loading="loadings.departureLoading"
@click="
declareData('departureLoading', '离境单申报', 'logisticsDeparture')
declareDataTime(
'departureLoading',
'离境单申报',
'logisticsDeparture'
)
"
>
<svg-icon
......@@ -243,9 +247,6 @@
<span style="font-weight: 700; color: #515a6e">订单编号:</span>
{{ selectedLogRow.orderno }}
</div>
<!-- <div slot="buttonLabel">
{{ selectedLogRow.allLogDataReceiptStatusPopoverType }}
</div> -->
</TablePopover>
</section>
<Table
......@@ -436,6 +437,11 @@
:showDialog="batchModifyVisible"
@cancelBatchModify="cancelBatchModify"
/>
<TimeDialog
:timeVisible="timeVisible"
:selected="selected"
@close="dialogClose"
/>
</div>
</template>
......@@ -458,6 +464,7 @@ import RevokeDialog from "./revokeDialog.vue";
import TemplateDownloadDialog from "./templateDownloadDialog.vue";
import ExportDialog from "./exportDialog.vue";
import BatchModify from "./batchModify.vue";
import TimeDialog from "./time-dialog.vue";
export default {
name: "ReportingData",
components: {
......@@ -466,6 +473,7 @@ export default {
TemplateDownloadDialog,
ExportDialog,
BatchModify,
TimeDialog,
},
data() {
return {
......@@ -641,6 +649,7 @@ export default {
templateDownloadVisible: false,
datasExportVisible: false,
batchModifyVisible: false,
timeVisible: false,
};
},
created() {
......@@ -669,6 +678,10 @@ export default {
});
},
methods: {
dialogClose() {
this.timeVisible = false;
this.search(0);
},
calculateTableHeight() {
this.tableMaxheight = window.innerHeight - 300;
},
......@@ -826,6 +839,14 @@ export default {
this.datasExportVisible = false;
this.loadings.exportDeclareLoading = false;
},
// 离镜申报
declareDataTime(loadingKey, dropdownName, dropdownCode) {
if (this.selected.length === 0) {
this.alertWarningMsg("请选择数据!");
return;
}
this.timeVisible = true;
},
/**
* 通用申报方法
......
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="离境单申报"
:visible.sync="timeVisible"
:show-close="false"
width="40%"
:close-on-click-modal="false"
:destroy-on-close="true"
v-loading="loadings.dialogLoading"
@close="close"
>
<div class="modelItem">
<el-form
class="fedexFormStyle"
ref="formData"
:model="formData"
label-position="top"
size="small"
>
<el-row :gutter="5">
<el-col :span="8">
<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"
v-model="formData.leaveTime"
format="yyyy-MM-dd HH:mm:ss"
type="datetime"
prefix-icon="none"
value-format="yyyy-MM-dd HH:mm:ss"
/>
</Formitem>
</el-col>
</el-row>
</el-form>
</div>
<div class="dialogOption entrySave">
<el-button
class="entrySaveButton"
:disabled="loadings.submitLoading"
@click="submit"
>确 定</el-button
>
<el-button class="entrySaveButton" @click="close">关 闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { declareUpload } from "@/api/declareData-api.js";
export default {
props: {
timeVisible: {
type: Boolean,
default: false,
},
selected: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
formData: {
leaveTime: "",
},
loadings: {
dialogLoading: false,
submitLoading: false,
},
loadingText: "",
};
},
methods: {
//数据保存
submit() {
let obj = {
...this.formData,
declareIds: this.selected.map((item) => item.declareId),
type: "logisticsDeparture",
};
this.$refs.formData.validate((valid) => {
if (valid) {
this.addapi(obj);
}
});
},
//新增
addapi(val) {
this.loadings.dialogLoading = true;
declareUpload(val)
.then((res) => {
if (res.code === "200") {
this.msgSuccess(res.message);
this.close();
} else {
this.alertWarningMsg(res.message);
this.loadings.dialogLoading = false;
}
})
.catch((err) => {
console.log(err);
this.loadings.dialogLoading = false;
});
},
close() {
this.formData = {
leaveTime: "",
};
this.loadings.dialogLoading = false;
this.$emit("close");
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
</style>
......@@ -168,11 +168,11 @@ export default {
// 新增菜单用,可以不麻烦后端---------
addMenuFn() {
let params = {
icon: "receipt",
menuName: "模拟回执管理",
icon: "",
menuName: "运抵单申报",
order: 1,
parentMenuId: 0,
physicalUrl: "/receipt", //-management
parentMenuId: 96,
physicalUrl: "/arrival-declare", //-management
url: "",
};
addMenu(params).then((res) => {
......
......@@ -299,13 +299,4 @@ export default {
<style lang="scss" scoped>
@import "@/assets/styles/variables.scss";
.menuTree {
max-width: 350px;
max-height: 300px;
overflow: auto;
margin: 0 auto;
border: 1px solid #999;
padding: 10px;
}
</style>
......