Merge remote-tracking branch 'origin/master'

zhc4dev
lenovo 2 years ago
commit 264444492d
  1. 1
      ant-design-vue-jeecg/src/components/jeecg/JVxeTable/jvxeTypes.js
  2. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  3. 14
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  4. 230
      ant-design-vue-jeecg/src/views/storage/StorageList.vue
  5. 213
      ant-design-vue-jeecg/src/views/storage/modules/StorageForm.vue
  6. 60
      ant-design-vue-jeecg/src/views/storage/modules/StorageModal.vue
  7. 84
      ant-design-vue-jeecg/src/views/storage/modules/StorageModal__Style#Drawer.vue
  8. 209
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  9. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java
  10. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java
  11. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularServiceImpl.java
  12. 172
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/storage/controller/StorageController.java
  13. 85
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/storage/entity/Storage.java
  14. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/storage/mapper/StorageMapper.java
  15. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/storage/mapper/xml/StorageMapper.xml
  16. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/storage/service/IStorageService.java
  17. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/storage/service/impl/StorageServiceImpl.java
  18. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  19. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
  20. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/IZyStyleModelService.java
  21. 32
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
  22. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java

@ -17,6 +17,7 @@ export const JVXETypes = {
rowDragSort: 'row-drag-sort',
input: 'input',
//数字输入框 只能输入数字 小数也可以 其它类型的无法输入
inputNumber: 'inputNumber',
textarea: 'textarea',
select: 'select',

@ -208,7 +208,7 @@
// this.data.push(res.result)
// }
//console.log("List "+this.model.nums);
console.log("制衣部件 编号: "+this.model.nums);
},
// bianHao() {
// getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {

