This commit is contained in:
linfso 2024-07-04 07:52:39 +08:00
commit 2eca21b389
3 changed files with 72 additions and 29 deletions

View File

@ -452,6 +452,7 @@ export default {
{
billCode:this.form.billCode,
scanWeight:this.form.scanWeight,
bagNo: this.form.bagNo
// dispatchOrSendManCode:this.form.dispatchOrSendManCode
}
]

View File

@ -368,6 +368,14 @@ export default {
// this.getWaybill(this.form.billCode)
// this.loading = true;
for(let i = 0; i < this.emisWaybillList.length; i++){
if(this.emisWaybillList[i].billCode == this.form.billCode && this.emisWaybillList[i].problemId == this.form.problemId){
this.$message.error("重复扫描");
this.form.billCode = "";
return;
}
}
let res=await getWaybillDetail(this.form.billCode);
// this.loading = false;
if(res.code != 200){
@ -476,7 +484,6 @@ export default {
this.$message.error("请填写问题原因");
return;
}
debugger;
this.tempRecord.notifySiteCode = this.form.notifySiteCode;
this.tempRecord.notifySiteName = this.form.notifySiteName;
this.tempRecord.problemTypeName=this.form.problemType;
@ -641,7 +648,20 @@ export default {
// });
this.loading = true;
for(let bc=0;bc<bcList.length;bc++){
await this.addToList(bcList[bc]);
// for(let i = 0; i < this.emisWaybillList.length; i++){
// if(this.emisWaybillList[i].billCode == this.form.billCode && this.emisWaybillList[i].problemId == this.form.problemId){
// this.$message.error("重复扫描");
// this.form.billCode = "";
// return;
// }
// }
let exitlist = this.emisWaybillList.filter(item => (item.billCode == bcList[bc] && item.problemId == this.form.problemId));
if(exitlist.length > 0){
this.$message.error("单号:"+ bcList[bc] + ", 已存在");
continue;
}else{
await this.addToList(bcList[bc]);
}
}
this.loading = false;
this.openBatch=false;

View File

@ -83,6 +83,15 @@
@click="getList"
>查询</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="handleDelete"
:disabled="multiable"
>删除</el-button>
</el-col> -->
<el-col :span="1.5">
<el-button
type="primary"
@ -111,8 +120,9 @@
</el-col>
</el-row>
</div>
<!-- <el-table-column :label="$t('选择')" type="selection" width="55" align="center" /> -->
<el-table-column width="40" align="center" >
<el-table-column width="60" align="center" >
<template slot-scope="scope">
<el-radio class="radio" :label="scope.row" v-model="radio" @change.native="getCurrentRow(scope.row)" >&nbsp;</el-radio>
</template>
@ -202,7 +212,7 @@
</template>
<script>
import { listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
import { listEmisWaybillProblemInfo, delEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
import { listEmisWaybill } from "@/api/emis/emisWaybill";
import { addEmisWaybillProblemFaq } from "@/api/emis/emisWaybillProblemFaq";
import CommentInfoForm from '@/views/emis/emisWaybillProblemFaq/commentInfoForm.vue';
@ -245,6 +255,8 @@ export default {
open: false,
currentRow:{},
multiable: true,
openForm: false,
titleForm: "",
@ -406,6 +418,7 @@ export default {
}
this.currentRow = {};
this.showProblemDetail = false;
this.multiable = true;
this.reversion = {
status:'',
content:''
@ -558,28 +571,29 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection,row) {
if (selection.length > 1) {
// this.$message.error("只能选择一条数据");
this.$refs.singleSelectTable.getInstance().clearSelection();
this.$refs.singleSelectTable.getInstance().toggleRowSelection(row);
this.currentRow = row;
this.showProblemDetail = true;
this.reversion = this.currentRow;
} else if(selection.length==1) {
this.currentRow = selection[0];
this.showProblemDetail = true;
this.reversion = this.currentRow;
}else{
this.currentRow = {};
this.showProblemDetail = false;
}
this.reversion = {
status:'',
content:''
}
// this.ids = selection.map(item => item.id)
// this.ids = selection;
// if (selection.length > 1) {
// // this.$message.error("只能选择一条数据");
// this.$refs.singleSelectTable.getInstance().clearSelection();
// this.$refs.singleSelectTable.getInstance().toggleRowSelection(row);
// this.currentRow = row;
// this.showProblemDetail = true;
// this.reversion = this.currentRow;
// } else if(selection.length==1) {
// this.currentRow = selection[0];
// this.showProblemDetail = true;
// this.reversion = this.currentRow;
// }else{
// this.currentRow = {};
// this.showProblemDetail = false;
// }
// this.reversion = {
// status:'',
// content:''
// }
this.ids = selection.map(item => item.id)
this.multiable = this.ids.length > 0 ? false : true;
},
async saveReversion(){
@ -725,12 +739,20 @@ export default {
},
/** 删除按钮操作 */
handleDelete() {
const ids = this.ids
this.$modal.confirm('是否确认删除').then(function() {
return delEmisTmsScanRecord(ids);
const ids = this.ids;
let res;
let that = this;
this.$modal.confirm('是否确认删除').then(async function() {
for(let i = 0; i< ids.length; i++){
res = await delEmisWaybillProblemInfo(ids[i]);
}
if(!res || res.code != 0){
that.$message.error(res && res.message || "删除失败");
}else{
that.$modal.msgSuccess("删除成功");
}
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */