作者 shenhailong

预配添加 批量发送报文 批量修改报文

@@ -23,14 +23,14 @@ @@ -23,14 +23,14 @@
23 <el-col :span="24"> 23 <el-col :span="24">
24 <div class="grid-content content">预配舱单查询</div> 24 <div class="grid-content content">预配舱单查询</div>
25 </el-col> 25 </el-col>
26 - <el-col :span="22"> 26 + <el-col :span="24">
27 <div class="grid-content co"> 27 <div class="grid-content co">
28 <el-col :span="1"> 28 <el-col :span="1">
29 <div class="grid-content"></div> 29 <div class="grid-content"></div>
30 </el-col> 30 </el-col>
31 - <el-col :span="22"> 31 + <el-col :span="24">
32 <div class="grid-content"> 32 <div class="grid-content">
33 - <el-col :span="4"> 33 + <el-col :span="3">
34 <div class="grid-content"> 34 <div class="grid-content">
35 <el-input size="small" v-model="preQuery.awba" placeholder="请输入主单号" clearable></el-input> 35 <el-input size="small" v-model="preQuery.awba" placeholder="请输入主单号" clearable></el-input>
36 </div> 36 </div>
@@ -41,7 +41,16 @@ @@ -41,7 +41,16 @@
41 style="width:150px" icon="el-icon-plus" 41 style="width:150px" icon="el-icon-plus"
42 @click="handleAddpre">新增预配舱单 42 @click="handleAddpre">新增预配舱单
43 </el-button> 43 </el-button>
44 - <el-button @click="download" style="width:150px" size="small" type="primary"> 44 + <el-button @click="handleAwbSend('')" v-if="batchChooseFlag" style="width:150px" size="small" type="primary">
  45 + 批量发送申报
  46 + </el-button>
  47 + <el-button @click="handleAwbEdit('')" v-if="batchChooseFlag" style="width:150px" size="small" type="success">
  48 + 批量发送修改申报
  49 + </el-button>
  50 + <el-button @click="download" v-if="batchChooseFlag" style="width:150px" size="small" type="danger">
  51 + 批量发送删除申报
  52 + </el-button>
  53 + <el-button @click="download" style="width:150px" size="small" type="success">
