|
|
|
@ -1,9 +1,80 @@ |
|
|
|
|
<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.productCode"></a-input> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<a-form-item label="车间名称"> |
|
|
|
|
<j-select-depart placeholder="请选择车间" v-model="queryParam.departId"/> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="queryParam.workshopId"--> |
|
|
|
|
<!-- dictCode="sys_depart,depart_name,id,org_category='2'"/>--> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<a-form-item label="车间负责人"> |
|
|
|
|
<j-select-multi-user |
|
|
|
|
v-model="queryParam.responsiblePerson" |
|
|
|
|
:multiple="false" |
|
|
|
|
placeholder="请选择车间负责人" |
|
|
|
|
/> |
|
|
|
|
<!-- <j-select-user-by-dep v-model="queryParam.responsiblePerson" :multi="false"--> |
|
|
|
|
<!-- :back-user="true"--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- </j-select-user-by-dep>--> |
|
|
|
|
<!-- <j-select-user-by-dep placeholder="请输入车间负责人" v-model="queryParam.responsiblePerson"/>--> |
|
|
|
|
</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.teamId"></a-input>--> |
|
|
|
|
<j-dict-select-tag type="list" v-model="queryParam.teamId" dict-code="groupx,group_name,id" |
|
|
|
|
placeholder="请输入班组名称"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<!-- <a-input placeholder="请输入班组长" v-model="queryParam.teamLeader"></a-input>--> |
|
|
|
|
<a-form-item label="班组长"> |
|
|
|
|
<j-select-multi-user |
|
|
|
|
v-model="queryParam.teamLeader" |
|
|
|
|
:multiple="false" |
|
|
|
|
placeholder="请选择班组长" |
|
|
|
|
/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<a-form-item label="生产开始时间"> |
|
|
|
|
<!-- <a-date-picker valueFormat="YYYY-MM-DD" v-model="model.birthday"/>--> |
|
|
|
|
<a-date-picker placeholder="请选生产开始时间" valueFormat="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
v-model="queryParam.workTime" style="width: 100%"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<a-form-item label="生产状态"> |
|
|
|
|
<j-dict-select-tag type="list" v-model="queryParam.status" dictCode="productplanStatus" |
|
|
|
|
placeholder="请选择状态"/> |
|
|
|
|
</a-form-item> |
|
|
|
|
</a-col> |
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
|
<a-form-item label="是否加急"> |
|
|
|
|
<!-- <j-dict-select-tag type="radio" v-model="queryParam.speedUp" dictCode="sfjj" placeholder="请选择是否加急"/>--> |
|
|
|
|
<j-dict-select-tag type="list" v-model="queryParam.speedUp" dictCode="sfjj" |
|
|
|
|
placeholder="请选择是否加急"/> |
|
|
|
|
</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> |
|
|
|
@ -13,23 +84,6 @@ |
|
|
|
|
<div class="table-operator"> |
|
|
|
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
|
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('生产计划')">导出</a-button> |
|
|
|
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
|
|
|
|
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
|
|
|
|
<!-- </a-upload>--> |
|
|
|
|
<!-- 高级查询区域 --> |
|
|
|
|
<j-super-query :fieldList="superFieldList" ref="superQueryModal" |
|
|
|
|
@handleSuperQuery="handleSuperQuery"></j-super-query> |
|
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0"> |
|
|
|
|
<a-menu slot="overlay"> |
|
|
|
|
<a-menu-item key="1" @click="batchDel"> |
|
|
|
|
<a-icon type="delete"/> |
|
|
|
|
删除 |
|
|
|
|
</a-menu-item> |
|
|
|
|
</a-menu> |
|
|
|
|
<a-button style="margin-left: 8px"> 批量操作 |
|
|
|
|
<a-icon type="down"/> |
|
|
|
|
</a-button> |
|
|
|
|
</a-dropdown> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- table区域-begin --> |
|
|
|
@ -54,46 +108,14 @@ |
|
|
|
|
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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
|
|
|
|
<a>删除</a> |
|
|
|
|
</a-popconfirm> |
|
|
|
|
<!-- <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>--> |
|
|
|
|
<a-divider type="vertical"/> |
|
|
|
|
<a @click="getPaiWeiTu(record)">生产计划排位图</a> |
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
</a-table> |
|
|
|
@ -109,6 +131,8 @@ import '@/assets/less/TableExpand.less' |
|
|
|
|
import {mixinDevice} from '@/utils/mixin' |
|
|
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
|
|
|
|
import ZyProductPlanModal from './modules/ZyProductPlanModal' |
|
|
|
|
import {getAction} from "@api/manage"; |
|
|
|
|
import {filterObj} from "@/utils/util"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: 'ZyProductPlanList', |
|
|
|
@ -136,11 +160,20 @@ export default { |
|
|
|
|
align: "center", |
|
|
|
|
dataIndex: 'productCode' |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: '车间编号', |
|
|
|
|
// align: "center", |
|
|
|
|
// dataIndex: 'workshopId' |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: '产品编号', |
|
|
|
|
align: "center", |
|
|
|
|
dataIndex: 'productNo' |
|
|
|
|
}, { |
|
|
|
|
title: '产品名称', |
|
|
|
|
align: "center", |
|
|
|
|
dataIndex: 'productName' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '生产企业', |
|
|
|
|
align: "center", |
|
|
|
|
dataIndex: 'productOrg' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '车间名称', |
|
|
|
|
align: "center", |
|
|
|
@ -164,7 +197,7 @@ export default { |
|
|
|
|
{ |
|
|
|
|
title: '组长', |
|
|
|
|
align: "center", |
|
|
|
|
dataIndex: 'teamLeader' |
|
|
|
|
dataIndex: 'teamLeader_dictText' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '生产开始时间', |
|
|
|
@ -223,6 +256,7 @@ export default { |
|
|
|
|
], |
|
|
|
|
url: { |
|
|
|
|
list: "/org.jeecg.modules.productplan/zyProductPlan/list", |
|
|
|
|
paiweitu: "/org.jeecg.modules.productplan/zyProductPlan/paiweitu", |
|
|
|
|
delete: "/org.jeecg.modules.productplan/zyProductPlan/delete", |
|
|
|
|
deleteBatch: "/org.jeecg.modules.productplan/zyProductPlan/deleteBatch", |
|
|
|
|
exportXlsUrl: "/org.jeecg.modules.productplan/zyProductPlan/exportXls", |
|
|
|
@ -234,7 +268,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.getSuperFieldList(); |
|
|
|
|
// this.getSuperFieldList(); |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
// importExcelUrl: function(){ |
|
|
|
@ -242,23 +276,71 @@ export default { |
|
|
|
|
// }, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
initDictConfig() { |
|
|
|
|
}, |
|
|
|
|
getSuperFieldList() { |
|
|
|
|
let fieldList = []; |
|
|
|
|
fieldList.push({type: 'string', value: 'productCode', text: '工单编号', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'string', value: 'workshopId', text: '车间id', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'string', value: 'responsiblePerson', text: '车间负责人', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'string', value: 'teamId', text: '班组', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'string', value: 'teamLeader', text: '组长', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'date', value: 'workTime', text: '生产开始时间'}) |
|
|
|
|
fieldList.push({type: 'int', value: 'duration', text: '生产时长', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'int', value: 'speedUp', text: '是否加急', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'string', value: 'auditBy', text: '审核人', dictCode: ''}) |
|
|
|
|
fieldList.push({type: 'date', value: 'auditTimr', text: '审核时间'}) |
|
|
|
|
this.superFieldList = fieldList |
|
|
|
|
getPaiWeiTu(record) { |
|
|
|
|
// alert(JSON.stringify(record)); |
|
|
|
|
getAction(this.url.paiweitu, record).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
// this.dataSource = res.result.records || res.result; |
|
|
|
|
console.log("the paiweitu----------" + JSON.stringify(res.result)) |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning(res.message) |
|
|
|
|
} |
|
|
|
|
}).finally(() => { |
|
|
|
|
// this.dataSource.forEach(item => { |
|
|
|
|
// item['stationName'] = this.stationName; |
|
|
|
|
// item['stationNum'] = this.stationNum; |
|
|
|
|
// }) |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// loadData(arg) { |
|
|
|
|
// if (!this.url.list) { |
|
|
|
|
// this.$message.error("请设置url.list属性!") |
|
|
|
|
// return |
|
|
|
|
// } |
|
|
|
|
// //加载数据 若传入参数1则加载第一页的内容 |
|
|
|
|
// if (arg === 1) { |
|
|
|
|
// this.ipagination.current = 1; |
|
|
|
|
// } |
|
|
|
|
// this.loadParameter(); |
|
|
|
|
// var params = this.getQueryParams();//查询条件 |
|
|
|
|
// this.loading = true; |
|
|
|
|
// console.log("----------------the params:", params); |
|
|
|
|
// 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.dataSource.forEach(item => { |
|
|
|
|
// // item['stationName'] = this.stationName; |
|
|
|
|
// // item['stationNum'] = this.stationNum; |
|
|
|
|
// // }) |
|
|
|
|
// this.loading = false |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
// getQueryParams() { |
|
|
|
|
// //获取查询条件 |
|
|
|
|
// let sqp = {} |
|
|
|
|
// if (this.superQueryParams) { |
|
|
|
|
// sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
|
|
|
|
// sqp['superQueryMatchType'] = this.superQueryMatchType |
|
|
|
|
// } |
|
|
|
|
// var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
|
|
|
|
// param.field = this.getQueryField(); |
|
|
|
|
// param.pageNo = this.ipagination.current; |
|
|
|
|
// param.pageSize = this.ipagination.pageSize; |
|
|
|
|
// param.planId = this.planId; |
|
|
|
|
// return filterObj(param); |
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|