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
feiyue.teng
2025-01-03 18:04:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
508f85b8df52356a4ab4f7d70097a58d63f9c933
508f85b8
1 parent
a93ffe2e
撤销单申报 添加对话确认
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
227 additions
and
1 deletions
src/api/declareData-api.js
src/views/reportingData/index.vue
src/views/reportingData/revokeDialog.vue
src/api/declareData-api.js
View file @
508f85b
...
...
@@ -44,7 +44,10 @@ export function declareDataUpload(data) {
return
request
({
url
:
'/bus-customer/declareData/'
+
data
.
type
,
method
:
'post'
,
data
:
data
.
declareIds
,
data
:{
cancellationReason
:
data
.
cancellationReason
,
declareIds
:
data
.
declareIds
},
})
}
...
...
src/views/reportingData/index.vue
View file @
508f85b
...
...
@@ -316,6 +316,11 @@
@dwonloadModelFile="dwonloadModelFile"
@close="close"
/>
<RevokeDialog
:showDialog="revokeVisible"
:selectedDatas="selected"
:dropdownCode="dropdownCode"
@cancelRevoke="cancelRevoke" />
</div>
</template>
...
...
@@ -330,11 +335,14 @@ import {
getLogisticsReceipt,
exportDeclareData
} from "@/api/declareData-api.js";
import { getDictData } from '@/api/system/dict-api.js'
import DialogVue from "./dialog.vue";
import RevokeDialog from "./revokeDialog.vue";
export default {
name: "ReportingData",
components: {
DialogVue,
RevokeDialog
},
data() {
return {
...
...
@@ -459,10 +467,14 @@ export default {
outerVisible: false,
dropdownName: "一键申报",
dropdownCode: "full",
revokeVisible:false,
};
},
created() {
this.search(0);
// this.getCancellationReasons()
},
mounted() {
this.tableMaxheight = window.innerHeight - 300;
...
...
@@ -584,6 +596,12 @@ export default {
this.selected.forEach((item) => {
obj.declareIds.push(item.declareId);
});
if (this.dropdownName === '撤销单申报') {
this.revokeVisible = true
return
}
declareDataUpload(obj)
.then((res) => {
if (res.code === "200") {
...
...
@@ -598,6 +616,8 @@ export default {
console.log(err);
this.loadings.dropDownLoading = false;
});
} else {
this.alertWarningMsg("请选择数据!");
}
...
...
@@ -751,6 +771,12 @@ export default {
});
}
},
cancelRevoke(){
this.loadings.dropDownLoading = false;
this.revokeVisible = false
}
},
};
</script>
...
...
@@ -799,4 +825,10 @@ export default {
transform: translate(0, -50%);
z-index: 10;
}
.revokeOperation{
margin-bottom:25px;
.revokeSubmitBtn{
margin-right: 30px;
}
}
</style>
...
...
src/views/reportingData/revokeDialog.vue
0 → 100644
View file @
508f85b
<template>
<el-dialog
class="entryDialog classCUploadDialog"
title="撤销单申报"
:visible.sync="cancelVisible"
:show-close="false"
width="60%"
:close-on-click-modal="false"
>
<div>
<el-form class="fedexFormStyle"
ref="cancelForm"
:model="cancelFormData"
:rules="cancelFormRules"
label-position="left"
size="small"
>
<Formitem label="撤销原因" prop="cancellationReason">
<el-select
type="text"
v-model="cancelFormData.cancellationReason"
@change="changeCancellationReason"
clearable
placeholder=""
>
<el-option
v-for="(item) in cancellationReasons"
:key="item.itemValue"
:label="item.itemValue"
:value="item.itemValue"
></el-option>
</el-select>
</Formitem>
<Formitem v-if="showOtherReason" label="其他原因" prop="otherReason">
<el-input
type="textarea"
class="inputShadow"
resize="none"
v-model="cancelFormData.otherReason"
clearable
placeholder="请输入其它撤销原因"
></el-input>
</Formitem>
</el-form>
</div>
<div class="dialogOption entrySave revokeOperation">
<el-button
class="entrySaveButton entrySaveButton-background revokeSubmitBtn"
type="primary"
@click="submitRevoke"
>提交</el-button>
<el-button
class="entrySaveButton"
@click="cancelRevoke"
>取消</el-button>
</div>
</el-dialog>
</template>
<script>
import { declareDataUpload } 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:() => []
},
dropdownCode: {
type: String,
default: 'full',
},
},
data() {
return {
cancelVisible:false,
showOtherReason:false,
cancellationReasons:[],
cancelFormData:{
cancellationReason:'',
otherReason:'',
},
cancelFormRules: {
cancellationReason: [
{ required: true, message: '请选择撤销原因', trigger: 'change' }
],
otherReason:[
{ required: true, message: '请输入撤销原因', trigger: 'blur' }
]
}
};
},
watch: {
showDialog(val) {
if (val) {
this.cancelVisible = val
}
},
},
created() {
this.getCancellationReasons()
},
methods: {
getCancellationReasons(){
getDictData({doctCode:'CANCELLATION_REASON'}).then(res =>{
if (res.code == '200') {
this.cancellationReasons = res.data
}
}).catch(err =>{
console.error(err)
})
},
changeCancellationReason(ev){
if (ev == '手工输入') {
this.showOtherReason = true
} else {
this.showOtherReason = false
}
},
submitRevoke(){
if (!this.showOtherReason) {
this.cancelFormData.otherReason = ''
}
this.$refs.cancelForm.validate((valid) => {
if (valid) {
let obj = {
cancellationReason: this.cancelFormData.otherReason || this.cancelFormData.cancellationReason,
declareIds: [],
type: this.dropdownCode,
};
this.selectedDatas.forEach((item) => {
obj.declareIds.push(item.declareId);
});
console.log('datas==', obj)
declareDataUpload(obj)
.then((res) => {
if (res.code === "200") {
// this.alertSuccessMsg(res.message);
this.alertSuccessMsg("数据已成功提交申报,请等待海关回执。");
} else {
this.alertWarningMsg(res.message);
}
this.cancelRevoke()
})
.catch((err) => {
console.log(err);
this.cancelRevoke()
});
} else {
return false;
}
});
},
cancelRevoke(){
this.cancelVisible = false
this.showOtherReason = false
this.cancelFormData.cancellationReason = ''
this.cancelFormData.otherReason = ''
this.$emit('cancelRevoke')
}
},
};
</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
Please
register
or
login
to post a comment