45 模板下载 54 模板下载
46 </el-button> 55 </el-button>
47 <el-upload 56 <el-upload
@@ -52,7 +61,7 @@ @@ -52,7 +61,7 @@
52 :on-exceed="fileExceed" 61 :on-exceed="fileExceed"
53 accept="application/vnd.ms-excel,application/vnd.ms-excels" 62 accept="application/vnd.ms-excel,application/vnd.ms-excels"
54 ref="fileupload"> 63 ref="fileupload">
55 - <el-button slot="trigger" style="width:150px" size="small" icon="el-icon-folder-add" type="success">导入excel</el-button> 64 + <el-button slot="trigger" style="width:150px" size="small" icon="el-icon-folder-add" type="primary">导入excel</el-button>
56 </el-upload> 65 </el-upload>
57 </div> 66 </div>
58 </div> 67 </div>
@@ -77,8 +86,6 @@ @@ -77,8 +86,6 @@
77 </el-table-column> 86 </el-table-column>
78 <el-table-column label="运单号" width="130" align="center"> 87 <el-table-column label="运单号" width="130" align="center">
79 <template slot-scope="scope"> 88 <template slot-scope="scope">
80 - <!-- <span class="tableInline" v-if="scope.row.awbh !==''">{{scope.row.awbh}}</span>-->  
81 - <!-- <span class="tableInline" v-else>{{scope.row.awba}}</span>-->  
82 <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" @click="handleEdit(scope.row)" v-if="scope.row.awbh !==''">{{scope.row.awbh}}</a> 89 <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" @click="handleEdit(scope.row)" v-if="scope.row.awbh !==''">{{scope.row.awbh}}</a>
83 <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" @click="handleEdit(scope.row)" v-else>{{scope.row.awba}}</a> 90 <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" @click="handleEdit(scope.row)" v-else>{{scope.row.awba}}</a>
84 </template> 91 </template>
@@ -141,28 +148,25 @@ @@ -141,28 +148,25 @@
141 <el-col :span="5" style="margin-right: 10px"> 148 <el-col :span="5" style="margin-right: 10px">
142 <el-button type="warning" icon="el-icon-view" size="mini" @click="handleSend(scope.row)">收发明细</el-button> 149 <el-button type="warning" icon="el-icon-view" size="mini" @click="handleSend(scope.row)">收发明细</el-button>
143 </el-col> 150 </el-col>
144 -<!-- <el-col :span="4" style="margin-right: 30px">-->  
145 -<!-- <el-button type="primary" icon="el-icon-edit" style="width: 100px" size="mini" @click="handleEdit(scope.row)" >编辑</el-button>-->  
146 -<!-- </el-col>-->  
147 <el-col :span="5" style="margin-right: 10px"> 151 <el-col :span="5" style="margin-right: 10px">
148 <el-button type="info" icon="el-icon-edit" size="mini" @click="handleAwbStatus(scope.row)" 152 <el-button type="info" icon="el-icon-edit" size="mini" @click="handleAwbStatus(scope.row)"
149 :disabled="scope.row.status === '22'">更改状态 153 :disabled="scope.row.status === '22'">更改状态
150 </el-button> 154 </el-button>
151 </el-col> 155 </el-col>
152 <el-col :span="5" style="margin-right: 10px"> 156 <el-col :span="5" style="margin-right: 10px">
153 - <el-button type="success" icon="el-icon-plus" size="mini" v-if="scope.row.awbh ===''" 157 + <el-button type="primary" icon="el-icon-plus" size="mini" v-if="scope.row.awbh ===''"
154 @click="handleAddAwbh(scope.row)">新增分单 158 @click="handleAddAwbh(scope.row)">新增分单
155 </el-button> 159 </el-button>
156 </el-col> 160 </el-col>
157 </el-row> 161 </el-row>
158 <el-row> 162 <el-row>
159 <el-col :span="7" style="margin-right: 10px"> 163 <el-col :span="7" style="margin-right: 10px">
160 - <el-button type="success" icon="el-icon-plus" size="mini" style="width: 130px" @click="handleAwbSend(scope.row)" 164 + <el-button type="primary" icon="el-icon-plus" size="mini" style="width: 130px" @click="handleAwbSend(scope.row.uuid)"
161 :disabled="addStatus(scope.row.status)">发送预配舱单报 165 :disabled="addStatus(scope.row.status)">发送预配舱单报
162 </el-button> 166 </el-button>
163 </el-col> 167 </el-col>
164 <el-col :span="7" style="margin-right: 10px"> 168 <el-col :span="7" style="margin-right: 10px">
165 - <el-button type="primary" icon="el-icon-plus" size="mini" style="width: 130px" @click="handleAwbEdit(scope.row)" 169 + <el-button type="success" icon="el-icon-plus" size="mini" style="width: 130px" @click="handleAwbEdit(scope.row.uuid)"
166 :disabled="editStatus(scope.row.status)">发送预配修改报</el-button> 170 :disabled="editStatus(scope.row.status)">发送预配修改报</el-button>
167 </el-col> 171 </el-col>
168 <el-col :span="7"> 172 <el-col :span="7">
@@ -583,42 +587,40 @@ @@ -583,42 +587,40 @@
583 </el-form-item> 587 </el-form-item>
584 </el-col> 588 </el-col>
585 </el-row> 589 </el-row>
586 - <div v-if="dialogStatus === 'sendUpdate'">  
587 - <div class="grid-content content">  
588 - 运单信息  
589 - </div>  
590 - <el-row>  
591 - <el-col :span="6">  
592 - <el-form-item label="" prop="reason">  
593 - <el-input v-model="preModel.reason" clearable>  
594 - <template slot="prepend" >修改原因</template>  
595 - </el-input>  
596 - </el-form-item>  
597 - </el-col>  
598 - <el-col :span="6">  
599 - <el-form-item label="" prop="contactName">  
600 - <el-input v-model="preModel.contactName" clearable>  
601 - <template slot="prepend" >修改人</template>  
602 - </el-input>  
603 - </el-form-item>  
604 - </el-col>  
605 - <el-col :span="6">  
606 - <el-form-item label="" prop="contactTel">  
607 - <el-input v-model="preModel.contactTel" clearable maxlength="5">  
608 - <template slot="prepend" >修改人Tel</template>  
609 - </el-input>  
610 - </el-form-item>  
611 - </el-col>  
612 - </el-row>  
613 - </div>  
614 - 590 +<!-- <div v-if="dialogStatus === 'sendUpdate'">-->
  591 +<!-- <div class="grid-content content">-->
  592 +<!-- 运单信息-->
  593 +<!-- </div>-->
  594 +<!-- <el-row>-->
  595 +<!-- <el-col :span="6">-->
  596 +<!-- <el-form-item label="" prop="reason">-->
  597 +<!-- <el-input v-model="preModel.reason" clearable>-->
  598 +<!-- <template slot="prepend" >修改原因</template>-->
  599 +<!-- </el-input>-->
  600 +<!-- </el-form-item>-->
  601 +<!-- </el-col>-->
  602 +<!-- <el-col :span="6">-->
  603 +<!-- <el-form-item label="" prop="contactName">-->
  604 +<!-- <el-input v-model="preModel.contactName" clearable>-->
  605 +<!-- <template slot="prepend" >修改人名称</template>-->
  606 +<!-- </el-input>-->
  607 +<!-- </el-form-item>-->
  608 +<!-- </el-col>-->
  609 +<!-- <el-col :span="6">-->
  610 +<!-- <el-form-item label="" prop="contactTel">-->
  611 +<!-- <el-input v-model="preModel.contactTel" clearable maxlength="5">-->
  612 +<!-- <template slot="prepend" >修改人电话</template>-->
  613 +<!-- </el-input>-->
  614 +<!-- </el-form-item>-->
  615 +<!-- </el-col>-->
  616 +<!-- </el-row>-->
  617 +<!-- </div>-->
