Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
zhc4dev
赵玉瑞 2 years ago
commit 311525bfbd
  1. 284
      ant-design-vue-jeecg/src/views/pdmodulecomponent/ProductModuleComponentList.vue
  2. 124
      ant-design-vue-jeecg/src/views/pdmodulecomponent/modules/ProductModuleComponentForm.vue
  3. 78
      ant-design-vue-jeecg/src/views/pdmodulecomponent/modules/ProductModuleComponentModal.vue
  4. 84
      ant-design-vue-jeecg/src/views/pdmodulecomponent/modules/ProductModuleComponentModal__Style#Drawer.vue
  5. 165
      ant-design-vue-jeecg/src/views/pdmodulecomponent/modules/ZyClothsComponentList.vue
  6. 286
      ant-design-vue-jeecg/src/views/pdmoduleprocess/ProductModuleProcessList.vue
  7. 124
      ant-design-vue-jeecg/src/views/pdmoduleprocess/modules/ProductModuleProcessForm.vue
  8. 76
      ant-design-vue-jeecg/src/views/pdmoduleprocess/modules/ProductModuleProcessModal.vue
  9. 84
      ant-design-vue-jeecg/src/views/pdmoduleprocess/modules/ProductModuleProcessModal__Style#Drawer.vue
  10. 288
      ant-design-vue-jeecg/src/views/pdmoduleprocess/modules/ZyProcessList.vue
  11. 12
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  12. 4
      ant-design-vue-jeecg/src/views/product/productProcess/ZyProductProcessList.vue
  13. 15
      ant-design-vue-jeecg/src/views/product/productProcess/modules/ZyProcessList.vue
  14. 293
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
  15. 119
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue
  16. 4
      ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
  17. 6
      ant-design-vue-jeecg/src/views/productplan/modules/ZyProductPlanForm.vue
  18. 46
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  19. 217
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmodulecomponent/controller/ProductModuleComponentController.java
  20. 70
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmodulecomponent/entity/ProductModuleComponent.java
  21. 27
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmodulecomponent/mapper/ProductModuleComponentMapper.java
  22. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmodulecomponent/mapper/xml/ProductModuleComponentMapper.xml
  23. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmodulecomponent/service/IProductModuleComponentService.java
  24. 39
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmodulecomponent/service/impl/ProductModuleComponentServiceImpl.java
  25. 217
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmoduleprocess/controller/ProductModuleProcessController.java
  26. 71
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmoduleprocess/entity/ProductModuleProcess.java
  27. 24
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmoduleprocess/mapper/ProductModuleProcessMapper.java
  28. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmoduleprocess/mapper/xml/ProductModuleProcessMapper.xml
  29. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmoduleprocess/service/IProductModuleProcessService.java
  30. 31
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmoduleprocess/service/impl/ProductModuleProcessServiceImpl.java
  31. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/mapper/ZyProductProcessMapper.java
  32. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/service/IZyProductProcessService.java
  33. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/service/impl/ZyProductProcessServiceImpl.java
  34. 52
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  35. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java
  36. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyProductPlan.java
  37. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java
  38. 46
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java

