zhc4dev
赵玉瑞 2 years ago
parent 7367cd921d
commit eac1aba41e
  1. 6
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  2. 34
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  3. 14
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularForm.vue
  4. 29
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue
  5. 4
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal__Style#Drawer.vue
  6. 25
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
  7. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java

@ -225,6 +225,7 @@
importExcelUrl: "zyclothsstyle/zyClothsStyle/importExcel",
},
styleId:'',
dictOptions:{},
superFieldList:[],
}
@ -279,9 +280,10 @@
//
jumpPage5(record) {
this.$router.push({
path: '/process/ZyProcessList',
//path: '/process/ZyProcessList',
path: '/zystylemodular/ZyStyleModularList',
query: { //
'styleId': record.id,
'id': record.id,
}
});
},

@ -89,7 +89,7 @@
</a-table>
</div>
<zy-style-modular-modal ref="modalForm" @ok="modalFormOk"></zy-style-modular-modal>
<zy-style-modular-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-style-modular-modal>
</a-card>
</template>
@ -124,12 +124,12 @@
{
title:'款式id',
align:"center",
dataIndex: 'styleId'
dataIndex: 'styleId_dictText'
},
{
title:'工序id',
align:"center",
dataIndex: 'processId'
dataIndex: 'processId_dictText'
},
{
title: '操作',
@ -140,14 +140,14 @@
scopedSlots: { customRender: 'action' }
}
],
// url: {
// list: "/zyStyleModular/zyStyleModular/list",
// delete: "/zyStyleModular/zyStyleModular/delete",
// deleteBatch: "/zyStyleModular/zyStyleModular/deleteBatch",
// exportXlsUrl: "/zyStyleModular/zyStyleModular/exportXls",
// importExcelUrl: "zyStyleModular/zyStyleModular/importExcel",
//
// },
url: {
list: "/zyStyleModular/zyStyleModular/list",
delete: "/zyStyleModular/zyStyleModular/delete",
deleteBatch: "/zyStyleModular/zyStyleModular/deleteBatch",
exportXlsUrl: "/zyStyleModular/zyStyleModular/exportXls",
importExcelUrl: "zyStyleModular/zyStyleModular/importExcel",
},
dictOptions:{},
superFieldList:[],
}
@ -161,8 +161,20 @@
},
},
methods: {
loadParameter() {
if (this.loadRouteType === false) {
//this.id = this.$route.query.id;
this.styleId = this.$route.query.id;
console.log('********id对应的为款式style_id: '+this.styleId);
//console.log('******typeIdtypeId: '+this.typeId);
this.loadRouteType = true;
}
},
initDictConfig(){
},
valueChange(value){
if (value) this.loadData()
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:''})

@ -5,12 +5,16 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="款式id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<a-input v-model="model.styleId" placeholder="请输入款式id" ></a-input>
<!-- <a-input v-model="model.styleId" placeholder="请输入款式id" ></a-input>-->
<j-dict-select-tag v-model="model.styleId" placeholder="请选择款式"
dict-code="zy_cloths_style,style_names,id" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processId">
<a-input v-model="model.processId" placeholder="请输入工序id" ></a-input>
<!-- <a-input v-model="model.processId" placeholder="请输入工序id" ></a-input>-->
<j-dict-select-tag v-model="model.processId" placeholder="请选择款式"
dict-code="zy_process,process_name,id" />
</a-form-model-item>
</a-col>
</a-row>
@ -39,6 +43,7 @@
data () {
return {
model:{
styleId:'',
},
labelCol: {
xs: { span: 24 },
@ -68,8 +73,9 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
add1 (id) {
this.edit(this.modelDefault);
this.model.styleId = id;
},
edit (record) {
this.model = Object.assign({}, record);
@ -101,7 +107,7 @@
that.confirmLoading = false;
})
}
})
},
}

@ -9,12 +9,15 @@
@cancel="handleCancel"
cancelText="关闭">
<zy-style-modular-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-style-modular-form>
<zy-process-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit" ></zy-process-list>
</j-modal>
</template>
<script>
import ZyStyleModularForm from './ZyStyleModularForm'
import {postAction} from "../../../api/manage";
import ZyProcessList from "./ZyProcessList";
export default {
name: 'ZyStyleModularModal',
components: {
@ -22,14 +25,24 @@
},
data () {
return {
model:{
styleId:'',
processId:''
},
title:'',
width:800,
visible: false,
disableSubmit: false
disableSubmit: false,
url: {
add: "/zyStyleModular/zyStyleModular/add",
edit: "/zyStyleModular/zyStyleModular/edit",
queryById: "/zyStyleModular/zyStyleModular/queryById"
}
}
},
methods: {
add () {
this.model.styleId=this.$route.query.id;
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
@ -45,8 +58,20 @@
this.$emit('close');
this.visible = false;
},
chuancan(res){
this.model.processId=res;
},
handleOk () {
this.$refs.realForm.submitForm();
postAction(this.url.add,this.model).then((res)=>{
if(res.success){
this.$message.success(res.message);
}else{
this.$message.warning(res.message);
}
this.$emit('valueChange',1)
this.close()
})
},
submitCallback(){
this.$emit('ok');

@ -33,10 +33,10 @@
}
},
methods: {
add () {
add1 (id) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
this.$refs.realForm.add1(id);
})
},
edit (record) {

@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> {
@Autowired
private IZyStyleModularService zyStyleModularService;
/**
* 分页列表查询
*
@ -71,7 +71,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
IPage<ZyStyleModular> pageList = zyStyleModularService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -82,10 +82,21 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
@ApiOperation(value="款式工序表-添加", notes="款式工序表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyStyleModular zyStyleModular) {
zyStyleModularService.save(zyStyleModular);
String[] split = zyStyleModular.getProcessId().split(",");
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("style_id",zyStyleModular.getStyleId());
for (String s : split) {
zyStyleModular.setProcessId(s);
zyStyleModular.setId(null);
queryWrapper.eq("process_id",zyStyleModular.getProcessId());
int a=zyStyleModularService.count(queryWrapper);
if(a>=1)
return Result.error("存在以添加过的数据!!!");
zyStyleModularService.save(zyStyleModular);
}
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -99,7 +110,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
zyStyleModularService.updateById(zyStyleModular);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
@ -113,7 +124,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
zyStyleModularService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
@ -127,7 +138,7 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
this.zyStyleModularService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*

@ -57,9 +57,11 @@ public class ZyStyleModular implements Serializable {
/**款式id*/
@Excel(name = "款式id", width = 15)
@ApiModelProperty(value = "款式id")
@Dict(dictTable = "zy_cloths_style",dicText = "style_names",dicCode = "id")
private String styleId;
/**工序id*/
@Excel(name = "工序id", width = 15)
@ApiModelProperty(value = "工序id")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
}

Loading…
Cancel
Save