|
|
|
@ -49,7 +49,8 @@
|
|
|
|
|
<!-- table区域-begin --> |
|
|
|
|
<div> |
|
|
|
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
|
|
|
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ this.selectedRowKeys.length }}</a>项 |
|
|
|
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ |
|
|
|
|
this.selectedRowKeys.length }}</a>项 |
|
|
|
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -73,7 +74,8 @@
|
|
|
|
|
</template> |
|
|
|
|
<template slot="imgSlot" slot-scope="text"> |
|
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
|
|
|
|
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
|
|
|
|
<img v-else :src="getImgView(text)" height="25px" alt="" |
|
|
|
|
style="max-width:80px;font-size: 12px;font-style: italic;"/> |
|
|
|
|
</template> |
|
|
|
|
<template slot="fileSlot" slot-scope="text"> |
|
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
|
|
|
@ -137,7 +139,8 @@
|
|
|
|
|
import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' |
|
|
|
|
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue' |
|
|
|
|
import '@/assets/less/TableExpand.less' |
|
|
|
|
const MODAL_WIDTH = 1200; |
|
|
|
|
|
|
|
|
|
const MODAL_WIDTH = 1200 |
|
|
|
|
export default { |
|
|
|
|
name: 'ProcessDelivery', |
|
|
|
|
props: ['multi', 'code', 'groupId', 'param'], |
|
|
|
@ -153,62 +156,60 @@
|
|
|
|
|
confirmLoading: false, |
|
|
|
|
title: '物资出库流程管理列表', |
|
|
|
|
description: '物资出库流程管理页面', |
|
|
|
|
queryParam:{ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
queryParam: {}, |
|
|
|
|
columns: [ |
|
|
|
|
{ |
|
|
|
|
title: '流程发起公司', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'company_dictText', |
|
|
|
|
align: 'center', |
|
|
|
|
dataIndex: 'company_dictText' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '流程发起时间', |
|
|
|
|
align:"center", |
|
|
|
|
align: 'center', |
|
|
|
|
dataIndex: 'createTime' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '流程发起部门', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'sysOrgCode_dictText', |
|
|
|
|
align: 'center', |
|
|
|
|
dataIndex: 'sysOrgCode_dictText' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '流程发起人', |
|
|
|
|
align:"center", |
|
|
|
|
align: 'center', |
|
|
|
|
dataIndex: 'createBy' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '物资类型', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'materialType_dictText', |
|
|
|
|
align: 'center', |
|
|
|
|
dataIndex: 'materialType_dictText' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '出库时间', |
|
|
|
|
align:"center", |
|
|
|
|
align: 'center', |
|
|
|
|
dataIndex: 'deliveryTime', |
|
|
|
|
customRender: function(text) { |
|
|
|
|
return !text?"":(text.length>10?text.substr(0,10):text) |
|
|
|
|
return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'文件id', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'fileId', |
|
|
|
|
scopedSlots: {customRender: 'fileSlot'} |
|
|
|
|
} |
|
|
|
|
// { |
|
|
|
|
// title:'文件id', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'fileId', |
|
|
|
|
// scopedSlots: {customRender: 'fileSlot'} |
|
|
|
|
// } |
|
|
|
|
], |
|
|
|
|
url: { |
|
|
|
|
list: "/hy/processMaterialsDelivery/list", |
|
|
|
|
delete: "/hy/processMaterialsDelivery/delete", |
|
|
|
|
deleteBatch: "/hy/processMaterialsDelivery/deleteBatch", |
|
|
|
|
exportXlsUrl: "/hy/processMaterialsDelivery/exportXls", |
|
|
|
|
importExcelUrl: "hy/processMaterialsDelivery/importExcel", |
|
|
|
|
list: '/hy/processMaterialsDelivery/list', |
|
|
|
|
delete: '/hy/processMaterialsDelivery/delete', |
|
|
|
|
deleteBatch: '/hy/processMaterialsDelivery/deleteBatch', |
|
|
|
|
exportXlsUrl: '/hy/processMaterialsDelivery/exportXls', |
|
|
|
|
importExcelUrl: 'hy/processMaterialsDelivery/importExcel' |
|
|
|
|
}, |
|
|
|
|
dictOptions: { |
|
|
|
|
company: [], |
|
|
|
|
sysOrgCode: [], |
|
|
|
|
materialType: [], |
|
|
|
|
processPlan:[], |
|
|
|
|
processPlan: [] |
|
|
|
|
}, |
|
|
|
|
/* 分页参数 */ |
|
|
|
|
pagination: { |
|
|
|
@ -216,7 +217,7 @@
|
|
|
|
|
pageSize: 5, |
|
|
|
|
pageSizeOptions: ['5', '10', '50'], |
|
|
|
|
showTotal: (total, range) => { |
|
|
|
|
return range[0] + "-" + range[1] + " 共" + total + "条" |
|
|
|
|
return range[0] + '-' + range[1] + ' 共' + total + '条' |
|
|
|
|
}, |
|
|
|
|
showQuickJumper: true, |
|
|
|
|
showSizeChanger: true, |
|
|
|
@ -226,6 +227,8 @@
|
|
|
|
|
superFieldList: [], |
|
|
|
|
selectedRowKeys: [], |
|
|
|
|
modalWidth: MODAL_WIDTH, |
|
|
|
|
changeData: '', |
|
|
|
|
getFileData: false |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
@ -251,43 +254,45 @@
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
onClearSelected() { |
|
|
|
|
this.selectedRowKeys = []; |
|
|
|
|
this.selectionRows = []; |
|
|
|
|
this.selectedRowKeys = [] |
|
|
|
|
this.selectionRows = [] |
|
|
|
|
this.selectedMainId = '' |
|
|
|
|
}, |
|
|
|
|
onSelectChange(selectedRowKeys, selectionRows) { |
|
|
|
|
this.selectedMainId = selectedRowKeys[0] |
|
|
|
|
this.selectedRowKeys = selectedRowKeys; |
|
|
|
|
this.selectionRows = selectionRows; |
|
|
|
|
this.selectedRowKeys = selectedRowKeys |
|
|
|
|
this.selectionRows = selectionRows |
|
|
|
|
}, |
|
|
|
|
loadPlan(arg) { |
|
|
|
|
if (!this.url.list) { |
|
|
|
|
this.$message.error("请设置url.list属性!") |
|
|
|
|
this.$message.error('请设置url.list属性!') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
|
if (arg === 1) { |
|
|
|
|
this.pagination.current = 1; |
|
|
|
|
this.pagination.current = 1 |
|
|
|
|
} |
|
|
|
|
this.onClearSelected() |
|
|
|
|
var params = this.queryParams();//查询条件 |
|
|
|
|
this.loading = true; |
|
|
|
|
var params = this.queryParams()//查询条件 |
|
|
|
|
this.loading = true |
|
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.dataSource = res.result.records; |
|
|
|
|
this.pagination.total = res.result.total; |
|
|
|
|
this.dataSource = res.result.records |
|
|
|
|
this.pagination.total = res.result.total |
|
|
|
|
} |
|
|
|
|
if (res.code === 510) { |
|
|
|
|
this.$message.warning(res.message) |
|
|
|
|
} |
|
|
|
|
this.loading = false; |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
this.selectedRowKeys = this.changeData |
|
|
|
|
this.selectedMainId = this.changeData[0] |
|
|
|
|
}, |
|
|
|
|
clickThenSelect(record) { |
|
|
|
|
return { |
|
|
|
|
on: { |
|
|
|
|
click: () => { |
|
|
|
|
this.onSelectChange(record.id.split(","), [record]); |
|
|
|
|
this.onSelectChange(record.id.split(','), [record]) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -300,10 +305,10 @@
|
|
|
|
|
paramTarget['self_' + key] = this.dynamicParam[key] |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
let param = Object.assign(paramTarget, this.queryParam, this.sorter); |
|
|
|
|
param.pageNo = this.pagination.current; |
|
|
|
|
param.pageSize = this.pagination.pageSize; |
|
|
|
|
return filterObj(param); |
|
|
|
|
let param = Object.assign(paramTarget, this.queryParam, this.sorter) |
|
|
|
|
param.pageNo = this.pagination.current |
|
|
|
|
param.pageSize = this.pagination.pageSize |
|
|
|
|
return filterObj(param) |
|
|
|
|
}, |
|
|
|
|
handleChangeInTableSelect(selectedRowKeys, selectionRows) { |
|
|
|
|
//update-begin-author:taoyan date:2020902 for:【issue】开源online的几个问题 LOWCOD-844 |
|
|
|
@ -314,7 +319,7 @@
|
|
|
|
|
} else { |
|
|
|
|
//当两者长度不一的时候 需要判断 |
|
|
|
|
let keys = this.table.selectedRowKeys |
|
|
|
|
let rows = this.table.selectionRows; |
|
|
|
|
let rows = this.table.selectionRows |
|
|
|
|
//这个循环 添加新的记录 |
|
|
|
|
for (let i = 0; i < selectionRows.length; i++) { |
|
|
|
|
let combineKey = this.combineRowKey(selectionRows[i]) |
|
|
|
@ -345,31 +350,43 @@
|
|
|
|
|
this.close() |
|
|
|
|
}, |
|
|
|
|
handleSubmit() { |
|
|
|
|
if (this.getFileData) { |
|
|
|
|
this.$emit('close') |
|
|
|
|
this.visible = false |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
if (!this.multi) { |
|
|
|
|
if (this.selectionRows && this.selectionRows.length > 1) { |
|
|
|
|
this.$message.warning("请选择一条记录") |
|
|
|
|
this.$message.warning('请选择一条记录') |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!this.selectionRows || this.selectionRows.length == 0) { |
|
|
|
|
this.$message.warning("请选择一条记录") |
|
|
|
|
this.$message.warning('请选择一条记录') |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
console.log(this.selectionRows) |
|
|
|
|
this.$emit('ok', this.selectionRows); |
|
|
|
|
this.$emit('ok', this.selectionRows) |
|
|
|
|
this.close() |
|
|
|
|
}, |
|
|
|
|
close() { |
|
|
|
|
this.$emit('close'); |
|
|
|
|
this.visible = false; |
|
|
|
|
this.$emit('close') |
|
|
|
|
this.visible = false |
|
|
|
|
//this.onClearSelected() |
|
|
|
|
}, |
|
|
|
|
show(){ |
|
|
|
|
show(val) { |
|
|
|
|
if (val) { |
|
|
|
|
this.getFileData = true |
|
|
|
|
} |
|
|
|
|
let data = [] |
|
|
|
|
data.push(val) |
|
|
|
|
console.log('这是什么数据', val) |
|
|
|
|
this.changeData = data |
|
|
|
|
this.visible = true |
|
|
|
|
this.loadPlan(1); |
|
|
|
|
this.loadPlan(1) |
|
|
|
|
}, |
|
|
|
|
handleToggleSearch() { |
|
|
|
|
this.toggleSearchStatus = !this.toggleSearchStatus; |
|
|
|
|
this.toggleSearchStatus = !this.toggleSearchStatus |
|
|
|
|
}, |
|
|
|
|
searchByquery() { |
|
|
|
|
//this.loadData(1); |
|
|
|
@ -379,7 +396,7 @@
|
|
|
|
|
}, |
|
|
|
|
searchReset() { |
|
|
|
|
Object.keys(this.queryParam).forEach(key => { |
|
|
|
|
this.queryParam[key]="" |
|
|
|
|
this.queryParam[key] = '' |
|
|
|
|
}) |
|
|
|
|
//this.loadData(1); |
|
|
|
|
}, |
|
|
|
@ -415,8 +432,8 @@
|
|
|
|
|
this.table.selectionRows.push(record) |
|
|
|
|
} else { |
|
|
|
|
let rowKey_index = this.table.selectedRowKeys.indexOf(rowKey) |
|
|
|
|
this.table.selectedRowKeys.splice(rowKey_index,1); |
|
|
|
|
this.table.selectionRows.splice(rowKey_index,1); |
|
|
|
|
this.table.selectedRowKeys.splice(rowKey_index, 1) |
|
|
|
|
this.table.selectionRows.splice(rowKey_index, 1) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -430,8 +447,8 @@
|
|
|
|
|
Object.keys(dictOptions).map(k => { |
|
|
|
|
obj[k] = dictOptions[k].filter(item => { |
|
|
|
|
return item != null |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.dictOptions = obj |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|