Merge remote-tracking branch 'origin/master'

zhc4dev
暖暖 2 years ago
commit 9ddd168757
  1. 87
      ant-design-vue-jeecg/src/views/hanger/HangerList.vue
  2. 246
      ant-design-vue-jeecg/src/views/hanger/HangerMakerList.vue
  3. 3
      ant-design-vue-jeecg/src/views/hanger/modules/HangerForm.vue
  4. 170
      ant-design-vue-jeecg/src/views/hanger/modules/HangerMakerForm.vue
  5. 0
      ant-design-vue-jeecg/src/views/hanger/modules/HangerMakerModal.vue
  6. 0
      ant-design-vue-jeecg/src/views/hanger/modules/HangerMakerModal__Style#Drawer.vue
  7. 213
      ant-design-vue-jeecg/src/views/hangermaker/HangerMakerList.vue
  8. 156
      ant-design-vue-jeecg/src/views/hangermaker/modules/HangerMakerForm.vue
  9. 35
      ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue
  10. 354
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  11. 122
      ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue
  12. 10
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  13. 14
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  14. 28
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
  15. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java
  16. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
  17. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/xml/ZyStyleModularMapper.xml
  18. 57
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  19. 80
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangermaker/entity/HangerMaker.java
  20. 33
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/controller/ZyProcessModularController.java
  21. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/entity/ZyProcessModular.java
  22. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/mapper/ZyProcessModularMapper.java
  23. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java

@ -9,16 +9,16 @@
<a-input placeholder="请输入衣架编号" v-model="queryParam.hangerCode"></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>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</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>-->
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
<!-- </span>-->
<!-- </a-col>-->
</a-row>
</a-form>
</div>
@ -28,15 +28,15 @@
<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>
<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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- <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 -->
@ -59,44 +59,27 @@
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
</span>
</a-table>

@ -0,0 +1,246 @@
<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.hangerCode"></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.orderCode"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="制单编号">
<a-input placeholder="请输入制单编号" v-model="queryParam.makerCode"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload"
style="margin-left: 8px">重置</a-button>
</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 @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<hanger-maker-modal ref="modalForm" @ok="modalFormOk"></hanger-maker-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import HangerMakerModal from './modules/HangerMakerModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'HangerMakerList',
mixins: [JeecgListMixin, mixinDevice],
components: {
HangerMakerModal
},
data() {
return {
description: '衣架制单表管理页面',
//
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '绑定方式',
align: "center",
dataIndex: 'ismaker_dictText'
},
{
title: '衣架编号',
align: "center",
dataIndex: 'hangerCode'
},
{
title: '工单编号',
align: "center",
dataIndex: 'orderCode'
},
{
title: '制单编号',
align: "center",
dataIndex: 'makerCode'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/hangermaker/hangerMaker/list",
delete: "/hangermaker/hangerMaker/delete",
deleteBatch: "/hangermaker/hangerMaker/deleteBatch",
exportXlsUrl: "/hangermaker/hangerMaker/exportXls",
importExcelUrl: "hangermaker/hangerMaker/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
// this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loading = true;
var params = this.getQueryParams();//
// 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 => {
// if (item['ismaker'] === 0) {
// item['ismaker'] = "";
// }
// if (item['ismaker'] === 1) {
// item['ismaker'] = "";
// }
// })
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.planProcessId = this.planProcessId;
return filterObj(param);
},
}
}
</script>