@ -0,0 +1,284 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="产品编号">
<a-input placeholder="产品编号" v-model="productId"></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="component"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('产品模块部件表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="up(record.id)">升序</a>
<a-divider type="vertical" />
<a @click="down(record.id)">降序</a>
</span>
</a-table>
</div>
<product-module-component-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></product-module-component-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ProductModuleComponentModal from './modules/ProductModuleComponentModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ProductModuleComponentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ProductModuleComponentModal
},
data () {
return {
description: '产品模块部件表管理页面',
component:'',
productId:'',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'产品编号',
align:"center",
dataIndex: 'productId'
// dataIndex: 'productId_dictText'
},
{
title:'模块',
align:"center",
dataIndex: 'moduleId'
// dataIndex: 'moduleId_dictText'
},
{
title:'部件',
align:"center",
dataIndex: 'componentId_dictText'
},
{
title:'序号',
align:"center",
dataIndex: 'number'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/pdmodulecomponent/productModuleComponent/list",
delete: "/pdmodulecomponent/productModuleComponent/delete",
deleteBatch: "/pdmodulecomponent/productModuleComponent/deleteBatch",
exportXlsUrl: "/pdmodulecomponent/productModuleComponent/exportXls",
importExcelUrl: "/pdmodulecomponent/productModuleComponent/importExcel",
up: "/pdmodulecomponent/productModuleComponent/up",
down: "/pdmodulecomponent/productModuleComponent/down"
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
up(id){
getAction(this.url.up,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
})},
down(id){
getAction(this.url.down,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
})},
initDictConfig(){
},
valueChange(value){
if (value) this.loadData()
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productId',text:'产品id',dictCode:''})
fieldList.push({type:'string',value:'productModuleId',text:'产品模块id',dictCode:''})
fieldList.push({type:'string',value:'moduleId',text:'模块id',dictCode:''})
fieldList.push({type:'string',value:'componentId',text:'部件id',dictCode:''})
fieldList.push({type:'int',value:'number',text:'序号',dictCode:''})
this.superFieldList = fieldList
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
console.log("***********")
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!");
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.productModuleId = this.$route.query.id;
param.componentId=this.component;
param.productId=this.productId;
return filterObj(param);
},
searchReset() {
this.component = ''
this.productId = ''
this.loadData(1);
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,124 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="产品id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productId">
<a-input v-model="model.productId" placeholder="请输入产品id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productModuleId">
<a-input v-model="model.productModuleId" placeholder="请输入产品模块id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">
<a-input v-model="model.moduleId" placeholder="请输入模块id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="部件id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentId">
<a-input v-model="model.componentId" placeholder="请输入部件id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="序号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
<a-input-number v-model="model.number" placeholder="请输入序号" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ProductModuleComponentForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/pdmodulecomponent/productModuleComponent/add",
edit: "/pdmodulecomponent/productModuleComponent/edit",
queryById: "/pdmodulecomponent/productModuleComponent/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,78 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-cloths-component-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit"></zy-cloths-component-list>
</j-modal>
</template>
<script>
import {postAction} from "@api/manage";
import ZyClothsComponentList from "./ZyClothsComponentList";
export default {
name: 'ProductModuleComponentModal',
components: {
ZyClothsComponentList,
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false,
model:{
productModuleId:'',
componentId:''
},
url:{
add: "/pdmodulecomponent/productModuleComponent/add",
},
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
})
},
edit (record) {
this.visible=true
},
close () {
this.$emit('close');
this.visible = false;
},
chuancan(res){
this.model.componentId=res;
console.log(res)
},
handleOk () {
this.model.productModuleId = this.$route.query.id
postAction(this.url.add,this.model).then((res)=>{
if(res.success){
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
this.$emit('valueChange',1)
this.close()
})},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<product-module-component-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></product-module-component-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ProductModuleComponentForm from './ProductModuleComponentForm'
export default {
name: 'ProductModuleComponentModal',
components: {
ProductModuleComponentForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,165 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="编号">
<a-input placeholder="编号" v-model="queryParam.nums"></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.partsName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange1}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
name: 'ZyClothsComponentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
},
data () {
return {
description: 'zy_cloths_component管理页面',
//
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: 'partsName'
},
],
url: {
list: "/base/zyClothsComponent/list",
delete: "/base/zyClothsComponent/delete",
deleteBatch: "/base/zyClothsComponent/deleteBatch",
exportXlsUrl: "/base/zyClothsComponent/exportXls",
importExcelUrl: "base/zyClothsComponent/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey',ids)
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'nums',text:'编号',dictCode:''})
fieldList.push({type:'string',value:'partsName',text:'部件名称',dictCode:''})
fieldList.push({type:'string',value:'componentType',text:'部件类型',dictCode:''})
fieldList.push({type:'string',value:'description',text:'描述',dictCode:''})
fieldList.push({type:'string',value:'pictureUrl',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'modularId',text:'模块',dictCode:'zy_cloths_modular,modular_name,id'})
fieldList.push({type:'string',value:'enterpriseId',text:'企业',dictCode:''})
this.superFieldList = fieldList
},
handleDetail(record){
this.$refs.ZyClothsComponentListDetail.showModal(record)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,286 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="产品编号">
<a-input placeholder="产品编号" v-model="productId"></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="processId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('产品模块工序')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="up(record.id)">升序</a>
<a-divider type="vertical" />
<a @click="down(record.id)">降序</a>
</span>
</a-table>
</div>
<product-module-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></product-module-process-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ProductModuleProcessModal from './modules/ProductModuleProcessModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ProductModuleProcessList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ProductModuleProcessModal
},
data () {
return {
description: '产品模块工序管理页面',
processId:'',
productId:'',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'产品编号',
align:"center",
dataIndex: 'productId'
// dataIndex: 'productId_dictText'
},
//id
{
title:'模块',
align:"center",
dataIndex: 'moduleId'
// dataIndex: 'moduleId_dictText'
},
{
title:'工序',
align:"center",
// dataIndex: 'processId'
dataIndex: 'processId_dictText'
},
{
title:'序号',
align:"center",
dataIndex: 'number'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/pdmoduleprocess/productModuleProcess/list",
delete: "/pdmoduleprocess/productModuleProcess/delete",
deleteBatch: "/pdmoduleprocess/productModuleProcess/deleteBatch",
exportXlsUrl: "/pdmoduleprocess/productModuleProcess/exportXls",
importExcelUrl: "pdmoduleprocess/productModuleProcess/importExcel",
up: "/pdmoduleprocess/productModuleProcess/up",
down: "/pdmoduleprocess/productModuleProcess/down"
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
up(id){
getAction(this.url.up,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
})},
down(id){
getAction(this.url.down,{id:id}).then((res)=>{
if(res.success){
this.loadData();
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
})},
initDictConfig(){
},
valueChange(value){
if (value) this.loadData()
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productId',text:'产品id',dictCode:''})
fieldList.push({type:'string',value:'productModuleId',text:'产品模块id',dictCode:''})
fieldList.push({type:'string',value:'moduleId',text:'模块id',dictCode:''})
fieldList.push({type:'string',value:'processId',text:'工序id',dictCode:''})
fieldList.push({type:'int',value:'number',text:'序号',dictCode:''})
this.superFieldList = fieldList
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
console.log("***********")
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!");
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.productModuleId = this.$route.query.id;
param.processId=this.processId;
param.productId=this.productId;
return filterObj(param);
},
searchReset() {
this.processId = ''
this.productId = ''
this.loadData(1);
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,124 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="产品id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productId">
<a-input v-model="model.productId" placeholder="请输入产品id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productModuleId">
<a-input v-model="model.productModuleId" placeholder="请输入产品模块id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模块id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moduleId">
<a-input v-model="model.moduleId" placeholder="请输入模块id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processId">
<a-input v-model="model.processId" placeholder="请输入工序id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="序号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="number">
<a-input-number v-model="model.number" placeholder="请输入序号" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ProductModuleProcessForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/pdmoduleprocess/productModuleProcess/add",
edit: "/pdmoduleprocess/productModuleProcess/edit",
queryById: "/pdmoduleprocess/productModuleProcess/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,76 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-process-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit"></zy-process-list>
</j-modal>
</template>
<script>
import ZyProcessList from './ZyProcessList'
import {postAction} from "@api/manage";
export default {
name: 'ProductModuleProcessModal',
components: {
ZyProcessList
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false,
model:{
productModuleId:'',
processId:''
},
url:{
add: "/pdmoduleprocess/productModuleProcess/add",
},
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
})
},
edit (record) {
this.visible=true
},
close () {
this.$emit('close');
this.visible = false;
},
chuancan(res){
this.model.processId=res;
console.log(res)
},
handleOk () {
this.model.productModuleId = this.$route.query.id
postAction(this.url.add,this.model).then((res)=>{
if(res.success){
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
this.$emit('valueChange',1)
this.close()
})},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<product-module-process-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></product-module-process-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ProductModuleProcessForm from './ProductModuleProcessForm'
export default {
name: 'ProductModuleProcessModal',
components: {
ProductModuleProcessForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,288 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="服装类型">-->
<!-- <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_type,type_name,nums"-->
<!-- v-model="styleId"></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序代码">
<a-input placeholder="工序代码" v-model="processCode"></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="processName"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" />-->
<!-- </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 -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_process')">导出</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>
<!-- 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: onSelectChange1}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<!-- 新建一个管理列-->
<!-- <span slot="action1" slot-scope="text, record">-->
<!-- -->
<!-- </span>-->
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
},
data() {
return {
description: 'zy_process管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processName'
},
],
url: {
list: "/base/zyProcess/list",
delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel",
},
//
loadRouteType: false,
styleId: "",
processCode:'',
processName:'',
enterpriseId:'',
dictOptions: {},
superFieldList: [],
}
},
created() {
// queryParam.styleId=this.styleId
// this.getSuperFieldList();
this.loadParameter();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey',ids)
},
//
loadParameter() {
if (this.loadRouteType == false) {
this.styleId = this.$route.query.styleId;
console.log(this.styleId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.styleId = this.styleId;
param.enterpriseId=this.enterpriseId;
param.processCode=this.processCode;
param.processName=this.processName;
return filterObj(param);
},
searchReset() {
this.styleId = ''
this.processCode = ''
this.processName = ''
this.enterpriseId = ''
this.loadData(1);
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''})
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''})
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''})
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''})
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''})
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''})
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''})
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''})
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'})
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''})
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''})
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''})
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''})
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'})
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''})
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'})
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''})
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''})
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''})
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''})
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''})
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -1,7 +1,7 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-form-model ref="model" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
@ -13,6 +13,8 @@
<a-col :span="48">
<a-form-model-item label="模块名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularName">
<a-input v-model="model.modularName" placeholder="请输入模块名称"></a-input>
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称(最多30字)" :maxLength="30"></a-input>-->
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称" ></a-input>-->
</a-form-model-item>
</a-col>
</a-row>
@ -139,8 +141,9 @@ export default {
// { required: true, message: '!'},
// ],
modularName: [
{ required: true, message: '请输入模块名称!'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
{required: true, message: '请输入模块名称!'},
//{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;!()?]{0,50}$/, message: ''},
{min: 1, max: 30, message: '最多输入30字!', trigger: 'blur'},
],
clothsTypeId: [
{required: true, message: '请选择衣服类型!'},
@ -169,7 +172,7 @@ export default {
//var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
let num = res.result;
console.log("+6++++aaa"+num)
console.log("+6++++aaa" + num)
//num=num.toString()
//while(num.length<n){
//num="0"+num
@ -211,7 +214,6 @@ export default {
that.confirmLoading = false;
})
}
})
},
}

