车间工位管理问题修改 12.15

zhc4dev
zhc077 2 years ago
parent c8e920ae25
commit 8d416bbee8
  1. 8
      ant-design-vue-jeecg/src/views/devicetype/ZyDevicetypeListRef.vue
  2. 381
      ant-design-vue-jeecg/src/views/erp/tool/ZyToolListRef.vue
  3. 32
      ant-design-vue-jeecg/src/views/team/modules/GroupxMemberModal.vue
  4. 78
      ant-design-vue-jeecg/src/views/team/modules/GroupxModal.vue
  5. 2
      ant-design-vue-jeecg/src/views/team/modules/StationModal.vue
  6. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/GroupxMemberController.java

@ -9,14 +9,8 @@
<!-- </div>-->
<!-- &lt;!&ndash; 查询区域-END &ndash;&gt;-->
<!-- &lt;!&ndash; 操作按钮区域 &ndash;&gt;-->
<!-- 操作按钮区域 -->
<!-- <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>-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- </div>-->

@ -1,218 +1,261 @@
<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-page-search-wrapper">-->
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<!-- <a-row :gutter="24">-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!-- &lt;!&ndash; 查询区域-END &ndash;&gt;-->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_tool')">导出</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>-->
<!-- 高级查询区域 -->
<!-- <div class="table-operator">-->
<!-- &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>-->
<!-- 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>
<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"
class="j-table-force-nowrap"
:scroll="{x:true}"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
: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="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>-->
<!-- <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>-->
<!-- <span slot="action" slot-scope="text, record">-->
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical" />-->
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
<!-- </span>-->
<!-- <a-divider type="vertical" />-->
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
<!-- </span>-->
</a-table>
</div>
<!-- <zy-tool-modal ref="modalForm" @ok="modalFormOk"></zy-tool-modal>-->
<!-- <zy-tool-modal ref="modalForm" @ok="modalFormOk"></zy-tool-modal>-->
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyToolModal from './modules/ZyToolModal'
import '@/assets/less/TableExpand.less'
// import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
// import ZyToolModal from './modules/ZyToolModal'
export default {
name: 'ZyToolList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyToolModal
},
data () {
return {
description: 'zy_tool管理页面',
//
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title:'工具编号',
align:"center",
dataIndex: 'nums'
},
{
title:'工具名称',
align:"center",
dataIndex: 'name'
},
{
title:'功能',
align:"center",
dataIndex: 'function'
},
{
title:'规格',
align:"center",
dataIndex: 'specs'
},
// {
// title:'',
// align:"center",
// dataIndex: 'scope'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'workshopSection'
// },
// {
// title:' ( 0 1 2 3 4 )',
// align:"center",
// dataIndex: 'status'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'qrode'
// },
// {
// title: '',
// dataIndex: 'action',
// align:"center",
// fixed:"right",
// width:147,
// scopedSlots: { customRender: 'action' }
// }
],
url: {
list: "/tool/zyTool/list",
delete: "/tool/zyTool/delete",
deleteBatch: "/tool/zyTool/deleteBatch",
exportXlsUrl: "/tool/zyTool/exportXls",
importExcelUrl: "tool/zyTool/importExcel",
export default {
name: 'ZyToolList',
mixins: [JeecgListMixin],
components: {
// ZyToolModal
},
data() {
return {
description: 'zy_tool管理页面',
//
columns: [
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title: '工具编号',
align: "center",
dataIndex: 'nums'
},
{
title: '工具名称',
align: "center",
dataIndex: 'name'
},
{
title: '功能',
align: "center",
dataIndex: 'function'
},
{
title: '规格',
align: "center",
dataIndex: 'specs'
},
// {
// title:'',
// align:"center",
// dataIndex: 'scope'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'workshopSection'
// },
// {
// title:' ( 0 1 2 3 4 )',
// align:"center",
// dataIndex: 'status'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'qrode'
// },
// {
// title: '',
// dataIndex: 'action',
// align:"center",
// fixed:"right",
// width:147,
// scopedSlots: { customRender: 'action' }
// }
],
url: {
list: "/tool/zyTool/list",
delete: "/tool/zyTool/delete",
deleteBatch: "/tool/zyTool/deleteBatch",
exportXlsUrl: "/tool/zyTool/exportXls",
importExcelUrl: "tool/zyTool/importExcel",
},
dictOptions:{
},
/* 分页参数 */
ipagination:{
current: 1,
pageSize: 5,
pageSizeOptions: ['5', '10', '50'],
showTotal: (total, range) => {
return range[0] + "-" + range[1] + " 共" + total + "条"
},
dictOptions:{},
superFieldList:[],
selectedRowKeys: [],
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
selectedMainId:'',
superFieldList:[],
selectedRowKeys: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
clickThenSelect(record) {
return {
on: {
click: () => {
this.onSelectChange(record.id.split(","), [record]);
}
}
}
},
created() {
this.getSuperFieldList();
onClearSelected() {
this.selectedRowKeys = [];
this.selectionRows = [];
this.selectedMainId=''
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
methods: {
onSelectChange(selectedRowKeys){
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'name',text:'工具名称'})
fieldList.push({type:'string',value:'nums',text:'工具编号'})
fieldList.push({type:'string',value:'function',text:'功能'})
fieldList.push({type:'string',value:'specs',text:'规格'})
fieldList.push({type:'string',value:'scope',text:'适用范围'})
fieldList.push({type:'string',value:'workshopSection',text:'责人工段'})
fieldList.push({type:'string',value:'status',text:'状态 ( 0 在库、1 在用、2 遗失 、3 损坏、4 报废)'})
fieldList.push({type:'string',value:'qrode',text:'二维码'})
this.superFieldList = fieldList
initDictConfig() {
},
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: 'name', text: '工具名称'})
fieldList.push({type: 'string', value: 'nums', text: '工具编号'})
fieldList.push({type: 'string', value: 'function', text: '功能'})
fieldList.push({type: 'string', value: 'specs', text: '规格'})
fieldList.push({type: 'string', value: 'scope', text: '适用范围'})
fieldList.push({type: 'string', value: 'workshopSection', text: '责人工段'})
fieldList.push({type: 'string', value: 'status', text: '状态 ( 0 在库、1 在用、2 遗失 、3 损坏、4 报废)'})
fieldList.push({type: 'string', value: 'qrode', text: '二维码'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -20,9 +20,9 @@
<!-- <j-select-user-by-dep v-model="model.userId" :multi="false"></j-select-user-by-dep>-->
<j-select-multi-user placeholder="请选择成员" v-model="model.userId"></j-select-multi-user>
</a-form-model-item>
<!-- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="joinTime" label="加入时间">-->
<!-- <a-date-picker showTime valueFormat='YYYY-MM-DD HH:mm:ss' v-model="model.joinTime"/>-->
<!-- </a-form-model-item>-->
<!-- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="joinTime" label="加入时间">-->
<!-- <a-date-picker showTime valueFormat='YYYY-MM-DD HH:mm:ss' v-model="model.joinTime"/>-->
<!-- </a-form-model-item>-->
</a-form-model>
</a-spin>
@ -62,6 +62,7 @@ export default {
},
url: {
add: "/groupxMember/add",
addBatch: "/groupxMember/addBatch",
edit: "/groupxMember/edit",
}
,
@ -98,25 +99,24 @@ export default {
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
httpurl += this.url.addBatch;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
console.log("----------the add() model:", this.model);
this.model.stationId =
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;
that.close();
})
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;
that.close();
})
} else {
return false;
}

@ -22,15 +22,20 @@
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="groupName" label="班组名称">
<a-input placeholder="请输入班组名称" v-model="model.groupName"/>
</a-form-model-item>
<!-- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterprisesManager" label="负责人">-->
<!-- &lt;!&ndash; <a-input placeholder="请输入负责人" v-model="model.enterprisesManager"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <j-select-multi-user placeholder="请选择负责人" v-model="model.enterprisesManager" @change="getMobile()"/>&ndash;&gt;-->
<!-- <j-select-user-by-dep placeholder="请选择负责人" v-model="model.enterprisesManager" @change="getMobile()"/>-->
<!-- <j-select-user-by-dep placeholder="请选择负责人" v-model="model.enterprisesManager" :multi="false"-->
<!-- @change="getMobile"></j-select-user-by-dep>-->
<!-- {{ model.enterprisesManager }}-->
<!-- </a-form-model-item>-->
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterprisesManager" label="负责人">
<j-select-user-by-dep placeholder="请选择负责人" v-model="model.enterprisesManager" :multi="false" :value='sex' :back-user="true"></j-select-user-by-dep>
{{ model.enterprisesManager }}
<a-form-model-item :label-col="labelCol" :wrapper-col="wrapperCol" prop="enterprisesManager" label="班组成员">
<!-- <j-select-user-by-dep v-model="model.userId" :multi="false"></j-select-user-by-dep>-->
<j-select-multi-user placeholder="请选择成员" v-model="model.enterprisesManager" @change="getMobile()" :multiple="false" ></j-select-multi-user>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mobile" label="手机号">
<a-input placeholder="请输入手机号" v-model="model.mobile"/>
<!-- <j-dict-select-tag type="list" v-model="model.mobile" :dictCode="mobileVal"></j-dict-select-tag>-->
@ -44,13 +49,13 @@
<script>
import {httpAction, getAction} from '@/api/manage'
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
export default {
name: "GroupxModal",
components: {
JDictSelectTag,
JSelectDepart,
JSelectUserByDep,
},
data() {
return {
@ -99,42 +104,47 @@ export default {
created() {
},
methods: {
async getMobile() {
getMobile() {
let that = this;
// alert(userIds);
let param = {
"username": this.model.enterprisesManager,
"username": that.model.enterprisesManager,
}
let that = this;
const {data: res} = await this.$axios.get('/jeecg-boot/sys/user/list', {params: param})
// this.questionBankList = res.result
console.log("userlist:" + JSON.stringify(res))
console.log("the phone:" + JSON.stringify(res.result.records[0].phone))
let phone = JSON.stringify(res.result.records[0].phone);
this.model.mobile = phone;
},
getAction(that.url.sysUserList, param).then((res) => {
if (res.success) {
let phone = JSON.stringify(res.result.records[0].phone);
console.log("phone:",phone)
if (phone.length > 11) {
phone = phone.substring(1, 12);
}else {
phone = "";
}
that.model = Object.assign(that.model, {'mobile': phone});
this.$forceUpdate();
}
});
// getMobile() {
// alert(this.model.enterprisesManager);
// this.mobileVal = "sys_user,phone,username,username='" + this.model.enterprisesManager + "'";
// // this.model.mobile = "123456789";
//
// getMobile(userIds) {
// let that = this;
// // alert(userIds);
// let param = {
// "username": this.model.enterprisesManager,
// "username": userIds,
// }
// let that = this;
// getAction(this.url.sysUserList, param).then((res) => {
// if (res.success) {
// console.log("res:" + JSON.stringify(res.result.records[0]))
// console.log("res22222222:" + JSON.stringify(res.result.records[0].phone));
// // this.model.mobile = res.result.records[0].phone;
// // this.model.mobile = JSON.stringify(res.result.records[0].phone)
// if (JSON.stringify(res.result.records[0].phone) !== "") {
// that.model.mobile = "15112345678";
// } else {
// that.model.mobile = JSON.stringify(res.result.records[0].phone)
//
// let phone = JSON.stringify(res.result.records[0].phone);
// if (phone.length > 11) {
// phone = phone.substring(1, 12);
// }else {
// phone = "";
// }
// that.model = Object.assign(that.model, {'mobile': phone});
// this.$forceUpdate();
// }
// });
// },
},
add() {
//
this.edit({});

@ -67,7 +67,7 @@ export default {
],
stationNum: [
{required: true,message:"工位序号不能不空"},
{pattern: /^[1-9]{0,100}$/, message: '工位序号不能为空且长度范围在(1-100)间!'}
{pattern: /^[1-9]{0,100}$/, message: '工位序号不能为空且长度为(1-100)间正整数'}
],
},
url: {

@ -6,12 +6,15 @@ 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.apache.commons.lang3.StringUtils;
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.team.entity.GroupxMember;
import org.jeecg.modules.team.entity.GroupxMember;
import org.jeecg.modules.team.service.IGroupxMemberService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -19,6 +22,8 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
/**
* @Description: 班组成员管理
@ -67,6 +72,26 @@ public class GroupxMemberController extends JeecgController<GroupxMember, IGroup
return Result.OK("添加成功!");
}
@AutoLog(value = "班组成员表管理-添加")
@ApiOperation(value = "班组成员表管理-添加", notes = "班组成员表管理-添加")
@PostMapping(value = "/addBatch")
public Result<?> addBatch(@RequestBody GroupxMember en) {
String userIds = en.getUserId();
List<GroupxMember> addList = new LinkedList<>();
if (StringUtils.isNotBlank(userIds)) {
List<String> list = Arrays.asList(userIds.split(","));
list.forEach(e -> {
GroupxMember s = new GroupxMember();
BeanUtils.copyProperties(en, s);
s.setUserId(e);
addList.add(s);
});
}
groupxMemberService.saveBatch(addList);
return Result.OK("添加成功!");
}
/**
* 编辑
*

Loading…
Cancel
Save