Merge remote-tracking branch 'origin/master' into zhc4dev

zhc4dev
zhc077 2 years ago
commit 44e6b74346
  1. 238
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
  2. 87
      ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue
  3. 35
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java
  4. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java

@ -2,8 +2,8 @@
<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-row type="flex" justify="space-around">
<a-col :span="11">
<a-form-model-item label="面料类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-popup
v-model="model.typeName"
@ -17,118 +17,236 @@
<a-input v-model="model.typeId" hidden />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">
<j-search-select-tag v-model="model.material" dict="material" @change="gaibian" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricNumber">
<a-input v-model="model.fabricNumber" placeholder="请输入编号" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<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-col>
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="颜色" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="color">
<a-input v-model="model.color" placeholder="请输入颜色" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="花样" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pattern">
<j-search-select-tag v-model="model.pattern" dict="pattern" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">-->
<!-- <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-col>-->
<a-col :span="24">
<a-form-model-item label="厚度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ply">
<j-search-select-tag v-model="model.ply" dict="ply" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">
<a-input-number v-model="model.money" placeholder="请输入单价" :precision="2" :min="0" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="零售价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="retailPrice">
<a-input-number v-model="model.retailPrice" placeholder="请输入零售价" style="width: 100%" />
<a-col :span="12">
<a-form-model-item label="厚度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ply">
<j-search-select-tag v-model="model.ply" dict="ply" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单位(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<j-dict-select-tag v-model="model.unit" type="radioButton" title="单位" dictCode="unit1" />
<a-col :span="11">
<a-form-model-item label="零售价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="retailPrice">
<a-input-number v-model="model.retailPrice" placeholder="请输入零售价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brandId">
<j-search-select-tag v-model="model.brandId" dict="brand" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="单位(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unit">
<j-dict-select-tag v-model="model.unit" type="radioButton" title="单位" dictCode="unit1" />
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="密度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="density">
<j-search-select-tag v-model="model.density" dict="density" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="幅宽(米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothW">
<a-col :span="11">
<a-form-model-item label="幅宽(米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothW">
<j-search-select-tag v-model="model.clothW" dict="clothW" />
</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-col>
<a-col :span="24">
<a-col :span="12">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag v-model="model.status" type="radioButton" title="状态" dictCode="fabric_status" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricGrade">-->
<!-- <j-search-select-tag v-model="model.fabricGrade" dict="fabric_grade" />-->
<!-- <a-col :span="11">-->
<!-- <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-col>-->
<a-col :span="24">
<a-col :span="11">
<a-form-model-item label="供货商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo">
<j-select-depart v-model="model.supplierInfo" multi />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-col :span="12">
</a-col>
</a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="location">
<!-- <a-input v-model="model.location" placeholder="请输入销售地区" ></a-input>-->
<a-textarea v-model="model.location" rows="2" placeholder="请输入销售地区"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="11">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageUrl">
<j-image-upload isMultiple v-model="model.imageUrl" ></j-image-upload>
</a-form-model-item>
</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="12">
<a-form-model-item label="二维码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qRcode">
<j-image-upload isMultiple v-model="model.qRcode" ></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="typeId">-->
<!-- <j-popup-->
<!-- v-model="model.typeName"-->
<!-- field="typeName"-->
<!-- org-fields="nums,content"-->
<!-- dest-fields="typeId,typeName"-->
<!-- code="zy_fabric_type"-->
<!-- :multi="false"-->
<!-- @input="popupCallback"-->
<!-- />-->
<!-- <a-input v-model="model.typeId" hidden />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">-->
<!-- <j-search-select-tag v-model="model.material" dict="material" @change="gaibian" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricNumber">-->
<!-- <a-input v-model="model.fabricNumber" placeholder="请输入编号" disabled></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-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="颜色" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="color">-->
<!-- <a-input v-model="model.color" placeholder="请输入颜色" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="花样" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pattern">-->
<!-- <j-search-select-tag v-model="model.pattern" dict="pattern" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--&lt;!&ndash; <a-col :span="24">&ndash;&gt;-->
<!--&lt;!&ndash; <a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">&ndash;&gt;-->
<!--&lt;!&ndash; <j-search-select-tag v-model="model.material" dict="material" />&ndash;&gt;-->
<!--&lt;!&ndash; </a-form-model-item>&ndash;&gt;-->
<!--&lt;!&ndash; </a-col>&ndash;&gt;-->
<!--&lt;!&ndash; <a-col :span="24">&ndash;&gt;-->
<!--&lt;!&ndash; <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">&ndash;&gt;-->
<!--&lt;!&ndash; <a-input v-model="model.description" placeholder="请输入描述" ></a-input>&ndash;&gt;-->
<!--&lt;!&ndash; </a-form-model-item>&ndash;&gt;-->
<!--&lt;!&ndash; </a-col>&ndash;&gt;-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="厚度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ply">-->
<!-- <j-search-select-tag v-model="model.ply" dict="ply" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="money">-->
<!-- <a-input-number v-model="model.money" placeholder="请输入单价" :precision="2" :min="0" style="width: 100%" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="零售价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="retailPrice">-->
<!-- <a-input-number v-model="model.retailPrice" 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">-->
<!-- <j-dict-select-tag v-model="model.unit" type="radioButton" title="单位" dictCode="unit1" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="brandId">-->
<!-- <j-search-select-tag v-model="model.brandId" dict="brand" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="密度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="density">-->
<!-- <j-search-select-tag v-model="model.density" dict="density" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="幅宽(米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothW">-->
<!-- <j-search-select-tag v-model="model.clothW" dict="clothW" />-->
<!-- </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-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">-->
<!-- <j-dict-select-tag v-model="model.status" type="radioButton" title="状态" dictCode="fabric_status" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--&lt;!&ndash; <a-col :span="24">&ndash;&gt;-->
<!--&lt;!&ndash; <a-form-model-item label="等级" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricGrade">&ndash;&gt;-->
<!--&lt;!&ndash; <j-search-select-tag v-model="model.fabricGrade" dict="fabric_grade" />&ndash;&gt;-->
<!--&lt;!&ndash; </a-form-model-item>&ndash;&gt;-->
<!--&lt;!&ndash; </a-col>&ndash;&gt;-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="供货商" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierInfo">-->
<!-- <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="imageUrl">-->
<!-- <j-image-upload isMultiple v-model="model.imageUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--&lt;!&ndash; <a-col :span="24">&ndash;&gt;-->
<!--&lt;!&ndash; <a-form-model-item label="图片地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="imageUrl">&ndash;&gt;-->
<!--&lt;!&ndash; &lt;!&ndash;<j-image-upload isMultiple v-model="model.imageUrl" ></j-image-upload>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash; <img style="width: 100%;" :src="model.imageUrl">&ndash;&gt;-->
<!--&lt;!&ndash; <a-input hidden="hidden" v-model="model.imageUrl"></a-input>&ndash;&gt;-->
<!--&lt;!&ndash; <a-button type="primary" @click="onlineImage">&ndash;&gt;-->
<!--&lt;!&ndash; 在线&ndash;&gt;-->
<!--&lt;!&ndash; </a-button>&ndash;&gt;-->
<!--&lt;!&ndash; </a-form-model-item>&ndash;&gt;-->
<!--&lt;!&ndash; </a-col>&ndash;&gt;-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="二维码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qRcode">-->
<!-- <j-image-upload isMultiple v-model="model.qRcode" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<online-camera ref="onlineCamera" v-on:changeOnlineVisible="changeOnlineVisible" />
</a-form-model>
@ -172,6 +290,14 @@
xs: { span: 24 },
sm: { span: 16 },
},
labelCol1: {
xs: { span: 24 },
sm: { span: 3 },
},
wrapperCol1: {
xs: { span: 24 },
sm: { span: 21 },
},
confirmLoading: false,
validatorRules: {
typeId: [

@ -3,9 +3,29 @@
<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="enterprisesId">
<j-select-depart v-model="model.enterprisesId" @change="getlx()"/>
</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="lx" placeholder="请选择类型" @change="getks()"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="服装款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.styleId" :dictCode="ks" placeholder="请选择款式" @change="getxh()"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="服装型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modelId">
<j-dict-select-tag type="list" v-model="model.modelId" :dictCode="xh" placeholder="请选择型号" @change="getspbh()"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="商品编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsCode">
<a-input v-model="model.goodsCode" placeholder="请输入商品编号" ></a-input>
<a-input v-model="model.goodsCode" placeholder="请输入商品编号" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -38,21 +58,6 @@
<j-upload v-model="model.goodsVideo" ></j-upload>
</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="请选择类型id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modelId">
<j-dict-select-tag type="list" v-model="model.modelId" dictCode="zy_style_model,model_number,id" placeholder="请选择型号id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式id" />
</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>
@ -64,17 +69,17 @@
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="单价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
<a-form-model-item label="单价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="unitPrice">
<a-input-number v-model="model.unitPrice" placeholder="请输入单价" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="折扣" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discount">
<a-form-model-item label="折扣(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="discount">
<a-input-number v-model="model.discount" placeholder="请输入折扣" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="促销价" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="promotionPrice">
<a-form-model-item label="促销价(元)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="promotionPrice">
<a-input-number v-model="model.promotionPrice" placeholder="请输入促销价" style="width: 100%" />
</a-form-model-item>
</a-col>
@ -93,11 +98,7 @@
<j-dict-select-tag type="radio" v-model="model.status" dictCode="good_status" placeholder="请选择状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterprisesId">
<j-select-depart v-model="model.enterprisesId" multi />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
@ -123,6 +124,9 @@
},
data () {
return {
lx:'zy_cloths_type ,type_name,id',
ks:'zy_cloths_style,style_names,id',
xh:'zy_style_model,model_number,id',
model:{
customized:0,
recommend:0,
@ -138,15 +142,24 @@
},
confirmLoading: false,
validatorRules: {
enterprisesId:[{
required: true, message: '请选择企业!'
}],
modelId:[{
required: true, message: '请选择型号!'
}],
goodsCode: [
{ required: true, message: '请输入商品编号!'},
],
styleId: [
{ required: true, message: '请选择款式!'},
],
clothsTypeId:[{
required: true, message: '请选择类型!'
}],
number: [
{ required: false},
{ pattern: /^-?\d+$/, message: '请输入整数!'},
{ pattern: /^[+]{0,1}(\d+)$/, message: '包装个数必须大于等于0!'},
],
unitPrice: [
{ required: false},
@ -164,7 +177,8 @@
url: {
add: "/zygoods/zyGoods/add",
edit: "/zygoods/zyGoods/edit",
queryById: "/zygoods/zyGoods/queryById"
queryById: "/zygoods/zyGoods/queryById",
zy:"/zygoods/zyGoods/getspbh"
}
}
},
@ -178,6 +192,27 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
getlx(){
this.lx ="zy_cloths_type ,type_name,id,enterprise_id='" + this.model.enterprisesId + "'";
},
getks(){
this.ks ="zy_cloths_style,style_names,id,type_id='" + this.model.clothsTypeId + "'";
},
getxh(){
this.xh ="zy_style_model,model_number,id,style_id='" + this.model.styleId + "'";
},
getspbh(){
getAction(this.url.zy, {lxid:this.model.clothsTypeId,xhid:this.model.modelId}).then((res) => {
if (res.success) {
// console.log(res.result.nums)
// this.$forceUpdate();
//
this.$set(this.model,'goodsCode',res.result);
} else {
}
});
},
add () {
this.edit(this.modelDefault);
},

@ -12,7 +12,9 @@ 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.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule;
import org.jeecg.modules.demo.goodsmodule.service.IGoodsModuleService;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
@ -65,6 +67,10 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyStyleModelService zyStyleModelService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
/**
* 分页列表查询
@ -204,6 +210,35 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
return Result.OK(zyGoods);
}
/**
* 动态获取商品编码
*
* @param
* @return
*/
@AutoLog(value = "商品表-通过id查询")
@ApiOperation(value="商品表-通过id查询", notes="商品表-通过id查询")
@GetMapping(value = "/getspbh")
public Result<?> getspbh(@RequestParam(name="lxid",required=true) String lxid,@RequestParam(name="xhid",required=true) String xhid,HttpServletRequest req) {
String spbh = "";
ZyClothsType zyClothsType = zyClothsTypeService.getById(lxid);
//服装类型编号
String lxbh = zyClothsType.getNums();
//型号编码
ZyStyleModel zyStyleModel = zyStyleModelService.getById(xhid);
String xhbm =zyStyleModel.getModelNumber();
//顺序号
String sxh = "";
ZyGoods zyGoods = new ZyGoods();
QueryWrapper<ZyGoods> queryWrapper = QueryGenerator.initQueryWrapper(zyGoods, req.getParameterMap());
queryWrapper.eq("cloths_type_id",lxid);
queryWrapper.eq("model_id",xhid);
List<ZyGoods> list = zyGoodsService.list(queryWrapper);
sxh = list.size()+1+"";
spbh = lxbh + xhbm + sxh;
return Result.OK(spbh);
}
/**
* 导出excel
*

@ -47,7 +47,7 @@ public class ZyStyleModel implements Serializable {
/**型号编码*/
@Excel(name = "型号编码", width = 15)
@ApiModelProperty(value = "型号编码")
private java.lang.Integer modelNumber;
private java.lang.String modelNumber;
/**码数*/
@Excel(name = "码数", width = 15)
@ApiModelProperty(value = "码数")

Loading…
Cancel
Save