修改展示逻辑

This commit is contained in:
liuyp 2024-06-14 16:17:12 +08:00
parent 07cd4c0f62
commit f94c387fac
2 changed files with 38 additions and 28 deletions

View File

@ -48,13 +48,13 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item :label="$t('删除备注')" prop="delRemark" label-width="100px">
<el-checkbox v-model="queryParams.delChecked">删除后清空备注</el-checkbox>
<el-checkbox v-model="form.delChecked">删除后清空备注</el-checkbox>
<!-- <span>{{$t('删除备注')}}</span>
<div slot="label">
<el-checkbox v-model="queryParams.delChecked">删除后清空备注</el-checkbox>
<el-checkbox v-model="form.delChecked">删除后清空备注</el-checkbox>
</div> -->
<el-input
v-model="queryParams.delRemark"
v-model="form.delRemark"
:placeholder="$t('请输入删除备注')"
clearable
type="textarea"
@ -215,7 +215,7 @@
</template>
<script>
import { listEmisTmsScanRecord, delEmisTmsScanRecord } from "@/api/emis/emisTmsScanRecord";
import { listEmisTmsScanRecord, deleteSignedAndRemark } from "@/api/emis/emisTmsScanRecord";
import elDateAdvPicker from '@/components/DatePickerAdv/elDateAdvPicker';
import EmisSiteSimplePicker from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
import EmisGetNextSitePicker from '@/views/emis/EmisBaseTools/EmisGetNextSitePicker.vue';
@ -538,29 +538,38 @@ export default {
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
},
/** 删除按钮操作 */
handleDelete() {
debugger;
async handleDelete() {
const ids = this.ids;
console.log(ids)
let newList = [];
this.$modal.confirm('是否确认删除').then(function() {
for(let i=0;i<ids.length;i++){
// TODO 等待新的接口
// delEmisTmsScanRecord(ids[i]).then(function(){
// this.tmsScanList.forEach(item => {
// ids[i] == item.id ? null : newList.push(item);
// });
// this.$modal.msgSuccess("删除成功");
// }).catch(function(error){
// this.$message.error("删除异常")
// })
let that = this;
// let newList = [];
this.$modal.confirm('是否确认删除').then(async function(isPass) {
debugger;
console.log(that.form)
if(isPass){
for(let i=0; i < ids.length; i++){
// TODO 等待新的接口
let res = await deleteSignedAndRemark(ids[i], that.form.delRemark);
if(!res || res.code != 200){
that.$message.error("删除异常")
return;
}
}
// that.tmsScanList.forEach(item => {
// if(ids.indexOf(item.id) == -1){
// newList.push(item)
// }
// });
if(that.form.delChecked){
that.form.delRemark = null;
}
// that.tmsScanList = newList;
that.getList();
that.ids = [];
that.single = true;
that.multiple = true;
that.$modal.msgSuccess("删除成功");
}
}).catch(() => {});
this.tmsScanList = newList;
this.ids = [];
this.single = true;
this.multiple = true;
},
}
};

View File

@ -134,7 +134,8 @@
</el-table-column>
<el-table-column :label="$t('回复状态')" align="center" prop="blReversion" min-width="100" >
<template slot-scope="scope">
<span>{{ scope.row.blReversion ? "已回复" : "未回复" }}</span>
<span v-if="scope.row.blReversion == '0'" style="background-color: #ff69b4;">{{ $t("未回复") }}</span>
<span v-else-if="scope.row.blReversion == '1'" style="background-color: #00fa9a;">{{ $t("已回复") }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('通知网点')" align="center" prop="sendSiteName" min-width="100" />
@ -177,9 +178,9 @@
<el-table-column :label="$t('回复网点')" align="center" prop="reversionManCode" min-width="100" />
<el-table-column :label="$t('处理状态')" align="center" prop="dealResult" min-width="100">
<template slot-scope="scope">
<span v-if="scope.row.dealResult=='0'">未处理</span>
<span v-if="scope.row.dealResult=='1'">处理中</span>
<span v-if="scope.row.dealResult=='2'">处理完毕</span>
<span v-if="scope.row.dealResult=='2'" style="background-color: #f0e68c;">处理完毕</span>
<span v-else-if="scope.row.dealResult=='0' && scope.row.blSee == '0'">未处理</span>
<span v-else-if="scope.row.blSee=='1'" style="background-color: #dcdcdc;">已查看未处理</span>
</template>
</el-table-column>
<el-table-column :label="$t('是否查看')" align="center" prop="blSee" min-width="100">