2022-11-14款式工序

zhc4dev
YTD 2 years ago
parent 7367cd921d
commit 619dea8f46
  1. 17
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyFabricList.vue
  2. 41
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  3. 258
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyProcessList.vue
  4. 35
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularModal.vue
  5. 11
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
  6. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java

@ -180,23 +180,6 @@
align:"center", align:"center",
dataIndex: 'retailPrice' dataIndex: 'retailPrice'
}, },
{
title:'品牌',
align:"center",
dataIndex: 'brandId_dictText'
},
{
title:'计量单位',
align:"center",
dataIndex: 'unit_dictText'
},
{
title:'密度',
align:"center",
dataIndex: 'density_dictText'
},
], ],
url: { url: {
list: "/fabric/zyFabric/list", list: "/fabric/zyFabric/list",

@ -68,28 +68,16 @@
</template> </template>
<span slot="action" slot-scope="text, record"> <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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span> </span>
</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>
@ -122,14 +110,14 @@
} }
}, },
{ {
title:'款式id', title:'款式',
align:"center", align:"center",
dataIndex: 'styleId' dataIndex: 'styleId_dictText'
}, },
{ {
title:'工序id', title:'工序',
align:"center", align:"center",
dataIndex: 'processId' dataIndex: 'processId_dictText'
}, },
{ {
title: '操作', title: '操作',
@ -140,14 +128,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:[],
} }
@ -163,6 +151,9 @@
methods: { methods: {
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:''})

@ -0,0 +1,258 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange1}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
},
data() {
return {
description: 'zy_process管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'processDescribe'
// },
{
title: '工序等级',
align: "center",
dataIndex: 'grade'
},
{
title: '工段代码',
align: "center",
dataIndex: 'worksectionCode'
},
],
url: {
list: "/base/zyProcess/list",
delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel",
},
//
loadRouteType: false,
styleId: "",
dictOptions: {},
superFieldList: [],
}
},
created() {
// queryParam.styleId=this.styleId
// this.getSuperFieldList();
this.loadParameter();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
add(){
},
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey',ids)
},
//
loadParameter() {
if (this.loadRouteType == false) {
this.styleId = this.$route.query.styleId;
console.log(this.styleId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.styleId = this.styleId;
return filterObj(param);
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''})
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''})
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''})
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''})
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''})
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''})
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''})
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''})
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'})
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''})
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''})
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''})
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''})
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'})
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''})
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'})
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''})
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''})
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''})
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''})
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''})
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -8,28 +8,39 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"> 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> </j-modal>
</template> </template>
<script> <script>
import {postAction} from "../../../api/manage";
import ZyStyleModularForm from './ZyStyleModularForm' import ZyProcessList from "./ZyProcessList";
export default { export default {
name: 'ZyStyleModularModal', name: 'ZyStyleModularModal',
components: { components: {
ZyStyleModularForm ZyProcessList,
}, },
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();
@ -44,9 +55,21 @@
close () { close () {
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');

@ -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