commit
e3b6ec81d4
20 changed files with 1866 additions and 13 deletions
@ -0,0 +1,226 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
<div class="table-operator"> |
||||
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> |
||||
<a-button @click="zyStyleFabricHandleAdd(planId)" type="primary" icon="plus">新增</a-button> |
||||
<!-- <a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>--> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('计划面料')">导出</a-button> |
||||
<a-button type="primary" @click="fanHui()">返回</a-button> |
||||
</div> |
||||
|
||||
<!-- 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"> |
||||
<span slot="action" slot-scope="text, record"> |
||||
<a @click="handleEdit(record)">编辑</a> |
||||
<!-- <a-divider type="vertical"/>--> |
||||
<!-- <a @click="handleDetail(record)">详情</a>--> |
||||
<a-divider type="vertical"/> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
<!-- <a-divider type="vertical"/>--> |
||||
<!-- <a @click="jumpPage1(record)">制定计划工序</a>--> |
||||
</span> |
||||
</a-table> |
||||
</div> |
||||
|
||||
<!-- <div class="table-operator" style="text-align: right">--> |
||||
<!-- <a-button type="primary" @click="saveBatch">提交</a-button>--> |
||||
<!-- </div>--> |
||||
<zy-plan-fabric-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-fabric-modal> |
||||
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>--> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import {mixinDevice} from '@/utils/mixin' |
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||
import ZyPlanFabricModal from './modules/ZyPlanFabricModal' |
||||
import {getAction, httpAction, downFile, postAction} from "@api/manage"; |
||||
import {filterObj} from "@/utils/util"; |
||||
|
||||
export default { |
||||
name: 'ZyPlanFabricDataList', |
||||
mixins: [JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ZyPlanFabricModal |
||||
}, |
||||
data() { |
||||
return { |
||||
description: '计划面料管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key: 'rowIndex', |
||||
width: 60, |
||||
align: "center", |
||||
customRender: function (t, r, index) { |
||||
return parseInt(index) + 1; |
||||
} |
||||
}, |
||||
// { |
||||
// title: '计划id', |
||||
// align: "center", |
||||
// dataIndex: 'planId' |
||||
// }, |
||||
{ |
||||
title: '计划ID', |
||||
align: "center", |
||||
dataIndex: 'planId' |
||||
}, |
||||
{ |
||||
title: '面料', |
||||
align: "center", |
||||
dataIndex: 'fabricId_dictText' |
||||
}, |
||||
{ |
||||
title: '用量(厘米)', |
||||
align: "center", |
||||
dataIndex: 'amount' |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align: "center", |
||||
fixed: "right", |
||||
width: 147, |
||||
scopedSlots: {customRender: 'action'} |
||||
} |
||||
], |
||||
url: { |
||||
list: "/org.jeecg.modules.productplan/zyPlanFabric/list", |
||||
delete: "/org.jeecg.modules.productplan/zyPlanFabric/delete", |
||||
deleteBatch: "/org.jeecg.modules.productplan/zyPlanFabric/deleteBatch", |
||||
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanFabric/exportXls", |
||||
importExcelUrl: "org.jeecg.modules.productplan/zyPlanFabric/importExcel", |
||||
|
||||
}, |
||||
loadRouteType: false, |
||||
planId: "", |
||||
dictOptions: {}, |
||||
superFieldList: [], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
// this.model = Object.assign({}, record); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function () { |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
fanHui() { |
||||
this.$router.push({ |
||||
//这里的路径是要返回的对应菜单的路由配置地址 |
||||
path: '/productplan/ZyplanFabricList', |
||||
}); |
||||
}, |
||||
valueChange(value) { |
||||
if (value) this.loadData() |
||||
}, |
||||
//加载传递参数 |
||||
loadParameter() { |
||||
if (this.loadRouteType === false) { |
||||
this.planId = this.$route.query.planId; |
||||
// this.biaoTi = this.$route.query.styleNames+"款式面料管理"; |
||||
console.log("*******传递的planId:" + this.planId) |
||||
this.loadRouteType = true; |
||||
} |
||||
}, |
||||
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); |
||||
}, |
||||
// initDictConfig() { |
||||
// }, |
||||
getSuperFieldList() { |
||||
let fieldList = []; |
||||
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) |
||||
this.superFieldList = fieldList |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,198 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<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 --> |
||||
<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>--> |
||||
<span slot="action" slot-scope="text, record"> |
||||
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">--> |
||||
<!-- <a>删除</a>--> |
||||
<!-- </a-popconfirm>--> |
||||
<!-- <a-divider type="vertical"/>--> |
||||
<a @click="jumpPage1(record)">制定计划面料</a> |
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
<zy-plan-fabric-modal2 ref="modalForm" @ok="modalFormOk"></zy-plan-fabric-modal2> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import ZyPlanFabricModal2 from './modules/ZyPlanFabricModal2' |
||||
|
||||
export default { |
||||
name: 'ZyPlanFabricList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ZyPlanFabricModal2 |
||||
}, |
||||
data () { |
||||
return { |
||||
description: '计划面料表管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'计划ID', |
||||
align:"center", |
||||
dataIndex: 'planId' |
||||
}, |
||||
{ |
||||
title:'面料', |
||||
align:"center", |
||||
dataIndex: 'fabricId_dictText' |
||||
}, |
||||
{ |
||||
title:'用量(合计)', |
||||
align:"center", |
||||
dataIndex: 'amount' |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align:"center", |
||||
fixed:"right", |
||||
width:147, |
||||
scopedSlots: { customRender: 'action' } |
||||
} |
||||
], |
||||
url: { |
||||
list: "/org.jeecg.modules.productplan/zyPlanFabric/list", |
||||
delete: "/org.jeecg.modules.productplan/zyPlanFabric/delete", |
||||
deleteBatch: "/org.jeecg.modules.productplan/zyPlanFabric/deleteBatch", |
||||
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanFabric/exportXls", |
||||
importExcelUrl: "org.jeecg.modules.productplan/zyPlanFabric/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
jumpPage1(record) { |
||||
this.$router.push({ |
||||
path: '/productplan/ZyPlanFabricDataList', |
||||
query: { // 路由携带参数 |
||||
'planId': record.planId, |
||||
// 'stationName': record.stationName, |
||||
}, |
||||
}); |
||||
}, |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'fabricId',text:'面料id',dictCode:''}) |
||||
fieldList.push({type:'BigDecimal',value:'amount',text:'用量(合计)',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,331 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
<div class="table-operator"> |
||||
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> |
||||
<!-- <a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>--> |
||||
<a-button type="primary" icon="download" @click="handleExportXls('1')">导出</a-button> |
||||
<a-button type="primary" @click="fanHui()">返回</a-button> |
||||
</div> |
||||
|
||||
<!-- 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"> |
||||
<!-- <span slot="machineIds_dictText" slot-scope="text, record">--> |
||||
<span slot="groupMemberList" slot-scope="record,text"> |
||||
<a-select mode="multiple" |
||||
@select="selectData($event,text)" |
||||
style="width: 220px" |
||||
placeholder="请选择"> |
||||
<a-select-option v-for="item in record" :value="item.id"> |
||||
{{ item.userId }} |
||||
</a-select-option> |
||||
</a-select> |
||||
</span> |
||||
|
||||
<!-- <span slot="toolsList" slot-scope="toolsList">--> |
||||
<!-- <a-select style="width: 180px" placeholder="请选择">--> |
||||
<!-- <a-select-option v-for="item in toolsList" :value="item.id">--> |
||||
<!-- {{ item.name }}--> |
||||
<!-- </a-select-option>--> |
||||
<!-- </a-select>--> |
||||
<!-- </span>--> |
||||
|
||||
<!-- <span slot="machineList" slot-scope="machineList">--> |
||||
<!-- <a-select style="width: 180px" placeholder="请选择">--> |
||||
<!-- <a-select-option v-for="item in machineList" :value="item.id">--> |
||||
<!-- {{ item.name }}--> |
||||
<!-- </a-select-option>--> |
||||
<!-- </a-select>--> |
||||
<!-- </span>--> |
||||
</a-table> |
||||
</div> |
||||
|
||||
<div class="table-operator" style="text-align: right"> |
||||
<a-button type="primary" @click="saveBatch">提交</a-button> |
||||
</div> |
||||
|
||||
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>--> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import {mixinDevice} from '@/utils/mixin' |
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2' |
||||
import {getAction, httpAction, downFile, postAction} from "@api/manage"; |
||||
import {filterObj} from "@/utils/util"; |
||||
|
||||
export default { |
||||
name: 'ZyPlanProcessList', |
||||
mixins: [JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ZyPlanProcessModal |
||||
}, |
||||
data() { |
||||
return { |
||||
description: '生产计划班组管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key: 'rowIndex', |
||||
width: 60, |
||||
align: "center", |
||||
customRender: function (t, r, index) { |
||||
return parseInt(index) + 1; |
||||
} |
||||
}, |
||||
// { |
||||
// title: '计划id', |
||||
// align: "center", |
||||
// dataIndex: 'planId' |
||||
// }, |
||||
{ |
||||
title: '工单编号', |
||||
align: "center", |
||||
dataIndex: 'workOrderId' |
||||
}, |
||||
{ |
||||
title: '产品id', |
||||
align: "center", |
||||
dataIndex: 'productId' |
||||
}, |
||||
{ |
||||
title: '产品', |
||||
align: "center", |
||||
dataIndex: 'productName' |
||||
}, |
||||
{ |
||||
title: '车间', |
||||
align: "center", |
||||
dataIndex: 'departName' |
||||
}, |
||||
{ |
||||
title: '工序', |
||||
align: "center", |
||||
dataIndex: 'processName' |
||||
}, |
||||
{ |
||||
title: '班组成员', |
||||
align: "center", |
||||
dataIndex: 'groupMemberList', |
||||
width: 150, |
||||
scopedSlots: {customRender: 'groupMemberList'} |
||||
}, |
||||
// { |
||||
// title: '工位工具列表', |
||||
// align: "center", |
||||
// dataIndex: 'toolsList', |
||||
// width: 150, |
||||
// scopedSlots: {customRender: 'toolsList'} |
||||
// // scopedSlots: {customRender: this.toolsList} |
||||
// }, |
||||
// { |
||||
// title: '工具设备列表', |
||||
// align: "center", |
||||
// dataIndex: 'machineList', |
||||
// width: 150, |
||||
// scopedSlots: {customRender: 'machineList'} |
||||
// }, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align: "center", |
||||
fixed: "right", |
||||
width: 147, |
||||
scopedSlots: {customRender: 'action'} |
||||
} |
||||
], |
||||
url: { |
||||
list: "/org.jeecg.modules.productplan/zyPlanProcess/getTeamDatalist", |
||||
// getTeamDatalistByPlanId: "/org.jeecg.modules.productplan/zyPlanProcess/getTeamDatalistByPlanId", |
||||
groupMemberlist: "/groupxMember/list", |
||||
addTeamBatch: "/org.jeecg.modules.productplan/zyPlanProcess/addTeamBatch", |
||||
// stationMachinelist: "/stationMachine/list", |
||||
// productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", |
||||
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", |
||||
// deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", |
||||
// exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", |
||||
// importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", |
||||
}, |
||||
loadRouteType: false, |
||||
planId: "", |
||||
dictOptions: {}, |
||||
superFieldList: [], |
||||
toolsList: [], |
||||
machineList: [], |
||||
processIds: [], |
||||
memberIds: [], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
// this.model = Object.assign({}, record); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function () { |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
saveBatch() { |
||||
alert("保存开始") |
||||
postAction(this.url.addTeamBatch, this.processIds).then((res) => { |
||||
if (res.success) { |
||||
this.$message.success(res.message) |
||||
this.$emit('ok') |
||||
this.close() |
||||
} else { |
||||
this.$message.warning(res.message) |
||||
} |
||||
}).finally(() => { |
||||
this.confirmLoading = false |
||||
}) |
||||
}, |
||||
fanHui() { |
||||
this.$router.push({ |
||||
path: '/productplan/ZyPlanTeamList', |
||||
}); |
||||
}, |
||||
//$event为当前所选的key |
||||
selectData($event, row) { |
||||
console.log("group_member key $event=" + $event); |
||||
// console.log("group_member key row=" + JSON.stringify(row)); |
||||
console.log("productProcessId=" + JSON.stringify(row.productProcessId)); |
||||
this.processIds.push({"processId": row.productProcessId, "userIds": $event}); |
||||
|
||||
// for (var i = 0; i < processIds.length; i++) { |
||||
console.log("the processIds length:" + this.processIds.length); |
||||
}, |
||||
//加载传递参数 |
||||
loadParameter() { |
||||
if (this.loadRouteType === false) { |
||||
this.planId = this.$route.query.planId; |
||||
// this.biaoTi = this.$route.query.styleNames+"款式面料管理"; |
||||
console.log("*******传递的planId:" + this.planId) |
||||
this.loadRouteType = true; |
||||
} |
||||
}, |
||||
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); |
||||
}, |
||||
// initDictConfig() { |
||||
// }, |
||||
getSuperFieldList() { |
||||
let fieldList = []; |
||||
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) |
||||
this.superFieldList = fieldList |
||||
}, |
||||
// jumpPage1(record) { |
||||
// this.$router.push({ |
||||
// // path: '/productplan/ZyProductPlanList', |
||||
// path: '/productplan/ZyPlanProcessDataList', |
||||
// |
||||
// // query: { // 路由携带参数 |
||||
// // 'stationId': record.id, |
||||
// // 'stationName': record.stationName, |
||||
// // }, |
||||
// }); |
||||
// }, |
||||
// pf(record) { |
||||
// this.$router.push({ |
||||
// path: '/productplan/ZyPlanProcessAddList', |
||||
// query: { // 路由携带参数 |
||||
// } |
||||
// }); |
||||
|
||||
// getAction("productPlanlist", {id: record.id}).then((res) => { |
||||
// if (res.success) { |
||||
// this.$router.push({ |
||||
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', |
||||
// query: { // 路由携带参数 |
||||
// } |
||||
// }); |
||||
// } else { |
||||
// this.$message.error(res.message) |
||||
// } |
||||
// }); |
||||
// }, |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,257 @@ |
||||
<template> |
||||
<a-card :bordered="false"> |
||||
<!-- 查询区域 --> |
||||
<div class="table-page-search-wrapper"> |
||||
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
||||
<a-row :gutter="24"> |
||||
</a-row> |
||||
</a-form> |
||||
</div> |
||||
<!-- 查询区域-END --> |
||||
|
||||
<!-- 操作按钮区域 --> |
||||
<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 --> |
||||
<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"> |
||||
|
||||
<span slot="processId_dictText" slot-scope="text, record"> |
||||
<a-popover> |
||||
<template slot="content"> |
||||
<p>{{ text }}</p> |
||||
</template> |
||||
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a> |
||||
</a-popover> |
||||
</span> |
||||
<span slot="stationId_dictText" slot-scope="text, record"> |
||||
<a-popover> |
||||
<template slot="content"> |
||||
<p>{{ text }}</p> |
||||
</template> |
||||
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a> |
||||
</a-popover> |
||||
</span> |
||||
|
||||
<span slot="toolsIds_dictText" slot-scope="text, record"> |
||||
<a-popover> |
||||
<template slot="content"> |
||||
<p>{{ text }}</p> |
||||
</template> |
||||
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a> |
||||
</a-popover> |
||||
</span> |
||||
|
||||
<span slot="machineIds_dictText" slot-scope="text, record"> |
||||
<a-popover> |
||||
<template slot="content"> |
||||
<p>{{ text }}</p> |
||||
</template> |
||||
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a> |
||||
</a-popover> |
||||
</span> |
||||
|
||||
<span slot="userIds" slot-scope="text, record"> |
||||
<a-popover> |
||||
<template slot="content"> |
||||
<p>{{ text }}</p> |
||||
</template> |
||||
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a> |
||||
</a-popover> |
||||
</span> |
||||
|
||||
<span slot="action" slot-scope="text, record"> |
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
||||
<a>删除</a> |
||||
</a-popconfirm> |
||||
<a-divider type="vertical"/> |
||||
<a @click="jumpPage1(record)">制定计划班组</a> |
||||
</span> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal> |
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import {mixinDevice} from '@/utils/mixin' |
||||
import {JeecgListMixin} from '@/mixins/JeecgListMixin' |
||||
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2' |
||||
|
||||
export default { |
||||
name: 'ZyPlanProcessList', |
||||
mixins: [JeecgListMixin, mixinDevice], |
||||
components: { |
||||
ZyPlanProcessModal |
||||
}, |
||||
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: 'planId' |
||||
}, |
||||
{ |
||||
title: '工序', |
||||
align: "center", |
||||
dataIndex: 'processId_dictText', |
||||
scopedSlots: {customRender: 'stationId_dictText'} |
||||
}, |
||||
{ |
||||
title: '工位', |
||||
align: "center", |
||||
dataIndex: 'stationId_dictText', |
||||
scopedSlots: {customRender: 'stationId_dictText'} |
||||
}, |
||||
{ |
||||
title: '设备', |
||||
align: "center", |
||||
dataIndex: 'machineIds_dictText', |
||||
scopedSlots: {customRender: 'machineIds_dictText'} |
||||
}, |
||||
{ |
||||
title: '工具', |
||||
align: "center", |
||||
dataIndex: 'toolsIds_dictText', |
||||
scopedSlots: {customRender: 'toolsIds_dictText'} |
||||
}, |
||||
{ |
||||
title: '成员', |
||||
align: "center", |
||||
dataIndex: 'userIds_dictText', |
||||
scopedSlots: {customRender: 'userIds_dictText'} |
||||
}, |
||||
{ |
||||
title: '操作', |
||||
dataIndex: 'action', |
||||
align: "center", |
||||
fixed: "right", |
||||
width: 147, |
||||
scopedSlots: {customRender: 'action'} |
||||
} |
||||
], |
||||
url: { |
||||
list: "/org.jeecg.modules.productplan/zyPlanProcess/list", |
||||
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list2", |
||||
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", |
||||
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", |
||||
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", |
||||
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", |
||||
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", |
||||
|
||||
}, |
||||
dictOptions: {}, |
||||
superFieldList: [], |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function () { |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
initDictConfig() { |
||||
}, |
||||
getSuperFieldList() { |
||||
let fieldList = []; |
||||
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''}) |
||||
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) |
||||
this.superFieldList = fieldList |
||||
}, |
||||
jumpPage1(record) { |
||||
this.$router.push({ |
||||
path: '/productplan/ZyPlanTeamDataList', |
||||
query: { // 路由携带参数 |
||||
'planId': record.planId, |
||||
// 'stationName': record.stationName, |
||||
}, |
||||
}); |
||||
}, |
||||
// pf(record) { |
||||
// this.$router.push({ |
||||
// path: '/productplan/ZyPlanProcessAddList', |
||||
// query: { // 路由携带参数 |
||||
// } |
||||
// }); |
||||
|
||||
// getAction("productPlanlist", {id: record.id}).then((res) => { |
||||
// if (res.success) { |
||||
// this.$router.push({ |
||||
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList', |
||||
// query: { // 路由携带参数 |
||||
// } |
||||
// }); |
||||
// } else { |
||||
// this.$message.error(res.message) |
||||
// } |
||||
// }); |
||||
// }, |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,126 @@ |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<j-form-container :disabled="formDisabled"> |
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
||||
<a-row> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="面料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricId"> |
||||
<!-- <j-multi-select-tag type="checkbox" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料" />--> |
||||
<j-dict-select-tag type="list" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料"/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="用量(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount"> |
||||
<a-input-number v-model="model.amount" placeholder="请输入用量" style="width: 100%" /> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'ZyPlanFabricForm', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
planId:'' |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
fabricId: [ |
||||
{required: true, message: "面料不能为空"}, |
||||
], |
||||
// status: [ |
||||
// {required: true,message: "状态不能为空"}, |
||||
// ], |
||||
amount: [ |
||||
{required: true, message: "用量不能不空"}, |
||||
{pattern: /^[0-9]{0,1000}$/, message: '用量不能为空且长度为正整数'} |
||||
], |
||||
}, |
||||
url: { |
||||
add: "/org.jeecg.modules.productplan/zyPlanFabric/add", |
||||
edit: "/org.jeecg.modules.productplan/zyPlanFabric/edit", |
||||
queryById: "/org.jeecg.modules.productplan/zyPlanFabric/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add(planId) { |
||||
this.model.planId = planId; |
||||
console.log("Modal层接收到上级参数-planId:" + this.model.planId); |
||||
this.edit(this.model); |
||||
}, |
||||
// add () { |
||||
// this.edit(this.modelDefault); |
||||
// }, |
||||
edit (record) { |
||||
this.model = Object.assign({}, record); |
||||
this.visible = true; |
||||
}, |
||||
submitForm () { |
||||
const that = this; |
||||
// 触发表单验证 |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
that.confirmLoading = true; |
||||
let httpurl = ''; |
||||
let method = ''; |
||||
if(!this.model.id){ |
||||
httpurl+=this.url.add; |
||||
method = 'post'; |
||||
}else{ |
||||
httpurl+=this.url.edit; |
||||
method = 'put'; |
||||
} |
||||
httpAction(httpurl,this.model,method).then((res)=>{ |
||||
if(res.success){ |
||||
that.$message.success(res.message); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,106 @@ |
||||
<template> |
||||
<a-spin :spinning="confirmLoading"> |
||||
<j-form-container :disabled="formDisabled"> |
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> |
||||
<a-row> |
||||
<a-col :span="24"> |
||||
<a-form-model-item label="生产计划" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planId"> |
||||
<!-- <a-input v-model="model.planId" placeholder="请选择生产计划"></a-input>--> |
||||
<j-dict-select-tag type="list" v-model="model.planId" dictCode="zy_product_plan,id,id" |
||||
placeholder="请选择生产计划"/> |
||||
</a-form-model-item> |
||||
</a-col> |
||||
</a-row> |
||||
</a-form-model> |
||||
</j-form-container> |
||||
</a-spin> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import { httpAction, getAction } from '@/api/manage' |
||||
import { validateDuplicateValue } from '@/utils/util' |
||||
|
||||
export default { |
||||
name: 'ZyPlanFabricForm2', |
||||
components: { |
||||
}, |
||||
props: { |
||||
//表单禁用 |
||||
disabled: { |
||||
type: Boolean, |
||||
default: false, |
||||
required: false |
||||
} |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
}, |
||||
labelCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 5 }, |
||||
}, |
||||
wrapperCol: { |
||||
xs: { span: 24 }, |
||||
sm: { span: 16 }, |
||||
}, |
||||
confirmLoading: false, |
||||
validatorRules: { |
||||
}, |
||||
url: { |
||||
add: "/org.jeecg.modules.productplan/zyPlanFabric/add", |
||||
edit: "/org.jeecg.modules.productplan/zyPlanFabric/edit", |
||||
queryById: "/org.jeecg.modules.productplan/zyPlanFabric/queryById" |
||||
} |
||||
} |
||||
}, |
||||
computed: { |
||||
formDisabled(){ |
||||
return this.disabled |
||||
}, |
||||
}, |
||||
created () { |
||||
//备份model原始值 |
||||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.edit(this.modelDefault); |
||||
}, |
||||
edit (record) { |
||||
this.model = Object.assign({}, record); |
||||
this.visible = true; |
||||
}, |
||||
submitForm () { |
||||
const that = this; |
||||
// 触发表单验证 |
||||
this.$refs.form.validate(valid => { |
||||
if (valid) { |
||||
that.confirmLoading = true; |
||||
let httpurl = ''; |
||||
let method = ''; |
||||
if(!this.model.id){ |
||||
httpurl+=this.url.add; |
||||
method = 'post'; |
||||
}else{ |
||||
httpurl+=this.url.edit; |
||||
method = 'put'; |
||||
} |
||||
httpAction(httpurl,this.model,method).then((res)=>{ |
||||
if(res.success){ |
||||
that.$message.success(res.message); |
||||
that.$emit('ok'); |
||||
}else{ |
||||
that.$message.warning(res.message); |
||||
} |
||||
}).finally(() => { |
||||
that.confirmLoading = false; |
||||
}) |
||||
} |
||||
|
||||
}) |
||||
}, |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,70 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<zy-plan-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-fabric-form> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ZyPlanFabricForm from './ZyPlanFabricForm' |
||||
export default { |
||||
name: 'ZyPlanFabricModal', |
||||
components: { |
||||
ZyPlanFabricForm |
||||
}, |
||||
data () { |
||||
return { |
||||
model:{ |
||||
planId:'', |
||||
}, |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add (id) { |
||||
this.model.planId=id |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(id); |
||||
}) |
||||
}, |
||||
// add () { |
||||
// this.visible=true |
||||
// this.$nextTick(()=>{ |
||||
// this.$refs.realForm.add(); |
||||
// }) |
||||
// }, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,60 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<zy-plan-fabric-form2 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-fabric-form2> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ZyPlanFabricForm2 from './ZyPlanFabricForm2' |
||||
export default { |
||||
name: 'ZyPlanFabricModal2', |
||||
components: { |
||||
ZyPlanFabricForm2 |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,84 @@ |
||||
<template> |
||||
<a-drawer |
||||
:title="title" |
||||
:width="width" |
||||
placement="right" |
||||
:closable="false" |
||||
@close="close" |
||||
destroyOnClose |
||||
:visible="visible"> |
||||
<zy-plan-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-plan-fabric-form> |
||||
<div class="drawer-footer"> |
||||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> |
||||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> |
||||
</div> |
||||
</a-drawer> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import ZyPlanFabricForm from './ZyPlanFabricForm' |
||||
|
||||
export default { |
||||
name: 'ZyPlanFabricModal', |
||||
components: { |
||||
ZyPlanFabricForm |
||||
}, |
||||
data () { |
||||
return { |
||||
title:"操作", |
||||
width:800, |
||||
visible: false, |
||||
disableSubmit: false |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}); |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleOk () { |
||||
this.$refs.realForm.submitForm(); |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="less" scoped> |
||||
/** Button按钮间距 */ |
||||
.ant-btn { |
||||
margin-left: 30px; |
||||
margin-bottom: 30px; |
||||
float: right; |
||||
} |
||||
.drawer-footer{ |
||||
position: absolute; |
||||
bottom: -8px; |
||||
width: 100%; |
||||
border-top: 1px solid #e8e8e8; |
||||
padding: 10px 16px; |
||||
text-align: right; |
||||
left: 0; |
||||
background: #fff; |
||||
border-radius: 0 0 2px 2px; |
||||
} |
||||
</style> |
@ -0,0 +1,152 @@ |
||||
package org.jeecg.modules.productplan.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.jeecg.common.api.vo.Result; |
||||
import org.jeecg.common.aspect.annotation.AutoLog; |
||||
import org.jeecg.common.system.base.controller.JeecgController; |
||||
import org.jeecg.common.system.query.QueryGenerator; |
||||
import org.jeecg.modules.productplan.entity.ZyPlanFabric; |
||||
import org.jeecg.modules.productplan.service.IZyPlanFabricService; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.util.Arrays; |
||||
|
||||
/** |
||||
* @Description: 计划面料表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-20 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Api(tags = "计划面料表") |
||||
@RestController |
||||
@RequestMapping("/org.jeecg.modules.productplan/zyPlanFabric") |
||||
@Slf4j |
||||
public class ZyPlanFabricController extends JeecgController<ZyPlanFabric, IZyPlanFabricService> { |
||||
@Autowired |
||||
private IZyPlanFabricService zyPlanFabricService; |
||||
|
||||
/** |
||||
* 分页列表查询 |
||||
* |
||||
* @param zyPlanFabric |
||||
* @param pageNo |
||||
* @param pageSize |
||||
* @param req |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "计划面料表-分页列表查询") |
||||
@ApiOperation(value = "计划面料表-分页列表查询", notes = "计划面料表-分页列表查询") |
||||
@GetMapping(value = "/list") |
||||
public Result<?> queryPageList(ZyPlanFabric zyPlanFabric, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
||||
QueryWrapper<ZyPlanFabric> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanFabric, req.getParameterMap()); |
||||
Page<ZyPlanFabric> page = new Page<ZyPlanFabric>(pageNo, pageSize); |
||||
IPage<ZyPlanFabric> pageList = zyPlanFabricService.page(page, queryWrapper); |
||||
return Result.OK(pageList); |
||||
} |
||||
|
||||
/** |
||||
* 添加 |
||||
* |
||||
* @param zyPlanFabric |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "计划面料表-添加") |
||||
@ApiOperation(value = "计划面料表-添加", notes = "计划面料表-添加") |
||||
@PostMapping(value = "/add") |
||||
public Result<?> add(@RequestBody ZyPlanFabric zyPlanFabric) { |
||||
zyPlanFabricService.save(zyPlanFabric); |
||||
return Result.OK("添加成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param zyPlanFabric |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "计划面料表-编辑") |
||||
@ApiOperation(value = "计划面料表-编辑", notes = "计划面料表-编辑") |
||||
@PutMapping(value = "/edit") |
||||
public Result<?> edit(@RequestBody ZyPlanFabric zyPlanFabric) { |
||||
zyPlanFabricService.updateById(zyPlanFabric); |
||||
return Result.OK("编辑成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "计划面料表-通过id删除") |
||||
@ApiOperation(value = "计划面料表-通过id删除", notes = "计划面料表-通过id删除") |
||||
@DeleteMapping(value = "/delete") |
||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) { |
||||
zyPlanFabricService.removeById(id); |
||||
return Result.OK("删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 批量删除 |
||||
* |
||||
* @param ids |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "计划面料表-批量删除") |
||||
@ApiOperation(value = "计划面料表-批量删除", notes = "计划面料表-批量删除") |
||||
@DeleteMapping(value = "/deleteBatch") |
||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
||||
this.zyPlanFabricService.removeByIds(Arrays.asList(ids.split(","))); |
||||
return Result.OK("批量删除成功!"); |
||||
} |
||||
|
||||
/** |
||||
* 通过id查询 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@AutoLog(value = "计划面料表-通过id查询") |
||||
@ApiOperation(value = "计划面料表-通过id查询", notes = "计划面料表-通过id查询") |
||||
@GetMapping(value = "/queryById") |
||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
||||
ZyPlanFabric zyPlanFabric = zyPlanFabricService.getById(id); |
||||
if (zyPlanFabric == null) { |
||||
return Result.error("未找到对应数据"); |
||||
} |
||||
return Result.OK(zyPlanFabric); |
||||
} |
||||
|
||||
/** |
||||
* 导出excel |
||||
* |
||||
* @param request |
||||
* @param zyPlanFabric |
||||
*/ |
||||
@RequestMapping(value = "/exportXls") |
||||
public ModelAndView exportXls(HttpServletRequest request, ZyPlanFabric zyPlanFabric) { |
||||
return super.exportXls(request, zyPlanFabric, ZyPlanFabric.class, "计划面料表"); |
||||
} |
||||
|
||||
/** |
||||
* 通过excel导入数据 |
||||
* |
||||
* @param request |
||||
* @param response |
||||
* @return |
||||
*/ |
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
||||
return super.importExcel(request, response, ZyPlanFabric.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,85 @@ |
||||
package org.jeecg.modules.productplan.entity; |
||||
|
||||
|
||||
import java.io.Serializable; |
||||
import java.io.UnsupportedEncodingException; |
||||
import java.util.Date; |
||||
import java.math.BigDecimal; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
import org.jeecgframework.poi.excel.annotation.Excel; |
||||
import org.jeecg.common.aspect.annotation.Dict; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.EqualsAndHashCode; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
/** |
||||
* @Description: 计划面料表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-20 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Data |
||||
@TableName("zy_plan_fabric") |
||||
@Accessors(chain = true) |
||||
@EqualsAndHashCode(callSuper = false) |
||||
@ApiModel(value = "zy_plan_fabric对象", description = "计划面料表") |
||||
public class ZyPlanFabric implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 主键 |
||||
*/ |
||||
@TableId(type = IdType.ASSIGN_ID) |
||||
@ApiModelProperty(value = "主键") |
||||
private String id; |
||||
/** |
||||
* 创建人 |
||||
*/ |
||||
@ApiModelProperty(value = "创建人") |
||||
private String createBy; |
||||
/** |
||||
* 创建日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "创建日期") |
||||
private Date createTime; |
||||
/** |
||||
* 更新人 |
||||
*/ |
||||
@ApiModelProperty(value = "更新人") |
||||
private String updateBy; |
||||
/** |
||||
* 更新日期 |
||||
*/ |
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@ApiModelProperty(value = "更新日期") |
||||
private Date updateTime; |
||||
/** |
||||
* 计划id |
||||
*/ |
||||
@Excel(name = "计划id", width = 15) |
||||
@ApiModelProperty(value = "计划id") |
||||
private String planId; |
||||
/** |
||||
* 面料id |
||||
*/ |
||||
@Excel(name = "面料id", width = 15) |
||||
@ApiModelProperty(value = "面料id") |
||||
@Dict(dictTable = "zy_fabric", dicText = "name", dicCode = "id") |
||||
private String fabricId; |
||||
/** |
||||
* 用量(合计) |
||||
*/ |
||||
@Excel(name = "用量(合计)", width = 15) |
||||
@ApiModelProperty(value = "用量(合计)") |
||||
private BigDecimal amount; |
||||
} |
@ -0,0 +1,14 @@ |
||||
package org.jeecg.modules.productplan.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.jeecg.modules.productplan.entity.ZyPlanFabric; |
||||
|
||||
/** |
||||
* @Description: 计划面料表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-20 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface ZyPlanFabricMapper extends BaseMapper<ZyPlanFabric> { |
||||
|
||||
} |
@ -0,0 +1,15 @@ |
||||
package org.jeecg.modules.productplan.service; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import org.jeecg.modules.productplan.entity.ZyPlanFabric; |
||||
|
||||
/** |
||||
* @Description: 计划面料表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-20 |
||||
* @Version: V1.0 |
||||
*/ |
||||
public interface IZyPlanFabricService extends IService<ZyPlanFabric> { |
||||
|
||||
} |
@ -0,0 +1,20 @@ |
||||
package org.jeecg.modules.productplan.service.impl; |
||||
|
||||
|
||||
import org.jeecg.modules.productplan.entity.ZyPlanFabric; |
||||
import org.jeecg.modules.productplan.mapper.ZyPlanFabricMapper; |
||||
import org.jeecg.modules.productplan.service.IZyPlanFabricService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
||||
/** |
||||
* @Description: 计划面料表 |
||||
* @Author: jeecg-boot |
||||
* @Date: 2022-12-20 |
||||
* @Version: V1.0 |
||||
*/ |
||||
@Service |
||||
public class ZyPlanFabricServiceImpl extends ServiceImpl<ZyPlanFabricMapper, ZyPlanFabric> implements IZyPlanFabricService { |
||||
|
||||
} |
Loading…
Reference in new issue