615 </el-form> 618 </el-form>
616 <div slot="footer" class="dialog-footer" style="text-align: center"> 619 <div slot="footer" class="dialog-footer" style="text-align: center">
617 <el-button @click="dialogFormVisible = false" size="medium" type="primary" 620 <el-button @click="dialogFormVisible = false" size="medium" type="primary"
618 style="width: 100px">取消</el-button> 621 style="width: 100px">取消</el-button>
619 - <el-button type="success" size="medium" style="width: 100px" v-show="dialogStatus!=='sendUpdate'" 622 + <el-button type="success" size="medium" style="width: 100px"
620 @click="dialogStatus ==='create'? createData():updateData()" v-loading="addloading">保存</el-button> 623 @click="dialogStatus ==='create'? createData():updateData()" v-loading="addloading">保存</el-button>
621 - <el-button type="primary" size="medium" style="width: 100px" v-show="dialogStatus==='sendUpdate'" @click="sendUpdate()">发送</el-button>  
622 </div> 624 </div>
623 </el-dialog> 625 </el-dialog>
624 <el-dialog title="收发明细" :visible.sync="dialogTableVisible" width="70%"> 626 <el-dialog title="收发明细" :visible.sync="dialogTableVisible" width="70%">
@@ -666,33 +668,37 @@ @@ -666,33 +668,37 @@
666 </el-table-column> 668 </el-table-column>
667 </el-table> 669 </el-table>
668 </el-dialog> 670 </el-dialog>
669 - <el-dialog title="删除原因" :visible.sync="dialogDeleteVisble" width="50%"> 671 + <el-dialog :title="sendMap[sendStatus]" :visible.sync="dialogDeleteVisble" width="50%">
670 <el-form ref="sendDeleteForm" :model="respModel" :rules="sendDeleteRules" label-width="120px" 672 <el-form ref="sendDeleteForm" :model="respModel" :rules="sendDeleteRules" label-width="120px"
671 style="margin-right:50px;"> 673 style="margin-right:50px;">
672 <el-form-item label="" prop="reason"> 674 <el-form-item label="" prop="reason">
673 - <el-input v-model="respModel.reason" placeholder="删除原因">  
674 - <template slot="prepend" >删除&nbsp;&nbsp;&nbsp;&nbsp;原因</template> 675 + <el-input v-if="sendStatus==='remove'" v-model="respModel.reason" type="textarea" placeholder="删除原因">
  676 + <template slot="prepend" >删除原因</template>
  677 + </el-input>
  678 + <el-input v-else v-model="respModel.reason" type="textarea" placeholder="修改原因">
  679 + <template slot="prepend" >修改原因</template>
