feiyue.teng

申报数据管理页面添加批量修改功能

......@@ -183,6 +183,14 @@ export function updateDeclareData(data) {
data
})
}
//申报数据批量修改-航班号,运单号
export function bathDeclareDate(data) {
return request({
url: '/bus-customer/declareData/bathDeclareDate',
method: 'post',
data
})
}
......
......@@ -67,6 +67,17 @@ export function uploadCertificate(ecomEntCode, certificate) {
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,
});
}
//删除证书
export function delCertificate(id, certificate) {
......@@ -77,6 +88,15 @@ export function delCertificate(id, certificate) {
params: {id:id,certificate:certificate},
});
}
//删除青岛证书
export function delQingdaoCertificate(id, certificate) {
return request({
url: '/bus-customer/customers/deleteQingdaoCertificate',
method: 'post',
params: {id:id,certificate:certificate},
});
}
//下载证书
export function downloadCertificate(id,filename) {
......
......@@ -24,7 +24,7 @@ router.beforeEach((to, from, next) => {
store.dispatch('GetInfo').then((res) => {
// if (res.success) {
store.dispatch('GenerateRoutes').then(accessRoutes => {
store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS']);
store.dispatch("GetDict", ['DECLARE_F_FLAG', 'MEASUREMENT_UNIT','TEMPLATE_TYPE','PACKAGE_TYPE_CODE', 'RECEIPT_STATUS', 'DECLARE_APPTYPE', 'CURRENCY','COUNTRY_REGION_CODE', 'DECLARE_STATISTICS_FLAG', 'ORDER_DECLARATION_PARTY','APP_STATUS']);
// 根据roles权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
......
......@@ -101,6 +101,8 @@ service.interceptors.response.use(res => {
dangerouslyUseHTMLString: true
});
return Promise.reject(new Error(msg))
} else if (code === 530) {
store.dispatch('FedLogOut')
} else if (code !== 200) {
// MessageBox.alert(msg, '注意', {
// dangerouslyUseHTMLString: true
......
This diff is collapsed. Click to expand it.
......@@ -334,7 +334,8 @@ export default {
update(val) {
let data={
...val,
file:null
file:null,
qingdaoFile:null
}
this.dialogTitle = "修改客户";
this.editType = "update";
......
<template>
<div>
<div style="height: 100%;">
<el-form
class="fedexFormStyle"
ref="editForm"
class="fedexFormStyle fedexRowEditFormStyle"
ref="editRowForm"
:model="tableRowformData"
:rules="tableRowFormRules"
label-position="top"
......@@ -236,7 +236,7 @@
></el-input>
</Formitem>
</el-col>
<el-col :span="4">
<el-col :span="8">
<Formitem label="备注" prop="remark">
<el-input
type="text"
......@@ -267,7 +267,47 @@
data() {
return {
tableRowformData:{},
tableRowFormRules:{}
tableRowFormRules:{
enterpriseProductCode: [
{ required: true, message: '请输入企业商品货号', trigger: 'blur' },
],
enterpriseProductName: [
{ required: true, message: '请输入企业商品名称', trigger: 'blur' }
],
productName: [
{ required: true, message: '请输入商品名称', trigger: 'blur' }
],
productCode: [
{ required: true, message: '请输入商品编码', trigger: 'blur' }
],
model: [
{ required: true, message: '请输入规格型号', trigger: 'blur' }
],
destinationCountryRegionCode: [
{ required: true, message: '请选择目的国(地区)代码', trigger: 'change' }
],
unit: [
{ required: true, message: '请选择计量单位', trigger: 'change' }
],
qty: [
{ required: true, message: '请输入数量', trigger: 'blur' }
],
legalQty: [
{ required: true, message: '请输入法定数量', trigger: 'blur' }
],
currency: [
{ required: true, message: '请选择币制', trigger: 'change' }
],
price: [
{ required: true, message: '请输入单价', trigger: 'blur' }
],
totalPrice: [
{ required: true, message: '请输入总价', trigger: 'blur' }
],
netWeight: [
{ required: true, message: '请输入净重', trigger: 'blur' }
],
}
};
},
watch: {
......@@ -275,8 +315,14 @@
},
methods: {
rowFormDataSave(){
this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData})
this.tableRowformData = {}
this.$refs.editRowForm.validate((valid) => {
if (valid) {
this.$emit('rowFormDataSave', {gnum: this.rowDatas.row.gnum, tableRowformData: this.tableRowformData})
this.tableRowformData = {}
} else {
return false;
}
})
},
cancelEditRowData(){
this.tableRowformData = {}
......@@ -313,5 +359,17 @@
}
}
}
.fedexRowEditFormStyle .el-form-item{
background-color: #ffffff;
box-shadow: 0 2px 4px 0 #E5F2F8CC;
border-left: 1px solid #E5F2F8CC;
// margin-bottom: 30px;
}
.fedexRowEditFormStyle .el-form-item:has(.formError){
margin-bottom: 25px!important;
}
.fedexRowEditFormStyle .activeBorder{
border-left: 3px solid #007AB7;
}
</style>
\ No newline at end of file
......
This diff is collapsed. Click to expand it.
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="批量修改"
:visible.sync="batchModifyVisible"
:show-close="false"
width="60%"
:close-on-click-modal="false"
>
<div>
<el-form class="fedexFormStyle"
ref="batchModifyForm"
:model="batchModifyFormData"
:rules="batchModifyFormRules"
label-position="left"
size="small"
>
<Formitem label="修改数据" prop="modifyData">
<el-select
type="text"
v-model="batchModifyFormData.modifyData"
clearable
placeholder=""
>
<el-option
v-for="(item, index) in modifyDataList"
:key="index"
:label="item.name"
:value="item.value"
></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";
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() {
},
methods: {
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()
} else {
this.alertWarningMsg(res.message);
}
})
.catch((err) => {
console.log(err);
this.alertWarningMsg(err.message);
this.cancelModify()
});
} else {
return false;
}
});
},
cancelModify(){
this.batchModifyVisible = false
this.$emit('cancelBatchModify')
}
},
};
</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>
\ No newline at end of file
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="申报数据导出"
:visible.sync="datasExportVisible"
:show-close="false"
width="60%"
:close-on-click-modal="false"
>
<div>
<el-form class="fedexFormStyle"
ref="selectTemplateForm"
:model="selectTemplateFormData"
:rules="selectTemplateFormRules"
label-position="left"
size="small"
>
<Formitem label="模板类型" prop="dataSource">
<el-select
type="text"
v-model="selectTemplateFormData.dataSource"
clearable
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict.TEMPLATE_TYPE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-form>
</div>
<div class="dialogOption entrySave revokeOperation">
<el-button
class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
type="primary"
@click="startDownload"
>确定</el-button>
<el-button
class="entrySaveButton"
@click="cancelDownload"
>关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
showDialog: {
type: Boolean,
default: false,
}
},
data() {
return {
datasExportVisible:false,
selectTemplateFormData:{
dataSource:''
},
selectTemplateFormRules: {
dataSource: [
{ required: true, message: '请选择模板类型', trigger: 'change' }
],
}
};
},
watch: {
showDialog(val) {
if (val) {
this.datasExportVisible = val
this.selectTemplateFormData.dataSource=""
}
},
},
created() {
},
methods: {
startDownload(){
this.$refs.selectTemplateForm.validate((valid) => {
if (valid) {
this.$emit('startDatasExport', this.selectTemplateFormData.dataSource)
} else {
return false;
}
});
},
cancelDownload(){
this.datasExportVisible = false
this.selectTemplateFormData.dataSource=""
this.$emit('cancelDatasExport')
}
},
};
</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>
\ No newline at end of file
......@@ -128,6 +128,14 @@
>
导入模版下载
</el-button>
<el-button
class="entrySaveButton"
size="small"
icon="el-icon-edit"
@click="batchModify"
>
批量修改
</el-button>
</div>
<div class="optionButton-right">
<el-dropdown
......@@ -328,6 +336,21 @@
:selectedDatas="selected"
:dropdownCode="dropdownCode"
@cancelRevoke="cancelRevoke" />
<TemplateDownloadDialog
:showDialog="templateDownloadVisible"
@cancelDownload="cancelDownload"
/>
<ExportDialog
ref="exportDialog"
:showDialog="datasExportVisible"
@cancelDatasExport="cancelDatasExport"
@startDatasExport="startDatasExport"
/>
<BatchModify
:selectedDatas="selected"
:showDialog="batchModifyVisible"
@cancelBatchModify="cancelBatchModify"
/>
</div>
</template>
......@@ -345,11 +368,17 @@ import {
import { getDictData } from '@/api/system/dict-api.js'
import DialogVue from "./dialog.vue";
import RevokeDialog from "./revokeDialog.vue";
import TemplateDownloadDialog from "./templateDownloadDialog.vue";
import ExportDialog from "./exportDialog.vue";
import BatchModify from "./batchModify.vue";
export default {
name: "ReportingData",
components: {
DialogVue,
RevokeDialog
RevokeDialog,
TemplateDownloadDialog,
ExportDialog,
BatchModify
},
data() {
return {
......@@ -474,9 +503,10 @@ export default {
outerVisible: false,
dropdownName: "一键申报",
dropdownCode: "full",
revokeVisible:false,
templateDownloadVisible:false,
datasExportVisible:false,
batchModifyVisible:false
};
},
created() {
......@@ -553,53 +583,92 @@ export default {
//下载模板
dwonloadModelFile() {
this.loadings.dwonloadModelLoading = true;
this.fileDownload
.downLoadZip(
"api",
"declareDataModel",
"申报数据模板.xlsx",
"xlsx",
"get"
)
.finally(() => {
this.loadings.dwonloadModelLoading = false;
});
this.$store.dispatch("GetInfo").then(res =>{
console.log('res====', res)
if (res.code == 200) {
console.log('port===', res.data?.port?.split(','))
if (res.data?.port?.split(',').length == 2) {
this.templateDownloadVisible = true
} else {
this.fileDownload
.downLoadZip(
"api",
"declareDataModel",
"申报数据模板.xlsx",
"xlsx",
"get",
{type: res.data?.port}
)
.finally(() => {
this.cancelDownload()
});
}
}
}).catch(err =>{
console.log(err)
})
},
datasDownload(dataSource){
let obj = {
billNo: this.sreachFormData.billNo,
declareId: [],
logisticsNo: this.sreachFormData.logisticsNo,
orderNo: this.sreachFormData.orderNo,
receiptStatus: this.sreachFormData.receiptStatus,
dataSource
};
obj.startCreateTime = "";
obj.endCreateTime = "";
if (this.sreachFormData.createTime.length > 0) {
obj.startCreateTime = this.sreachFormData.createTime[0];
obj.endCreateTime = this.sreachFormData.createTime[1];
}
this.selected.forEach((item) => {
obj.declareId.push(item.declareId);
});
exportDeclareData(obj).then((res)=>{
// if (res.code === "200") {
// // this.alertSuccessMsg(res.message);
// } else {
// console.log(res.message);
// this.alertWarningMsg(res.message);
// }
}).catch((err)=>{
console.log(err);
this.alertErrorMsg(err);
}).finally(res =>{
this.loadings.exportDeclareLoading = false;
this.datasExportVisible = false
this.$refs.exportDialog.datasExportVisible = false
})
},
//导出
downloadData() {
this.loadings.exportDeclareLoading = true;
let obj = {
billNo: this.sreachFormData.billNo,
declareId: [],
logisticsNo: this.sreachFormData.logisticsNo,
orderNo: this.sreachFormData.orderNo,
receiptStatus: this.sreachFormData.receiptStatus,
};
obj.startCreateTime = "";
obj.endCreateTime = "";
if (this.sreachFormData.createTime.length > 0) {
obj.startCreateTime = this.sreachFormData.createTime[0];
obj.endCreateTime = this.sreachFormData.createTime[1];
}
this.selected.forEach((item) => {
obj.declareId.push(item.declareId);
});
exportDeclareData(obj).then((res)=>{
// if (res.code === "200") {
// // this.alertSuccessMsg(res.message);
// } else {
// console.log(res.message);
// this.alertWarningMsg(res.message);
// }
this.loadings.exportDeclareLoading = false;
}).catch((err)=>{
console.log(err);
this.alertErrorMsg(err);
this.loadings.exportDeclareLoading = false;
})
this.$store.dispatch("GetInfo").then(res =>{
console.log('res====', res)
if (res.code == 200) {
console.log('port===', res.data?.port?.split(','))
if (res.data?.port?.split(',').length == 2) {
this.datasExportVisible = true
} else {
this.datasDownload(res.data?.port)
}
}
}).catch(err =>{
console.log(err)
})
},
startDatasExport(dataSource){
this.datasDownload(dataSource)
},
cancelDatasExport(){
this.datasExportVisible = false
this.loadings.exportDeclareLoading = false;
},
//申报
declareData() {
......@@ -800,7 +869,21 @@ export default {
params: { data: val },
});
},
cancelDownload(){
this.loadings.dwonloadModelLoading = false;
this.templateDownloadVisible = false
},
batchModify(){
if (!this.selected.length) {
this.alertWarningMsg("请选择数据!");
return
}
this.batchModifyVisible = true
},
cancelBatchModify(){
this.batchModifyVisible = false
this.search(0);
}
},
};
</script>
......
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="导入模板下载"
:visible.sync="downloadTemplateVisible"
:show-close="false"
width="60%"
:close-on-click-modal="false"
>
<div>
<el-form class="fedexFormStyle"
ref="selectTemplateForm"
:model="selectTemplateFormData"
:rules="selectTemplateFormRules"
label-position="left"
size="small"
>
<Formitem label="模板类型" prop="type">
<el-select
type="text"
v-model="selectTemplateFormData.type"
clearable
placeholder=""
>
<el-option
v-for="(item, index) in $store.getters.dict.TEMPLATE_TYPE"
:key="index"
:label="item.itemChineseName"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
</el-form>
</div>
<div class="dialogOption entrySave revokeOperation">
<el-button
class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
type="primary"
@click="startDownload"
>确定</el-button>
<el-button
class="entrySaveButton"
@click="cancelDownload"
>关闭</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
props: {
showDialog: {
type: Boolean,
default: false,
}
},
data() {
return {
downloadTemplateVisible:false,
selectTemplateFormData:{
type:''
},
selectTemplateFormRules: {
type: [
{ required: true, message: '请选择模板类型', trigger: 'change' }
],
}
};
},
watch: {
showDialog(val) {
if (val) {
this.downloadTemplateVisible = val
}
},
},
created() {
this.selectTemplateFormData.type=""
},
methods: {
startDownload(){
this.$refs.selectTemplateForm.validate((valid) => {
if (valid) {
console.log('datas==', this.selectTemplateFormData)
this.fileDownload
.downLoadZip(
"api",
"declareDataModel",
"申报数据模板.xlsx",
"xlsx",
"get",
{type: this.selectTemplateFormData.type}
)
.finally(() => {
this.cancelDownload()
});
} else {
return false;
}
});
},
cancelDownload(){
this.downloadTemplateVisible = false
this.selectTemplateFormData.type=""
this.$emit('cancelDownload')
}
},
};
</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>
\ No newline at end of file