@ -66,6 +66,7 @@
hangerCode: {
rules: [
{ required: true, message: '请输入衣架编号!'},
{ pattern: /^.{0,50}$/, message: '衣架编号长度不能超过50位字符'},
]
},
},
@ -150,7 +151,7 @@
that.confirmLoading = false;
})
}
})
},
popupCallback(row){

@ -0,0 +1,170 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="绑定方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ismaker">
<!-- <a-input v-model="model.ismaker" placeholder="请选择绑定方式"></a-input>-->
<j-dict-select-tag type="list" v-model="model.ismaker" dictCode="ismaker" placeholder="请选择绑定方式"/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-show="false">
<a-form-model-item label="衣架ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerId">
<a-input v-model="model.hangerId" placeholder="请输入衣架ID"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="衣架编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerCode">
<j-popup
v-model="model.hangerCode"
field="hangerCode"
org-fields="id,hanger_code"
dest-fields="hangerId,hangerCode"
code="hanger"
:multi="false"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-show="false">
<a-form-model-item label="工单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
<a-input v-model="model.orderId" placeholder="请输入工单ID"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode">
<j-popup
v-model="model.orderCode"
field="orderCode"
org-fields="id,code"
dest-fields="orderId,orderCode"
code="zy_work_order"
:multi="false"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-show="false">
<a-form-model-item label="制单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerId">
<a-input v-model="model.makerId" placeholder="请输入制单ID"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="制单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerCode">
<j-popup
v-model="model.makerCode"
field="makerCode"
org-fields="id,code"
dest-fields="makerId,makerCode"
code="zy_maker"
:multi="false"
@input="popupCallback"
/>
</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: 'HangerMakerForm',
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: {
ismaker: [
{required: true, message: '绑定方式不能为空!'},
],
hangerCode: [
{required: true, message: '衣架编号不能为空!'},
],
orderCode: [
{required: true, message: '工单编号不能为空!'},
],
},
url: {
add: "/hangermaker/hangerMaker/add",
edit: "/hangermaker/hangerMaker/edit",
queryById: "/hangermaker/hangerMaker/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;
})
}
})
},
popupCallback(value, row) {
this.model = Object.assign(this.model, row);
},
}
}
</script>

@ -1,213 +0,0 @@
<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.hangerCode"></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.orderCode"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="制单编号">
<a-input placeholder="请输入制单编号" v-model="queryParam.makerCode"></a-input>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</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 @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<hanger-maker-modal ref="modalForm" @ok="modalFormOk"></hanger-maker-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import HangerMakerModal from './modules/HangerMakerModal'
export default {
name: 'HangerMakerList',
mixins:[JeecgListMixin, mixinDevice],
components: {
HangerMakerModal
},
data () {
return {
description: '衣架制单表管理页面',
//
columns: [
{
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'衣架编号',
align:"center",
dataIndex: 'hangerCode'
},
{
title:'工单编号',
align:"center",
dataIndex: 'orderCode'
},
{
title:'制单编号',
align:"center",
dataIndex: 'makerCode'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/hangermaker/hangerMaker/list",
delete: "/hangermaker/hangerMaker/delete",
deleteBatch: "/hangermaker/hangerMaker/deleteBatch",
exportXlsUrl: "/hangermaker/hangerMaker/exportXls",
importExcelUrl: "hangermaker/hangerMaker/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'hangerId',text:'衣架ID',dictCode:''})
fieldList.push({type:'popup',value:'hangerCode',text:'衣架编号', popup:{code:'hanger',field:'id',orgFields:'id',destFields:'hanger_id'}})
fieldList.push({type:'string',value:'orderId',text:'工单ID',dictCode:''})
fieldList.push({type:'popup',value:'orderCode',text:'工单编号', popup:{code:'zy_work_order',field:'id',orgFields:'id',destFields:'order_id'}})
fieldList.push({type:'string',value:'makerId',text:'制单ID',dictCode:''})
fieldList.push({type:'popup',value:'makerCode',text:'制单编号', popup:{code:'zy_document_order',field:'id',orgFields:'id',destFields:'maker_id'}})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -1,156 +0,0 @@
<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" v-show="false">
<a-form-model-item label="衣架ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerId">
<a-input v-model="model.hangerId" placeholder="请输入衣架ID" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="衣架编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hangerCode">
<j-popup
v-model="model.hangerCode"
field="hangerCode"
org-fields="id,hanger_code"
dest-fields="hangerId,hangerCode"
code="hanger"
:multi="false"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-show="false">
<a-form-model-item label="工单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
<a-input v-model="model.orderId" placeholder="请输入工单ID" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode">
<j-popup
v-model="model.orderCode"
field="orderCode"
org-fields="id,code"
dest-fields="orderId,orderCode"
code="zy_work_order"
:multi="false"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-show="false">
<a-form-model-item label="制单ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerId">
<a-input v-model="model.makerId" placeholder="请输入制单ID" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="制单编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="makerCode">
<j-popup
v-model="model.makerCode"
field="makerCode"
org-fields="id,code"
dest-fields="makerId,makerCode"
code="zy_document_order"
:multi="false"
@input="popupCallback"
/>
</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: 'HangerMakerForm',
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: "/hangermaker/hangerMaker/add",
edit: "/hangermaker/hangerMaker/edit",
queryById: "/hangermaker/hangerMaker/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;
})
}
})
},
popupCallback(value,row){
this.model = Object.assign(this.model, row);
},
}
}
</script>

