Browse Source

添加流程批量删除

dev
caoyizhong 2 years ago
parent
commit
9fcfd1b146
  1. 2
      src/views/activiti/applyList.vue
  2. 42
      src/views/activiti/doneManage.vue
  3. 40
      src/views/activiti/processFinishManage.vue
  4. 43
      src/views/activiti/processInsManage.vue
  5. 14
      src/views/merchandisenews/ProcessMerchandiseNewsList.vue

2
src/views/activiti/applyList.vue

@ -63,7 +63,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:scroll="{x: false, y: 470 }"
:scroll="{x: false, y: 580 }"
@change="handleTableChange">
<span slot="result" slot-scope="text, r">
<span v-if="r.result == 0" style="color: #afa8a8">未提交</span>

42
src/views/activiti/doneManage.vue

@ -28,6 +28,9 @@
<a-col :md="6" :sm="12" >
<a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
<a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0" v-has="'doneManage:deleteAll'">
<a-button style="margin-left: 8px" @click="batchDell"> <a-icon type="delete"/> 删除 </a-button>
</a-dropdown>
</a-col>
</span>
</a-row>
@ -41,9 +44,10 @@
:dataSource="data"
:pagination="ipagination"
@change="handleTableChange"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
ref="table"
>
<a-table-column title="#" :width="50">
<a-table-column title="序号" :width="80" align="center">
<template slot-scope="t,r,i" >
<span> {{i+1}} </span>
</template>
@ -96,7 +100,7 @@
<span> {{millsToTime(t)}} </span>
</template>
</a-table-column>
<a-table-column title="创建时间" dataIndex="createTime" :width="150" align="center">
<a-table-column title="创建时间" dataIndex="createTime" :width="200" align="center">
<template slot-scope="t">
<span> {{t}} </span>
</template>
@ -134,6 +138,7 @@
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
import { postFormAction } from '@api/manage'
export default {
name: "doneManage",
mixins:[activitiMixin,JeecgListMixin],
@ -187,6 +192,39 @@ export default {
this.init();
},
methods: {
batchDell(){
if(!this.url.deleteHistoricTask){
this.$message.error("请设置url.deleteHistoricTask属性!!!!")
return
}
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return;
} else {
var ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
var that = this;
this.$confirm({
title: "确认删除",
content: "是否删除选中数据?",
onOk: function () {
that.loading = true;
postFormAction(that.url.deleteHistoricTask+ids,null).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.getDataList();
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.loading = false;
});
}
});
}
},
loadData(){},
init() {
this.getDataList();

40
src/views/activiti/processFinishManage.vue

@ -38,6 +38,9 @@
<a-col :md="6" :sm="12" >
<a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
<a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0" v-has="'processFinishManage:deleteAll'">
<a-button style="margin-left: 8px" @click="batchDell"> <a-icon type="delete"/> 删除 </a-button>
</a-dropdown>
</a-col>
</span>
</a-row>
@ -50,6 +53,7 @@
:dataSource="data"
:pagination="ipagination"
@change="handleTableChange"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
ref="table"
>
<a-table-column title="序号" :width="50" align="center">
@ -146,6 +150,8 @@
import {activitiMixin} from "./mixins/activitiMixin";
import {JeecgListMixin} from "../../mixins/JeecgListMixin";
import { deleteAction,postFormAction } from '@api/manage'
export default {
mixins:[JeecgListMixin,activitiMixin],
name: "processFinishManage",
@ -184,6 +190,40 @@ export default {
};
},
methods: {
batchDell(){
if(!this.url.delHistoricIns){
this.$message.error("请设置url.delHistoricIns属性!!!!")
return
}
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return;
} else {
var ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
var that = this;
this.$confirm({
title: "确认删除",
content: "是否删除选中数据?",
onOk: function () {
that.loading = true;
postFormAction(that.url.delHistoricIns+ids,null).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.getDataList();
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.loading = false;
});
}
});
}
},
loadData(){},
init() {
this.getDataList();

43
src/views/activiti/processInsManage.vue

@ -1,4 +1,4 @@
<template>
<template>
<div class="search" style="height: 100%;">
<a-card>
<div class="table-page-search-wrapper">
@ -28,6 +28,9 @@
<a-col :md="6" :sm="12" >
<a-button @click="handleSearch" type="primary" icon="search">搜索</a-button>
<a-button @click="handleReset" style="margin-left: 10px;">重置</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0" v-has="'processInsManage:deleteAll'">
<a-button style="margin-left: 8px" @click="batchDell"> <a-icon type="delete"/> 删除 </a-button>
</a-dropdown>
</a-col>
</span>
</a-row>
@ -35,12 +38,13 @@
</div>
<a-row>
<a-table bordered
:scroll="{y:460}"
:scroll="{y:560}"
:loading="loading"
rowKey="id"
:dataSource="data"
:pagination="ipagination"
@change="handleTableChange"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
ref="table"
>
<a-table-column title="序号" :width="80">
@ -152,6 +156,7 @@
<script>
import {activitiMixin} from "./mixins/activitiMixin";
import {JeecgListMixin} from "../../mixins/JeecgListMixin";
import { postFormAction } from '@api/manage'
export default {
mixins:[activitiMixin,JeecgListMixin],
@ -206,6 +211,40 @@ export default {
};
},
methods: {
batchDell(){
if(!this.url.deleteProcessIns){
this.$message.error("请设置url.deleteProcessIns属性!!!!")
return
}
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return;
} else {
var ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
var that = this;
this.$confirm({
title: "确认删除",
content: "是否删除选中数据?",
onOk: function () {
that.loading = true;
that.form.reason = "批量删除"
postFormAction(that.url.deleteProcessIns+ids,that.form).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.getDataList();
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.loading = false;
});
}
});
}
},
loadData(){},
init() {
this.getDataList();

14
src/views/merchandisenews/ProcessMerchandiseNewsList.vue

@ -61,6 +61,16 @@
</a-form-item>
</a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="24">
<a-form-item label="物资区分">
<!-- <a-input placeholder="供应商" v-model="queryParam.materialsUnit"></a-input>-->
<a-select v-model="queryParam.materialsUnit" placeholder="请选择" >
<a-select-option value="0">一般物资</a-select-option>
<a-select-option value="1">资产物资</a-select-option>
</a-select>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="物资单位">-->
<!-- <a-input placeholder="请输入物资单位" v-model="queryParam.materialsUnit"></a-input>-->
@ -124,7 +134,6 @@
<a-table
ref="table"
size="middle"
:scroll="{ y:470}"
bordered
rowKey="id"
:columns="columns"
@ -133,12 +142,13 @@
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- :scroll="{ y:570}" -->
<span slot="merchandiseName" slot-scope="text, record">
<j-ellipsis :value="text" :length="10"/>
</span>
<span slot="supplierId" slot-scope="text, record">
<j-ellipsis :value="text" :length="9"/>
<j-ellipsis :value="text" :length="7"/>
</span>
<span slot="type" slot-scope="text, record">
<j-ellipsis :value="text" :length="9"/>

Loading…
Cancel
Save