20220905-zc

zhc4dev
lenovo 2 years ago
parent 1adfc469f1
commit 027b79f53a
  1. 106
      ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricList.vue
  2. 40
      ant-design-vue-jeecg/src/views/erp/fabric/ZyFabricTypeList.vue
  3. 194
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
  4. 6
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricTypeForm.vue
  5. 22
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricTypeController.java
  6. 59
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java

@ -4,6 +4,21 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <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.pattern" dict="pattern"/>-->
<!-- </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.name"></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.fabricNumber"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="名称"> <a-form-item label="名称">
<a-input placeholder="名称" v-model="queryParam.name"></a-input> <a-input placeholder="名称" v-model="queryParam.name"></a-input>
@ -154,15 +169,20 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail'
} }
}, },
{ {
title:'名称', title:'类型',
align:"center", align:"center",
dataIndex: 'name' dataIndex: 'typeId'
}, },
{ {
title:'面料编号', title:'编号',
align:"center", align:"center",
dataIndex: 'fabricNumber' dataIndex: 'fabricNumber'
}, },
{
title:'名称',
align:"center",
dataIndex: 'name'
},
{ {
title:'颜色', title:'颜色',
align:"center", align:"center",
@ -171,42 +191,42 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail'
{ {
title:'花样', title:'花样',
align:"center", align:"center",
dataIndex: 'pattern' dataIndex: 'pattern_dictText'
}, },
{ {
title:'材质', title:'材质',
align:"center", align:"center",
dataIndex: 'material' dataIndex: 'material_dictText'
}, },
{ {
title:'描述', title:'厚度',
align:"center", align:"center",
dataIndex: 'description' dataIndex: 'ply_dictText'
}, },
{ {
title:'厚度', title:'单价',
align:"center", align:"center",
dataIndex: 'ply' dataIndex: 'money'
}, },
{ {
title:'金额', title:'零售价',
align:"center", align:"center",
dataIndex: 'money' dataIndex: 'retailPrice'
}, },
{ {
title:'面料组别', title:'品牌',
align:"center", align:"center",
dataIndex: 'fabricGroupId_dictText' dataIndex: 'brandId_dictText'
}, },
{ {
title:'面料品牌', title:'计量单位',
align:"center", align:"center",
dataIndex: 'brandId' dataIndex: 'unit_dictText'
}, },
{ {
title:'库存', title:'密度',
align:"center", align:"center",
dataIndex: 'store' dataIndex: 'density_dictText'
}, },
{ {
title:'幅宽', title:'幅宽',
@ -214,21 +234,32 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail'
dataIndex: 'clothW' dataIndex: 'clothW'
}, },
{ {
title:'密度', title:'所在地区',
align:"center", align:"center",
dataIndex: 'density' dataIndex: 'location'
}, },
{ {
title:'状态', title:'状态',
align:"center", align:"center",
dataIndex: 'status' dataIndex: 'status_dictText'
}, },
{ {
title:'二维码', title:'二维码',
align:"center", align:"center",
dataIndex: 'img', dataIndex: 'qRcode',
scopedSlots: {customRender: 'imgSlot'} scopedSlots: {customRender: 'imgSlot'}
}, },
{
title:'供货商',
align:"center",
dataIndex: 'supplierInfo_dictText'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -262,28 +293,25 @@ import ZyFabricFormDetail from './modules/ZyFabricFormDetail'
}, },
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
fieldList.push({type:'string',value:'fabricNumber',text:'面料编号',dictCode:''})
fieldList.push({type:'string',value:'color',text:'颜色',dictCode:''}) fieldList.push({type:'string',value:'color',text:'颜色',dictCode:''})
fieldList.push({type:'string',value:'pattern',text:'花样',dictCode:''}) fieldList.push({type:'sel_search',value:'pattern',text:'花样',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'material',text:'材质',dictCode:''}) fieldList.push({type:'sel_search',value:'material',text:'材质',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'ply',text:'厚度',dictCode:''}) fieldList.push({type:'sel_search',value:'ply',text:'厚度',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'int',value:'money',text:'金额',dictCode:''}) fieldList.push({type:'int',value:'money',text:'单价',dictCode:''})
fieldList.push({type:'string',value:'fabricGroupId',text:'面料组别',dictCode:'zy_fabric_group,name,id'}) fieldList.push({type:'string',value:'imageUrl',text:'图片地址',dictCode:''})
fieldList.push({type:'string',value:'brandId',text:'面料品牌',dictCode:''}) fieldList.push({type:'popup',value:'typeId',text:'面料类型id', popup:{code:'zy_fabric_type',field:'id',orgFields:'id',destFields:'content'}})
fieldList.push({type:'int',value:'store',text:'库存',dictCode:''}) fieldList.push({type:'sel_search',value:'brandId',text:'材料品牌id',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'fabricNumber',text:'材料编号',dictCode:''})
fieldList.push({type:'int',value:'unit',text:'1、为m。2:kg,等',dictCode:''}) fieldList.push({type:'int',value:'unit',text:'1、为m。2:kg,等',dictCode:''})
fieldList.push({type:'string',value:'category1Id',text:'一级面料表分类',dictCode:'zy_category,name,id'})
fieldList.push({type:'string',value:'category2Id',text:'二级面料表分类',dictCode:'zy_category,name,id'})
fieldList.push({type:'string',value:'category3Id',text:'三级面料表分类',dictCode:'zy_category,name,id'})
fieldList.push({type:'int',value:'sort',text:'排序',dictCode:''})
fieldList.push({type:'int',value:'fabricType',text:'0:无,1:特价,2:推荐等等',dictCode:''})
fieldList.push({type:'string',value:'clothW',text:'幅宽',dictCode:''})
fieldList.push({type:'string',value:'density',text:'密度',dictCode:''})
fieldList.push({type:'int',value:'status',text:'状态',dictCode:''})
fieldList.push({type:'int',value:'retailPrice',text:'零售价',dictCode:''}) fieldList.push({type:'int',value:'retailPrice',text:'零售价',dictCode:''})
fieldList.push({type:'sel_search',value:'density',text:'密度',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'clothW',text:'幅宽',dictCode:''})
fieldList.push({type:'string',value:'location',text:'所在地区',dictCode:''}) fieldList.push({type:'string',value:'location',text:'所在地区',dictCode:''})
fieldList.push({type:'int',value:'logisticsFreight',text:'物流运费',dictCode:''}) fieldList.push({type:'int',value:'status',text:'状态 o 为下架 1为上架 ',dictCode:''})
fieldList.push({type:'string',value:'qRcode',text:'二维码',dictCode:''})
fieldList.push({type:'string',value:'name',text:'名称',dictCode:''})
fieldList.push({type:'sel_depart',value:'supplierInfo',text:'供货商信息'})
fieldList.push({type:'string',value:'createTime',text:'创建时间',dictCode:''})
this.superFieldList = fieldList this.superFieldList = fieldList
}, },
openDetail(id){ openDetail(id){

@ -4,6 +4,22 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="编号">
<a-input placeholder="请输入编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="名称">
<a-input placeholder="请输入名称" v-model="queryParam.content"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
@ -13,11 +29,11 @@
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('面料类型')">导出</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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<a-button type="primary" icon="import">导入</a-button> <!-- <a-button type="primary" icon="import">导入</a-button>-->
</a-upload> <!-- </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-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <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>
@ -71,19 +87,12 @@
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" /> <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 @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item> <a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span> </span>
</a-table> </a-table>
@ -131,6 +140,11 @@
align:"center", align:"center",
dataIndex: 'content' dataIndex: 'content'
}, },
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',