@ -5,8 +5,9 @@
<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.modularName"></a-input>
<a-form-item label="模块编号">
<!--自带模糊查询-->
<a-input placeholder="请输入模块编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
@ -20,7 +21,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="企业" >
<j-select-depart v-model="queryParam.enterpriseId" placeholder="请输入企业名称"/>
<j-select-depart v-model="queryParam.enterpriseId" />
</a-form-model-item>
</a-col>
<!-- </a-row>-->
@ -120,19 +121,19 @@
<a>删除</a>
</a-popconfirm>
<!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>-->
<!-- <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>-->
</span>
</a-table>
@ -183,7 +184,7 @@ export default {
}
},
{
title: '编号',
title: '模块编号',
align: "center",
dataIndex: 'nums'
},

@ -5,15 +5,15 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" />
<j-select-depart v-model="model.enterpriseId"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="48">
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<a-form-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">
<j-tree-select v-model="model.clothsTypeId"
dict="zy_cloths_type,type_name,id"
@ -28,7 +28,7 @@
<a-row>
<a-col :span="478">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" disabled=""></a-input>
<a-input v-model="model.nums" placeholder="请输入编号" disabled=""></a-input>
</a-form-model-item>
</a-col>
</a-row>
@ -36,17 +36,17 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">
<a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input>
<a-input v-model="model.partsName" placeholder="请输入部件名称"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<!-- <a-row>-->
<!-- <a-col :span="48">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!--<a-row>-->
<!-- <a-col :span="48">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--</a-row>-->
<a-row>
<a-col :span="48">
@ -66,55 +66,44 @@
</a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">
<j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>
</a-form-model-item>
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">
<j-image-upload isMultiple v-model="model.pictureUrl"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">-->
<!-- <a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="部件类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentType">-->
<!-- <a-input v-model="model.componentType" placeholder="请输入部件类型" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" />-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
</a-row>
</a-form-model>
@ -124,143 +113,142 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
export default {
name: 'ZyClothsComponentForm',
components: {
JTreeSelect
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
export default {
name: 'ZyClothsComponentForm',
components: {
JTreeSelect
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
model: {
nums: '',
},
labelCol: {
xs: {span: 24},
sm: {span: 4},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {
// nums: [
// { required: true, message: '!'},
// ],
clothsTypeId: [
{required: true, message: '请选择服装类型!'},
],
partsName: [
{required: true, message: '请输入部件名称!'},
],
// modularId: [
// { required: true, message: '!'},
// ],
modularType: [
{required: true, message: '请选择制衣模块类型!'},
],
},
url: {
add: "/base/zyClothsComponent/add",
edit: "/base/zyClothsComponent/edit",
queryById: "/base/zyClothsComponent/queryById",
//
sort: "/base/zyClothsComponent/sort"
}
}
},
computed: {
formDisabled() {
return this.disabled
},
data () {
return {
model:{
nums: '',
},
labelCol: {
xs: { span: 24 },
sm: { span: 4 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
// nums: [
// { required: true, message: '!'},
// ],
clothsTypeId: [
{ required: true, message: '请选择服装类型!'},
],
partsName: [
{ required: true, message: '请输入部件名称!'},
],
// modularId: [
// { required: true, message: '!'},
// ],
modularType: [
{ required: true, message: '请选择制衣模块类型!'},
],
},
url: {
add: "/base/zyClothsComponent/add",
edit: "/base/zyClothsComponent/edit",
queryById: "/base/zyClothsComponent/queryById",
//
sort: "/base/zyClothsComponent/sort"
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
async getNumberClothsComponentList() {
//const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
}
this.model.nums = res.result;
console.log("制衣部件 编号: " + this.model.nums);
//console.log('res.result')
//console.log(res.result)
//this.confirmLoading = false
// if (this.data.length === 0) {
// this.data.push(res.result)
// }
})
},
computed: {
formDisabled(){
return this.disabled
},
// bianHao() {
// getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
// let number = res.result;
// console.log("List id " + this.model.clothsTypeId)
// console.log("List " +number)
// this.model.nums = number;
// })
// },
add() {
this.edit(this.modelDefault);
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
methods: {
async getNumberClothsComponentList() {
//const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
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';
}
this.model.nums = res.result
//console.log('res.result')
//console.log(res.result)
//this.confirmLoading = false
// if (this.data.length === 0) {
// this.data.push(res.result)
// }
console.log("制衣部件 编号: "+this.model.nums);
})
},
// bianHao() {
// getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
// let number = res.result;
// console.log("List id " + this.model.clothsTypeId)
// console.log("List " +number)
// this.model.nums = number;
// })
// },
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);
}
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;
})
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
})
},
}
}
</script>
<style scoped>
.ant-form-item{
margin-bottom: 16px;
}
.ant-form-item {
margin-bottom: 16px;
}
</style>