675 </el-input> 680 </el-input>
676 </el-form-item> 681 </el-form-item>
677 <el-form-item label="" prop="contactName"> 682 <el-form-item label="" prop="contactName">
678 <el-input v-model="respModel.contactName" placeholder="操作人姓名"> 683 <el-input v-model="respModel.contactName" placeholder="操作人姓名">
679 - <template slot="prepend" >删除操作人</template> 684 + <template slot="prepend" >操作人名称</template>
680 </el-input> 685 </el-input>
681 </el-form-item> 686 </el-form-item>
682 <el-form-item label="" prop="contactTel"> 687 <el-form-item label="" prop="contactTel">
683 - <el-input v-model="respModel.contactTel" placeholder="删除操作人联系方式">  
684 - <template slot="prepend" >操作人&nbsp;&nbsp; &nbsp;Tel</template> 688 + <el-input v-model="respModel.contactTel" placeholder="操作人联系方式">
  689 + <template slot="prepend" >操作人电话</template>
685 </el-input> 690 </el-input>
686 </el-form-item> 691 </el-form-item>
687 <el-form-item label=""> 692 <el-form-item label="">
688 - <el-input v-model="respModel.content" type="textarea" placeholder="请输入备注"> 693 + <el-input v-if="sendStatus==='remove'" v-model="respModel.content" type="textarea" placeholder="请输入备注">
689 </el-input> 694 </el-input>
690 </el-form-item> 695 </el-form-item>
691 </el-form> 696 </el-form>
692 <div slot="footer" class="dialog-footer"> 697 <div slot="footer" class="dialog-footer">
693 <el-button @click="dialogDeleteVisble = false" size="medium" 698 <el-button @click="dialogDeleteVisble = false" size="medium"
694 style="width: 100px;background-color: #6F8294;color: #ffffff">取消</el-button> 699 style="width: 100px;background-color: #6F8294;color: #ffffff">取消</el-button>
695 - <el-button type="primary" size="medium" style="width: 100px" @click="sendDelete()">发送</el-button> 700 + <el-button type="success" size="medium" style="width: 100px"
  701 + @click="sendStatus ==='edit'? sendUpdate():sendDelete()">发送</el-button>
696 </div> 702 </div>
697 </el-dialog> 703 </el-dialog>
698 <el-dialog title="发货人信息" :visible.sync="dialogSelectVisible" width="70%"> 704 <el-dialog title="发货人信息" :visible.sync="dialogSelectVisible" width="70%">
@@ -845,6 +851,8 @@ @@ -845,6 +851,8 @@
845 addloading: false, 851 addloading: false,
846 consignerList: [], 852 consignerList: [],
847 dialogNeeVisible: false, 853 dialogNeeVisible: false,
  854 + batchChooseFlag: false,
  855 + batchChooseSelection: '',
848 consigneeList: [], 856 consigneeList: [],
849 consignerQuery: { 857 consignerQuery: {
850 companyName: '', 858 companyName: '',
@@ -879,6 +887,10 @@ @@ -879,6 +887,10 @@
879 create: '添加预配舱单', 887 create: '添加预配舱单',
880 addAwbh: '添加分单' 888 addAwbh: '添加分单'
881 }, 889 },
  890 + sendMap: {
  891 + edit: '修改申报',
  892 + remove: '删除申报',
  893 + },