@ -132,7 +132,9 @@ export default {
},
data() {
return {
model: {},
model: {
nums: '',
},
labelCol: {
xs: {span: 24},
sm: {span: 4},
@ -174,17 +176,17 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
bianhao() {
async bianhao() {
//var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
let num = res.result;
console.log("+6++++aaa" + num)
//let num = res.result;
console.log("+6++++aaa: " + res.result)
//num=num.toString()
//while(num.length<n){
//num="0"+num
//}
console.log(num)
this.model.nums = num;
//console.log(num)
this.model.nums = res.result;
})
},
add() {

@ -0,0 +1,230 @@
<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-search-select-tag placeholder="请选择仓库" v-model="queryParam.storehouseId" dict="starehouse,name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="物品类型">
<j-dict-select-tag placeholder="请选择物品类型" v-model="queryParam.itemType" dictCode="goods_category"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="管理员">
<j-search-select-tag placeholder="请选择管理员" v-model="queryParam.adminId" dict="sys_user,realname,id"/>
</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>
<storage-modal ref="modalForm" @ok="modalFormOk"></storage-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import StorageModal from './modules/StorageModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'StorageList',
mixins:[JeecgListMixin, mixinDevice],
components: {
StorageModal
},
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: 'storehouseId_dictText'
},
{
title:'物品类型',
align:"center",
dataIndex: 'itemType_dictText'
},
{
title:'物品编码',
align:"center",
dataIndex: 'itemCode'
},
{
title:'存量',
align:"center",
dataIndex: 'amount'
},
{
title:'单位',
align:"center",
dataIndex: 'unit'
},
{
title:'管理员',
align:"center",
dataIndex: 'adminId_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/storage/storage/list",
delete: "/storage/storage/delete",
deleteBatch: "/storage/storage/deleteBatch",
exportXlsUrl: "/storage/storage/exportXls",
importExcelUrl: "storage/storage/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'sel_search',value:'storehouseId',text:'仓库',dictTable:'starehouse', dictText:'name', dictCode:'id'})
fieldList.push({type:'string',value:'itemType',text:'物品类型',dictCode:'goods_category'})
fieldList.push({type:'popup',value:'itemCode',text:'物品编码', popup:{code:'findml',field:'fabric_number',orgFields:'fabric_number',destFields:'item_code'}})
fieldList.push({type:'double',value:'amount',text:'存量',dictCode:''})
fieldList.push({type:'string',value:'unit',text:'单位',dictCode:''})
fieldList.push({type:'sel_search',value:'adminId',text:'管理员',dictTable:'sys_user', dictText:'realname', dictCode:'id'})
fieldList.push({type:'popup',value:'adminname',text:'管理员', popup:{code:'findck',field:'id',orgFields:'id',destFields:'admin_id'}})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,213 @@
<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="storehouseId">
<j-search-select-tag v-model="model.storehouseId" dict="starehouse,name,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="物品类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemType">
<j-dict-select-tag type="list" v-model="model.itemType" dictCode="goods_category" placeholder="请选择物品类型" />
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="this.model.itemType==1">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
v-model="model.itemCode"
field="itemCode"
org-fields="fabric_number"
dest-fields="itemCode"
code="findml"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="this.model.itemType==2">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
v-model="model.itemCode"
field="itemCode"
org-fields="nums"
dest-fields="itemCode"
code="ckfindfl"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="this.model.itemType==3">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
v-model="model.itemCode"
field="itemCode"
org-fields="code"
dest-fields="itemCode"
code="ckfindsb"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="this.model.itemType==4">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
v-model="model.itemCode"
field="itemCode"
org-fields="nums"
dest-fields="itemCode"
code="kcfindgj"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24" v-if="this.model.itemType==5">
<a-form-model-item label="物品编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemCode">
<j-popup
v-model="model.itemCode"
field="itemCode"
org-fields="goods_code"
dest-fields="itemCode"
code="kcfindsp"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="存量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
<a-input-number v-model="model.amount" placeholder="请输入存量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-input v-model="model.unit" placeholder="请输入单位" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="管理员" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="adminname">
<j-popup
v-model="model.adminname"
field="adminname"
org-fields="id,realname"
dest-fields="adminId,adminname"
code="findck"
:multi="true"
@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: 'StorageForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
itemType : "1"
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/storage/storage/add",
edit: "/storage/storage/edit",
queryById: "/storage/storage/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>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<storage-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></storage-form>
</j-modal>
</template>
<script>
import StorageForm from './StorageForm'
export default {
name: 'StorageModal',
components: {
StorageForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<storage-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></storage-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 StorageForm from './StorageForm'
export default {
name: 'StorageModal',
components: {
StorageForm
},
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>

@ -3,20 +3,20 @@
<a-card :bordered="false">
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<!-- <div class="table-page-search-wrapper">-->
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col>-->
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!-- <div class="table-page-search-wrapper">-->
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col>-->
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!-- 查询区域-END -->
<!-- <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>-->
<!-- <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>-->
<!-- table区域-begin -->
<div >
<div>
<j-vxe-table
toolbar
:toolbarConfig="toolbarConfig"
@ -37,19 +37,19 @@
>
<template v-slot:toolbarSuffix>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- <a-tooltip placement="top" title="获取值,忽略表单验证" :autoAdjustOverflow="true">-->
<!-- <a-button @click="handleTableGet">获取值</a-button>-->
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="top" title="模拟加载1000条数据" :autoAdjustOverflow="true">-->
<!-- <a-button @click="handleTableSet">设置值</a-button>-->
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="top" title="获取值,忽略表单验证" :autoAdjustOverflow="true">-->
<!-- <a-button @click="handleTableGet">获取值</a-button>-->
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="top" title="模拟加载1000条数据" :autoAdjustOverflow="true">-->
<!-- <a-button @click="handleTableSet">设置值</a-button>-->
<!-- </a-tooltip>-->
</template>
<template v-slot:action="props">
<!-- <a @click="submitForm(props)">保存</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="submitForm(props)">保存</a>-->
<!-- <a-divider type="vertical"/>-->
<a @click="viewDetail(props.rowId)">详情</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="handleDelete(props.rowId)">
<a>删除</a>
</a-popconfirm>
@ -91,11 +91,11 @@ export default {
// add remove clearSelection
btn: ['add'],
},
validatorRules: {
// validatorRules: {
// styleId: [
// {required: true, message: '!'},
// ],
},
// },
//
loading: false,
//
@ -117,40 +117,140 @@ export default {
columns: [
{
title: '服装款式',
width: '110px',
fixed: 'left',
key: 'styleId',
type: JVXETypes.select,
title: '服装款式', width: '100px', fixed: 'left', key: 'styleId',
type: JVXETypes.normal,
placeholder: '请输入${title}',
//dictCode: 'zy_cloths_style,style_names,id',
validateRules: [
{required: true, message: '${title}不能为空'},
],
// validateRules: [
// {required: true, message: '${title}'},
// ],
disabled: true,
},
{
title: '是否默认尺码',
align: "center",
width: '130px',
key: 'isdefault',
title: '是否默认尺码', align: "center", width: '130px', key: 'isdefault',
type: JVXETypes.select,
dictCode: 'isdefault',
defaultValue: 0,
},
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '100px', type: JVXETypes.select},
{key: 'size', title: '码数', width: '85px', dictCode: 'size', type: JVXETypes.select},
{key: 'anumbers', title: '型', width: '85px', dictCode: 'hsize', type: JVXETypes.select},
{key: 'bnumbers', title: '号', width: '85px', dictCode: 'xsize', type: JVXETypes.select},
{key: 'collarLarge', title: '领大', width: '70px', type: JVXETypes.input},
{key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input},
{key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input},
{key: 'shslLength', title: '连肩袖长', width: '100px', type: JVXETypes.input},
{
key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '100px',
type: JVXETypes.select
},
{
key: 'size', title: '码数', width: '85px', dictCode: 'size',
type: JVXETypes.select
},
{
key: 'anumbers', title: '型', width: '85px', dictCode: 'hsize',
type: JVXETypes.select
},
{
key: 'bnumbers', title: '号', width: '85px', dictCode: 'xsize',
type: JVXETypes.select
},
{
key: 'collarLarge',
title: '领大', width: '70px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{
key: 'bust', title: '胸围', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /\D/g, message: '${title}只能输入数字类型',
},
]
},
{
key: 'sleeveLength', title: '袖长', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
]
},
{
key: 'shslLength', title: '连肩袖长', width: '100px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{key: 'tsWidth', title: '总肩宽', width: '80px', type: JVXETypes.input},
{key: 'cuff', title: '袖口', width: '80px', type: JVXETypes.input},
{key: 'waistline', title: '腰围', width: '80px', type: JVXETypes.input},
{key: 'hem', title: '下摆', width: '80px', type: JVXETypes.input},
{
key: 'tsWidth', title: '总肩宽', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{
key: 'cuff', title: '袖口', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{
key: 'waistline', title: '腰围', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{
required: false, //
message: '${title}只能输入数字类型' //
},
{pattern: /[^\d]/g, message: '${title}只能输入数字类型'},
],
},
{
key: 'hem', title: '下摆', width: '80px',
type: JVXETypes.inputNumber,
validateRules: [
{ required: false, //
message: '${title}只能输入数字类型' //
},
{
pattern: /[^\d]/g, message: '${title}只能输入数字类型',
},
],
},
{key: 'createTime', title: '创建时间', width: '60px', type: JVXETypes.datetime},
{
@ -195,14 +295,12 @@ export default {
methods: {
//
added(event){
added(event) {
//this.styleId = this.$route.query.id;
event.row.styleId = this.$route.query.id;
console.log("新增触发事件", event)
let httpUrl = this.url.add;
let method = 'post';
//httpUrl += this.url.add;
//method = 'post';
let that = this;
httpAction(httpUrl, event.row, method).then((res) => {
if (res.success) {
@ -216,18 +314,13 @@ export default {
})
},
//
handleValueChange(event) {
async handleValueChange(event) {
//this.submitForm(event)
console.log("//数据发生变化时事件", event);
//const str = event.row.id;
let httpUrl = '';
let method = '';
httpUrl += this.url.edit;
method = 'put';
httpAction(httpUrl, event.row, method).then((res) => {
let httpUrl = this.url.edit;
let method = 'put';
await httpAction(httpUrl, event.row, method).then((res) => {
if (res.success) {
this.$message.success(res.message);
this.$emit('ok');

@ -112,7 +112,7 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
@ApiOperation(value = "制衣部件详情", notes = "根据制衣部件详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id:zy_cloths_component对象 Id: "+id);
//System.out.println("controller层接受到的id:zy_cloths_component对象 Id: "+id);
ZyClothsComponentDetail detail = zyClothsComponentService.queryDetail(id);
return Result.OK(detail);
}
@ -154,7 +154,7 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
//编码规则:服装类型(10)+序号(8)
String sort = zyClothsComponentService.sort(id);
System.err.println(sort+ " 制衣部件 sort");
//System.err.println(sort+ " 制衣部件 sort");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}

@ -107,7 +107,7 @@ public class ZyClothsModularController extends JeecgController<ZyClothsModular,
@ApiOperation(value = "制衣模块详情详情", notes = "根据制衣模块详情id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("controller层接受到的id: zy_cloths_modularId: "+id);
//System.out.println("controller层接受到的id: zy_cloths_modularId: "+id);
ZyClothsModularDetail detail = zyClothsModularService.queryDetail(id);
return Result.OK(detail);
}

@ -139,7 +139,7 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
listLong.add(Long.valueOf(newNums));
}
System.out.println(listLong);
//System.out.println(listLong);
return Collections.max(listLong) + 1;
}

@ -0,0 +1,172 @@
package org.jeecg.modules.demo.storage.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 org.jeecg.modules.demo.storage.entity.Storage;
import org.jeecg.modules.demo.storage.service.IStorageService;
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.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: 2023-01-09
* @Version: V1.0
*/
@Api(tags="库存表")
@RestController
@RequestMapping("/storage/storage")
@Slf4j
public class StorageController extends JeecgController<Storage, IStorageService> {
@Autowired
private IStorageService storageService;
/**
* 分页列表查询
*
* @param storage
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "库存表-分页列表查询")
@ApiOperation(value="库存表-分页列表查询", notes="库存表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Storage storage,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Storage> queryWrapper = QueryGenerator.initQueryWrapper(storage, req.getParameterMap());
Page<Storage> page = new Page<Storage>(pageNo, pageSize);
IPage<Storage> pageList = storageService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param storage
* @return
*/
@AutoLog(value = "库存表-添加")
@ApiOperation(value="库存表-添加", notes="库存表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Storage storage) {
storageService.save(storage);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param storage
* @return
*/
@AutoLog(value = "库存表-编辑")
@ApiOperation(value="库存表-编辑", notes="库存表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Storage storage) {
storageService.updateById(storage);
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) {
storageService.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.storageService.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) {
Storage storage = storageService.getById(id);
if(storage==null) {
return Result.error("未找到对应数据");
}
return Result.OK(storage);
}
/**
* 导出excel
*
* @param request
* @param storage
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Storage storage) {
return super.exportXls(request, storage, Storage.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, Storage.class);
}
}

@ -0,0 +1,85 @@
package org.jeecg.modules.demo.storage.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;
@Data
@TableName("storage")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="storage对象", description="库存表")
public class Storage implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@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")
@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")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**仓库*/
@Excel(name = "仓库", width = 15, dictTable = "starehouse", dicText = "name", dicCode = "id")
@Dict(dictTable = "starehouse", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "仓库")
private java.lang.String storehouseId;
/**物品类型*/
@Excel(name = "物品类型", width = 15, dicCode = "goods_category")
@Dict(dicCode = "goods_category")
@ApiModelProperty(value = "物品类型")
private java.lang.String itemType;
/**物品编码*/
@Excel(name = "物品编码", width = 15)
@ApiModelProperty(value = "物品编码")
private java.lang.String itemCode;
/**存量*/
@Excel(name = "存量", width = 15)
@ApiModelProperty(value = "存量")
private java.lang.Double amount;
/**单位*/
@Excel(name = "单位", width = 15)
@ApiModelProperty(value = "单位")
private java.lang.String unit;
/**管理员*/
@Excel(name = "管理员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "id")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
@ApiModelProperty(value = "管理员")
private java.lang.String adminId;
/**管理员*/
@Excel(name = "管理员", width = 15)
@ApiModelProperty(value = "管理员")
private java.lang.String adminname;
}

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.storage.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.storage.entity.Storage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 库存表
* @Author: jeecg-boot
* @Date: 2023-01-09
* @Version: V1.0
*/
public interface StorageMapper extends BaseMapper<Storage> {
}

@ -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=".storage.mapper.StorageMapper">
</mapper>

@ -0,0 +1,16 @@
package org.jeecg.modules.demo.storage.service;
import org.jeecg.modules.demo.storage.entity.Storage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 库存表
* @Author: jeecg-boot
* @Date: 2023-01-09
* @Version: V1.0
*/
public interface IStorageService extends IService<Storage> {
}

@ -0,0 +1,20 @@
package org.jeecg.modules.demo.storage.service.impl;
import org.jeecg.modules.demo.storage.entity.Storage;
import org.jeecg.modules.demo.storage.mapper.StorageMapper;
import org.jeecg.modules.demo.storage.service.IStorageService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 库存表
* @Author: jeecg-boot
* @Date: 2023-01-09
* @Version: V1.0
*/
@Service
public class StorageServiceImpl extends ServiceImpl<StorageMapper, Storage> implements IStorageService {
}

@ -163,15 +163,11 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.error("添加失败!编号不能为空");
}
LambdaQueryWrapper<ZyClothsStyle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZyClothsStyle::getTypeName, zyClothsStyle.getTypeName());
queryWrapper.eq(ZyClothsStyle::getStyleNames, zyClothsStyle.getStyleNames());
int a = zyClothsStyleService.count(queryWrapper);
if (a >= 1)
if (a >= 1) {
return Result.error("存在以添加过的数据!");
// for (ZyClothsStyle zy : zyClothsStyleList) {
// if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())) {
// return Result.error("添加失败!数据已存在");
// }
// }
}
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}

@ -95,7 +95,12 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
@ApiOperation(value="zy_style_model-编辑", notes="zy_style_model-编辑")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyStyleModel zyStyleModel) {
public Result<?> edit(@RequestBody ZyStyleModel zyStyleModel) {
zyStyleModel.setStyleId(null);
//限制一些类型的数据只能为数字 否则无法保存
if(!zyStyleModelService.dataTypeProblem(zyStyleModel)){
return Result.error("只能输入数字类型");
}
//System.err.println("zyStyleModel edit: "+zyStyleModel+ LocalDateTime.now());
zyStyleModelService.updateById(zyStyleModel);
return Result.OK("编辑成功!");
@ -141,7 +146,7 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
List<String> idList = (List<String>) map.get("id");
// List<Integer> list = Arrays.asList(ids);
zyStyleModelService.removeByIds(idList);
System.out.println(map);
//System.out.println(map);
//this.zyStyleModelService.removeByIds(Arrays.asList(map.get("deleteIds").split(",")));
return Result.OK("批量删除成功!");
}

@ -18,4 +18,6 @@ public interface IZyStyleModelService extends IService<ZyStyleModel> {
List<ZyStyleModel> detail(String id);
ZyStyleModelDetailsVO queryDetails(String id);
boolean dataTypeProblem(ZyStyleModel zyStyleModel);
}

@ -19,6 +19,7 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
import java.util.regex.Pattern;
/**
@ -115,6 +116,37 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
return detailsVO;
}
@Override
public boolean dataTypeProblem(ZyStyleModel zyStyleModel) {
// Pattern pattern = Pattern.compile("/[^\\d]/g");
Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//正则表达式判断是否是数字字符串(可判断正数,负数和小数)
if (!ObjectUtils.isEmpty(zyStyleModel.getCollarLarge())){
return pattern.matcher(zyStyleModel.getCollarLarge().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getBust())){
return pattern.matcher(zyStyleModel.getBust().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getSleeveLength())){
return pattern.matcher(zyStyleModel.getSleeveLength().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getShslLength())){
return pattern.matcher(zyStyleModel.getShslLength().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getTsWidth())){
return pattern.matcher(zyStyleModel.getTsWidth().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getCuff())){
return pattern.matcher(zyStyleModel.getCuff().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getWaistline())){
return pattern.matcher(zyStyleModel.getWaistline().toString()).matches();
}
if (!ObjectUtils.isEmpty(zyStyleModel.getHem())){
return pattern.matcher(zyStyleModel.getHem().toString()).matches();
}
return true;
}
@Contract(pure = true)

@ -31,6 +31,7 @@ import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
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.servlet.ModelAndView;
@ -87,13 +88,18 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
Page<ZyStyleModule> page = new Page<>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
//改变list中的实体类 类型
List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(pageList.getRecords());
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, newStyleModuleList.size());
pageList2.setRecords(newStyleModuleList);
return Result.OK(pageList2);
if (!ObjectUtils.isEmpty(newStyleModuleList)){
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, newStyleModuleList.size());
pageList2.setRecords(newStyleModuleList);
return Result.OK(pageList2);
} else {
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
}

Loading…
Cancel
Save