增加单号+问题类型的重复判断
This commit is contained in:
parent
4b7d772c10
commit
1a4ada19f9
@ -368,6 +368,14 @@ export default {
|
|||||||
// this.getWaybill(this.form.billCode)
|
// this.getWaybill(this.form.billCode)
|
||||||
// this.loading = true;
|
// 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);
|
let res=await getWaybillDetail(this.form.billCode);
|
||||||
// this.loading = false;
|
// this.loading = false;
|
||||||
if(res.code != 200){
|
if(res.code != 200){
|
||||||
@ -476,7 +484,6 @@ export default {
|
|||||||
this.$message.error("请填写问题原因");
|
this.$message.error("请填写问题原因");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
debugger;
|
|
||||||
this.tempRecord.notifySiteCode = this.form.notifySiteCode;
|
this.tempRecord.notifySiteCode = this.form.notifySiteCode;
|
||||||
this.tempRecord.notifySiteName = this.form.notifySiteName;
|
this.tempRecord.notifySiteName = this.form.notifySiteName;
|
||||||
this.tempRecord.problemTypeName=this.form.problemType;
|
this.tempRecord.problemTypeName=this.form.problemType;
|
||||||
@ -641,8 +648,21 @@ export default {
|
|||||||
// });
|
// });
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
for(let bc=0;bc<bcList.length;bc++){
|
for(let bc=0;bc<bcList.length;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]);
|
await this.addToList(bcList[bc]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.openBatch=false;
|
this.openBatch=false;
|
||||||
},
|
},
|
||||||
|
|||||||
@ -83,6 +83,15 @@
|
|||||||
@click="getList"
|
@click="getList"
|
||||||
>查询</el-button>
|
>查询</el-button>
|
||||||
</el-col>
|
</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-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -111,8 +120,9 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</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">
|
<template slot-scope="scope">
|
||||||
<el-radio class="radio" :label="scope.row" v-model="radio" @change.native="getCurrentRow(scope.row)" > </el-radio>
|
<el-radio class="radio" :label="scope.row" v-model="radio" @change.native="getCurrentRow(scope.row)" > </el-radio>
|
||||||
</template>
|
</template>
|
||||||
@ -202,7 +212,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
|
import { listEmisWaybillProblemInfo, delEmisWaybillProblemInfo } from "@/api/emis/emisWaybillProblemInfo";
|
||||||
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
import { listEmisWaybill } from "@/api/emis/emisWaybill";
|
||||||
import { addEmisWaybillProblemFaq } from "@/api/emis/emisWaybillProblemFaq";
|
import { addEmisWaybillProblemFaq } from "@/api/emis/emisWaybillProblemFaq";
|
||||||
import CommentInfoForm from '@/views/emis/emisWaybillProblemFaq/commentInfoForm.vue';
|
import CommentInfoForm from '@/views/emis/emisWaybillProblemFaq/commentInfoForm.vue';
|
||||||
@ -245,6 +255,8 @@ export default {
|
|||||||
open: false,
|
open: false,
|
||||||
currentRow:{},
|
currentRow:{},
|
||||||
|
|
||||||
|
multiable: true,
|
||||||
|
|
||||||
openForm: false,
|
openForm: false,
|
||||||
titleForm: "",
|
titleForm: "",
|
||||||
|
|
||||||
@ -406,6 +418,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.currentRow = {};
|
this.currentRow = {};
|
||||||
this.showProblemDetail = false;
|
this.showProblemDetail = false;
|
||||||
|
this.multiable = true;
|
||||||
this.reversion = {
|
this.reversion = {
|
||||||
status:'',
|
status:'',
|
||||||
content:''
|
content:''
|
||||||
@ -558,28 +571,29 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection,row) {
|
handleSelectionChange(selection,row) {
|
||||||
if (selection.length > 1) {
|
// this.ids = selection;
|
||||||
// this.$message.error("只能选择一条数据");
|
// if (selection.length > 1) {
|
||||||
this.$refs.singleSelectTable.getInstance().clearSelection();
|
// // this.$message.error("只能选择一条数据");
|
||||||
this.$refs.singleSelectTable.getInstance().toggleRowSelection(row);
|
// this.$refs.singleSelectTable.getInstance().clearSelection();
|
||||||
this.currentRow = row;
|
// this.$refs.singleSelectTable.getInstance().toggleRowSelection(row);
|
||||||
this.showProblemDetail = true;
|
// this.currentRow = row;
|
||||||
this.reversion = this.currentRow;
|
// this.showProblemDetail = true;
|
||||||
} else if(selection.length==1) {
|
// this.reversion = this.currentRow;
|
||||||
this.currentRow = selection[0];
|
// } else if(selection.length==1) {
|
||||||
this.showProblemDetail = true;
|
// this.currentRow = selection[0];
|
||||||
this.reversion = this.currentRow;
|
// this.showProblemDetail = true;
|
||||||
}else{
|
// this.reversion = this.currentRow;
|
||||||
this.currentRow = {};
|
// }else{
|
||||||
this.showProblemDetail = false;
|
// this.currentRow = {};
|
||||||
|
// this.showProblemDetail = false;
|
||||||
}
|
|
||||||
this.reversion = {
|
|
||||||
status:'',
|
|
||||||
content:''
|
|
||||||
}
|
|
||||||
// this.ids = selection.map(item => item.id)
|
|
||||||
|
|
||||||
|
// }
|
||||||
|
// this.reversion = {
|
||||||
|
// status:'',
|
||||||
|
// content:''
|
||||||
|
// }
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.multiable = this.ids.length > 0 ? false : true;
|
||||||
|
|
||||||
},
|
},
|
||||||
async saveReversion(){
|
async saveReversion(){
|
||||||
@ -725,12 +739,20 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete() {
|
handleDelete() {
|
||||||
const ids = this.ids
|
const ids = this.ids;
|
||||||
this.$modal.confirm('是否确认删除').then(function() {
|
let res;
|
||||||
return delEmisTmsScanRecord(ids);
|
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(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user