From 4672d108e701bb4ff380ac9373504ee7cb85919b Mon Sep 17 00:00:00 2001 From: charles <981744753@qq.com> Date: 星期四, 11 七月 2024 14:44:48 +0800 Subject: [PATCH] feat:纤度登记表重构 --- src/views/productManage/silkRegisterForm/addPage.vue | 39 +++++++++++++++++++++++++++++++-------- 1 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/views/productManage/silkRegisterForm/addPage.vue b/src/views/productManage/silkRegisterForm/addPage.vue index 17c5680..0260ee3 100644 --- a/src/views/productManage/silkRegisterForm/addPage.vue +++ b/src/views/productManage/silkRegisterForm/addPage.vue @@ -171,8 +171,8 @@ @selTableCol="selTableCol"> </TableCommonView> --> <!-- 淇敼涓鸿緭鍏� --> - <CommonFormTableView - ref="commonFormTableView" + <FormTableView + ref="formTableView" :detail-enter="isView ? true : false" :selectBox="false" :detailEnter="true" @@ -181,7 +181,7 @@ :product-table-list="tableList" @inputContent="inputContent" @addProductClick="addProductClick" - ></CommonFormTableView> + ></FormTableView> </div> </div> <div class="body-r"> @@ -437,8 +437,9 @@ saveCheck } from "@/api/productManage/silkInspectForm.js"; import pageMixin from "@/components/makepager/pager/mixin/pageMixin"; -import CommonFormTableView from "@/components/makepager/CommonFormTableView"; +//import CommonFormTableView from "@/components/makepager/CommonFormTableView"; import { getWorkshopManageGroup } from "@/api/productManage/productRegisterForm.js"; +import FormTableView from '@/views/productManage/silkRegisterForm/components/FormTableView.vue'; import moment from 'moment'; let idValue=moment(new Date()).format('YYYYMMDDHHmmss'); export default { @@ -446,7 +447,7 @@ props: {}, mixins: [pageMixin], components: { - CommonFormTableView, + FormTableView, }, data() { return { @@ -795,13 +796,35 @@ }).then((res) => { if (res.code == 200) { this.tableData=[] - let data = res.data?JSON.parse(JSON.stringify(res.data)) : []; + const {startCarNumber,endCarNumber,startCarHalf,endCarHalf}=res.data; + for(let i=startCarNumber;i<=endCarNumber;i++){ + if(i===startCarNumber){ + if(startCarHalf===1){//宸﹀崐杞� + this.tableData.push({position:i,productId:Number(i)*2-1}); + this.tableData.push({position:i,productId:Number(i)*2}); + }else{//鍙冲崐杞� + this.tableData.push({position:i,productId:Number(i)*2-1}); + } + }else if(i===endCarNumber){ + if(endCarHalf===1){//宸﹀崐杞� + this.tableData.push({position:i,productId:Number(i)*2-1}); + this.tableData.push({position:i,productId:Number(i)*2}); + }else{//鍙冲崐杞� + this.tableData.push({position:i,productId:Number(i)*2-1}); + } + }else{ + this.tableData.push({position:i,productId:Number(i)*2-1}); + this.tableData.push({position:i,productId:Number(i)*2}); + } + } + /*let data = res.data?JSON.parse(JSON.stringify(res.data)) : []; if(Object.keys(data).length>0){ for(let i in data){ this.tableData.push({position:data[i],productId:Number(i)*2+1}) this.tableData.push({position:data[i],productId:Number(i)*2+2}) - } - } + } + }*/ + console.log(this.tableData); this.tableList.tableData = this.tableData }else{ this.tableData=[] -- Gitblit v1.8.0