2022-12-14 修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent 5f7964261f
commit 1d7426fa88
  1. 17
      ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
  2. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  3. 308
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  4. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java

@ -10,9 +10,16 @@
</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 label="类型名称" >
<j-tree-select v-model="queryParam.id"
dict="zy_cloths_type,type_name,id"
pidField="type_id"
placeholder="请选择类型名称" >
</j-tree-select>
</a-form-item>
<!-- <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="企业名称">
@ -111,6 +118,8 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyClothsTypeModal from './modules/ZyClothsTypeModal'
import {filterObj} from "@/utils/util";
import {getAction} from "@api/manage";
export default {
name: 'ZyClothsTypeList',
@ -147,7 +156,7 @@
title:'类型名称',
align:"center",
dataIndex: 'typeName',
sorter:true
sorter:true,
},
{
title:'企业',
@ -174,7 +183,6 @@
deleteBatch: "/base/zyClothsType/deleteBatch",
exportXlsUrl: "/base/zyClothsType/exportXls",
importExcelUrl: "base/zyClothsType/importExcel",
},
dictOptions:{},
superFieldList:[],
@ -182,6 +190,7 @@
},
created() {
this.getSuperFieldList();
// this.loadParameter();
},
computed: {
importExcelUrl: function(){

@ -81,7 +81,7 @@
// ],
typeName: [
{ required: true, message: '请输入类型名称!'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!?]{0,5}$/, message: '文本长度过长'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!?]{0,50}$/, message: '文本长度过长'},
],
enterpriseId: [
{ required: true, message: '请输入企业!'},

@ -1,11 +1,12 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" :layout="horizontal">
<!-- <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail" :layout="horizontal">-->
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="12">
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" multi />
<j-select-depart v-model="model.enterpriseId" multi/>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -13,62 +14,61 @@
<j-popup
v-model="model.typeName"
field="type_name"
org-fields="type_name,id"
dest-fields="typeName,typeId"
org-fields="type_name,nums"
dest-fields="typeName,styleId"
code="cloths_type"
:multi="false"
@input="popupCallback"
/>
</a-form-model-item>
<a-input v-model="model.typeId" hidden/>
<a-input v-model="model.typeId" hidden/>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="形式" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="shape">
<j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape" placeholder="请输入形式" ></j-dict-select-tag>
<j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape"
placeholder="请输入形式"></j-dict-select-tag>
</a-form-model-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>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="款式名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleNames">
<a-input v-model="model.styleNames" placeholder="请输入款式名称" ></a-input>
<a-input v-model="model.styleNames" placeholder="请输入款式名称"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification">
<a-input v-model="model.specification" placeholder="请输入规格" ></a-input>
<a-form-model-item label="编号" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" disabled=""></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="定额用料" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quotaMaterials">
<a-input v-model="model.quotaMaterials" placeholder="请输入定额用料" ></a-input>
<a-input v-model="model.quotaMaterials" placeholder="请输入定额用料"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入风格" ></a-input>
<a-form-model-item label="格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification">
<a-input v-model="model.specification" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="测体余量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error">
<a-input v-model="model.error" placeholder="请输入测体余量" ></a-input>
<a-input v-model="model.error" placeholder="请输入测体余量"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure">
<a-input v-model="model.structure" placeholder="请输入结构" ></a-input>
<a-form-model-item label="风格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic">
<a-input v-model="model.characteristic" placeholder="请输入风格"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -76,33 +76,45 @@
<j-dict-select-tag v-model="model.sewingForm" placeholder="请选择缝纫形式" dict-code="sewingForm"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure">
<a-input v-model="model.structure" placeholder="请输入结构"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging">
<j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装" dict-code="foldingPackaging" />
<j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装"
dict-code="foldingPackaging"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col >
<a-col>
<a-form-model-item label="产品概述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="productOverview">
<a-textarea v-model="model.productOverview" placeholder="请输入产品概述" />
<a-textarea v-model="model.productOverview" placeholder="请输入产品概述"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" :labelAlign="left">
<a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区" />
<!-- <a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" :labelAlign="left">-->
<!-- <a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区" />-->
<!-- </a-form-model-item>-->
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory">
<a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="制衣参数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="measuringMethod">
<a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数" ></a-textarea>
<a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数"></a-textarea>
</a-form-model-item>
</a-col>
</a-row>
@ -110,19 +122,19 @@
<a-row>
<a-col>
<a-form-model-item label="配件及标志" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="accLogos">
<a-textarea v-model="model.accLogos" placeholder="请输入配件及标志" />
<a-textarea v-model="model.accLogos" placeholder="请输入配件及标志"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-model-item label="效果" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="designSketch">
<j-image-upload isMultiple v-model="model.designSketch" ></j-image-upload>
<j-image-upload isMultiple v-model="model.designSketch"></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="主图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mainMap">
<j-image-upload isMultiple v-model="model.mainMap" ></j-image-upload>
<j-image-upload isMultiple v-model="model.mainMap"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
@ -234,17 +246,6 @@
<!-- </a-col>-->
</a-row>
<!-- <a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
@ -355,120 +356,135 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
import store from '@/store'
export default {
name: 'ZyClothsStyleForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
typeId : "",
typeName:"",
model:{
shape:1
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
labelCol1: {
xs: { span: 24 },
sm: { span: 3 },
},
wrapperCol1: {
xs: { span: 24 },
sm: { span: 18 },
},
confirmLoading: false,
validatorRules: {
typeId: [
{ required: true, message: '请选择服装类型!'},
],
// nums: [
// { required: true, message: '!'},
// ],
styleNames: [
{ required: true, message: '请输入名称!'},
],
positionid: [
{ required: true, message: '请选择组委会职务!'},
],
},
url: {
add: "/zyclothsstyle/zyClothsStyle/add",
edit: "/zyclothsstyle/zyClothsStyle/edit",
queryById: "/zyclothsstyle/zyClothsStyle/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
export default {
name: 'ZyClothsStyleForm',
components: {},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
typeId: "",
typeName: "",
model: {
nums: '',
shape: 1
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
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;
})
}
})
labelCol1: {
xs: {span: 24},
sm: {span: 3},
},
wrapperCol1: {
xs: {span: 24},
sm: {span: 18},
},
popupCallback(value,row){
this.model = Object.assign(this.model, row);
confirmLoading: false,
validatorRules: {
typeId: [
{required: true, message: '请选择服装类型!'},
],
// nums: [
// { required: true, message: '!'},
// ],
styleNames: [
{required: true, message: '请输入名称!'},
],
positionid: [
{required: true, message: '请选择组委会职务!'},
],
},
url: {
add: "/zyclothsstyle/zyClothsStyle/add",
edit: "/zyclothsstyle/zyClothsStyle/edit",
queryById: "/zyclothsstyle/zyClothsStyle/queryById",
//getActionurl
sort:"/base/zyProcess/sort"
}
}
},
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) {
console.log("1222346584" + "++++++")
var n = 8;
this.model = Object.assign(this.model, row);
getAction(this.url.sort, {id: this.model.styleId}).then((res) => {
console.log("aaaaaa"+res.result);
var num = parseInt(res.result, 10) + 1
num = num.toString()
while (num.length < n) {
num = "0" + num
}
this.model.nums = this.model.styleId + num;
// console.log(this.model.processCode)
})
},
}
}
</script>
<style scoped>
.ant-form-item{
margin-bottom: 16px;
}
.ant-form-item {
margin-bottom: 16px;
}
</style>

@ -60,6 +60,13 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
QueryWrapper<ZyClothsType> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsType, req.getParameterMap());
Page<ZyClothsType> page = new Page<ZyClothsType>(pageNo, pageSize);
IPage<ZyClothsType> pageList = zyClothsTypeService.page(page, queryWrapper);
List<ZyClothsType> records = pageList.getRecords();
for (ZyClothsType zy : records) {
String typeId = zy.getTypeId();
if (StringUtils.isEmpty(typeId)){
zy.setTypeId("1455487094925819901");
}
}
return Result.OK(pageList);
}

Loading…
Cancel
Save