@ -115,10 +115,10 @@
data () {
return {
description: '产品工序管理页面',
processId:'',
//
columns: [
{
processId:'',
title: '#',
dataIndex: '',
key:'rowIndex',
@ -131,7 +131,7 @@
{
title:'产品编号',
align:"center",
dataIndex: 'productId_dicText'
dataIndex: 'productId_dictText'
},
{
title:'工序名称',

@ -43,20 +43,7 @@
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->

@ -10,36 +10,42 @@
<!-- 查询区域-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 type="primary" icon="download" @click="handleExportXls('生产计划工序')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('1')">导出</a-button>
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<!-- <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"
@ -54,28 +60,37 @@
: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="action1" slot-scope="text, record">-->
<!-- <a @click="jumpPage1(record)">班组成员管理</a>-->
<!-- &lt;!&ndash; <a-divider type="vertical"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <a @click="jumpPage2(record)">工位工具管理</a>&ndash;&gt;-->
<!-- </span>-->
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical"/>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a @click="jumpPage1(record)">制定计划详情</a>
<span slot="toolsList" slot-scope="toolsList">
<a-select style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in toolsList" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</span>
<span slot="machineList" slot-scope="machineList">
<a-select style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in machineList" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</span>
</a-table>
</div>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
<div class="table-operator" style="text-align: right">
<a-button type="primary" @click="fanHui()">提交</a-button>
</div>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
@ -85,6 +100,8 @@ 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";
export default {
name: 'ZyPlanProcessList',
@ -94,7 +111,7 @@ export default {
},
data() {
return {
description: '计划工序制定数据列表',
description: '生产计划工序管理页面',
//
columns: [
{
@ -107,35 +124,57 @@ export default {
return parseInt(index) + 1;
}
},
// {
// title: 'id',
// align: "center",
// dataIndex: 'planId'
// },
{
title: '生产计划id',
title: '工单编号',
align: "center",
dataIndex: 'planId'
dataIndex: 'workOrderId'
},
{
title: '车间名称',
title: '产品id',
align: "center",
dataIndex: 'teamName'
dataIndex: 'productId'
},
{
title: '工单编号',
title: '产品',
align: "center",
dataIndex: 'productCode'
dataIndex: 'productName'
},
{
title: '产品名称',
title: '车间',
align: "center",
dataIndex: 'productCode2'
dataIndex: 'departName'
},
{
title:'工序名称',
align:"center",
dataIndex: 'processId_dictText'
title: '工序',
align: "center",
dataIndex: 'processName'
},
{
title:'序号',
align:"center",
dataIndex: 'number'
title: '工位列表',
align: "center",
dataIndex: 'stationList',
width: 150,
scopedSlots: {customRender: 'stationList'}
},
{
title: '工位工具列表',
align: "center",
dataIndex: 'toolsList',
width: 150,
scopedSlots: {customRender: 'toolsList'}
// scopedSlots: {customRender: this.toolsList}
},
{
title: '工具设备列表',
align: "center",
dataIndex: 'machineList',
width: 150,
scopedSlots: {customRender: 'machineList'}
},
{
title: '操作',
@ -147,16 +186,21 @@ export default {
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
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",
// deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
// exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
// importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",
},
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
toolsList: [],
machineList: [],
}
},
created() {
@ -168,8 +212,88 @@ export default {
},
},
methods: {
initDictConfig() {
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) {
this.planId = this.$route.query.planId;
// this.biaoTi = this.$route.query.styleNames+"";
console.log("*******传递的planId:" + this.planId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
console.log("----------------the params:", params);
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
// this.dataSource.forEach(item => {
// item['stationName'] = this.stationName;
// item['stationNum'] = this.stationNum;
// })
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.planId = this.planId;
return filterObj(param);
},
// initDictConfig() {
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
@ -180,16 +304,17 @@ export default {
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyProductPlanList',
// query: { //
// 'stationId': record.id,
// 'stationName': record.stationName,
// },
});
},
// 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',
@ -197,17 +322,17 @@ export default {
// }
// });
// 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)
// }
// });
// 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)
// }
// });
// },
}
}

@ -55,16 +55,51 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<!-- <span slot="action1" slot-scope="text, record">-->
<!-- <a @click="jumpPage1(record)">班组成员管理</a>-->
<!-- &lt;!&ndash; <a-divider type="vertical"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <a @click="jumpPage2(record)">工位工具管理</a>&ndash;&gt;-->
<!-- </span>-->
<span slot="processId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="stationId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="toolsIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="machineIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="userIds" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical"/>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
@ -108,33 +143,39 @@ export default {
}
},
{
title: '生产计划id',
title: '生产计划',
align: "center",
dataIndex: 'planId'
}, {
title: '工位id',
},
{
title: '工序',
align: "center",
dataIndex: 'stationId'
dataIndex: 'processId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '设备id列表',
title: '工位',
align: "center",
dataIndex: 'machineIds'
dataIndex: 'stationId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '工具id列表',
title: '设备',
align: "center",
dataIndex: 'toolsIds'
dataIndex: 'machineIds_dictText',
scopedSlots: {customRender: 'machineIds_dictText'}
},
{
title: '工序id列表',
title: '工',
align: "center",
dataIndex: 'processIds'
dataIndex: 'toolsIds_dictText',
scopedSlots: {customRender: 'toolsIds_dictText'}
},
{
title: '成员id列表',
title: '成员',
align: "center",
dataIndex: 'userIds'
dataIndex: 'userIds',
scopedSlots: {customRender: 'userIds'}
},
{
title: '操作',
@ -146,7 +187,8 @@ export default {
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
@ -181,12 +223,11 @@ export default {
},
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyProductPlanList',
// query: { //
// 'stationId': record.id,
// 'stationName': record.stationName,
// },
path: '/productplan/ZyPlanProcessDataList',
query: { //
'planId': record.planId,
// 'stationName': record.stationName,
},
});
},
// pf(record) {
@ -196,17 +237,17 @@ export default {
// }
// });
// 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)
// }
// });
// 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)
// }
// });
// },
}
}

@ -184,7 +184,7 @@ export default {
{
title: '生产时长',
align: "center",
dataIndex: 'offTime'
dataIndex: 'duration'
},
{
title: '状态',
@ -252,7 +252,7 @@ export default {
fieldList.push({type: 'string', value: 'teamId', text: '班组', dictCode: ''})
fieldList.push({type: 'string', value: 'teamLeader', text: '组长', dictCode: ''})
fieldList.push({type: 'date', value: 'workTime', text: '生产开始时间'})
fieldList.push({type: 'int', value: 'offTime', text: '生产时长', dictCode: ''})
fieldList.push({type: 'int', value: 'duration', text: '生产时长', dictCode: ''})
fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: ''})
fieldList.push({type: 'int', value: 'speedUp', text: '是否加急', dictCode: ''})
fieldList.push({type: 'string', value: 'auditBy', text: '审核人', dictCode: ''})

@ -57,8 +57,8 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="生产时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="offTime">
<a-input-number v-model="model.offTime" placeholder="请输入生产时长" style="width: 100%"/>
<a-form-model-item label="生产时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="duration">
<a-input-number v-model="model.duration" placeholder="请输入生产时长" style="width: 100%"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -134,7 +134,7 @@ export default {
// status: [
// {required: true,message: ""},
// ],
offTime: [
duration: [
{required: true, message: "生产时长不能不空"},
{pattern: /^[0-9]{0,100}$/, message: '生产时间不能为空且长度为正整数'}
],

@ -3,9 +3,9 @@
<j-form-container :disabled="formDisabled">
<!-- <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" :layout="horizontal">-->
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-row type="flex" justify="space-between">
<a-col :span="12">
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId">
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId" class="label">
<j-select-depart v-model="model.enterpriseId" multi/>
</a-form-model-item>
</a-col>
@ -23,10 +23,9 @@
</a-form-model-item>
<a-input v-model="model.typeId" hidden/>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="形式" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="shape">
<a-form-model-item label="形式" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="shape" class="label">
<j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape"
placeholder="请输入形式"></j-dict-select-tag>
</a-form-model-item>
@ -37,11 +36,9 @@
<a-input v-model="model.styleNames" placeholder="请输入款式名称"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="编号" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="nums">
<a-form-model-item label="编号" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="nums" class="label">
<a-input v-model="model.nums" placeholder="请输入编号" disabled=""></a-input>
</a-form-model-item>
</a-col>
@ -51,11 +48,9 @@
<a-input v-model="model.quotaMaterials" placeholder="请输入定额用料"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification">
<a-form-model-item label="规格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification" class="label">
<a-input v-model="model.specification" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
@ -64,10 +59,9 @@
<a-input v-model="model.error" placeholder="请输入测体余量"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="风格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic">
<a-form-model-item label="风格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic" class="label">
<a-input v-model="model.characteristic" placeholder="请输入风格"></a-input>
</a-form-model-item>
</a-col>
@ -76,27 +70,22 @@
<j-dict-select-tag v-model="model.sewingForm" placeholder="请选择缝纫形式" dict-code="sewingForm"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure" class="label">
<a-input v-model="model.structure" placeholder="请输入结构"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging" class="label">
<j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装"
dict-code="foldingPackaging"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="产品概述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="productOverview">
<a-col :span="48">
<a-form-model-item label="产品概述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="productOverview" class="label" >
<a-textarea v-model="model.productOverview" placeholder="请输入产品概述"/>
</a-form-model-item>
</a-col>
@ -106,14 +95,14 @@
<!-- <a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" :labelAlign="left">-->
<!-- <a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区" />-->
<!-- </a-form-model-item>-->
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory">
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" class="label">
<a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="制衣参数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="measuringMethod">
<a-form-model-item label="制衣参数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="measuringMethod" class="label">
<a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数"></a-textarea>
</a-form-model-item>
</a-col>
@ -121,7 +110,7 @@
<a-row>
<a-col>
<a-form-model-item label="配件及标志" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="accLogos">
<a-form-model-item label="配件及标志" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="accLogos" class="label">
<a-textarea v-model="model.accLogos" placeholder="请输入配件及标志"/>
</a-form-model-item>
</a-col>
@ -391,7 +380,7 @@ export default {
},
wrapperCol1: {
xs: {span: 24},
sm: {span: 18},
sm: {span: 20},
},
confirmLoading: false,
validatorRules: {
@ -485,4 +474,7 @@ export default {
.ant-form-item {
margin-bottom: 16px;
}
/deep/ .label label{
text-align:left;
}
</style>

@ -0,0 +1,217 @@
package org.jeecg.modules.pdmodulecomponent.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.pdmodulecomponent.entity.ProductModuleComponent;
import org.jeecg.modules.pdmodulecomponent.service.IProductModuleComponentService;
import org.jeecg.modules.pdmoduleprocess.entity.ProductModuleProcess;
import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 产品模块部件表
* @Author: jeecg-boot
* @Date: 2022-12-19
* @Version: V1.0
*/
@Api(tags="产品模块部件表")
@RestController
@RequestMapping("/pdmodulecomponent/productModuleComponent")
@Slf4j
public class ProductModuleComponentController extends JeecgController<ProductModuleComponent, IProductModuleComponentService> {
@Autowired
private IProductModuleComponentService productModuleComponentService;
@Autowired
IZyProductProcessService zyProductProcessService;
/**
* 分页列表查询
*
* @param productModuleComponent
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "产品模块部件表-分页列表查询")
@ApiOperation(value="产品模块部件表-分页列表查询", notes="产品模块部件表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ProductModuleComponent productModuleComponent,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.orderByDesc("number");
//查询指定模块对应的工序
queryWrapper.eq("product_module_id",productModuleComponent.getProductModuleId());
//根据产品编号查询
// if(productModuleComponent.getProductId()!=null&&!productModuleComponent.getProductId().equals("")){
// String s="%"+productModuleComponent.getProductId()+"%";
// List<String> list=zyProductProcessService.findProduct(s);
// queryWrapper.in("product_id",list);
// }
//根据部件查询
if(productModuleComponent.getComponentId()!=null&&!productModuleComponent.getComponentId().equals("")){
String s="%"+productModuleComponent.getComponentId()+"%";
List<String> list=productModuleComponentService.find(s);
queryWrapper.in("component_id",list);
}
Page<ProductModuleComponent> page = new Page<ProductModuleComponent>(pageNo, pageSize);
IPage<ProductModuleComponent> pageList = productModuleComponentService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param productModuleComponent
* @return
*/
@AutoLog(value = "产品模块部件表-添加")
@ApiOperation(value="产品模块部件表-添加", notes="产品模块部件表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ProductModuleComponent productModuleComponent) {
/*
* 通过模块id获取模块中的模块id和产品id由于当前产品模块还没有写暂时先不添加模块id和产品id
* */
String[] split = productModuleComponent.getComponentId().split(",");
for (String k : split) {
productModuleComponent.setComponentId(k);
QueryWrapper s=new QueryWrapper();
s.eq("product_module_id",productModuleComponent.getProductModuleId());
s.eq("component_id",productModuleComponent.getComponentId());
int a=productModuleComponentService.count(s);
if(a==0)
productModuleComponentService.save(productModuleComponent);
productModuleComponent.setId(null);
}
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param productModuleComponent
* @return
*/
@AutoLog(value = "产品模块部件表-编辑")
@ApiOperation(value="产品模块部件表-编辑", notes="产品模块部件表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ProductModuleComponent productModuleComponent) {
productModuleComponentService.updateById(productModuleComponent);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "产品模块部件表-通过id删除")
@ApiOperation(value="产品模块部件表-通过id删除", notes="产品模块部件表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
productModuleComponentService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "产品模块部件表-批量删除")
@ApiOperation(value="产品模块部件表-批量删除", notes="产品模块部件表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.productModuleComponentService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "产品模块部件表-通过id查询")
@ApiOperation(value="产品模块部件表-通过id查询", notes="产品模块部件表-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ProductModuleComponent productModuleComponent = productModuleComponentService.getById(id);
if(productModuleComponent==null) {
return Result.error("未找到对应数据");
}
return Result.OK(productModuleComponent);
}
/**
* 导出excel
*
* @param request
* @param productModuleComponent
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProductModuleComponent productModuleComponent) {
return super.exportXls(request, productModuleComponent, ProductModuleComponent.class, "产品模块部件表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ProductModuleComponent.class);
}
@GetMapping(value = "/up")
public Result<?> up(@RequestParam(name="id",required=true) String id) {
productModuleComponentService.up(id);
return Result.OK("升序成功");
}
@GetMapping(value = "/down")
public Result<?> down(@RequestParam(name="id",required=true) String id) {
ProductModuleComponent zyProductProcess = productModuleComponentService.getById(id);
if(zyProductProcess==null||zyProductProcess.getNumber()==0)
return Result.error("当前以是最低级别!!");
productModuleComponentService.down(id);
return Result.OK("降序成功");
}
}

@ -0,0 +1,70 @@
package org.jeecg.modules.pdmodulecomponent.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 产品模块部件表
* @Author: jeecg-boot
* @Date: 2022-12-19
* @Version: V1.0
*/
@Data
@TableName("product_module_component")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="product_module_component对象", description="产品模块部件表")
public class ProductModuleComponent implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
//@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 表暂未设计暂时不打开
private String productId;
/**产品模块id*/
@Excel(name = "产品模块id", width = 15)
@ApiModelProperty(value = "产品模块id")
private String productModuleId;
/**模块id*/
@Excel(name = "模块id", width = 15)
@ApiModelProperty(value = "模块id")
@Dict(dictTable = "zy_cloths_modular",dicText = "modular_name",dicCode = "id")
private String moduleId;
/**部件id*/
@Excel(name = "部件id", width = 15)
@ApiModelProperty(value = "部件id")
@Dict(dictTable = "zy_cloths_component",dicText = "parts_name",dicCode = "id")
private String componentId;
/**序号*/
@Excel(name = "序号", width = 15)
@ApiModelProperty(value = "序号")
private Integer number;
}

@ -0,0 +1,27 @@
package org.jeecg.modules.pdmodulecomponent.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.pdmodulecomponent.entity.ProductModuleComponent;
/**
* @Description: 产品模块部件表
* @Author: jeecg-boot
* @Date: 2022-12-19
* @Version: V1.0
*/
public interface ProductModuleComponentMapper extends BaseMapper<ProductModuleComponent> {
@Select("select id from zy_cloths_component where parts_name like #{s}")
List<String> find(String s);
@Update("update product_module_component set number=number+1 where id=#{id}")
void up(String id);
@Update("update product_module_component set number=number-1 where id=#{id}")
void down(String id);
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.pdmodulecomponent.mapper.ProductModuleComponentMapper">
</mapper>

@ -0,0 +1,22 @@
package org.jeecg.modules.pdmodulecomponent.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.pdmodulecomponent.entity.ProductModuleComponent;
import java.util.List;
/**
* @Description: 产品模块部件表
* @Author: jeecg-boot
* @Date: 2022-12-19
* @Version: V1.0
*/
public interface IProductModuleComponentService extends IService<ProductModuleComponent> {
List<String> find(String s);
void up(String id);
void down(String id);
}

@ -0,0 +1,39 @@
package org.jeecg.modules.pdmodulecomponent.service.impl;
import org.jeecg.modules.pdmodulecomponent.entity.ProductModuleComponent;
import org.jeecg.modules.pdmodulecomponent.mapper.ProductModuleComponentMapper;
import org.jeecg.modules.pdmodulecomponent.service.IProductModuleComponentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 产品模块部件表
* @Author: jeecg-boot
* @Date: 2022-12-19
* @Version: V1.0
*/
@Service
public class ProductModuleComponentServiceImpl extends ServiceImpl<ProductModuleComponentMapper, ProductModuleComponent> implements IProductModuleComponentService {
@Autowired
ProductModuleComponentMapper productModuleComponentMapper;
@Override
public List<String> find(String s) {
return productModuleComponentMapper.find(s);
}
@Override
public void up(String id) {
productModuleComponentMapper.up(id);
}
@Override
public void down(String id) {
productModuleComponentMapper.down(id);
}
}

@ -0,0 +1,217 @@
package org.jeecg.modules.pdmoduleprocess.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.pdmoduleprocess.entity.ProductModuleProcess;
import org.jeecg.modules.pdmoduleprocess.service.IProductModuleProcessService;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 产品模块工序
* @Author: jeecg-boot
* @Date: 2022-12-16
* @Version: V1.0
*/
@Api(tags="产品模块工序")
@RestController
@RequestMapping("/pdmoduleprocess/productModuleProcess")
@Slf4j
public class ProductModuleProcessController extends JeecgController<ProductModuleProcess, IProductModuleProcessService> {
@Autowired
private IProductModuleProcessService productModuleProcessService;
@Autowired
IZyProductProcessService zyProductProcessService;
/**
* 分页列表查询
*
* @param productModuleProcess
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "产品模块工序-分页列表查询")
@ApiOperation(value="产品模块工序-分页列表查询", notes="产品模块工序-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ProductModuleProcess productModuleProcess,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// QueryWrapper<ProductModuleProcess> queryWrapper = QueryGenerator.initQueryWrapper(productModuleProcess, req.getParameterMap());
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.orderByDesc("number");
//查询指定模块对应的工序
queryWrapper.eq("product_module_id",productModuleProcess.getProductModuleId());
//根据产品编号查询
// if(productModuleProcess.getProductId()!=null&&!productModuleProcess.getProductId().equals("")){
// String s="%"+productModuleProcess.getProductId()+"%";
// List<String> list=zyProductProcessService.findProduct(s);
// queryWrapper.in("product_id",list);
// }
if(productModuleProcess.getProcessId()!=null&&!productModuleProcess.getProcessId().equals("")){
String s="%"+productModuleProcess.getProcessId()+"%";
List<String> list=zyProductProcessService.find(s);
queryWrapper.in("process_id",list);
}
Page<ProductModuleProcess> page = new Page<ProductModuleProcess>(pageNo, pageSize);
IPage<ProductModuleProcess> pageList = productModuleProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param productModuleProcess
* @return
*/
@AutoLog(value = "产品模块工序-添加")
@ApiOperation(value="产品模块工序-添加", notes="产品模块工序-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ProductModuleProcess productModuleProcess) {
/*
* 通过模块id获取模块中的模块id和产品id由于当前产品模块还没有写暂时先不添加模块id和产品id
* */
String[] split = productModuleProcess.getProcessId().split(",");
for (String k : split) {
productModuleProcess.setProcessId(k);
QueryWrapper s=new QueryWrapper();
s.eq("product_module_id",productModuleProcess.getProductModuleId());
s.eq("process_id",productModuleProcess.getProcessId());
int a=productModuleProcessService.count(s);
if(a==0)
productModuleProcessService.save(productModuleProcess);
productModuleProcess.setId(null);
}
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param productModuleProcess
* @return
*/
@AutoLog(value = "产品模块工序-编辑")
@ApiOperation(value="产品模块工序-编辑", notes="产品模块工序-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ProductModuleProcess productModuleProcess) {
productModuleProcessService.updateById(productModuleProcess);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "产品模块工序-通过id删除")
@ApiOperation(value="产品模块工序-通过id删除", notes="产品模块工序-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
productModuleProcessService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "产品模块工序-批量删除")
@ApiOperation(value="产品模块工序-批量删除", notes="产品模块工序-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.productModuleProcessService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "产品模块工序-通过id查询")
@ApiOperation(value="产品模块工序-通过id查询", notes="产品模块工序-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ProductModuleProcess productModuleProcess = productModuleProcessService.getById(id);
if(productModuleProcess==null) {
return Result.error("未找到对应数据");
}
return Result.OK(productModuleProcess);
}
/**
* 导出excel
*
* @param request
* @param productModuleProcess
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ProductModuleProcess productModuleProcess) {
return super.exportXls(request, productModuleProcess, ProductModuleProcess.class, "产品模块工序");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ProductModuleProcess.class);
}
@GetMapping(value = "/up")
public Result<?> up(@RequestParam(name="id",required=true) String id) {
productModuleProcessService.up(id);
return Result.OK("升序成功");
}
@GetMapping(value = "/down")
public Result<?> down(@RequestParam(name="id",required=true) String id) {
ProductModuleProcess zyProductProcess = productModuleProcessService.getById(id);
if(zyProductProcess==null||zyProductProcess.getNumber()==0)
return Result.error("当前以是最低级别!!");
productModuleProcessService.down(id);
return Result.OK("降序成功");
}
}

@ -0,0 +1,71 @@
package org.jeecg.modules.pdmoduleprocess.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 产品模块工序
* @Author: jeecg-boot
* @Date: 2022-12-16
* @Version: V1.0
*/
@Data
@TableName("product_module_process")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="product_module_process对象", description="产品模块工序")
public class ProductModuleProcess implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
//@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 表暂未设计暂时不打开
private String productId;
/**产品模块id*/
@Excel(name = "产品模块id", width = 15)
@ApiModelProperty(value = "产品模块id")
private String productModuleId;
/**模块id*/
@Excel(name = "模块id", width = 15)
@ApiModelProperty(value = "模块id")
@Dict(dictTable = "zy_cloths_modular",dicText = "modular_name",dicCode = "id")
private String moduleId;
/**工序id*/
@Excel(name = "工序id", width = 15)
@ApiModelProperty(value = "工序id")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**序号*/
@Excel(name = "序号", width = 15)
@ApiModelProperty(value = "序号")
private Integer number;
}

@ -0,0 +1,24 @@
package org.jeecg.modules.pdmoduleprocess.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.pdmoduleprocess.entity.ProductModuleProcess;
/**
* @Description: 产品模块工序
* @Author: jeecg-boot
* @Date: 2022-12-16
* @Version: V1.0
*/
public interface ProductModuleProcessMapper extends BaseMapper<ProductModuleProcess> {
@Update("update product_module_process set number=number+1 where id=#{id}")
void up(String id);
@Update("update product_module_process set number=number-1 where id=#{id}")
void down(String id);
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.pdmoduleprocess.mapper.ProductModuleProcessMapper">
</mapper>

@ -0,0 +1,18 @@
package org.jeecg.modules.pdmoduleprocess.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.pdmoduleprocess.entity.ProductModuleProcess;
/**
* @Description: 产品模块工序
* @Author: jeecg-boot
* @Date: 2022-12-16
* @Version: V1.0
*/
public interface IProductModuleProcessService extends IService<ProductModuleProcess> {
void up(String id);
void down(String id);
}

@ -0,0 +1,31 @@
package org.jeecg.modules.pdmoduleprocess.service.impl;
import org.jeecg.modules.pdmoduleprocess.entity.ProductModuleProcess;
import org.jeecg.modules.pdmoduleprocess.mapper.ProductModuleProcessMapper;
import org.jeecg.modules.pdmoduleprocess.service.IProductModuleProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 产品模块工序
* @Author: jeecg-boot
* @Date: 2022-12-16
* @Version: V1.0
*/
@Service
public class ProductModuleProcessServiceImpl extends ServiceImpl<ProductModuleProcessMapper, ProductModuleProcess> implements IProductModuleProcessService {
@Autowired
ProductModuleProcessMapper productModuleProcessMapper;
@Override
public void up(String id) {
productModuleProcessMapper.up(id);
}
@Override
public void down(String id) {
productModuleProcessMapper.down(id);
}
}

@ -24,4 +24,7 @@ public interface ZyProductProcessMapper extends BaseMapper<ZyProductProcess> {
@Select("select id from zy_process where process_name like #{s}")
List<String> find(String s);
@Select("select id from zy_product where product_code like #{s}")
List<String> findProduct(String s);
}

@ -19,4 +19,6 @@ public interface IZyProductProcessService extends IService<ZyProductProcess> {
void down(String id);
List<String> find(String s);
List<String> findProduct(String s);
}

@ -36,4 +36,9 @@ public class ZyProductProcessServiceImpl extends ServiceImpl<ZyProductProcessMap
public List<String> find(String s) {
return zyProductProcessMapper.find(s);
}
@Override
public List<String> findProduct(String s) {
return zyProductProcessMapper.findProduct(s);
}
}

@ -3,6 +3,7 @@ package org.jeecg.modules.productplan.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -15,6 +16,7 @@ import org.jeecg.modules.productplan.entity.ZyPlanProcess;
import org.jeecg.modules.productplan.entity.vo.ProcessDataVo;
import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -47,7 +49,7 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
* @param req
* @return
*/
@AutoLog(value = "生产计划工序-分页列表查询")
// @AutoLog(value = "生产计划工序-分页列表查询")
@ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyPlanProcess zyPlanProcess,
@ -60,17 +62,53 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
return Result.OK(pageList);
}
// @AutoLog(value = "生产计划工序-分页列表查询")
@ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询")
@GetMapping(value = "/list2")
public Result<?> queryPageList2(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
if (!ObjectUtils.isEmpty(pageList)) {
String processIdList = "";
String stationIdList = "";
String machineIdList = "";
String toolsIdList = "";
String userIdList = "";
List<ZyPlanProcess> records = pageList.getRecords();
for (ZyPlanProcess e : records) {
processIdList += e.getProcessId();
stationIdList += e.getStationId();
machineIdList += e.getMachineIds();
toolsIdList += e.getToolsIds();
userIdList += e.getUserIds();
}
for (ZyPlanProcess e : records) {
e.setProcessId(processIdList);
e.setStationId(stationIdList);
e.setMachineIds(machineIdList);
e.setToolsIds(toolsIdList);
e.setUserIds(userIdList);
}
}
return Result.OK(pageList);
}
@ApiOperation(value = "生产计划工序-查询产品工序&计划", notes = "生产计划工序-查询产品工序&计划")
@GetMapping(value = "/getProcessDatalist")
public Result<?> getProcessDatalist(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
// IPage<ZyPlanProcess> pageList = zyPlanProcessService.getProcessDatalist(page, queryWrapper);
List<ProcessDataVo> pageList = zyPlanProcessService.getProcessDatalist(zyPlanProcess);
return Result.OK(pageList);
List<ProcessDataVo> processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess);
PageList<ProcessDataVo> processDataVos = new PageList<>(processDatalist, processDatalist.size());
return Result.OK(processDatalist);
}
/**

@ -10,6 +10,7 @@ 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;
@ -66,34 +67,39 @@ public class ZyPlanProcess implements Serializable {
@Excel(name = "生产计划id", width = 15)
@ApiModelProperty(value = "生产计划id")
private String planId;
/**
* 工序id列表
*/
@Excel(name = "工序id", width = 15)
@ApiModelProperty(value = "工序id列表")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**
* 工位id
*/
@Excel(name = "工位id", width = 15)
@ApiModelProperty(value = "工位id")
@Dict(dictTable = "station",dicText = "station_name",dicCode = "id")
private String stationId;
/**
* 设备id列表
*/
@Excel(name = "设备id列表", width = 15)
@ApiModelProperty(value = "设备id列表")
@Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
private String machineIds;
/**
* 工具id列表
*/
@Excel(name = "工具id列表", width = 15)
@ApiModelProperty(value = "工具id列表")
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
private String toolsIds;
/**
* 工序id列表
*/
@Excel(name = "工序id列表", width = 15)
@ApiModelProperty(value = "工序id列表")
private String processIds;
/**
* 成员id列表
*/
@Excel(name = "成员id列表", width = 15)
@ApiModelProperty(value = "成员id列表")
// @Dict(dictTable = "sys_user", dicText = "name", dicCode = "id")
private String userIds;
}

@ -103,7 +103,7 @@ public class ZyProductPlan implements Serializable {
*/
@Excel(name = "生产时长", width = 15)
@ApiModelProperty(value = "生产时长")
private Integer offTime;
private Integer duration;
/**
* 未审核0已审核1生产中2已完成3已撤销8异常9默认0
*/

@ -1,27 +1,38 @@
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.Station;
import java.io.Serializable;
import java.util.List;
@Data
public class ProcessDataVo {
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ProcessDataVo implements Serializable {
private static final long serialVersionUID = 1009888L;
//工单id
private String workOrderId;
//产品id
private String productId;
private String productName;
//车间
// @Dict(dictTable ="sys_depart",dicText = "depart_name",dicCode = "id")
private String departId;
private String departName;
//工位
private List<Station> stationList;
// @Dict("")
//产品工序id
// @Dict(dictTable ="zy_process",dicText = "process_name",dicCode = "id")
private String productProcessId;
private String processName;
}

@ -4,6 +4,8 @@ package org.jeecg.modules.productplan.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.swagger.annotations.Authorization;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.demo.base.service.IZyProcessService;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService;
import org.jeecg.modules.productplan.entity.ZyPlanProcess;
@ -12,12 +14,16 @@ import org.jeecg.modules.productplan.entity.vo.ProcessDataVo;
import org.jeecg.modules.productplan.mapper.ZyPlanProcessMapper;
import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.productplan.service.IZyProductPlanService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
@ -38,27 +44,43 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
@Autowired
private IStationService iStationService;
@Autowired
private ISysDepartService iSysDepartService;
@Autowired
private IZyProcessService iZyProcessService;
public List<ProcessDataVo> getProcessDatalist(ZyPlanProcess zyPlanProcess) {
//生产计划id
String planId = zyPlanProcess.getPlanId();
ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId);
if (ObjectUtils.isEmpty(zyPlanProcess)) {
throw new JeecgBootException("生产计划不存在!");
}
//工单id
String productCode = zyProductPlan.getProductCode();
String departId = zyProductPlan.getWorkshopId();
// TODO zy_product产品表,根据工单id获取产品id,
List<ProcessDataVo> result = new LinkedList<>();
//根据产品id获取产品工序列表
List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "产品id"));
Optional.ofNullable(productProcessesList).orElse(new ArrayList<>()).forEach(e -> {
ProcessDataVo vo = new ProcessDataVo();
vo.setProductProcessId(e.getProcessId());
vo.setProductId(e.getProductId());
vo.setWorkOrderId(productCode);
vo.setDepartId(departId);
vo.setStationList(iStationService.list(new LambdaQueryWrapper<Station>().eq(Station::getDepartId, departId)));
});
return null;
// List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "产品id"));
List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "1"));
if (!ObjectUtils.isEmpty(productProcessesList)) {
SysDepart depart = iSysDepartService.getById(departId);
List<Station> stationList = iStationService.list(new LambdaQueryWrapper<Station>().eq(Station::getDepartId, departId));
productProcessesList.forEach(e -> {
ProcessDataVo vo = new ProcessDataVo();
vo.setProductProcessId(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);
result.add(vo);
});
}
return result;
}
}

Loading…
Cancel
Save