<template>
|
<a-card :bordered="false">
|
<!-- 查询区域 -->
|
<div class="table-page-search-wrapper">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-row :gutter="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="流水号">
|
<a-input placeholder="请输入流水号" v-model="queryParam.serialNumber"></a-input>
|
</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.fixtureInformation"></a-input>
|
</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.processingBatch"></a-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
</span>
|
</a-col>
|
</a-row>
|
</a-form>
|
</div>
|
<!-- 查询区域-END -->
|
|
<!-- table区域-begin -->
|
<div>
|
<a-table
|
ref="table"
|
size="middle"
|
:scroll="{x:true}"
|
bordered
|
rowKey="id"
|
:columns="columns"
|
:dataSource="dataSource"
|
:pagination="ipagination"
|
:loading="loading"
|
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,record">
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
<img v-else :src="getImgView(text)" :preview="record.id" 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 @click="handleOpenPrintGuideCardModal(record)">生成数控加工程序确认表</a>
|
|
<a-divider type="vertical" />
|
|
<a @click="handleOpenPrintKnifeListModal(record)">生成刀具清单</a>
|
|
<a-divider type="vertical" />
|
|
<a @click="handleDetail(record)">发起流程</a>
|
|
<a-divider type="vertical" />
|
|
<a @click="handleDetail(record)">详情</a>
|
|
</span>
|
|
</a-table>
|
</div>
|
|
<guide-card-batch-modal ref="modalForm" @ok="modalFormOk"></guide-card-batch-modal>
|
|
<GuideCardBatchModalDrawer ref="modalEditForm" @ok="modalFormOk"></GuideCardBatchModalDrawer>
|
|
<guide-card-print-modal ref="guideCardPrintModal"/>
|
|
<knife-list-print-modal ref="knifeListPrintModal"/>
|
</a-card>
|
</template>
|
|
<script>
|
|
import '@assets/less/TableExpand.less'
|
import { mixinDevice } from '@/utils/mixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import GuideCardBatchModal from './GuideCardBatchModal'
|
import GuideCardBatchModalDrawer from './GuideCardBatchModal.Style#Drawer.vue'
|
import { getAction } from '@api/manage'
|
import GuideCardPrintModal from './GuideCardPrintModal'
|
import KnifeListPrintModal from './KnifeListPrintModal'
|
|
export default {
|
name: 'GuideCardBatchList',
|
mixins:[JeecgListMixin, mixinDevice],
|
props: {
|
guideCardBatchInfo: {
|
type: Object
|
},
|
size: {
|
type: String
|
}
|
},
|
components: {
|
KnifeListPrintModal,
|
GuideCardPrintModal,
|
GuideCardBatchModal,
|
GuideCardBatchModalDrawer
|
},
|
data () {
|
return {
|
description: 'nc文件对应数控程序加工确认表管理页面',
|
// 表头
|
columns: [
|
{
|
title: '#',
|
dataIndex: '',
|
key:'rowIndex',
|
width:60,
|
align:"center",
|
customRender:function (t,r,index) {
|
return parseInt(index)+1;
|
}
|
},
|
{
|
title:'流水号',
|
align:"center",
|
dataIndex: 'serialNumber',
|
width:150,
|
},
|
{
|
title:'夹具',
|
align:"center",
|
dataIndex: 'fixtureInformation'
|
},
|
{
|
title:'加工批次',
|
align:"center",
|
dataIndex: 'processingBatch'
|
},
|
{
|
title:'加工数量',
|
align:"center",
|
dataIndex: 'processingQuantity'
|
},
|
{
|
title:'加工设备',
|
align:"center",
|
dataIndex: 'processingEquipment'
|
},
|
{
|
title: '操作',
|
dataIndex: 'action',
|
align:"center",
|
fixed:"right",
|
width:500,
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
url: {
|
list: "/dnc/guideCardBatch/list",
|
delete: "/dnc/guideCardBatch/delete",
|
deleteBatch: "/dnc/guideCardBatch/deleteBatch",
|
exportXlsUrl: "/dnc/guideCardBatch/exportXls",
|
importExcelUrl: "dnc/guideCardBatch/importExcel",
|
|
},
|
dictOptions:{},
|
superFieldList:[],
|
}
|
},
|
created() {
|
this.getSuperFieldList();
|
},
|
computed: {
|
importExcelUrl: function(){
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
},
|
},
|
methods: {
|
initDictConfig(){
|
},
|
searchQuery() {
|
this.queryParam.docId = this.guideCardBatchInfo.docId;
|
this.loadData(1);
|
},
|
/**
|
* 获取加工确认表列表
|
*/
|
getGuideCardBatchList() {
|
let params= {};
|
params.docId=this.guideCardBatchInfo.docId;
|
params.serialNumber=this.queryParam.serialNumber;
|
params.fixtureInformation=this.guideCardBatchInfo.fixtureInformation;
|
params.processingBatch=this.guideCardBatchInfo.processingBatch;
|
this.loading = true
|
getAction(this.url.list,params).then((res) => {
|
if (res.success) {
|
this.dataSource = res.result.records||res.result;
|
if(res.result.total)
|
{
|
this.ipagination.total = res.result.total;
|
}else{
|
this.ipagination.total = 0;
|
}
|
}else{
|
this.$message.warning(res.message)
|
}
|
}).finally(() => {
|
this.loading = false
|
})
|
},
|
searchReset() {
|
// 保留必要字段的浅拷贝方式
|
this.queryParam = {
|
docId: this.guideCardBatchInfo.docId
|
};
|
this.loadData(1);
|
},
|
loadData(pageNum) {
|
if (this.ipagination) {
|
this.ipagination.current = pageNum;
|
}
|
this.getGuideCardBatchList();
|
},
|
getSuperFieldList(){
|
let fieldList=[];
|
fieldList.push({type:'string',value:'serialNumber',text:'流水号',dictCode:''})
|
fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''})
|
fieldList.push({type:'string',value:'docName',text:'程序文件名',dictCode:''})
|
fieldList.push({type:'string',value:'partsCode',text:'零件图号',dictCode:''})
|
fieldList.push({type:'string',value:'partsName',text:'零件名称',dictCode:''})
|
fieldList.push({type:'string',value:'materielDesp',text:'零件材料',dictCode:''})
|
fieldList.push({type:'string',value:'fixtureInformation',text:'夹具',dictCode:''})
|
fieldList.push({type:'string',value:'processWorkCode',text:'工序(工步号)',dictCode:''})
|
fieldList.push({type:'string',value:'processingBatch',text:'加工批次',dictCode:''})
|
fieldList.push({type:'string',value:'processingQuantity',text:'加工数量',dictCode:''})
|
fieldList.push({type:'string',value:'processingEquipment',text:'加工设备',dictCode:''})
|
fieldList.push({type:'Text',value:'picture',text:'图片',dictCode:''})
|
fieldList.push({type:'string',value:'remake',text:'说明信息',dictCode:''})
|
fieldList.push({type:'string',value:'compiler',text:'编写人',dictCode:''})
|
fieldList.push({type:'date',value:'compilerTime',text:'编写日期'})
|
fieldList.push({type:'string',value:'proofreader',text:'校对人',dictCode:''})
|
fieldList.push({type:'date',value:'proofreaderTime',text:'校对日期'})
|
fieldList.push({type:'string',value:'operator',text:'操作者',dictCode:''})
|
fieldList.push({type:'date',value:'inspectionTime',text:'首检日期'})
|
fieldList.push({type:'string',value:'approver',text:'审批人',dictCode:''})
|
fieldList.push({type:'date',value:'approverTime',text:'审批日期'})
|
this.superFieldList = fieldList
|
},
|
handleEdit(record) {
|
this.$refs.modalEditForm.edit(record);
|
this.$refs.modalEditForm.title = "上传/修改信息";
|
this.$refs.modalEditForm.disableSubmit = false;
|
},
|
|
/**
|
* 控制数据加工程序确认表弹窗弹出
|
* @param record 批次列表行记录
|
*/
|
handleOpenPrintGuideCardModal(record){
|
this.$refs.guideCardPrintModal.visible = true
|
this.$refs.guideCardPrintModal.detail = Object.assign({},record)
|
},
|
|
|
/**
|
* 控制数据加工程序确认表弹窗弹出
|
* @param record 批次列表行记录
|
*/
|
handleOpenPrintKnifeListModal(record){
|
this.$refs.knifeListPrintModal.visible = true
|
this.$refs.knifeListPrintModal.detail = Object.assign({},record)
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
@import '~@assets/less/common.less';
|
</style>
|