@ -4,13 +4,26 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name"> <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input v-model="model.name" placeholder="请输入名称" ></a-input> <j-popup
v-model="model.typeId"
field="typeId"
org-fields="id"
dest-fields="content"
code="zy_fabric_type"
:multi="true"
@input="popupCallback"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="面料编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricNumber"> <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricNumber">
<a-input v-model="model.fabricNumber" placeholder="请输入面料编号" ></a-input> <a-input v-model="model.fabricNumber" placeholder="请输入编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
<a-input v-model="model.name" placeholder="请输入名称" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -20,85 +33,47 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="花样" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pattern"> <a-form-model-item label="花样" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pattern">
<a-input v-model="model.pattern" placeholder="请输入花样" ></a-input> <j-search-select-tag v-model="model.pattern" dict="pattern" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material"> <a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">
<a-input v-model="model.material" placeholder="请输入材质" ></a-input> <j-search-select-tag v-model="model.material" dict="material" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">
<a-input v-model="model.description" placeholder="请输入描述" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-input v-model="model.description" placeholder="请输入描述" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="厚度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ply"> <a-form-model-item label="厚度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ply">
<a-input v-model="model.ply" placeholder="请输入厚度" ></a-input> <a-input v-model="model.ply" placeholder="请输入厚度" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money"> <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">
<a-input-number v-model="model.money" placeholder="请输入金额" style="width: 100%" /> <a-input-number v-model="model.money" placeholder="请输入单价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="图片地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageUrl">
<!--<j-image-upload isMultiple v-model="model.imageUrl" ></j-image-upload>-->
<img style="width: 100%;" :src="model.imageUrl">
<a-input hidden="hidden" v-model="model.imageUrl"></a-input>
<a-button type="primary" @click="onlineImage">
在线
</a-button>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="面料组别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricGroupId">
<j-dict-select-tag type="list" v-model="model.fabricGroupId" dictCode="zy_fabric_group,name,id" placeholder="请选择面料组别" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="面料品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brandId">
<a-input v-model="model.brandId" placeholder="请输入面料品牌" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="store">
<a-input-number v-model="model.store" placeholder="请输入库存" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="1、为m。2:kg,等" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-input-number v-model="model.unit" placeholder="请输入1、为m。2:kg,等" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="一级面料表分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="category1Id">
<j-dict-select-tag type="list" v-model="model.category1Id" dictCode="zy_category,name,id" placeholder="请选择一级面料表分类" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="二级面料表分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="category2Id"> <a-form-model-item label="零售价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="retailPrice">
<j-dict-select-tag type="list" v-model="model.category2Id" dictCode="zy_category,name,id" placeholder="请选择二级面料表分类" /> <a-input-number v-model="model.retailPrice" placeholder="请输入零售价" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="三级面料表分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="category3Id"> <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brandId">
<j-dict-select-tag type="list" v-model="model.category3Id" dictCode="zy_category,name,id" placeholder="请选择三级面料表分类" /> <a-input v-model="model.brandId" placeholder="请输入品牌" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort"> <a-form-model-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" /> <a-input-number v-model="model.unit" placeholder="请输入单位" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="0:无,1:特价,2:推荐等等" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricType"> <a-form-model-item label="密度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="density">
<a-input-number v-model="model.fabricType" placeholder="请输入0:无,1:特价,2:推荐等等" style="width: 100%" /> <a-input v-model="model.density" placeholder="请输入密度" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -107,8 +82,8 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="密度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="density"> <a-form-model-item label="销售地区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="location">
<a-input v-model="model.density" placeholder="请输入密度" ></a-input> <a-input v-model="model.location" placeholder="请输入销售地区" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -117,32 +92,85 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="零售价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="retailPrice"> <a-form-model-item label="供货商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo">
<a-input-number v-model="model.retailPrice" placeholder="请输入零售价" style="width: 100%" /> <j-select-depart v-model="model.supplierInfo" multi />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="所在地区" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="location">
<a-input v-model="model.location" placeholder="请输入所在地区" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="物流运费" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logisticsFreight"> <a-form-model-item label="图片地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageUrl">
<a-input-number v-model="model.logisticsFreight" placeholder="请输入物流运费" style="width: 100%" /> <j-image-upload isMultiple v-model="model.imageUrl" ></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageUrl">-->
<!-- &lt;!&ndash;<j-image-upload isMultiple v-model="model.imageUrl" ></j-image-upload>&ndash;&gt;-->
<!-- <img style="width: 100%;" :src="model.imageUrl">-->
<!-- <a-input hidden="hidden" v-model="model.imageUrl"></a-input>-->
<!-- <a-button type="primary" @click="onlineImage">-->
<!-- 在线-->
<!-- </a-button>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="物流详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logisticsDetail"> <a-form-model-item label="二维码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qRcode">
<a-input v-model="model.logisticsDetail" placeholder="请输入物流详情" ></a-input> <j-image-upload isMultiple v-model="model.qRcode" ></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="面料组别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricGroupId">-->
<!-- <j-dict-select-tag type="list" v-model="model.fabricGroupId" dictCode="zy_fabric_group,name,id" placeholder="请选择面料组别" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="库存" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="store">-->
<!-- <a-input-number v-model="model.store" placeholder="请输入库存" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24" > <!-- <a-col :span="24">-->
<a-form-model-item label="二维码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img"> <!-- <a-form-model-item label="一级面料表分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="category1Id">-->
<j-image-upload isMultiple v-model="model.img" ></j-image-upload> <!-- <j-dict-select-tag type="list" v-model="model.category1Id" dictCode="zy_category,name,id" placeholder="请选择一级面料表分类" />-->
</a-form-model-item> <!-- </a-form-model-item>-->
</a-col> <!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="二级面料表分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="category2Id">-->
<!-- <j-dict-select-tag type="list" v-model="model.category2Id" dictCode="zy_category,name,id" placeholder="请选择二级面料表分类" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="三级面料表分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="category3Id">-->
<!-- <j-dict-select-tag type="list" v-model="model.category3Id" dictCode="zy_category,name,id" placeholder="请选择三级面料表分类" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sort">-->
<!-- <a-input-number v-model="model.sort" placeholder="请输入排序" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="0:无,1:特价,2:推荐等等" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricType">-->
<!-- <a-input-number v-model="model.fabricType" placeholder="请输入0:无,1:特价,2:推荐等等" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="物流运费" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logisticsFreight">-->
<!-- <a-input-number v-model="model.logisticsFreight" placeholder="请输入物流运费" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="物流详情" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logisticsDetail">-->
<!-- <a-input v-model="model.logisticsDetail" placeholder="请输入物流详情" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24" >-->
<!-- <a-form-model-item label="二维码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="img">-->
<!-- <j-image-upload isMultiple v-model="model.img" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row> </a-row>
<online-camera ref="onlineCamera" v-on:changeOnlineVisible="changeOnlineVisible" /> <online-camera ref="onlineCamera" v-on:changeOnlineVisible="changeOnlineVisible" />
@ -186,6 +214,18 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
color: [
{ required: true, message: '请输入颜色!'},
],
pattern: [
{ required: true, message: '请输入花样!'},
],
fabricNumber: [
{ required: true, message: '请输入面料编号!'},
],
name: [
{ required: true, message: '请输入名称!'},
],
}, },
url: { url: {
add: "/fabric/zyFabric/add", add: "/fabric/zyFabric/add",

@ -50,6 +50,12 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
nums: [
{ pattern: /^\d{4,4}$/, message: '请输入4位数字!'},
],
content: [
{ pattern: /^.{0,30}$/, message: '输入名称过长!'},
],
}, },
url: { url: {
add: "/fabric/zyFabricType/add", add: "/fabric/zyFabricType/add",

@ -68,8 +68,8 @@ public class ZyFabricTypeController extends JeecgController<ZyFabricType, IZyFab
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
//QueryWrapper<ZyFabricType> queryWrapper = QueryGenerator.initQueryWrapper(zyFabricType, req.getParameterMap()); QueryWrapper<ZyFabricType> queryWrapper = QueryGenerator.initQueryWrapper(zyFabricType, req.getParameterMap());
QueryWrapper queryWrapper = new QueryWrapper(); // QueryWrapper queryWrapper = new QueryWrapper();
Page<ZyFabricType> page = new Page<ZyFabricType>(pageNo, pageSize); Page<ZyFabricType> page = new Page<ZyFabricType>(pageNo, pageSize);
IPage<ZyFabricType> pageList = zyFabricTypeService.page(page, queryWrapper); IPage<ZyFabricType> pageList = zyFabricTypeService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
@ -85,6 +85,15 @@ public class ZyFabricTypeController extends JeecgController<ZyFabricType, IZyFab
@ApiOperation(value="zy_fabric_type-添加", notes="zy_fabric_type-添加") @ApiOperation(value="zy_fabric_type-添加", notes="zy_fabric_type-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyFabricType zyFabricType) { public Result<?> add(@RequestBody ZyFabricType zyFabricType) {
List<ZyFabricType> list = zyFabricTypeService.list();
for (ZyFabricType zy : list){
if (zy.getNums().equals(zyFabricType.getNums())){
return Result.error("编号重复,请重新输入");
}
if (zy.getContent().equals(zyFabricType.getContent())){
return Result.error("名称重复,请重新输入");
}
}
zyFabricTypeService.save(zyFabricType); zyFabricTypeService.save(zyFabricType);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
@ -99,6 +108,15 @@ public class ZyFabricTypeController extends JeecgController<ZyFabricType, IZyFab
@ApiOperation(value="zy_fabric_type-编辑", notes="zy_fabric_type-编辑") @ApiOperation(value="zy_fabric_type-编辑", notes="zy_fabric_type-编辑")
@PutMapping(value = "/edit") @PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyFabricType zyFabricType) { public Result<?> edit(@RequestBody ZyFabricType zyFabricType) {
List<ZyFabricType> list = zyFabricTypeService.list();
for (ZyFabricType zy : list){
if (zy.getNums().equals(zyFabricType.getNums())){
return Result.error("编号重复,请重新输入");
}
if (zy.getContent().equals(zyFabricType.getContent())){
return Result.error("名称重复,请重新输入");
}
}
zyFabricTypeService.updateById(zyFabricType); zyFabricTypeService.updateById(zyFabricType);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }

@ -83,60 +83,30 @@ public class ZyFabric implements Serializable {
@ApiModelProperty(value = "图片地址") @ApiModelProperty(value = "图片地址")
private String imageUrl; private String imageUrl;
/**材料组别id*/
@Dict(dicCode = "id", dicText = "name", dictTable = "zy_fabric_group") /**面料类型id*/
@Excel(name = "材料组别id", width = 15) @ApiModelProperty(value = "面料类型id")
@ApiModelProperty(value = "材料组别id") private String typeId;
private String fabricGroupId;
@ApiModelProperty(value = "图片地址")
private String pictureUrl;
/**材料品牌id*/ /**材料品牌id*/
@Excel(name = "材料品牌id", width = 15) @Excel(name = "料品牌id", width = 15)
@ApiModelProperty(value = "材料品牌id") @ApiModelProperty(value = "材料品牌id")
private String brandId; private String brandId;
/**材料编号*/ /**材料编号*/
@Excel(name = "料编号", width = 15) @Excel(name = "料编号", width = 15)
@ApiModelProperty(value = "料编号") @ApiModelProperty(value = "料编号")
private String fabricNumber; private String fabricNumber;
/**库存(不用)*/
@Excel(name = "库存(不用)", width = 15)
@ApiModelProperty(value = "库存(不用)")
private Integer store;
/**1、为m。2:kg,等*/ /**1、为m。2:kg,等*/
@Excel(name = "1、为m。2:kg,等", width = 15) @Excel(name = "1、为m。2:kg,等", width = 15)
@ApiModelProperty(value = "1、为m。2:kg,等") @ApiModelProperty(value = "1、为m。2:kg,等")
private Integer unit; private Integer unit;
/**一级面料表分类*/
@Excel(name = "一级面料表分类", width = 15)
@ApiModelProperty(value = "一级面料表分类")
private String category1Id;
/**二级面料表分类*/
@Excel(name = "二级面料表分类", width = 15)
@ApiModelProperty(value = "二级面料表分类")
private String category2Id;
/**三级面料表分类*/
@Excel(name = "三级面料表分类", width = 15)
@ApiModelProperty(value = "三级面料表分类")
private String category3Id;
/**排序*/
@Excel(name = "排序", width = 15)
@ApiModelProperty(value = "排序")
private Integer sort;
/**0:无,1:特价,2:推荐等等*/
@Excel(name = "0:无,1:特价,2:推荐等等", width = 15)
@ApiModelProperty(value = "0:无,1:特价,2:推荐等等")
private Integer fabricType;
/**零售价*/ /**零售价*/
@Excel(name = "零售价", width = 15) @Excel(name = "零售价", width = 15)
@ApiModelProperty(value = "零售价") @ApiModelProperty(value = "零售价")
private Integer retailPrice; private Integer retailPrice;
/**物流详情*/
@Excel(name = "物流详情", width = 15)
@ApiModelProperty(value = "物流详情")
private String logisticsDetail;
/**物流运费*/
@Excel(name = "物流运费", width = 15)
@ApiModelProperty(value = "物流运费")
private Integer logisticsFreight;
/**密度*/ /**密度*/
@Excel(name = "密度", width = 15) @Excel(name = "密度", width = 15)
@ApiModelProperty(value = "密度") @ApiModelProperty(value = "密度")
@ -157,18 +127,10 @@ public class ZyFabric implements Serializable {
@Excel(name = "二维码", width = 15) @Excel(name = "二维码", width = 15)
@ApiModelProperty(value = "二维码") @ApiModelProperty(value = "二维码")
private String qRcode; private String qRcode;
/**有效期明细管理*/
@Excel(name = "有效期明细管理", width = 15)
@ApiModelProperty(value = "有效期明细管理")
private String useTime;
/**名称*/ /**名称*/
@Excel(name = "名称", width = 15) @Excel(name = "名称", width = 15)
@ApiModelProperty(value = "名称") @ApiModelProperty(value = "名称")
private String name; private String name;
/**门幅宽度*/
@Excel(name = "门幅宽度", width = 15)
@ApiModelProperty(value = "门幅宽度")
private String doorW;
/**克重*/ /**克重*/
@Excel(name = "克重", width = 15) @Excel(name = "克重", width = 15)
@ApiModelProperty(value = "克重") @ApiModelProperty(value = "克重")
@ -181,6 +143,7 @@ public class ZyFabric implements Serializable {
@Excel(name = "供货商信息", width = 15) @Excel(name = "供货商信息", width = 15)
@ApiModelProperty(value = "供货商信息") @ApiModelProperty(value = "供货商信息")
private String supplierInfo; private String supplierInfo;
/**二维码*/ /**二维码*/
@ApiModelProperty(value = "二维码") @ApiModelProperty(value = "二维码")

Loading…
Cancel
Save