|
@@ -107,6 +107,9 @@
|
|
|
新增</el-button>
|
|
|
<el-button class="button-class" v-if="selections.length > 0" type="danger" size="small" icon="delete"
|
|
|
@click="handleEmployeeBatchDelete">删除</el-button>
|
|
|
+ <el-button type="danger" v-if="selections.length > 0" size="small" icon="delete" class="button-class"
|
|
|
+ @click="handleEmployeeNotBatchDelete">取消删除
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="details-body">
|
|
|
<div>
|
|
@@ -464,7 +467,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
.catch(() => {
|
|
|
proxy.$modal.msg("已取消删除");
|
|
@@ -719,7 +722,28 @@
|
|
|
proxy.$modal.msgError("请输入正确密码");
|
|
|
}
|
|
|
}
|
|
|
+ function handleEmployeeNotBatchDelete() {
|
|
|
+ let cancelDelete = selections.value.filter((item) => {
|
|
|
+ return item.changeStatus == 2;
|
|
|
+ })
|
|
|
+ console.log(cancelDelete.length);
|
|
|
+
|
|
|
+ if (cancelDelete == null || cancelDelete.length <= 0) {
|
|
|
+ proxy.$modal.msgError("请选择并只能选择被删除的数据");
|
|
|
+ } else {
|
|
|
+ console.log(22324323);
|
|
|
+ for (let index = 0; index < form.value.details.length; index++) {
|
|
|
+ let x = form.value.details[index];
|
|
|
+ for (let index2 = 0; index2 < selections.value.length; index2++) {
|
|
|
+ let y = selections.value[index2];
|
|
|
+ if (x.phone + x.employeeName === y.phone + y.employeeName && y.add !== 1) {
|
|
|
+ x.changeStatus = 0;
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
function passwordCheck(value) {
|
|
|
const pattern = /^[A-Za-z0-9~!@#$%^&*()_+-=]*$/;
|
|
|
if (!pattern.test(value)) {
|