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

@ -89,7 +89,7 @@
</a-table> </a-table>
</div> </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> </a-card>
</template> </template>
@ -124,12 +124,12 @@
{ {
title:'款式id', title:'款式id',
align:"center", align:"center",
dataIndex: 'styleId' dataIndex: 'styleId_dictText'
}, },
{ {
title:'工序id', title:'工序id',
align:"center", align:"center",
dataIndex: 'processId' dataIndex: 'processId_dictText'
}, },
{ {
title: '操作', title: '操作',
@ -140,14 +140,14 @@
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
} }
], ],
// url: { url: {
// list: "/zyStyleModular/zyStyleModular/list", list: "/zyStyleModular/zyStyleModular/list",
// delete: "/zyStyleModular/zyStyleModular/delete", delete: "/zyStyleModular/zyStyleModular/delete",
// deleteBatch: "/zyStyleModular/zyStyleModular/deleteBatch", deleteBatch: "/zyStyleModular/zyStyleModular/deleteBatch",
// exportXlsUrl: "/zyStyleModular/zyStyleModular/exportXls", exportXlsUrl: "/zyStyleModular/zyStyleModular/exportXls",
// importExcelUrl: "zyStyleModular/zyStyleModular/importExcel", importExcelUrl: "zyStyleModular/zyStyleModular/importExcel",
//
// }, },
dictOptions:{}, dictOptions:{},
superFieldList:[], superFieldList:[],
} }
@ -161,8 +161,20 @@
}, },
}, },
methods: { 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(){ initDictConfig(){
}, },
valueChange(value){
if (value) this.loadData()
},
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:''}) fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:''})

@ -5,12 +5,16 @@
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="款式id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"> <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-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="工序id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processId"> <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-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -39,6 +43,7 @@
data () { data () {
return { return {
model:{ model:{
styleId:'',
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -68,8 +73,9 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
add () { add1 (id) {
this.edit(this.modelDefault); this.edit(this.modelDefault);
this.model.styleId = id;
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);

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

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

@ -82,7 +82,18 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
@ApiOperation(value="款式工序表-添加", notes="款式工序表-添加") @ApiOperation(value="款式工序表-添加", notes="款式工序表-添加")
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyStyleModular zyStyleModular) { public Result<?> add(@RequestBody ZyStyleModular 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); zyStyleModularService.save(zyStyleModular);
}
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }

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

Loading…
Cancel
Save