882 customTypess: [ 894 customTypess: [
883 {label: '普通货物', value: '001'}, 895 {label: '普通货物', value: '001'},
884 {label: '国际转运货物', value: '002'}, 896 {label: '国际转运货物', value: '002'},
@@ -890,7 +902,6 @@ @@ -890,7 +902,6 @@
890 {label: '4604', value: '4604'}, 902 {label: '4604', value: '4604'},
891 {label: '4620', value: '4620'}, 903 {label: '4620', value: '4620'},
892 ], 904 ],
893 -  
894 customsDeclarationType: [ 905 customsDeclarationType: [
895 {label: '本地报关', value: '001'}, 906 {label: '本地报关', value: '001'},
896 {label: '转关', value: '002'}, 907 {label: '转关', value: '002'},
@@ -936,6 +947,7 @@ @@ -936,6 +947,7 @@
936 customCodeList: [], 947 customCodeList: [],
937 airportCode:[], 948 airportCode:[],
938 dialogStatus: undefined, 949 dialogStatus: undefined,
  950 + sendStatus: undefined,
939 fenStatus:undefined, 951 fenStatus:undefined,
940 dialogTableVisible: false, 952 dialogTableVisible: false,
941 dialogDeleteVisble: false, 953 dialogDeleteVisble: false,
@@ -964,9 +976,6 @@ @@ -964,9 +976,6 @@
964 'awbinfo.paymodel': [{required: true, message: '付款方式必选', trigger: 'change'}], 976 'awbinfo.paymodel': [{required: true, message: '付款方式必选', trigger: 'change'}],
965 goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}], 977 goodsname: [{required: true, trigger: 'blur', validator: validAlphabetsSpanceKey}],
966 ex5: [{required: true, message: '货物描述不能为空', trigger: 'blur'}], 978 ex5: [{required: true, message: '货物描述不能为空', trigger: 'blur'}],
967 - reason:[{required: true, message: '修改原因不能为空', trigger: 'blur'}],  
968 - contactName:[{required: true, message: '修改操作人不能为空', trigger: 'blur'}],  
969 - contactTel:[{required: true, message: '修改操作人联系方式不能为空', trigger: 'blur'}],  
970 'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}], 979 'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
971 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}], 980 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
972 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}], 981 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
@@ -1055,16 +1064,22 @@ @@ -1055,16 +1064,22 @@
1055 contactName: undefined, 1064 contactName: undefined,
1056 contactTel: undefined, 1065 contactTel: undefined,
1057 content: '', 1066 content: '',
1058 - flightNo: undefined,  
1059 - awba: undefined,  
1060 - customCode: undefined,  
1061 - flightDate: undefined,  
1062 - awbh: ''  
1063 }, 1067 },
1064 sendDeleteRules:{ 1068 sendDeleteRules:{
1065 - reason:[{required:true,message:'删除原因不能为空',trigger:'blur'}],  
1066 - contactName:[{required:true,message:'删除操作人不能为空',trigger:'blur'}],  
1067 - contactTel:[{required:true,message:'操作人联系方式不能为空',trigger:'blur'}] 1069 + reason:[{required:true,message:'原因不能为空',trigger:'blur'}],
  1070 + contactName:[{required:true,message:'操作人不能为空',trigger:'blur'}],
  1071 + contactTel:[
  1072 + { required: true, message: '手机号不能为空', trigger: 'blur' },
  1073 + { type: 'number', message: '手机号格式不正确', trigger: 'blur',
  1074 + transform(value){
  1075 + var phone = 11 && /^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/
  1076 + if (!phone.test(value)){
  1077 + return false;
  1078 + }else {
  1079 + return Number(value);
  1080 + }
  1081 + }}
  1082 + ],
1068 }, 1083 },
1069 preData: [], 1084 preData: [],
1070 detailData: [], 1085 detailData: [],
@@ -1450,10 +1465,6 @@ @@ -1450,10 +1465,6 @@
1450 } 1465 }
1451 }) 1466 })
1452 }, 1467 },
1453 - // >>>>>>>>>>>>>>>>多选<<<<<<<<<<<<<<<<<<  
1454 - handleSelectionChange() {  
1455 -  
1456 - },  
1457 // 远程获取发货人信息 1468 // 远程获取发货人信息
1458 consignerSelect(){ 1469 consignerSelect(){
1459 this.dialogSelectVisible = true; 1470 this.dialogSelectVisible = true;
@@ -1552,32 +1563,46 @@ @@ -1552,32 +1563,46 @@
1552 this.detailData = res.data 1563 this.detailData = res.data
1553 }) 1564 })
1554 }, 1565 },
  1566 + // >>>>>>>>>>>>>>>>多选<<<<<<<<<<<<<<<<<<
  1567 + handleSelectionChange(val) {
  1568 + this.batchChooseSelection = val;
  1569 + this.batchChooseFlag = true;
  1570 + if (this.batchChooseSelection.length == 0){
  1571 + this.batchChooseFlag = false;
  1572 + }
  1573 + },
