计划工序制定 1.6

zhc4dev
zhc077 2 years ago
parent 8388f0199f
commit c3473b9aa9
  1. 195
      ant-design-vue-jeecg/src/views/device/ZyDeviceListRef.vue
  2. 579
      ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue
  3. 497
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
  4. 282
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue
  5. 34
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue
  6. 37
      ant-design-vue-jeecg/src/views/team/GroupxList.vue
  7. 23
      ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue
  8. 134
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/device/entity/ZyDevice.java
  9. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  10. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java
  11. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java
  12. 28
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java
  13. 35
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java
  14. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/Station.java
  15. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java
  16. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/vo/StationMachineVo.java
  17. 33
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/vo/StationToolVo.java
  18. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/vo/StationVo.java

@ -0,0 +1,195 @@
<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 :sm="5">
<a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="id">
<a-input v-model="queryParam.code" placeholder="请输入设备编号"></a-input>
</a-form-model-item>
</a-col>
<a-col :sm="5">
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="queryParam.name" placeholder="请输入设备名称"></a-input>
</a-form-model-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>
<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">
</a-table>
</div>
<!-- <ZyDeviceDetail ref="ZyDeviceDetail"></ZyDeviceDetail>-->
<!-- <zy-device-modal ref="modalForm" @ok="modalFormOk"></zy-device-modal>-->
</a-card>
</template>
<script>
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
export default {
name: 'ZyDeviceListRef',
mixins:[JeecgListMixin],
components: {},
data () {
return {
description: '设备信息管理页面',
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
//
columns: [
{
title:'设备编号',
align:"center",
dataIndex: 'code'
},
{
title: '名称',
align: "center",
dataIndex: 'name'
},
],
url: {
list: "/device/zyDevice/list",
delete: "/device/zyDevice/delete",
deleteBatch: "/device/zyDevice/deleteBatch",
exportXlsUrl: "/device/zyDevice/exportXls",
importExcelUrl: "device/zyDevice/importExcel",
},
dictOptions: {},
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 5,
pageSizeOptions: ['5', '10', '50'],
showTotal: (total, range) => {
return range[0] + "-" + range[1] + " 共" + total + "条"
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
selectedMainId: '',
superFieldList: [],
selectedRowKeys: [],
}
},
created() {
// this.getSuperFieldList();
// console.log(this.superFieldList)
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
initDictConfig() {
},
clickThenSelect(record) {
return {
on: {
click: () => {
this.onSelectChange(record.id.split(","), [record]);
}
}
}
},
onClearSelected() {
this.selectedRowKeys = [];
this.selectionRows = [];
this.selectedMainId = ''
},
// onSelectChange(selectedRowKeys, selectionRows) {
// this.selectedMainId=selectedRowKeys[0]
// this.selectedRowKeys = selectedRowKeys;
// this.selectionRows = selectionRows;
// },
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.onClearSelected()
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records;
this.ipagination.total = res.result.total;
}
if (res.code === 510) {
this.$message.warning(res.message)
}
this.loading = false;
})
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'img',text:'设备图片',dictCode:''})
fieldList.push({type:'string',value:'typeid',text:'设备类型',dictCode:'zy_devicetype,name,id'})
fieldList.push({type:'string',value:'code',text:'设备编号',dictCode:''})
fieldList.push({type:'date',value:'buydate',text:'购买时间'})
fieldList.push({type:'sel_user',value:'agent',text:'经办人'})
fieldList.push({type:'string',value:'adress',text:'存放位置',dictCode:''})
fieldList.push({type:'string',value:'status',text:'设备状态',dictCode:''})
fieldList.push({type:'string',value:'maintenancecycle',text:'维护周期',dictCode:''})
fieldList.push({type:'sel_user',value:'administrator',text:'管理人'})
fieldList.push({type:'date',value:'maintenancedate',text:'上次维护时间'})
fieldList.push({type:'string',value:'img3d',text:'3d模型',dictCode:''})
this.superFieldList = fieldList
},
openDetail(id){
this.$refs.ZyDeviceDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>

@ -1,304 +1,301 @@
<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 -->
<!--<template>-->
<!-- <a-card :bordered="false">-->
<!-- &lt;!&ndash; 查询区域 &ndash;&gt;-->
<!-- &lt;!&ndash; <div class="table-page-search-wrapper">&ndash;&gt;-->
<!-- &lt;!&ndash; <a-form layout="inline" @keyup.enter.native="searchQuery">&ndash;&gt;-->
<!-- &lt;!&ndash; <a-row :gutter="24">&ndash;&gt;-->
<!-- &lt;!&ndash; </a-row>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-form>&ndash;&gt;-->
<!-- &lt;!&ndash; </div>&ndash;&gt;-->
<!-- &lt;!&ndash; 查询区域-END &ndash;&gt;-->
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :sm="5">
<a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="id">
<a-input v-model="queryParam.id" placeholder="请输入设备编号"></a-input>
</a-form-model-item>
</a-col>
<a-col :sm="5">
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="queryParam.name" placeholder="请输入设备名称"></a-input>
</a-form-model-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>
<!-- &lt;!&ndash; 查询区域 &ndash;&gt;-->
<!-- <div class="table-page-search-wrapper">-->
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col :sm="5">-->
<!-- <a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="id">-->
<!-- <a-input v-model="queryParam.id" placeholder="请输入设备编号"></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :sm="5">-->
<!-- <a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">-->
<!-- <a-input v-model="queryParam.name" placeholder="请输入设备名称"></a-input>-->
<!-- </a-form-model-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>-->
<!-- 操作按钮区域 -->
<!-- <div class="table-operator">-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- </div>-->
<!-- &lt;!&ndash; 操作按钮区域 &ndash;&gt;-->
<!-- &lt;!&ndash; <div class="table-operator">&ndash;&gt;-->
<!-- &lt;!&ndash; <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>&ndash;&gt;-->
<!-- &lt;!&ndash; </div>&ndash;&gt;-->
<!-- 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>
<!-- &lt;!&ndash; table区域-begin &ndash;&gt;-->
<!-- <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"
bordered
rowKey="id"
class="j-table-force-nowrap"
:scroll="{x:true}"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:customRow="clickThenSelect"
@change="handleTableChange">
<!-- <a-table-->
<!-- ref="table"-->
<!-- size="middle"-->
<!-- bordered-->
<!-- rowKey="id"-->
<!-- class="j-table-force-nowrap"-->
<!-- :scroll="{x:true}"-->
<!-- :columns="columns"-->
<!-- :dataSource="dataSource"-->
<!-- :pagination="ipagination"-->
<!-- :loading="loading"-->
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<!-- :customRow="clickThenSelect"-->
<!-- @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="imgeSlot" slot-scope="text">-->
<!-- <img :src="text" height="" 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>-->
<!-- &lt;!&ndash; <template slot="htmlSlot" slot-scope="text">&ndash;&gt;-->
<!-- &lt;!&ndash; <div v-html="text"></div>&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot="imgSlot" slot-scope="text">&ndash;&gt;-->
<!-- &lt;!&ndash; <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>&ndash;&gt;-->
<!-- &lt;!&ndash; <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot="imgeSlot" slot-scope="text">&ndash;&gt;-->
<!-- &lt;!&ndash; <img :src="text" height="" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- &lt;!&ndash; <template slot="fileSlot" slot-scope="text">&ndash;&gt;-->
<!-- &lt;!&ndash; <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>&ndash;&gt;-->
<!-- &lt;!&ndash; <a-button&ndash;&gt;-->
<!-- &lt;!&ndash; v-else&ndash;&gt;-->
<!-- &lt;!&ndash; :ghost="true"&ndash;&gt;-->
<!-- &lt;!&ndash; type="primary"&ndash;&gt;-->
<!-- &lt;!&ndash; icon="download"&ndash;&gt;-->
<!-- &lt;!&ndash; size="small"&ndash;&gt;-->
<!-- &lt;!&ndash; @click="downloadFile(text)">&ndash;&gt;-->
<!-- &lt;!&ndash; 下载&ndash;&gt;-->
<!-- &lt;!&ndash; </a-button>&ndash;&gt;-->
<!-- &lt;!&ndash; </template>&ndash;&gt;-->
<!-- <span slot="action" slot-scope="text, record">-->
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- &lt;!&ndash; <span slot="action" slot-scope="text, record">&ndash;&gt;-->
<!-- &lt;!&ndash; <a @click="handleEdit(record)">编辑</a>&ndash;&gt;-->
<!-- <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="openDetail(record.id)">详情</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>-->
<!-- &lt;!&ndash; <a-divider type="vertical" />&ndash;&gt;-->
<!-- &lt;!&ndash; <a-dropdown>&ndash;&gt;-->
<!-- &lt;!&ndash; <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>&ndash;&gt;-->
<!-- &lt;!&ndash; <a-menu slot="overlay">&ndash;&gt;-->
<!-- &lt;!&ndash; <a-menu-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <a @click="openDetail(record.id)">详情</a>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-menu-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <a-menu-item>&ndash;&gt;-->
<!-- &lt;!&ndash; <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">&ndash;&gt;-->
<!-- &lt;!&ndash; <a>删除</a>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-popconfirm>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-menu-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-menu>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-dropdown>&ndash;&gt;-->
<!-- &lt;!&ndash; </span>&ndash;&gt;-->
</a-table>
</div>
<!-- </a-table>-->
<!-- </div>-->
<!-- <a-tabs defaultActiveKey="1">-->
<!-- <a-tab-pane tab="类型参数" key="1" >-->
<!-- <ZyTypeparametersList :mainId="selectedMainId" />-->
<!-- </a-tab-pane>-->
<!-- <a-tab-pane tab="运行参数" key="2" forceRender>-->
<!-- <ZyOperationparametersList :mainId="selectedMainId" />-->
<!-- </a-tab-pane>-->
<!-- </a-tabs>-->
<!-- <ZyDevicetypeDetail ref="ZyDevicetypeDetail"></ZyDevicetypeDetail>-->
<!-- <zyDevicetype-modal ref="modalForm" @ok="modalFormOk"></zyDevicetype-modal>-->
</a-card>
</template>
<!-- &lt;!&ndash; <a-tabs defaultActiveKey="1">&ndash;&gt;-->
<!-- &lt;!&ndash; <a-tab-pane tab="类型参数" key="1" >&ndash;&gt;-->
<!-- &lt;!&ndash; <ZyTypeparametersList :mainId="selectedMainId" />&ndash;&gt;-->
<!-- &lt;!&ndash; </a-tab-pane>&ndash;&gt;-->
<!-- &lt;!&ndash; <a-tab-pane tab="运行参数" key="2" forceRender>&ndash;&gt;-->
<!-- &lt;!&ndash; <ZyOperationparametersList :mainId="selectedMainId" />&ndash;&gt;-->
<!-- &lt;!&ndash; </a-tab-pane>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-tabs>&ndash;&gt;-->
<!-- &lt;!&ndash; <ZyDevicetypeDetail ref="ZyDevicetypeDetail"></ZyDevicetypeDetail>&ndash;&gt;-->
<!-- &lt;!&ndash; <zyDevicetype-modal ref="modalForm" @ok="modalFormOk"></zyDevicetype-modal>&ndash;&gt;-->
<!-- </a-card>-->
<!--</template>-->
<script>
<!--<script>-->
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyDevicetypeModal from './modules/ZyDevicetypeModal'
import {getAction} from '@/api/manage'
import ZyTypeparametersList from './ZyTypeparametersList'
import ZyOperationparametersList from './ZyOperationparametersList'
import '@/assets/less/TableExpand.less'
import ZyDevicetypeDetail from './modules/ZyDevicetypeDetail'
<!--import {JeecgListMixin} from '@/mixins/JeecgListMixin'-->
<!--import ZyDevicetypeModal from './modules/ZyDevicetypeModal'-->
<!--import {getAction} from '@/api/manage'-->
<!--import ZyTypeparametersList from './ZyTypeparametersList'-->
<!--import ZyOperationparametersList from './ZyOperationparametersList'-->
<!--import '@/assets/less/TableExpand.less'-->
<!--import ZyDevicetypeDetail from './modules/ZyDevicetypeDetail'-->
export default {
name: "ZyDevicetypeList",
mixins: [JeecgListMixin],
components: {
// ZyTypeparametersList,
// ZyOperationparametersList,
// ZyDevicetypeModal,
// ZyDevicetypeDetail
},
data() {
return {
description: '设备类型管理页面',
//
columns: [
{
title: '设备编号',
align: "center",
dataIndex: 'id'
},
{
title: '名称',
align: "center",
dataIndex: 'name'
},
// {
// title:'',
// align:"center",
// dataIndex: 'img',
// scopedSlots: {customRender: 'imgSlot'}
// },
// {
// title:"",
// align:"center",
// dataIndex: 'erweima',
// scopedSlots: {customRender: 'imgeSlot'}
// },
{
title: '类型品牌',
align: "center",
dataIndex: 'brand'
},
// {
// title:'',
// align:"center",
// dataIndex: 'model'
// },
{
title: '生产厂商',
align: "center",
dataIndex: 'manufacturer'
},
// {
// title:'',
// align:"center",
// dataIndex: 'supplier'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'contact'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'place'
// },
],
url: {
list: "/devicetype/zyDevicetype/list",
delete: "/devicetype/zyDevicetype/delete",
deleteBatch: "/devicetype/zyDevicetype/deleteBatch",
exportXlsUrl: "/devicetype/zyDevicetype/exportXls",
importExcelUrl: "devicetype/zyDevicetype/importExcel",
},
dictOptions: {},
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 5,
pageSizeOptions: ['5', '10', '50'],
showTotal: (total, range) => {
return range[0] + "-" + range[1] + " 共" + total + "条"
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
selectedMainId: '',
superFieldList: [],
selectedRowKeys: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
initDictConfig() {
},
clickThenSelect(record) {
return {
on: {
click: () => {
this.onSelectChange(record.id.split(","), [record]);
}
}
}
},
onClearSelected() {
this.selectedRowKeys = [];
this.selectionRows = [];
this.selectedMainId = ''
},
// onSelectChange(selectedRowKeys, selectionRows) {
// this.selectedMainId=selectedRowKeys[0]
// this.selectedRowKeys = selectedRowKeys;
// this.selectionRows = selectionRows;
// },
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.onClearSelected()
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records;
this.ipagination.total = res.result.total;
}
if (res.code === 510) {
this.$message.warning(res.message)
}
this.loading = false;
})
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'pid', text: '父级节点', dictCode: ''})
fieldList.push({type: 'string', value: 'code', text: '类型编号', dictCode: ''})
fieldList.push({type: 'string', value: 'name', text: '类型名称', dictCode: ''})
fieldList.push({type: 'string', value: 'img', text: '类型图片', dictCode: ''})
fieldList.push({type: 'string', value: 'brand', text: '类型品牌', dictCode: ''})
fieldList.push({type: 'string', value: 'model', text: '型号', dictCode: ''})
fieldList.push({type: 'string', value: 'manufacturer', text: '生产厂商', dictCode: ''})
fieldList.push({type: 'string', value: 'supplier', text: '供货商', dictCode: ''})
fieldList.push({type: 'string', value: 'contact', text: '联系人', dictCode: ''})
fieldList.push({type: 'string', value: 'place', text: '产地', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.ZyDevicetypeDetail.showModal(id)
<!--export default {-->
<!-- name: "ZyDevicetypeList",-->
<!-- mixins: [JeecgListMixin],-->
<!-- components: {-->
<!-- // ZyTypeparametersList,-->
<!-- // ZyOperationparametersList,-->
<!-- // ZyDevicetypeModal,-->
<!-- // ZyDevicetypeDetail-->
<!-- },-->
<!-- data() {-->
<!-- return {-->
<!-- description: '设备类型管理页面',-->
<!-- // -->
<!-- columns: [-->
<!-- {-->
<!-- title: '设备编号',-->
<!-- align: "center",-->
<!-- dataIndex: 'id'-->
<!-- },-->
<!-- {-->
<!-- title: '名称',-->
<!-- align: "center",-->
<!-- dataIndex: 'name'-->
<!-- },-->
<!-- // {-->
<!-- // title:'',-->
<!-- // align:"center",-->
<!-- // dataIndex: 'img',-->
<!-- // scopedSlots: {customRender: 'imgSlot'}-->
<!-- // },-->
<!-- // {-->
<!-- // title:"",-->
<!-- // align:"center",-->
<!-- // dataIndex: 'erweima',-->
<!-- // scopedSlots: {customRender: 'imgeSlot'}-->
<!-- // },-->
<!-- {-->
<!-- title: '类型品牌',-->
<!-- align: "center",-->
<!-- dataIndex: 'brand'-->
<!-- },-->
<!-- // {-->
<!-- // title:'',-->
<!-- // align:"center",-->
<!-- // dataIndex: 'model'-->
<!-- // },-->
<!-- {-->
<!-- title: '生产厂商',-->
<!-- align: "center",-->
<!-- dataIndex: 'manufacturer'-->
<!-- },-->
<!-- // {-->
<!-- // title:'',-->
<!-- // align:"center",-->
<!-- // dataIndex: 'supplier'-->
<!-- // },-->
<!-- // {-->
<!-- // title:'',-->
<!-- // align:"center",-->
<!-- // dataIndex: 'contact'-->
<!-- // },-->
<!-- // {-->
<!-- // title:'',-->
<!-- // align:"center",-->
<!-- // dataIndex: 'place'-->
<!-- // },-->
<!-- ],-->
<!-- url: {-->
<!-- list: "/devicetype/zyDevicetype/list",-->
<!-- delete: "/devicetype/zyDevicetype/delete",-->
<!-- deleteBatch: "/devicetype/zyDevicetype/deleteBatch",-->
<!-- exportXlsUrl: "/devicetype/zyDevicetype/exportXls",-->
<!-- importExcelUrl: "devicetype/zyDevicetype/importExcel",-->
<!-- },-->
<!-- dictOptions: {},-->
<!-- /* 分页参数 */-->
<!-- ipagination: {-->
<!-- current: 1,-->
<!-- pageSize: 5,-->
<!-- pageSizeOptions: ['5', '10', '50'],-->
<!-- showTotal: (total, range) => {-->
<!-- return range[0] + "-" + range[1] + " 共" + total + "条"-->
<!-- },-->
<!-- showQuickJumper: true,-->
<!-- showSizeChanger: true,-->
<!-- total: 0-->
<!-- },-->
<!-- selectedMainId: '',-->
<!-- superFieldList: [],-->
<!-- selectedRowKeys: [],-->
<!-- }-->
<!-- },-->
<!-- created() {-->
<!-- this.getSuperFieldList();-->
<!-- },-->
<!-- computed: {-->
<!-- importExcelUrl: function () {-->
<!-- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;-->
<!-- }-->
<!-- },-->
<!-- methods: {-->
<!-- onSelectChange(selectedRowKeys) {-->
<!-- console.log('selectedRowKeys changed: ', selectedRowKeys);-->
<!-- this.selectedRowKeys = selectedRowKeys;-->
<!-- },-->
<!-- initDictConfig() {-->
<!-- },-->
<!-- clickThenSelect(record) {-->
<!-- return {-->
<!-- on: {-->
<!-- click: () => {-->
<!-- this.onSelectChange(record.id.split(","), [record]);-->
<!-- }-->
<!-- }-->
<!-- }-->
<!-- },-->
<!-- onClearSelected() {-->
<!-- this.selectedRowKeys = [];-->
<!-- this.selectionRows = [];-->
<!-- this.selectedMainId = ''-->
<!-- },-->
<!-- // onSelectChange(selectedRowKeys, selectionRows) {-->
<!-- // this.selectedMainId=selectedRowKeys[0]-->
<!-- // this.selectedRowKeys = selectedRowKeys;-->
<!-- // this.selectionRows = selectionRows;-->
<!-- // },-->
<!-- loadData(arg) {-->
<!-- if (!this.url.list) {-->
<!-- this.$message.error("请设置url.list属性!")-->
<!-- return-->
<!-- }-->
<!-- // 1-->
<!-- if (arg === 1) {-->
<!-- this.ipagination.current = 1;-->
<!-- }-->
<!-- this.onClearSelected()-->
<!-- var params = this.getQueryParams();//-->
<!-- this.loading = true;-->
<!-- getAction(this.url.list, params).then((res) => {-->
<!-- if (res.success) {-->
<!-- this.dataSource = res.result.records;-->
<!-- this.ipagination.total = res.result.total;-->
<!-- }-->
<!-- if (res.code === 510) {-->
<!-- this.$message.warning(res.message)-->
<!-- }-->
<!-- this.loading = false;-->
<!-- })-->
<!-- },-->
<!-- getSuperFieldList() {-->
<!-- let fieldList = [];-->
<!-- fieldList.push({type: 'string', value: 'pid', text: '父级节点', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'code', text: '类型编号', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'name', text: '类型名称', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'img', text: '类型图片', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'brand', text: '类型品牌', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'model', text: '型号', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'manufacturer', text: '生产厂商', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'supplier', text: '供货商', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'contact', text: '联系人', dictCode: ''})-->
<!-- fieldList.push({type: 'string', value: 'place', text: '产地', dictCode: ''})-->
<!-- this.superFieldList = fieldList-->
<!-- },-->
<!-- openDetail(id) {-->
<!-- this.$refs.ZyDevicetypeDetail.showModal(id)-->
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>
<!-- }-->
<!-- }-->
<!--}-->
<!--</script>-->

@ -1,111 +1,30 @@
<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 type="primary" icon="download" @click="handleExportXls('计划工序')">导出</a-button>
<!-- <a-button type="primary" @click="handleTableSave($event)">保存</a-button>-->
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
<j-vxe-table
ref="xTable"
toolbar
:toolbarConfig="toolbarConfig"
row-number
row-selection
keep-source
:rowSelection="clickTrue"
:clickSelectRow="clickTrue"
:loading="loading"
:columns="columns"
@selectRowChange="handleSelectRowChange"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<span slot="stationList" slot-scope="stationList">
<a-select @change="getToolAndMachine" style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in stationList" :value="item.id">
{{ item.stationName }}
</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>
<span slot="proProcess" slot-scope="proProcess">
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"
pidValue="" placeholder="前导工序"/>
</span>
<span slot="postProcess" slot-scope="postProcess">
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"
pidValue="" placeholder="后导工序"/>
</span>
<span slot="inputProduct" slot-scope="inputProduct">
<a-input v-model="processIds" placeholder="请输入产品"></a-input>
</span>
<span slot="semiProduct" slot-scope="semiProduct">
<a-input v-model="semiProduct" placeholder="请输入成品/半成品"></a-input>
</span>
<!-- <template
v-for="col in columns"
:slot="col"
slot-scope="text, record, index"
>
<div :key="col">
<a-input
v-if="record.editable"
style="margin: -5px 0"
:value="text"
@change="e => handleChange(e.target.value, record.key, col)"
/>
<template v-else>
{{ text }}
</template>
</div>
</template>
<template slot="operation" slot-scope="text, record, index">
<div class="editable-row-operations">
<span v-if="record.editable">
<a @click="() => save(record)">Save</a>
<a-popconfirm title="Sure to cancel?" @confirm="() => cancel(record)">
<a>Cancel</a>
</a-popconfirm>
</span>
<span>
<a :disabled="editingKey !== ''" @click="() => edit(index)">Edit66</a>
</span> b
</div>
</template>-->
</a-table>
</div>
<div class="table-operator" style="text-align: right">
<a-button type="primary" @click="fanHui()">提交</a-button>
@valueChange="handleValueChange"
@save="handleTableSave"
/>
</div>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
@ -114,189 +33,135 @@
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import {getAction, postAction} from "@api/manage";
import {filterObj, pushIfNotExist, randomNumber, randomUUID} from "@/utils/util";
import {JVXETypes} from '@/components/jeecg/JVxeTable'
export default {
name: 'ZyPlanProcessList',
name: 'ZyPlanProcessDataList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal
},
data() {
// this.cacheData = this.dataSource.map(item => ({ ...item }));
this.cacheData = [];
return {
toolbarConfig: {
// add remove clearSelection
btn: ['save']
},
description: '生产计划工序管理页面',
loading: false,
//
// pagination: {
// //
// current: 1,
// //
// pageSize: 10,
// //
// pageSizeOptions: ['10', '20', '30', '50'],
// // 0
// total: 0,
// },
//
// selectedRows: [],
//
dataSource: [],
// columns,
//
columns: [
{
title: '#',
dataIndex: 'productProcessId',
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',
scopedSlots: {customRender: 'workOrderId'}
},
/*{
title: '产品id',
align: "center",
dataIndex: 'productId'
},
{
title: '工序id',
align: "center",
dataIndex: 'productProcessId'
},*/
{
title: '产品',
align: "center",
dataIndex: 'productName'
},
{
title: '车间',
align: "center",
dataIndex: 'departName'
},
{
title: '工序',
align: "center",
dataIndex: 'processName'
},
{key: 'workOrderId', title: '工单编号', width: '180px'},
{key: 'productName', title: '产品名称', width: '180px'},
{key: 'departName', title: '车间名称', width: '180px'},
{key: 'processName', title: '工序名称', width: '180px'},
{
title: '工位列表',
align: "center",
dataIndex: 'stationList',
width: 150,
scopedSlots: {customRender: 'stationList'}
},
{
title: '工位工具列表',
align: "center",
dataIndex: 'toolsList',
width: 150,
// scopedSlots: {customRender: this.toolsList}
scopedSlots: {customRender: 'toolsList'}
},
{
title: '工具设备列表',
align: "center",
dataIndex: 'machineList',
width: 150,
scopedSlots: {customRender: 'machineList'}
key: 'stationId',
type: JVXETypes.select,
width: '200px',
options: [],
placeholder: '请选择${title}',
}, {
title: '设备列表',
key: 'machineIds',
type: JVXETypes.selectMultiple,
width: '200px',
options: [],
placeholder: '请选择${title}',
}, {
title: '工具列表',
key: 'toolsIds',
type: JVXETypes.selectMultiple,
width: '200px',
options: [],
placeholder: '请选择${title}',
},
{
key: 'proProcess',
title: '前导工序',
align: "center",
dataIndex: 'proProcess',
width: 150,
scopedSlots: {customRender: 'proProcess'}
dictCode: 'zy_process,process_name,id,id in(select process_id from zy_product_process where product_id="1")',
width: '150',
type: JVXETypes.select
},
{
title: '后导工序',
align: "center",
dataIndex: 'proProcess',
width: 150,
scopedSlots: {customRender: 'postProcess'}
},
{
title: '输入产品',
align: "center",
dataIndex: 'inputProduct',
width: 150,
scopedSlots: {customRender: 'inputProduct'}
},
{
title: '成品/半成品',
align: "center",
dataIndex: 'semiProduct',
width: 150,
scopedSlots: {customRender: 'semiProduct'}
},
// {
// title: 'operation',
// dataIndex: 'operation',
// scopedSlots: {customRender: 'operation'},
// },
// {
// title: '',
// dataIndex: 'action',
// align: "center",
// fixed: "right",
// width: 147,
// scopedSlots: {customRender: 'action'}
// }
{key: 'postProcess', title: '后导工序', width: '150', type: JVXETypes.select},
{key: 'inputProduct', title: '输入产品', width: '150', type: JVXETypes.input},
{key: 'semiProduct', title: '成品/半成品', width: '150', type: JVXETypes.input},
],
editingKey: '',
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist",
stationToolslist: "/stationTool/list",
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",
stationToolslist: "/stationTool/list2",
stationMachinelist: "/stationMachine/list2",
addProcessBatch: "/org.jeecg.modules.productplan/zyPlanProcess/addProcessBatch",
},
loadRouteType: false,
planId: "",
dictOptions: {},
// superFieldList: [],
superFieldList: [],
stationList: [],
toolsList: [],
machineList: [],
clickTrue: true,
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
//
handleTableSave({$table, target}) {
console.log("保存开始-----")
//
$table.validate().then((errMap) => {
//
if (!errMap) {
//
let tableData = target.getTableData()
tableData.forEach(item => {
item.id = '';
})
console.log('当前保存的数据是:', tableData)
// //
// let newData = target.getNewData()
// console.log('-- ', newData)
// //
// let deleteData = target.getDeleteData()
// console.log('-- ', deleteData)
//
this.loading = true
postAction(this.url.addProcessBatch, tableData).then(res => {
if (res.success) {
this.$message.success(`保存成功!`)
} else {
this.$message.warn(`保存失败:` + res.message)
}
}).finally(() => {
this.loading = false
})
}
})
},
fanHui() {
this.$router.push({
path: '/productplan/ZyPlanProcessList',
});
},
getToolAndMachine(stationId) {
// alert("stationId=" + stationId);
getAction(this.url.stationToolslist, {"stationId": stationId}).then((res) => {
if (res.success) {
this.toolsList = res.result.records || res.result;
console.log("toolsList", JSON.stringify(this.toolsList))
} else {
this.$message.warning(res.message)
}
});
getAction(this.url.stationMachinelist, {"stationId": stationId}).then((res) => {
if (res.success) {
this.machineList = res.result.records || res.result;
console.log("machineList", JSON.stringify(this.toolsList))
} else {
this.$message.warning(res.message)
}
});
},
//
loadParameter() {
if (this.loadRouteType === false) {
@ -307,14 +172,16 @@ export default {
}
},
loadData(arg) {
console.log("the loadData---------开始");
// var that = this;
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
// if (arg === 1) {
// this.ipagination.current = 1;
// }
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
@ -322,19 +189,12 @@ export default {
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;
}
this.stationList = this.dataSource[0].stationList;
} else {
// this.stationIdCode = "station,station_name,id,depart_id in (select workshop_id from zy_product_plan where id='" + this.planId + "')";
this.$message.warning(res.message)
}
}).finally(() => {
// this.dataSource.forEach(item => {
// item['stationName'] = this.stationName;
// item['stationNum'] = this.stationNum;
// })
this.loading = false
})
},
@ -352,78 +212,61 @@ export default {
param.planId = this.planId;
return filterObj(param);
},
// initDictConfig() {
// },
getSuperFieldList() {
// let fieldList = [];
// fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'planId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'productName', 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: 'productProcessId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'productProcessId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'userIds', text: 'id', dictCode: ''})
// this.superFieldList = fieldList
},
// handleChange(value, key, column) {
// const newData = [...this.data];
// const target = newData.find(item => key === item.key);
// if (target) {
// target[column] = value;
// this.data = newData;
// }
// },
edit(key) {
alert("the edit() record =" + JSON.stringify(key))
// const newData = [...this.data];
const newData = [...this.dataSource];
// const newData = record;
console.log("the edit() newData =", JSON.stringify(newData));
// this.editingKey = '0';
// record.editable = true;
// const target = newData.find(item => key === item.key);
const target = newData[0];
console.log("the edit() target =", JSON.stringify(target));
this.editingKey = key;
console.log("the edit() editingKey =", this.editingKey);
if (target) {
// debugger;
target.editable = true;
this.dataSource = newData;
}
},
save(key) {
// const newData = [...this.data];
const newData = this.dataSource;
console.log("save() newData=", JSON.stringify(newData))
const newCacheData = [...this.cacheData];
const target = newData.find(item => key === item.key);
const targetCache = newCacheData.find(item => key === item.key);
if (target && targetCache) {
delete target.editable;
this.dataSource = newData;
Object.assign(targetCache, target);
this.cacheData = newCacheData;
}
this.editingKey = '';
//
handleSelectRowChange(event) {
console.log("handleSelectRowChange")
console.log("handleSelectRowChange-event:", event)
const {type, row, column, value, target, $table} = event
console.log(JSON.stringify(this.stationList));
// target.$refs.vxe.columns[6].dictCode = this.stationIdCode;
target.$refs.vxe.columns[6].options = this.stationList;
//
// target.setValues([{
// rowKey: row.id,
// values: {machineIds: '', toolsIds: ''}
// }])
// target.$refs.vxe.columns[4].options = []
},
cancel(key) {
const newData = this.dataSource;
const target = newData.find(item => key === item.key);
this.editingKey = '';
if (target) {
Object.assign(target, this.cacheData.find(item => key === item.key));
delete target.editable;
this.dataSource = newData;
/** 当选项被改变时,联动其他组件 */
handleValueChange(event) {
const {type, row, column, value, target} = event
console.log("event", event)
console.log("row", row)
// if (type === JVXETypes.select) {
//
if (column.key === 'stationId') {
// options
console.log('this stationid(row.id):', row.stationId)
//
target.setValues([{
rowKey: row.id,
values: {machineIds: '', toolsIds: ''}
}])
target.$refs.vxe.columns[7].options = []
target.$refs.vxe.columns[8].options = []
getAction(this.url.stationMachinelist, {"stationId": row.stationId}).then((res) => {
if (res.success) {
this.machineList = res.result.records || res.result;
console.log("machineList", JSON.stringify(this.machineList))
target.$refs.vxe.columns[7].options = this.machineList;
} else {
this.$message.warning(res.message)
}
});
getAction(this.url.stationToolslist, {"stationId": row.stationId}).then((res) => {
if (res.success) {
this.toolsList = res.result.records || res.result;
console.log("toolsList", JSON.stringify(this.toolsList))
target.$refs.vxe.columns[8].options = this.toolsList;
} else {
this.$message.warning(res.message)
}
});
}
},
}
},
};
</script>
<style scoped>
.editable-row-operations a {
margin-right: 8px;
}
</style>

@ -1,52 +1,13 @@
<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">-->
<!--&lt;!&ndash; <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>&ndash;&gt;-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('生产计划工序')">导出</a-button>-->
<!-- &lt;!&ndash; <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"&ndash;&gt;-->
<!-- &lt;!&ndash; @change="handleImportExcel">&ndash;&gt;-->
<!-- &lt;!&ndash; <a-button type="primary" icon="import">导入</a-button>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-upload>&ndash;&gt;-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <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>-->
<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" icon="download" @click="handleExportXls('计划工序')">导出</a-button>
<a-button type="primary" @click="fanHui()">保存</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"
@ -77,12 +38,59 @@
</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>
<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>
<span slot="proProcess" slot-scope="proProcess">
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"
pidValue="" placeholder="前导工序"/>
</span>
<span slot="postProcess" slot-scope="postProcess">
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"
pidValue="" placeholder="后导工序"/>
</span>
<span slot="inputProduct" slot-scope="inputProduct">
<a-input v-model="processIds" placeholder="请输入产品"></a-input>
</span>
<span slot="semiProduct" slot-scope="semiProduct">
<a-input v-model="semiProduct" placeholder="请输入成品/半成品"></a-input>
</span>
<!-- <template
v-for="col in columns"
:slot="col"
slot-scope="text, record, index"
>
<div :key="col">
<a-input
v-if="record.editable"
style="margin: -5px 0"
:value="text"
@change="e => handleChange(e.target.value, record.key, col)"
/>
<template v-else>
{{ text }}
</template>
</div>
</template>
<template slot="operation" slot-scope="text, record, index">
<div class="editable-row-operations">
<span v-if="record.editable">
<a @click="() => save(record)">Save</a>
<a-popconfirm title="Sure to cancel?" @confirm="() => cancel(record)">
<a>Cancel</a>
</a-popconfirm>
</span>
<span>
<a :disabled="editingKey !== ''" @click="() => edit(index)">Edit66</a>
</span> b
</div>
</template>-->
</a-table>
</div>
@ -110,13 +118,16 @@ export default {
ZyPlanProcessModal
},
data() {
// this.cacheData = this.dataSource.map(item => ({ ...item }));
this.cacheData = [];
return {
description: '生产计划工序管理页面',
// columns,
//
columns: [
{
title: '#',
dataIndex: '',
dataIndex: 'productProcessId',
key: 'rowIndex',
width: 60,
align: "center",
@ -124,21 +135,27 @@ export default {
return parseInt(index) + 1;
}
},
// {
// title: 'id',
// align: "center",
// dataIndex: 'planId'
// },
/* {
title: '计划id',
align: "center",
dataIndex: 'planId'
},*/
{
title: '工单编号',
align: "center",
dataIndex: 'workOrderId'
dataIndex: 'workOrderId',
scopedSlots: {customRender: 'workOrderId'}
},
{
/*{
title: '产品id',
align: "center",
dataIndex: 'productId'
},
{
title: '工序id',
align: "center",
dataIndex: 'productProcessId'
},*/
{
title: '产品',
align: "center",
@ -166,8 +183,8 @@ export default {
align: "center",
dataIndex: 'toolsList',
width: 150,
scopedSlots: {customRender: 'toolsList'}
// scopedSlots: {customRender: this.toolsList}
scopedSlots: {customRender: 'toolsList'}
},
{
title: '工具设备列表',
@ -177,14 +194,50 @@ export default {
scopedSlots: {customRender: 'machineList'}
},
{
title: '操作',
dataIndex: 'action',
title: '前导工序',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
dataIndex: 'proProcess',
width: 150,
scopedSlots: {customRender: 'proProcess'}
},
{
title: '后导工序',
align: "center",
dataIndex: 'proProcess',
width: 150,
scopedSlots: {customRender: 'postProcess'}
},
{
title: '输入产品',
align: "center",
dataIndex: 'inputProduct',
width: 150,
scopedSlots: {customRender: 'inputProduct'}
},
{
title: '成品/半成品',
align: "center",
dataIndex: 'semiProduct',
width: 150,
scopedSlots: {customRender: 'semiProduct'}
},
// {
// title: 'operation',
// dataIndex: 'operation',
// scopedSlots: {customRender: 'operation'},
// },
// {
// title: '',
// dataIndex: 'action',
// align: "center",
// fixed: "right",
// width: 147,
// scopedSlots: {customRender: 'action'}
// }
],
editingKey: '',
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist",
stationToolslist: "/stationTool/list",
@ -198,7 +251,7 @@ export default {
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
// superFieldList: [],
toolsList: [],
machineList: [],
}
@ -295,48 +348,75 @@ export default {
// 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
// let fieldList = [];
// fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'planId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'productName', 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: 'productProcessId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'productProcessId', 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)
// handleChange(value, key, column) {
// const newData = [...this.data];
// const target = newData.find(item => key === item.key);
// if (target) {
// target[column] = value;
// this.data = newData;
// }
// });
// },
}
}
edit(key) {
alert("the edit() record =" + JSON.stringify(key))
// const newData = [...this.data];
const newData = [...this.dataSource];
// const newData = record;
console.log("the edit() newData =", JSON.stringify(newData));
// this.editingKey = '0';
// record.editable = true;
// const target = newData.find(item => key === item.key);
const target = newData[0];
console.log("the edit() target =", JSON.stringify(target));
this.editingKey = key;
console.log("the edit() editingKey =", this.editingKey);
if (target) {
// debugger;
target.editable = true;
this.dataSource = newData;
}
},
save(key) {
// const newData = [...this.data];
const newData = this.dataSource;
console.log("save() newData=", JSON.stringify(newData))
const newCacheData = [...this.cacheData];
const target = newData.find(item => key === item.key);
const targetCache = newCacheData.find(item => key === item.key);
if (target && targetCache) {
delete target.editable;
this.dataSource = newData;
Object.assign(targetCache, target);
this.cacheData = newCacheData;
}
this.editingKey = '';
},
cancel(key) {
const newData = this.dataSource;
const target = newData.find(item => key === item.key);
this.editingKey = '';
if (target) {
Object.assign(target, this.cacheData.find(item => key === item.key));
delete target.editable;
this.dataSource = newData;
}
},
},
};
</script>
<style scoped>
@import '~@assets/less/common.less';
.editable-row-operations a {
margin-right: 8px;
}
</style>

@ -20,17 +20,17 @@
<!-- 高级查询区域 -->
<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>
<!-- <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>-->
<!--&lt;!&ndash; <a-button style="margin-left: 8px"> 批量操作&ndash;&gt;-->
<!--&lt;!&ndash; <a-icon type="down"/>&ndash;&gt;-->
<!--&lt;!&ndash; </a-button>&ndash;&gt;-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
@ -171,12 +171,12 @@ export default {
dataIndex: 'toolsIds_dictText',
scopedSlots: {customRender: 'toolsIds_dictText'}
},
{
title: '成员',
align: "center",
dataIndex: 'userIds_dictText',
scopedSlots: {customRender: 'userIds_dictText'}
},
// {
// title: '',
// align: "center",
// dataIndex: 'userIds_dictText',
// scopedSlots: {customRender: 'userIds_dictText'}
// },
{
title:'前导工序',
align:"center",

@ -16,26 +16,31 @@
<a-input placeholder="请输入班组名称" v-model="queryParam.groupName"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="负责人">
<a-input placeholder="请输入负责人" v-model="queryParam.enterprisesManager"></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.mobile"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="手机号">
<a-input placeholder="请输入手机号" v-model="queryParam.mobile"></a-input>
</a-form-item>
</a-col>
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="负责人">-->
<!-- <a-input placeholder="请输入负责人" v-model="queryParam.enterprisesManager"></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.mobile"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- </template>-->
<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>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
</span>
</a-col>

@ -27,19 +27,18 @@
<!-- </a-form-model>-->
<!-- </a-spin>-->
<ZyDevicetypeListRef ref="modalForm2"></ZyDevicetypeListRef>
<ZyDeviceListRef ref="modalForm2"></ZyDeviceListRef>
</j-modal>
</template>
<script>
import {httpAction} from '@/api/manage'
import moment from "moment"
import ZyDevicetypeListRef from '@views/devicetype/ZyDevicetypeListRef'
import ZyDeviceListRef from '@views/device/ZyDeviceListRef'
export default {
name: "StationMachineModal",
components:{
ZyDevicetypeListRef
ZyDeviceListRef
},
data() {
return {
@ -49,14 +48,14 @@ export default {
stationId: '',
machineId:[],
},
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
// labelCol: {
// xs: {span: 24},
// sm: {span: 5},
// },
// wrapperCol: {
// xs: {span: 24},
// sm: {span: 16},
// },
confirmLoading: false,
validatorRules: {

@ -4,7 +4,9 @@ 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.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -20,93 +22,133 @@ import lombok.experimental.Accessors;
/**
* @Description: 设备信息
* @Author: jeecg-boot
* @Date: 2021-11-11
* @Date: 2021-11-11
* @Version: V1.0
*/
@Data
@TableName("zy_device")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_device对象", description="设备信息")
@ApiModel(value = "zy_device对象", description = "设备信息")
public class ZyDevice implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
private String name;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
/**
* 创建日期
*/
@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")
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
/**
* 所属部门
*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**设备图片*/
@Excel(name = "设备图片", width = 15)
private String orgCode;
/**
* 设备图片
*/
@Excel(name = "设备图片", width = 15)
@ApiModelProperty(value = "设备图片")
private String img;
/**设备类型*/
@Excel(name = "设备类型", width = 15, dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
@Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
/**
* 设备类型
*/
@Excel(name = "设备类型", width = 15, dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
@Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "设备类型")
private String typeid;
/**设备编号*/
@Excel(name = "设备编号", width = 15)
private String typeCode;
/**
* 设备编号
*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private String code;
/**购买时间*/
@Excel(name = "购买时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
/**
* 购买时间
*/
@Excel(name = "购买时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "购买时间")
private Date buydate;
/**经办人*/
@Excel(name = "经办人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
/**
* 经办人
*/
@Excel(name = "经办人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "经办人")
private String agent;
/**存放位置*/
@Excel(name = "存放位置", width = 15)
/**
* 存放位置
*/
@Excel(name = "存放位置", width = 15)
@ApiModelProperty(value = "存放位置")
@TableField(exist = false)
private String adress;
/**设备状态*/
@Excel(name = "设备状态", width = 15)
/**
* 设备状态
*/
@Excel(name = "设备状态", width = 15)
@ApiModelProperty(value = "设备状态")
private String status;
/**二维码*/
@Excel(name = "二维码", width = 15)
/**
* 二维码
*/
@Excel(name = "二维码", width = 15)
@ApiModelProperty(value = "二维码")
@TableField(exist = false)
private String erweima;
/**维护周期*/
@Excel(name = "维护周期", width = 15)
/**
* 维护周期
*/
@Excel(name = "维护周期", width = 15)
@ApiModelProperty(value = "维护周期")
private String maintenancecycle;
/**管理人*/
@Excel(name = "管理人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
/**
* 管理人
*/
@Excel(name = "管理人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "管理人")
private String administrator;
/**上次维护时间*/
@Excel(name = "上次维护时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
/**
* 上次维护时间
*/
@Excel(name = "上次维护时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "上次维护时间")
private Date maintenancedate;
/**3d模型*/
@Excel(name = "3d模型", width = 15)
/**
* 3d模型
*/
@Excel(name = "3d模型", width = 15)
@ApiModelProperty(value = "3d模型")
private String img3d;
}

@ -4,7 +4,6 @@ package org.jeecg.modules.productplan.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -19,7 +18,6 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.productplan.entity.ZyPlanProcess;
import org.jeecg.modules.productplan.entity.vo.ProcessDataVo;
import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.team.entity.GroupxMember;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
@ -28,7 +26,9 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
/**
* @Description: 生产计划工序
@ -156,12 +156,15 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
return Result.OK("添加成功!");
}
// @AutoLog(value = "生产计划工序-添加")
@ApiOperation(value = "计划工序管理-批量添加工序、工位、设备", notes = "计划工序管理-批量添加工序、工位、设备")
@PostMapping(value = "/addProcessBatch")
public Result<?> addProcessBatch(@RequestBody List<ZyPlanProcess> zyPlanProcessList) {
if (!ObjectUtils.isEmpty(zyPlanProcessList)) {
zyPlanProcessService.remove(new LambdaQueryWrapper<ZyPlanProcess>()
.eq(ZyPlanProcess::getPlanId, zyPlanProcessList.get(0).getPlanId()));
zyPlanProcessService.saveBatch(zyPlanProcessList);
zyPlanProcessService.saveBatch(zyPlanProcessList);
}
return Result.OK("添加成功!");
}

@ -3,9 +3,8 @@ package org.jeecg.modules.productplan.entity.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.team.entity.GroupxMember;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.vo.StationVo;
import java.io.Serializable;
import java.util.List;
@ -21,6 +20,8 @@ public class ProcessDataVo implements Serializable {
//工单id
private String workOrderId;
private String planId;
//产品id
private String productId;
private String productName;
@ -31,13 +32,13 @@ public class ProcessDataVo implements Serializable {
private String departName;
//工位
private List<Station> stationList;
private List<StationVo> stationList;
//班组成员列表
private List<GroupxMember> groupMemberList;
//产品工序id
// @Dict(dictTable ="zy_process",dicText = "process_name",dicCode = "id")
private String productProcessId;
private String processId;
private String processName;
}

@ -19,6 +19,7 @@ import org.jeecg.modules.team.entity.GroupxMember;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IGroupxMemberService;
import org.jeecg.modules.team.service.IStationService;
import org.jeecg.modules.team.vo.StationVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
@ -69,16 +70,29 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
if (!ObjectUtils.isEmpty(productProcessesList)) {
SysDepart depart = iSysDepartService.getById(departId);
List<Station> stationList = iStationService.list(new LambdaQueryWrapper<Station>().eq(Station::getDepartId, departId));
List<StationVo> stationVoList = new LinkedList<>();
if (!ObjectUtils.isEmpty(stationList)) {
stationList.forEach(en -> {
StationVo stationVo = new StationVo();
stationVo.setId(en.getId());
stationVo.setValue(en.getId());
stationVo.setText(en.getStationName());
stationVo.setTitle(en.getStationName());
stationVoList.add(stationVo);
});
}
productProcessesList.forEach(e -> {
ProcessDataVo vo = new ProcessDataVo();
vo.setProductProcessId(e.getProcessId());
vo.setPlanId(planId);
vo.setProcessId(e.getProcessId());
vo.setProcessName(iZyProcessService.getById(e.getProcessId()).getProcessName());
vo.setProductId(e.getProductId());
vo.setProductName("产品名称");
vo.setWorkOrderId(productCode);
vo.setDepartId(departId);
vo.setDepartName(depart.getDepartName());
vo.setStationList(stationList);
vo.setStationList(stationVoList);
result.add(vo);
});
}
@ -106,8 +120,8 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
List<GroupxMember> groupxMemberList = iGroupxMemberService.list(new LambdaQueryWrapper<GroupxMember>().eq(GroupxMember::getGroupxId, zyProductPlan.getTeamId()));
productProcessesList.forEach(e -> {
ProcessDataVo vo = new ProcessDataVo();
// vo.setId()
vo.setProductProcessId(e.getProcessId());
vo.setPlanId(planId);
vo.setProcessId(e.getProcessId());
vo.setProcessName(iZyProcessService.getById(e.getProcessId()).getProcessName());
vo.setProductId(e.getProductId());
// vo.setProductName("产品名称")

@ -1,5 +1,6 @@
package org.jeecg.modules.team.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -11,11 +12,15 @@ 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.device.entity.ZyDevice;
import org.jeecg.modules.device.service.IZyDeviceService;
import org.jeecg.modules.team.entity.StationMachine;
import org.jeecg.modules.team.entity.StationMachine;
import org.jeecg.modules.team.service.IStationMachineService;
import org.jeecg.modules.team.vo.StationMachineVo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -39,6 +44,9 @@ public class StationMachineController extends JeecgController<StationMachine, IS
@Autowired
private IStationMachineService stationMachineService;
@Autowired
private IZyDeviceService iZyDeviceService;
/**
* 分页列表查询
*
@ -61,6 +69,26 @@ public class StationMachineController extends JeecgController<StationMachine, IS
return Result.OK(pageList);
}
@ApiOperation(value = "工序工具管理-分页列表查询", notes = "工序工具管理-分页列表查询")
@GetMapping(value = "/list2")
public Result<?> list2(StationMachine stationMachine,
HttpServletRequest req) {
List<StationMachineVo> voList = new LinkedList<>();
List<StationMachine> toolList = stationMachineService.list(new LambdaQueryWrapper<StationMachine>().eq(StationMachine::getStationId, stationMachine.getStationId()));
if (!ObjectUtils.isEmpty(toolList)) {
toolList.forEach(en -> {
StationMachineVo stationMachineVo = new StationMachineVo();
stationMachineVo.setId(en.getMachineId());
stationMachineVo.setValue(en.getMachineId());
ZyDevice zyDevice = iZyDeviceService.getById(en.getMachineId());
stationMachineVo.setText(zyDevice.getName());
stationMachineVo.setTitle(zyDevice.getName());
voList.add(stationMachineVo);
});
}
return Result.OK(voList);
}
/**
* 添加
*

@ -1,5 +1,6 @@
package org.jeecg.modules.team.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -12,10 +13,16 @@ 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.demo.tool.entity.ZyTool;
import org.jeecg.modules.demo.tool.service.IZyToolService;
import org.jeecg.modules.device.service.IZyDeviceService;
import org.jeecg.modules.team.entity.StationTool;
import org.jeecg.modules.team.service.IStationToolService;
import org.jeecg.modules.team.vo.StationToolVo;
import org.jeecg.modules.team.vo.StationVo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -40,6 +47,9 @@ public class StationToolController extends JeecgController<StationTool, IStation
@Autowired
private IStationToolService stationToolService;
@Autowired
private IZyToolService iZyToolService;
/**
* 分页列表查询
*
@ -62,6 +72,31 @@ public class StationToolController extends JeecgController<StationTool, IStation
return Result.OK(pageList);
}
@ApiOperation(value = "工序工具管理-分页列表查询", notes = "工序工具管理-分页列表查询")
@GetMapping(value = "/list2")
public Result<?> list2(StationTool stationTool,
// @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
// @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap());
// Page<StationTool> page = new Page<StationTool>(pageNo, pageSize);
// IPage<StationTool> pageList = stationToolService.page(page, queryWrapper);
List<StationToolVo> voList = new LinkedList<>();
List<StationTool> toolList = stationToolService.list(new LambdaQueryWrapper<StationTool>().eq(StationTool::getStationId, stationTool.getStationId()));
if(!ObjectUtils.isEmpty(toolList)){
toolList.forEach(en->{
StationToolVo stationVo = new StationToolVo();
stationVo.setId(en.getToolsId());
stationVo.setValue(en.getToolsId());
ZyTool zyTool = iZyToolService.getById(en.getToolsId());
stationVo.setText(zyTool.getName());
stationVo.setTitle(zyTool.getName());
voList.add(stationVo);
});
}
return Result.OK(voList);
}
/**
* 添加
*

@ -87,7 +87,7 @@ public class Station {
@TableField(exist = false)
@ApiModelProperty(value = "设备id列表")
@Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
@Dict(dictTable = "zy_device", dicText = "name", dicCode = "id")
private String machineIds;
/**
* 工具id列表

@ -45,7 +45,7 @@ public class StationMachine {
*/
@Excel(name = "设备id,uuid,FK,设备表", width = 15)
@ApiModelProperty(value = "设备id,uuid,FK,设备表")
@Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
@Dict(dictTable = "zy_device", dicText = "name", dicCode = "id")
private String machineId;
/**
* 创建日期

@ -0,0 +1,16 @@
package org.jeecg.modules.team.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class StationMachineVo {
private String id;
private String value;
private String text;
private String title;
}

@ -0,0 +1,33 @@
package org.jeecg.modules.team.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @Description: 工序工具管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class StationToolVo {
private String id;
private String value;
private String text;
private String title;
}

@ -0,0 +1,16 @@
package org.jeecg.modules.team.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class StationVo {
private String id;
private String value;
private String text;
private String title;
}
Loading…
Cancel
Save