@ -1,5 +1,5 @@
<template>
<!-- <a-card :bordered="false">-->
<!-- <a-card :bordered="false">-->
<a-modal
width="70%"
title=""
@ -13,10 +13,16 @@
<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 v-model="queryParam.modularId"-->
<!-- dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块名称"/>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块名称">
<j-dict-select-tag v-model="queryParam.modularId"
dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块名称"/>
<a-form-item label="工序代码">
<a-input v-model="queryParam.processCode"
placeholder="请输入工序代码"/>
</a-form-item>
</a-col>
@ -41,24 +47,30 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd1(modularId1)" 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>-->
<!-- <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>-->
<!-- <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-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-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>
<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>
@ -81,7 +93,8 @@
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img v-else :src="getImgView(text)" :preview="record.id" 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>
@ -99,25 +112,12 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<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-dropdown>-->
<!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
</span>
</a-table>
@ -130,19 +130,19 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyProcessModularModal from './modules/ZyProcessModularModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessModularList',
mixins:[JeecgListMixin, mixinDevice],
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessModularModal
},
data () {
data() {
return {
description: '模块工序表管理页面',
visible: false,
@ -156,36 +156,46 @@ export default {
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title:'模块名称',
align:"center",
title: '模块编号',
align: "center",
dataIndex: 'modularNums'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modularId_dictText'
},
{
title:'工序名称',
align:"center",
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processId_dictText'
},
{
title:'创建时间',
align:"center",
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
@ -196,8 +206,8 @@ export default {
importExcelUrl: "zyProcessModular/zyProcessModular/importExcel",
},
dictOptions:{},
superFieldList:[],
dictOptions: {},
superFieldList: [],
}
},
created() {
@ -205,15 +215,15 @@ export default {
//this.loadParameter();
},
computed: {
importExcelUrl: function(){
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
edit1(record) {
this.model = Object.assign({}, record);
this.modularId1= this.model.id;
this.biaoTi = record.modularName+"模块工序管理";
this.modularId1 = this.model.id;
this.biaoTi = record.modularName + "模块工序管理";
//console.log(topicid);
this.queryParam.modularId = this.model.id;
//console.log("ID++++++"+ this.queryParam.modularId);
@ -290,12 +300,12 @@ export default {
console.log('Clicked cancel button');
this.visible = false;
},
initDictConfig(){
initDictConfig() {
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'modularId',text:'模块ID',dictCode:''})
fieldList.push({type:'string',value:'processId',text:'工序ID',dictCode:''})
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'modularId', text: '模块ID', dictCode: ''})
fieldList.push({type: 'string', value: 'processId', text: '工序ID', dictCode: ''})
this.superFieldList = fieldList
}
}

@ -16,11 +16,11 @@
<!-- v-model="queryParam.styleId" disabled></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="queryParam.accessNum"></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.accessNum"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料名称">
<j-dict-select-tag placeholder="请选择辅料名称" dictCode="zy_accessories,contents,id"

@ -8,6 +8,13 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="工序代码" >
<a-input v-model="queryParam.processCode"
placeholder="请输入工序代码"/>
</a-form-model-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<!-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a-button type="primary">{{biaoTi}}</a-button>-->
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<a-form-model-item label="工序" >
@ -154,6 +161,11 @@ export default {
align: "center",
dataIndex: 'styleId_dictText'
},
{
title:'工序代码',
align:"center",
dataIndex: 'processCode'
},
{
title: '工序',
align: "center",
@ -260,7 +272,7 @@ export default {
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.id = this.$route.query.id;
param.styleId = this.$route.query.id;
return filterObj(param);
},
initDictConfig() {

@ -1,5 +1,7 @@
package org.jeecg.modules.demo.zyStyleModular.controller;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -11,6 +13,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
@ -54,6 +57,9 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> {
@Autowired
private IZyStyleModularService zyStyleModularService;
@Resource
private ZyStyleModularMapper zyStyleModularMapper;
/**
* 分页列表查询
*
@ -67,21 +73,25 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
@ApiOperation(value = "款式工序表-分页列表查询", notes = "款式工序表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModular zyStyleModular,
@RequestParam(value = "id", required = false) String id,
@RequestParam(value = "processId", required = false) String processId,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<ZyStyleModular> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModular, req.getParameterMap());
//System.err.println("id "+id);
//System.err.println("processId "+processId);
QueryWrapper<ZyStyleModular> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StringUtils.hasText(id), "style_id", id);
queryWrapper.eq(StringUtils.hasText(processId), "process_id", processId);
LambdaQueryWrapper<ZyStyleModular> queryWrapper = new LambdaQueryWrapper<>();
//当从服装款式进入款式工序的时候 会有一个 styleId
queryWrapper.eq(StringUtils.hasText(zyStyleModular.getStyleId()), ZyStyleModular::getStyleId, zyStyleModular.getStyleId());
//在工序页面 根据工序查询的时候 会有一个 processId
queryWrapper.eq(StringUtils.hasText(zyStyleModular.getProcessId()), ZyStyleModular::getProcessId, zyStyleModular.getProcessId());
Page<ZyStyleModular> page = new Page<>(pageNo, pageSize);
IPage<ZyStyleModular> pageList = zyStyleModularService.page(page, queryWrapper);
//List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id);
//pageList.setRecords(list);
//在工序页面 根据工序代码查询的时候 会有一个 processCode
if (StringUtils.hasText(zyStyleModular.getProcessCode())){
String newProcessCode = "%"+zyStyleModular.getProcessCode()+"%";
List<ZyStyleModular> listByProcessCode = new ArrayList<>(zyStyleModularMapper.getListByProcessCode(newProcessCode));
List<ZyStyleModular> collect = listByProcessCode.stream().filter(zyStyMo -> zyStyMo.getStyleId().equals(zyStyleModular.getStyleId())).collect(Collectors.toList());
pageList.setRecords(collect);
}
pageList.getRecords().forEach(zyStyMo -> zyStyMo.setProcessCode(zyStyleModularMapper.getCodeById(zyStyMo.getProcessId())));
return Result.OK(pageList);
}

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -65,6 +66,10 @@ public class ZyStyleModular implements Serializable {
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**工序代码*/
@TableField(exist = false)
private String processCode;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")

@ -27,4 +27,9 @@ public interface ZyStyleModularMapper extends BaseMapper<ZyStyleModular> {
@Select("select process_name from zy_process where id = #{processId}")
String getProcessNameByStyleId(String processId);
@Select("select process_code from zy_process where id=#{id}")
String getCodeById(String id);
//简单的用注解 复杂的用xml 复杂的注解处理好像有问题
List<ZyStyleModular> getListByProcessCode(String processCode);
}

@ -7,4 +7,9 @@
FROM zy_style_modular
WHERE style_id = #{styleId}
</select>
<select id="getListByProcessCode" resultType="org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular">
SELECT *
FROM zy_style_modular
WHERE process_id IN (SELECT id FROM zy_process WHERE process_code LIKE #{processCode}) LIMIT 0, 1000
</select>
</mapper>

@ -1,24 +1,18 @@
package org.jeecg.modules.demo.zyaccessories.controller;
import java.time.LocalDateTime;
import java.util.ArrayList;
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.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccDetailVO;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.mapper.ZyStyleAccessoriesMapper;
@ -29,22 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabricDetailVo;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
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.util.ObjectUtils;
import org.springframework.util.StringUtils;
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;
@ -88,35 +73,25 @@ public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccesso
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//zyStyleAccessories.getAccessNum() 辅料编号 查询参数 只有查询的时候才会有
// List<ZyAccessories> accessories = new ArrayList<>();
// if (StringUtils.hasText(zyStyleAccessories.getAccessNum())) {
// LambdaQueryWrapper<ZyAccessories> queryWrapper2 = new LambdaQueryWrapper<>();
// queryWrapper2.like(ZyAccessories::getNums, zyStyleAccessories.getAccessNum());
// accessories.addAll(zyAccessoriesService.list());
// }
List<ZyAccessories> accessories = new ArrayList<>();
if (StringUtils.hasText(zyStyleAccessories.getAccessNum())) {
accessories.addAll(zyAccessoriesService.list(new LambdaQueryWrapper<ZyAccessories>().like(ZyAccessories::getNums, zyStyleAccessories.getAccessNum())));
}
QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(new Page<>(pageNo, pageSize), queryWrapper);
List<ZyStyleAccessories> listRecords = pageList.getRecords();
// if (!ObjectUtils.isEmpty(accessories) && !ObjectUtils.isEmpty(listRecords)) {
// for (ZyAccessories zy : accessories) {
// listRecords.stream()
// .filter(ZyStyleAccessories -> ZyStyleAccessories.getAccessoriesId().equals(zy.getId()))
// .collect(Collectors.toList());
// }
// }
for (ZyStyleAccessories zy : listRecords) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
String num = zyStyleFabricMapper.getAccessoriesNumById(zy.getAccessoriesId());
if (StringUtils.hasText(typeName)) {
zy.setTypeName(typeName);
}
if (StringUtils.hasText(num)) {
zy.setAccessNum(num);
}
if (!ObjectUtils.isEmpty(accessories) && !ObjectUtils.isEmpty(listRecords)) {
List<ZyStyleAccessories> list = new ArrayList<>();
accessories.forEach(zy -> listRecords.stream().filter(ZyStyleAccess -> ZyStyleAccess.getAccessoriesId().equals(zy.getId())).forEachOrdered(list::add));
pageList.setRecords(list.stream().distinct().collect(Collectors.toList()));//去重
}
pageList.getRecords().forEach(zyStyleAccess -> {
String typeName = zyStyleFabricMapper.getTypeName(zyStyleAccess.getStyleId());
String num = zyStyleFabricMapper.getAccessoriesNumById(zyStyleAccess.getAccessoriesId());
if (StringUtils.hasText(typeName)) zyStyleAccess.setTypeName(typeName);
if (StringUtils.hasText(num)) zyStyleAccess.setAccessNum(num);
});
return Result.OK(pageList);
}

@ -4,6 +4,7 @@ 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;
@ -20,62 +21,87 @@ import lombok.experimental.Accessors;
/**
* @Description: 衣架制单表
* @Author: jeecg-boot
* @Date: 2021-11-20
* @Date: 2021-11-20
* @Version: V1.0
*/
@Data
@TableName("hanger_maker")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="hanger_maker对象", description="衣架制单表")
@ApiModel(value = "hanger_maker对象", description = "衣架制单表")
public class HangerMaker implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**衣架ID*/
@Excel(name = "衣架ID", width = 15)
/**
* 绑定方式
*/
@ApiModelProperty(value = "绑定方式:绑定工单0,绑定制单1,默认0")
@Dict(dicCode = "ismaker")
private Integer ismaker;
/**
* 衣架ID
*/
@Excel(name = "衣架ID", width = 15)
@ApiModelProperty(value = "衣架ID")
private java.lang.String hangerId;
/**衣架编号*/
@Excel(name = "衣架编号", width = 15)
/**
* 衣架编号
*/
@Excel(name = "衣架编号", width = 15)
@ApiModelProperty(value = "衣架编号")
private java.lang.String hangerCode;
/**工单ID*/
@Excel(name = "工单ID", width = 15)
/**
* 工单ID
*/
@Excel(name = "工单ID", width = 15)
@ApiModelProperty(value = "工单ID")
private java.lang.String orderId;
/**工单编号*/
@Excel(name = "工单编号", width = 15)
/**
* 工单编号
*/
@Excel(name = "工单编号", width = 15)
@ApiModelProperty(value = "工单编号")
private java.lang.String orderCode;
/**制单ID*/
@Excel(name = "制单ID", width = 15)
/**
* 制单ID
*/
@Excel(name = "制单ID", width = 15)
@ApiModelProperty(value = "制单ID")
private java.lang.String makerId;
/**制单编号*/
@Excel(name = "制单编号", width = 15)
/**
* 制单编号
*/
@Excel(name = "制单编号", width = 15)
@ApiModelProperty(value = "制单编号")
private java.lang.String makerCode;
}

@ -11,16 +11,25 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.base.entity.ZyProcess;
import org.jeecg.modules.demo.base.mapper.ZyProcessMapper;
import org.jeecg.modules.demo.base.service.IZyProcessService;
import org.jeecg.modules.zyProcessModular.entity.ZyProcessModular;
import org.jeecg.modules.zyProcessModular.mapper.ZyProcessModularMapper;
import org.jeecg.modules.zyProcessModular.service.IZyProcessModularService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* @Description: 模块工序表
@ -35,13 +44,17 @@ import java.util.Arrays;
public class ZyProcessModularController extends JeecgController<ZyProcessModular, IZyProcessModularService> {
@Autowired
private IZyProcessModularService zyProcessModularService;
@Autowired
private IZyProcessService zyProcessService;
@Autowired
private ZyProcessModularMapper zyProcessModularMapper;
/**
* 分页列表查询
*
* @param zyProcessModular
* @param pageNo
* @param pageSize
* @param pageNo 当前页的页码
* @param pageSize 当前页的数据条数
* @param req
* @return
*/
@ -55,6 +68,22 @@ public class ZyProcessModularController extends JeecgController<ZyProcessModular
QueryWrapper<ZyProcessModular> queryWrapper = QueryGenerator.initQueryWrapper(zyProcessModular, req.getParameterMap());
Page<ZyProcessModular> page = new Page<ZyProcessModular>(pageNo, pageSize);
IPage<ZyProcessModular> pageList = zyProcessModularService.page(page, queryWrapper);
//在模块工序中 根据工序代码查询的时候 会有一个 processCode
if (StringUtils.hasText(zyProcessModular.getProcessCode())){
//System.err.println(LocalDateTime.now() + " +++ " +zyProcessModular.getProcessCode());
List<ZyProcess> zyProcessList = zyProcessService.list(new LambdaQueryWrapper<ZyProcess>().like(ZyProcess::getProcessCode,zyProcessModular.getProcessCode()));
List<ZyProcessModular> modularList = new ArrayList<>();
zyProcessList.forEach(zyProcess -> {
modularList.addAll(zyProcessModularService.list(new LambdaQueryWrapper<ZyProcessModular>().eq(ZyProcessModular::getProcessId, zyProcess.getId())));
List<ZyProcessModular> collect = modularList.stream().filter(zyPModular -> zyPModular.getModularId().equals(zyProcessModular.getModularId())).collect(Collectors.toList());
pageList.setRecords(collect);
});
}
//不怕空值
pageList.getRecords().forEach(zyProModular -> {
zyProModular.setModularNums(zyProcessModularMapper.getModularNumsByModularId(zyProModular.getModularId()));
zyProModular.setProcessCode(zyProcessModularMapper.getProcessCodeByProcessId(zyProModular.getProcessId()));
});
return Result.OK(pageList);
}

@ -1,6 +1,7 @@
package org.jeecg.modules.zyProcessModular.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -57,11 +58,21 @@ public class ZyProcessModular implements Serializable {
@ApiModelProperty(value = "模块ID")
@Dict(dictTable = "zy_cloths_modular",dicText = "modular_name",dicCode = "id")
private java.lang.String modularId;
/**模块编号*/
@TableField(exist = false)
private String modularNums;
/**工序ID*/
@Excel(name = "工序ID", width = 15)
@ApiModelProperty(value = "工序ID")
@Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id")
private java.lang.String processId;
/**工序代码*/
@TableField(exist = false)
private String processCode;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")

@ -1,6 +1,8 @@
package org.jeecg.modules.zyProcessModular.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.zyProcessModular.entity.ZyProcessModular;
/**
@ -9,6 +11,12 @@ import org.jeecg.modules.zyProcessModular.entity.ZyProcessModular;
* @Date: 2022-11-22
* @Version: V1.0
*/
@Mapper
public interface ZyProcessModularMapper extends BaseMapper<ZyProcessModular> {
@Select("select nums from zy_cloths_modular where id = #{modularId}")
String getModularNumsByModularId(String modularId);
@Select("select process_code from zy_process where id = #{processId}")
String getProcessCodeByProcessId(String processId);
}

@ -58,7 +58,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
private IZyFabricService zyFabricService;
@Autowired
private ZyStyleFabricMapper zyStyleFabricMapper;
private ZyStyleFabricMapper zyStyleFabricMapper;
/**
* 分页列表查询
@ -95,23 +95,16 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
List<ZyStyleFabric> list = zyStyleFabricService.list(queryWrapper);
//fabricNumber 面料编号查询参数 只有查询的时候才会有
if (StringUtils.hasText(fabricNumber)) {
LambdaQueryWrapper<ZyFabric> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.like( ZyFabric::getFabricNumber,fabricNumber);
List<ZyFabric> listTwo = zyFabricService.list(queryWrapper2);
if (ObjectUtils.isEmpty(listTwo)){
IPage<NewZyStyleFabric> pageList2 = new Page<>(pageNo, pageSize, 0);
List<ZyFabric> listTwo = zyFabricService.list(new LambdaQueryWrapper<ZyFabric>().like(ZyFabric::getFabricNumber, fabricNumber));
if (ObjectUtils.isEmpty(listTwo)) {
IPage<NewZyStyleFabric> pageList2 = new Page<NewZyStyleFabric>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
List<ZyStyleFabric> zyStyleFabricList = new ArrayList<>();
for (ZyFabric zy : listTwo) {
List<ZyStyleFabric> zyStyleFabrics = zyStyleFabricMapper.getListByFabricId(zy.getId());
zyStyleFabricList.addAll(zyStyleFabrics);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleFabricList = zyStyleFabricList.stream().filter(ZyStyleFabric -> ZyStyleFabric.getStyleId().equals(id)).collect(Collectors.toList());
listTwo.stream().map(zy -> zyStyleFabricMapper.getListByFabricId(zy.getId())).forEachOrdered(zyStyleFabricList::addAll);
List<ZyStyleFabric> collect = zyStyleFabricList.stream().filter(ZyStyleFabric -> ZyStyleFabric.getStyleId().equals(id)).collect(Collectors.toList());
list.clear();
list.addAll(zyStyleFabricList);
list.addAll(collect);
}
List<NewZyStyleFabric> newZyStyleFabrics = zyStyleFabricService.changeList(list);
IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size());
@ -174,6 +167,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
zyStyleFabricService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 详情
*/

Loading…
Cancel
Save