作者 xudada

批量删除,批量申请功能

... ... @@ -12,4 +12,6 @@ export const selectCustomcode=params=>{return http.get(`${baseUrl}/selectCustomc
export const sendCreateMt1201=params=>{return http.post(`${baseUrl}/sendCreateMt1201`, params);};
export const sendEditeMt1201=params=>{return http.post(`${baseUrl}/sendEditeMt1201`, params);};
export const sendRemoveMt1201=params=>{return http.post(`${baseUrl}/sendRemoveMt1201`, params);};
\ No newline at end of file
export const sendRemoveMt1201=params=>{return http.post(`${baseUrl}/sendRemoveMt1201`, params);};
export const sendBatchDelMt1201=params=>{return http.post(`${baseUrl}/sendBatchDelMt1201`, params);};
export const sendBatchApllyMt1201=params=>{return http.post(`${baseUrl}/sendBatchApllyMt1201`, params);};
... ...
... ... @@ -11,4 +11,8 @@ export const sendCreateMt520x=params=>{return http.post(`${baseUrl}/sendCreateMt
export const sendRemoveMt520x=params=>{return http.post(`${baseUrl}/sendRemoveMt520x`, params);};
export const selectCustomcode=params=>{return http.get(`${baseUrl2}/selectCustomcode`, params);};
export const sendbatchRemoveMt5201=params=>{return http.post(`${baseUrl}/sendbatchRemoveMt5201`, params);};
export const sendbatchCreateMt5201=params=>{return http.post(`${baseUrl}/sendbatchCreateMt5201`, params);};
... ...
... ... @@ -135,7 +135,7 @@
this.tableData=response.list;
this.tableloading=false;
this.total=response.total;
this.listLoading = false;
this.listLoading = false;
});
},
/*原始舱单跳转*/
... ...
... ... @@ -588,7 +588,12 @@
</el-col>
<el-col :span="2.5" class="pub">
<div class="grid-content">
<el-button type="primary" size="mini">批量发送删除报</el-button>
<el-button type="primary" size="mini" :disabled="batich" @click="batchdel()">批量发送删除报</el-button>
</div>
</el-col>
<el-col :span="2.5" class="pub">
<div class="grid-content">
<el-button type="primary" size="mini" :disabled="batich" @click="batchaplly()">批量申请</el-button>
</div>
</el-col>
<el-col :span="2" class="pub">
... ... @@ -717,7 +722,7 @@
</style>
<script>
import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201 } from '../../api/mt1201'
import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201,sendBatchDelMt1201,sendBatchApllyMt1201 } from '../../api/mt1201'
import{addResponse,selectResponseList} from "../../api/InResponse";
import FileSaver from "file-saver";
import XLSX from "xlsx";
... ... @@ -890,7 +895,10 @@
dialogTableVisible:false,
gridData:[],
tableloading:true,
htmlTitle:''
htmlTitle:'',
batich:true,
batichboolean:false,
uuids:[],
}
},
methods: {
... ... @@ -982,10 +990,44 @@
return false;
}
},
/*多选框功能*/
/*多选框功能批量选择*/
handleSelectionChange(val) {
this.multipleSelection = val;
console.log(val)
if(this.multipleSelection!=null && this.multipleSelection!=""){
this.batich=false;
}else{
this.batich=true;
}
},
//批量删除
batchdel(){
let ids=[];
this.multipleSelection.forEach(function (item) {
ids.push(item.uuid);
})
this.uuids=ids;
this.udStatus='delete';
this.dialogFormVisible=true;
this.batichboolean=true;
},
//批量申请
batchaplly(){
let ids=[];
this.multipleSelection.forEach(function (item) {
ids.push(item.uuid);
})
sendBatchApllyMt1201(ids).then(res=>{
let response=res.data;
this.code=response.code;
if(this.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
/*编辑主单信息*/
handleEdit(index, row){
... ... @@ -1055,40 +1097,56 @@
row.flightno=row.flightno.substring(2);
}
this.temprows= row;
this.batichboolean=false;
},
//提交发送舱单删除报表单
deleteUdForm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
const map = {'flightNo':this.temprows.flightno,
'flightDate':this.temprows.flightdate,
'awba':this.temprows.awba,
'content':'',
'customCode':this.temprows.customcode,
'awbh':this.temprows.awbh,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel,
'carrier':this.Udform.carrier,
'username':loginUserInfo.username}
sendRemoveMt1201(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.temprows.status='24';
this.temprows.customText='舱单删除报发送成功';
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
if(this.batichboolean){
let arr={ids:this.uuids,reason:this.Udform.operreason,contactName:loginUserInfo.username,contactTel:this.Udform.opertel,content:''}
sendBatchDelMt1201(arr).then(res=>{
let response=res.data;
this.code=response.code;
if(this.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
}else{
const map = {'flightNo':this.temprows.flightno,
'flightDate':this.temprows.flightdate,
'awba':this.temprows.awba,
'content':'',
'customCode':this.temprows.customcode,
'awbh':this.temprows.awbh,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel,
'carrier':this.Udform.carrier,
'username':loginUserInfo.username}
sendRemoveMt1201(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.temprows.status='24';
this.temprows.customText='舱单删除报发送成功';
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
}
} else {
console.log('error submit!!');
return false;
... ... @@ -1320,6 +1378,7 @@
this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode,goodsname:row.goodsname}});
},
//返回上一层
back(){
this.$router.go(-1);
... ... @@ -1332,4 +1391,4 @@
this.getList();
}
}
</script>
\ No newline at end of file
</script>
... ...
... ... @@ -349,7 +349,8 @@
<!--底部按钮及理货信息-->
<el-row>
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" v-on:click="addTally" size="mini">新增进港理货</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini">批量发送删除报</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini" :disabled="batich" @click="batchdel()">批量发送删除报</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini" :disabled="batich" @click="batchaplly()">批量申请</el-button></div></el-col>
<el-col :span="2"><div class="grid-content"><el-button type="primary" @click="back" size="mini">返回</el-button></div></el-col>
<el-col :span="2.5"><div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div></el-col>
<el-col :span="3.5"><div class="grid-content"><span>理货总件数:{{sumNmmsPrice}}</span></div></el-col>
... ... @@ -440,8 +441,9 @@
<script>
import{addResponse,selectResponseList} from "../../api/InResponse";
import { getMt5201List,addMt5201,ediMt5201,delMt5201,sendCreateMt520x,sendRemoveMt520x,selectCustomcode} from '../../api/mt5201'
import { getMt5201List,addMt5201,ediMt5201,delMt5201,sendCreateMt520x,sendRemoveMt520x,selectCustomcode,sendbatchRemoveMt5201,sendbatchCreateMt5201} from '../../api/mt5201'
import loginUserInfo from '@/api/base'
import {sendBatchApllyMt1201, sendBatchDelMt1201} from "../../api/mt1201";
export default {
data() {
return {
... ... @@ -536,7 +538,10 @@
loading:false,
dialogTableVisible:false,
gridData:[],
tableLoading:false
tableLoading:false,
batich:true,
batichboolean:false,
uuids:[],
}
},
methods: {
... ... @@ -657,41 +662,58 @@
row.awbh="";
}
this.rows=row;
this.batichboolean=false;
},
//发送理化删除报提交表单
deleteUdForm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
const map = {'flightNo':this.rows.flightno,
'flightDate':this.rows.flightdate,
'awba':this.rows.awba,
'content':'',
'customCode':this.rows.customcode,
'awbh':this.rows.awbh,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel,
'rcfdep':this.rows.rcfdep,
'carrier':this.rows.carrier,
'username':loginUserInfo.username}
sendRemoveMt520x(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.rows.status='24';
this.rows.ext5='理货删除报发送成功';
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
if(this.batichboolean){
let arr={ids:this.uuids,reason:this.Udform.operreason,contactName:loginUserInfo.username,contactTel:this.Udform.opertel,content:''}
sendbatchRemoveMt5201(arr).then(res=>{
let response=res.data;
this.code=response.code;
if(this.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
}else{
const map = {'flightNo':this.rows.flightno,
'flightDate':this.rows.flightdate,
'awba':this.rows.awba,
'content':'',
'customCode':this.rows.customcode,
'awbh':this.rows.awbh,
'reason' :this.Udform.operreason,
'contactName':this.Udform.operperson,
'contactTel':this.Udform.opertel,
'rcfdep':this.rows.rcfdep,
'carrier':this.rows.carrier,
'username':loginUserInfo.username}
sendRemoveMt520x(map).then(res=>{
let response=res.data;
//console.log(res);
this.code=response.code;
if(this.code=='200'){
this.rows.status='24';
this.rows.ext5='理货删除报发送成功';
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.dialogFormVisible=false;
this.outerVisible = false;
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
}
} else {
console.log('error submit!!');
return false;
... ... @@ -702,6 +724,40 @@
//批量选中事件
handleSelectionChange(val) {
this.multipleSelection = val;
if(this.multipleSelection!=null && this.multipleSelection!=""){
this.batich=false;
}else{
this.batich=true;
}
},
//批量申请
batchaplly(){
let ids=[];
this.multipleSelection.forEach(function (item) {
ids.push(item.uuid);
})
sendbatchCreateMt5201(ids).then(res=>{
let response=res.data;
this.code=response.code;
if(this.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
},
//批量删除
batchdel(){
let ids=[];
this.multipleSelection.forEach(function (item) {
ids.push(item.uuid);
})
this.uuids=ids;
this.udStatus='delete';
this.dialogFormVisible=true;
this.batichboolean=true;
},
//编辑主单
handleMain(index,row){
... ... @@ -833,4 +889,4 @@
this.getMt5201List();
}
}
</script>
\ No newline at end of file
</script>
... ...