|
@@ -21,7 +21,7 @@
|
|
|
searchList();
|
|
|
"
|
|
|
>
|
|
|
- <template #table-header="{}">
|
|
|
+ <template #table-header="{ selection }">
|
|
|
<div style="width: 100%">
|
|
|
<el-row style="padding: 0 0 10px 80px">
|
|
|
<el-col :span="4" style="width: 140px">
|
|
@@ -100,6 +100,20 @@
|
|
|
</el-select>
|
|
|
</el-input>
|
|
|
</el-col>
|
|
|
+ <el-col
|
|
|
+ :span="3"
|
|
|
+ class="fr"
|
|
|
+ style="width: 90px; padding: 0 0 0 10px"
|
|
|
+ v-if="powers.some((i) => i == '006')"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ :size="searchSize"
|
|
|
+ @click="deleteItem(selection)"
|
|
|
+ >
|
|
|
+ 批量删除
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -236,7 +250,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
if (this.$route.query.back) {
|
|
|
- const { sinput = '', size, page, ...rest } = JSON.parse(this.$route.query.back)
|
|
|
+ const { sinput = "", size, page, ...rest } = JSON.parse(this.$route.query.back);
|
|
|
this.sinput = sinput;
|
|
|
this.parmValue = rest;
|
|
|
this.pageInfo.curr = page;
|
|
@@ -280,6 +294,49 @@ export default {
|
|
|
await this.searchList();
|
|
|
}
|
|
|
},
|
|
|
+ async deleteItem(list) {
|
|
|
+ if (list.length == 0) {
|
|
|
+ this.$message.warning("至少选择一条数据!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let isok = false;
|
|
|
+ let ids = [];
|
|
|
+ list.forEach((item) => {
|
|
|
+ ids.push(item.id);
|
|
|
+ if (item.status + "" !== "8") {
|
|
|
+ isok = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (isok) {
|
|
|
+ this.$message.warning("只能选择转单失败的数据!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ await this.$confirm("确定要删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ const model = {
|
|
|
+ id: ids,
|
|
|
+ };
|
|
|
+ const { code, data, message } = await asyncRequest.delete(model);
|
|
|
+ if (code === 0) {
|
|
|
+ this.$notify.success({
|
|
|
+ title: "删除成功",
|
|
|
+ message: "",
|
|
|
+ });
|
|
|
+ this.searchList();
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ console.log("取消");
|
|
|
+ });
|
|
|
+ },
|
|
|
//点击详情
|
|
|
getRouter(toRouter, queryId) {
|
|
|
if (toRouter && queryId) {
|
|
@@ -294,10 +351,12 @@ export default {
|
|
|
// this.parmValue.sinput = this.sinput;
|
|
|
//
|
|
|
let routerModel = {
|
|
|
- options: JSON.parse(JSON.stringify({
|
|
|
- ...this.parmValue,
|
|
|
- sinput: this.sinput
|
|
|
- })),
|
|
|
+ options: JSON.parse(
|
|
|
+ JSON.stringify({
|
|
|
+ ...this.parmValue,
|
|
|
+ sinput: this.sinput,
|
|
|
+ })
|
|
|
+ ),
|
|
|
router: this.$route.path,
|
|
|
};
|
|
|
model.preModel = JSON.stringify(routerModel);
|