Browse Source

箱类型

java8
han\hanst 3 months ago
parent
commit
f0f5ae7a06
  1. 21
      src/views/modules/ecss/createDeclaration.vue

21
src/views/modules/ecss/createDeclaration.vue

@ -458,7 +458,7 @@
</el-table> </el-table>
</div> </div>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveDeclaration()">保存</el-button>
<el-button type="primary" :loading="saveLoading" :disabled="saveLoading" @click="saveDeclaration()">保存</el-button>
<el-button type="primary" @click="declarationFlag=false">关闭</el-button> <el-button type="primary" @click="declarationFlag=false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -496,6 +496,7 @@
dataList2:[], dataList2:[],
detailList:[], detailList:[],
dataListLoading: false, dataListLoading: false,
saveLoading: false,
searchData: { searchData: {
page: 1, page: 1,
limit: 100, limit: 100,
@ -1440,6 +1441,11 @@
this.declarationData.salesArea=this.customerMap.get(this.declarationData.overseasShipper) this.declarationData.salesArea=this.customerMap.get(this.declarationData.overseasShipper)
}, */ }, */
saveDeclaration(){ saveDeclaration(){
//
if(this.saveLoading) {
return false
}
if(this.detailList==null|| this.detailList.length<1){ if(this.detailList==null|| this.detailList.length<1){
this.$alert('不存在明细记录!', '错误', { this.$alert('不存在明细记录!', '错误', {
confirmButtonText: '确定' confirmButtonText: '确定'
@ -1454,7 +1460,11 @@
return false return false
} }
} }
// loading
this.saveLoading = true
this.declarationData.detailList=this.detailList this.declarationData.detailList=this.detailList
saveDeclaration(this.declarationData).then(({data}) => { saveDeclaration(this.declarationData).then(({data}) => {
// //
if (data && data.code === 0) { if (data && data.code === 0) {
@ -1465,6 +1475,15 @@
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
}).catch(error => {
//
this.$alert('保存失败,请重试!', '错误', {
confirmButtonText: '确定'
})
console.error('保存报关单失败:', error)
}).finally(() => {
// loading
this.saveLoading = false
}); });
}, },
//excel //excel

Loading…
Cancel
Save