2022-09-22 1.1.1 服装类型管理

zhc4dev
chen 2 years ago
parent c57f1a612d
commit bdc6484882
  1. 58
      ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
  2. 30
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  3. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  4. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsType.java

@ -4,6 +4,27 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="编号">
<a-input placeholder="请输入编号" v-model="queryParam.nums" ></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="类型名称">
<a-input placeholder="请输入类型名称" v-model="queryParam.typeName" ></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称">
<j-select-depart placeholder="请输入企业名称" v-model="queryParam.enterpriseId" />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -13,11 +34,11 @@
<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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -69,21 +90,12 @@
<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>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
@ -121,6 +133,11 @@
return parseInt(index)+1;
}
},
{
title:'上级类型',
align:"center",
dataIndex: 'typeId_dictText'
},
{
title:'编号',
align:"center",
@ -135,7 +152,12 @@
{
title:'企业',
align:"center",
dataIndex: 'enterpriseId'
dataIndex: 'enterpriseId_dictText'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',

@ -3,6 +3,12 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-item label="上级类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-tree-select v-model="model.typeId" dict="zy_cloths_type,type_name,id" pidField="type_id" placeholder="请选择上级类型" ></j-tree-select>
{{ typeId }}
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
@ -13,9 +19,15 @@
<a-input v-model="model.typeName" 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="enterpriseId">
<a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>
&lt;!&ndash; <j-dict-select-tag v-model="model.enterpriseId" placeholder="请输入企业" dictCode="sc_competitioninf,compname,compid" ></j-dict-select-tag>&ndash;&gt;
</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-row>
@ -28,10 +40,11 @@
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
export default {
name: 'ZyClothsTypeForm',
components: {
JTreeSelect
},
props: {
//
@ -45,6 +58,7 @@
return {
model:{
},
typeId:"",
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
@ -55,6 +69,15 @@
},
confirmLoading: false,
validatorRules: {
nums: [
{ required: true, message: '请输入编号!'},
],
typeName: [
{ required: true, message: '请输入类型名称!'},
],
enterpriseId: [
{ required: true, message: '请输入企业!'},
],
},
url: {
add: "/base/zyClothsType/add",
@ -76,6 +99,9 @@
add () {
this.edit(this.modelDefault);
},
getTreeFieldValue(){
return this.form.getFieldValue("demoTree")
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;

@ -153,7 +153,7 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyClothsType zyClothsType) {
return super.exportXls(request, zyClothsType, ZyClothsType.class, "zy_cloths_type");
return super.exportXls(request, zyClothsType, ZyClothsType.class, "制衣类型表");
}
/**

@ -35,6 +35,11 @@ public class ZyClothsType implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "衣服类型表")
private java.lang.String id;
/**编号*/
@Excel(name = "上级类型",dictTable = "zy_cloths_type", dicText = "type_name", dicCode = "id", width = 15)
@Dict(dictTable = "zy_cloths_type", dicText = "type_name", dicCode = "id")
@ApiModelProperty(value = "父类ID")
private java.lang.String typeId;
/**编号*/
@Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号")
@ -44,15 +49,18 @@ public class ZyClothsType implements Serializable {
@ApiModelProperty(value = "类型名称")
private java.lang.String typeName;
/**企业*/
@Excel(name = "企业", width = 15)
@Excel(name = "企业",dictTable = "sys_depart", dicText = "depart_name", dicCode = "id", width = 15)
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "企业")
private java.lang.String enterpriseId;
/**createTime*/
@Excel(name = "创建时间", width = 15,format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "createTime")
private java.util.Date createTime;
/**updateTime*/
@Excel(name = "更新时间", width = 15 ,format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "updateTime")

Loading…
Cancel
Save