5 changed files with 259 additions and 89 deletions
@ -0,0 +1,203 @@ |
|||||||
|
<template> |
||||||
|
<a-card :bordered="false"> |
||||||
|
<!-- 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">{{ selectedRowKeys.length }}</a>项 |
||||||
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a> |
||||||
|
</div> |
||||||
|
|
||||||
|
<a-table |
||||||
|
ref="table" |
||||||
|
size="middle" |
||||||
|
:scroll="{x:true}" |
||||||
|
bordered |
||||||
|
rowKey="id" |
||||||
|
:columns="columns" |
||||||
|
:dataSource="dataSource" |
||||||
|
:pagination="ipagination" |
||||||
|
:loading="loading" |
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
||||||
|
class="j-table-force-nowrap" |
||||||
|
@change="handleTableChange"> |
||||||
|
|
||||||
|
<template slot="htmlSlot" slot-scope="text"> |
||||||
|
<div v-html="text"></div> |
||||||
|
</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;"/> |
||||||
|
</template> |
||||||
|
<template slot="fileSlot" slot-scope="text"> |
||||||
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
||||||
|
<a-button |
||||||
|
v-else |
||||||
|
:ghost="true" |
||||||
|
type="primary" |
||||||
|
icon="download" |
||||||
|
size="small" |
||||||
|
@click="downloadFile(text)"> |
||||||
|
下载 |
||||||
|
</a-button> |
||||||
|
</template> |
||||||
|
|
||||||
|
<span slot="action" slot-scope="text, record"> |
||||||
|
<a @click="handleEdit(record)">编辑</a> |
||||||
|
|
||||||
|
<a-divider type="vertical" /> |
||||||
|
<a-dropdown> |
||||||
|
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
||||||
|
<a-menu slot="overlay"> |
||||||
|
<a-menu-item> |
||||||
|
<a @click="handleDetail(record)">详情</a> |
||||||
|
</a-menu-item> |
||||||
|
<a-menu-item> |
||||||
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||||
|
<a>删除</a> |
||||||
|
</a-popconfirm> |
||||||
|
</a-menu-item> |
||||||
|
</a-menu> |
||||||
|
</a-dropdown> |
||||||
|
</span> |
||||||
|
|
||||||
|
</a-table> |
||||||
|
</div> |
||||||
|
|
||||||
|
<process-waste-modal ref="modalForm" @ok="modalFormOk"></process-waste-modal> |
||||||
|
</a-card> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
|
||||||
|
import '@/assets/less/TableExpand.less' |
||||||
|
import { mixinDevice } from '@/utils/mixin' |
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||||
|
import ProcessWasteModal from './modules/ProcessWasteModal' |
||||||
|
import JDate from '@/components/jeecg/JDate.vue' |
||||||
|
import JSearchSelectTag from '@/components/dict/JSearchSelectTag' |
||||||
|
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue' |
||||||
|
|
||||||
|
export default { |
||||||
|
name: 'ProcessWasteListCable', |
||||||
|
mixins:[JeecgListMixin, mixinDevice], |
||||||
|
components: { |
||||||
|
JDate, |
||||||
|
JSearchSelectTag, |
||||||
|
ProcessWasteModal, |
||||||
|
JSuperQuery, |
||||||
|
}, |
||||||
|
data () { |
||||||
|
return { |
||||||
|
description: '废旧台账', |
||||||
|
// 表头 |
||||||
|
columns: [ |
||||||
|
{ |
||||||
|
title: '#', |
||||||
|
dataIndex: '', |
||||||
|
key:'rowIndex', |
||||||
|
width:60, |
||||||
|
align:"center", |
||||||
|
customRender:function (t,r,index) { |
||||||
|
return parseInt(index)+1; |
||||||
|
} |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'报废日期', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'scrapDate' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'原盘号', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'originalPlate' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'现盘号', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'nowNumberPlate' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'电缆规格', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'typeSpecification' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'缴料队组', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'payMaterial' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'车号', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'payMaterial' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'原长度(米)', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'originalLength' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'现长度(米)', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'nowLength' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'缴料人', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'payMaterialPeople' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'存放地', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'depositary' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'报废原因', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'scrappedBecause' |
||||||
|
}, |
||||||
|
{ |
||||||
|
title:'备注', |
||||||
|
align:"center", |
||||||
|
dataIndex: 'remark' |
||||||
|
}, |
||||||
|
], |
||||||
|
url: { |
||||||
|
list: "/waste/processWaste/listCable", |
||||||
|
}, |
||||||
|
dictOptions:{}, |
||||||
|
superFieldList:[], |
||||||
|
} |
||||||
|
}, |
||||||
|
created() { |
||||||
|
this.getSuperFieldList(); |
||||||
|
}, |
||||||
|
computed: { |
||||||
|
importExcelUrl: function(){ |
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||||
|
}, |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
initDictConfig(){ |
||||||
|
}, |
||||||
|
getSuperFieldList(){ |
||||||
|
let fieldList=[]; |
||||||
|
fieldList.push({type:'sel_search',value:'createBy',text:'创建人',dictTable:'', dictText:'', dictCode:''}) |
||||||
|
fieldList.push({type:'sel_search',value:'descriptionId',text:'物料码',dictTable:'', dictText:'', dictCode:''}) |
||||||
|
fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''}) |
||||||
|
fieldList.push({type:'sel_search',value:'materialName',text:'名称',dictTable:'', dictText:'', dictCode:''}) |
||||||
|
fieldList.push({type:'string',value:'typeSpecification',text:'型号规格',dictCode:''}) |
||||||
|
fieldList.push({type:'sel_search',value:'unit',text:'单位',dictTable:'', dictText:'', dictCode:''}) |
||||||
|
fieldList.push({type:'int',value:'number',text:'数量',dictCode:''}) |
||||||
|
fieldList.push({type:'sel_search',value:'depositary',text:'存放位置',dictTable:'', dictText:'', dictCode:''}) |
||||||
|
fieldList.push({type:'string',value:'scrappedBecause',text:'报废原因',dictCode:''}) |
||||||
|
fieldList.push({type:'sel_search',value:'affiliation',text:'所属单位',dictTable:'', dictText:'', dictCode:''}) |
||||||
|
fieldList.push({type:'date',value:'scrapDate',text:'报废日期'}) |
||||||
|
this.superFieldList = fieldList |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style scoped> |
||||||
|
@import '~@assets/less/common.less'; |
||||||
|
</style> |
Loading…
Reference in new issue