1555 // >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<< 1574 // >>>>>>>>>>>>>>>>发送舱单报<<<<<<<<<<<<<<<<<<
1556 - handleAwbSend(row) {  
1557 - delete row.parent  
1558 - delete row.children  
1559 - this.rows = row; 1575 + handleAwbSend(id) {
  1576 + let checkArr = "";
  1577 + let ids = [];
  1578 + if (id !== undefined && id !== ""){
  1579 + ids.push(id);
  1580 + }else {
  1581 + checkArr = this.batchChooseSelection;
  1582 + checkArr.forEach(function (item) {
  1583 + ids.push(item.uuid);
  1584 + })
  1585 +
  1586 + }
1560 this.$confirm("是否发送", "确认消息", { 1587 this.$confirm("是否发送", "确认消息", {
1561 distinguishCancelAndClose: true, 1588 distinguishCancelAndClose: true,
1562 confirmButtonText: '发送', 1589 confirmButtonText: '发送',
1563 cancelButtonText: '取消' 1590 cancelButtonText: '取消'
1564 }).then(() => { 1591 }).then(() => {
1565 - if (row.awbh === null) {  
1566 - row.awbh = ''  
1567 - }  
1568 - row.user = {  
1569 - username : JSON.parse(sessionStorage.getItem('user')).username  
1570 - }  
1571 - sendCreateMt2201(row).then(res => {  
1572 - if (res.data.count > 0) {  
1573 - Message.success(res.data.respMessage) 1592 + const form = new FormData()
  1593 + form.append("username", loginUserInfo.username);
  1594 + form.append("ids", ids);
  1595 + sendCreateMt2201(form).then(res => {
  1596 + if (res.data.code == "200") {
  1597 + Message.success(res.data.msg)
1574 this.rows.status="23"; 1598 this.rows.status="23";
1575 this.rows.ext5="新增报发送成功"; 1599 this.rows.ext5="新增报发送成功";
1576 } else { 1600 } else {
1577 - Message.error(res.data.respMessage) 1601 + Message.error(res.data.msg)
1578 } 1602 }
1579 }) 1603 })
1580 }) 1604 })
  1605 +
1581 }, 1606 },
1582 // 发送舱单报 按钮自灰 1607 // 发送舱单报 按钮自灰
1583 addStatus(status){ 1608 addStatus(status){
@@ -1634,15 +1659,13 @@ @@ -1634,15 +1659,13 @@
1634 }) 1659 })
1635 }, 1660 },
1636 // >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<< 1661 // >>>>>>>>>>>>>>>>发送修改报<<<<<<<<<<<<<<<<<<
1637 - handleAwbEdit(row) {  
1638 - delete row.parent  
1639 - delete row.children  
1640 - this.rows = row;  
1641 - this.preModel = Object.assign({}, row)  
1642 - this.dialogStatus = 'sendUpdate'  
1643 - this.dialogFormVisible = true  
1644 - this.$nextTick(() => {  
1645 - this.$refs.preFormData.clearValidate() 1662 + handleAwbEdit(id) {
  1663 + this.batchModel();
  1664 + this.restModel.uuid = id;
  1665 + this.sendStatus = 'edit';
  1666 + this.dialogDeleteVisble = true;
  1667 + this.$nextTick(()=>{
  1668 + this.$refs.sendDeleteForm.clearValidate()
1646 }) 1669 })
1647 }, 1670 },
1648 // 发送修改报自灰 1671 // 发送修改报自灰
@@ -1654,42 +1677,32 @@ @@ -1654,42 +1677,32 @@
1654 } 1677 }
1655 }, 1678 },
1656 sendUpdate(){ 1679 sendUpdate(){
1657 - this.respModel.reason = this.preModel.reason  
1658 - this.respModel.contactName = this.preModel.contactName  
1659 - this.respModel.contactTel = this.preModel.contactTel  
1660 - //  
1661 - delete this.preModel._expanded  
1662 - delete this.preModel._level  
1663 - delete this.preModel._marginLeft  
1664 - delete this.preModel._show  
1665 - delete this.preModel._width  
1666 -  
1667 - const reason = this.preModel.reason  
1668 - const contactName = this.preModel.contactName  
1669 - const contactTel = this.preModel.contactTel  
1670 - const username = JSON.parse(sessionStorage.getItem('user')).username  
1671 -  
1672 -  
1673 - this.$refs.preFormData.validate(valid =>{ 1680 + let checkArr = "";
  1681 + let ids = [];
  1682 + if (this.restModel.uuid !== undefined && this.restModel.uuid !== ""){
  1683 + ids.push(this.restModel.uuid);
  1684 + }else {
  1685 + checkArr = this.batchChooseSelection;
  1686 + checkArr.forEach(function (item) {
  1687 + ids.push(item.uuid);
  1688 + })
  1689 + }
  1690 + this.$refs.sendDeleteForm.validate(valid =>{
1674 if(valid){ 1691 if(valid){
1675 - delete this.preModel.reason  
1676 - delete this.preModel.contactName  
1677 - delete this.preModel.contactTel  
1678 - const map = {  
1679 - 'mt2201': this.preModel,  
1680 - 'reason' : reason,  
1681 - 'contactName': contactName,  
1682 - 'contactTel': contactTel,  
1683 - 'username': username,  
1684 - }  
1685 - sendUpdateMt2201(map).then(res =>{  
1686 - if(res.data.count >0){  
1687 - Message.success(res.data.respMessage) 1692 + const form = new FormData()
  1693 + form.append("username", loginUserInfo.username);
  1694 + form.append("ids", ids);
  1695 + form.append("reason", this.respModel.reason);
  1696 + form.append("contactName", this.respModel.contactName);
  1697 + form.append("contactTel", this.respModel.contactTel);
  1698 + sendUpdateMt2201(form).then(res =>{
  1699 + if(res.data.code =="200"){
  1700 + Message.success(res.data.msg)
1688 this.rows.status="25"; 1701 this.rows.status="25";
1689 this.rows.ext5="修改报发送成功"; 1702 this.rows.ext5="修改报发送成功";
1690 - this.dialogFormVisible = false 1703 + this.dialogDeleteVisble = false
1691 }else { 1704 }else {
1692 - Message.error(res.data.respMessage) 1705 + Message.error(res.data.msg)
1693 } 1706 }
1694 }) 1707 })
1695 } 1708 }
@@ -1976,6 +1989,17 @@ @@ -1976,6 +1989,17 @@
1976 } 1989 }
1977 }) 1990 })
1978 } 1991 }
  1992 + },
  1993 +
  1994 + // 批量实体充值
  1995 + batchModel(){
  1996 + this.respModel = {
  1997 + uuid: undefined,
  1998 + reason: undefined,
  1999 + contactName: undefined,
  2000 + contactTel: undefined,
  2001 + content: '',
  2002 + }
1979 } 2003 }
1980 } 2004 }
1981 } 2005 }