From 41e0df8413624e6034c967f3afae30da59370879 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期一, 11 十二月 2023 16:20:15 +0800 Subject: [PATCH] modified: src/components/verifition/Verify/VerifyPoints.vue modified: src/const/crud/admin/sys-public-param.js modified: src/page/full-screen/fullScreenPlus.vue modified: src/page/index/logo.vue modified: src/page/index/sidebar/sidebarItem.vue modified: src/page/login/index.vue modified: src/page/login/thirdpartylogin.vue modified: src/util/elAttr.js modified: src/views/accounting/unitworkfactor/unitworkfactor-form.vue modified: src/views/accounting/unitworkfactor/updateQuota-form.vue modified: src/views/basic/discmaintenance/discmaintenance-form.vue modified: src/views/basic/log/index.vue modified: src/views/basic/part/part-form.vue modified: src/views/basic/part/print-label-form.vue modified: src/views/basic/poc/index.vue modified: src/views/basic/tabletest/index.vue modified: src/views/basic/template/index.vue modified: src/views/basic/template/template-form.vue modified: src/views/basic/workstation/workstation-form.vue modified: src/views/common/custom-table.vue modified: src/views/common/documentDetail.vue modified: src/views/common/operationParamTemplate.vue modified: src/views/common/rawMaterial-part.vue modified: src/views/common/search-select.vue modified: src/views/common/ztt-table.vue modified: src/views/huawei/code19bind/list.vue modified: src/views/huawei/code19gen/form.vue modified: src/views/huawei/grossweightcode/list.vue modified: src/views/huawei/grossweightcode/task-secret-form.vue modified: src/views/oa/JiegouModal.vue modified: src/views/oa/PeizhiModal.vue modified: src/views/oa/technology-document-new.vue modified: src/views/oa/technology-document.vue modified: src/views/plan/customer/index.vue modified: src/views/plan/customerorder/confirm-pull-customerorder.vue modified: src/views/plan/customerorder/customerorder-config-history.vue modified: src/views/plan/customerorder/customerorder-form.vue modified: src/views/plan/customerorder/customerorder-return.vue modified: src/views/plan/customerorder/customerorder-ztt-table.vue modified: src/views/plan/customerorder/index.vue modified: src/views/plan/customerorder/other-customer-order-line.vue modified: src/views/plan/customerorder/sample-customerorder-form.vue modified: src/views/plan/customerorder/schedule-table.vue modified: src/views/plan/manufacturingorder/auto-operationtask.vue modified: src/views/plan/manufacturingorder/customerorder.vue modified: src/views/plan/manufacturingorder/customize-param-template.vue modified: src/views/plan/manufacturingorder/order-operation-form.vue modified: src/views/plan/manufacturingorder/productorder-form.vue modified: src/views/plan/manufacturingorderapply/index.vue modified: src/views/plan/masterproductionschedule/auto-manufacturingorder.vue modified: src/views/plan/operationtask/gantt.vue modified: src/views/plan/operationtask/operationtask-form.vue modified: src/views/plan/operationtask/task-material.vue modified: src/views/plan/productionschedul/index.vue modified: src/views/plan/productionschedul/template-form.vue modified: src/views/plan/schedule/gantt.vue modified: src/views/plan/schedulelookover/ganttview.vue modified: src/views/plan/segmentmerge/index.vue modified: src/views/plan/segmentmerge/operate-dialog.vue modified: src/views/plan/segmentmerge/operation-technology-form.vue modified: src/views/product/dutyrecord/index.vue modified: src/views/product/producttraceability/index.vue modified: src/views/product/producttraceability/traceability-diagram.vue modified: src/views/product/workbench/batchproductout-form-new.vue modified: src/views/product/workbench/batchproductout-form.vue modified: src/views/product/workbench/feed-form.vue modified: src/views/product/workbench/feed-pane.vue modified: src/views/product/workbench/feed-tab.vue modified: src/views/product/workbench/handymantype.vue modified: src/views/product/workbench/index.vue modified: src/views/product/workbench/mould-pane.vue modified: src/views/product/workbench/operation-task-pane.vue modified: src/views/product/workbench/product-record-form.vue modified: src/views/product/workbench/productout-form-by-batch.vue modified: src/views/product/workbench/productout-form.vue modified: src/views/product/workbench/productrecord-tab.vue modified: src/views/product/workbench/producttracking-tab.vue modified: src/views/product/workbench/shift-productout-form.vue modified: src/views/product/workbench/splitTaskForm.vue modified: src/views/product/workbench/taskinfo-pane.vue modified: src/views/quality/Packaging_ledger/pack-from.vue modified: src/views/quality/apply/index.vue modified: src/views/quality/exception/exception.vue modified: src/views/quality/exception/index.vue modified: src/views/quality/finishedProductInspection/finishedProduct-form.vue modified: src/views/quality/finishedProductInspection/finishedProduct-print.vue modified: src/views/quality/finishedProductInspection/finishedProducter-print.vue modified: src/views/quality/finishedProductInspection/index.vue modified: src/views/quality/newReport/ReportForm.vue modified: src/views/quality/processInspect/index.vue modified: src/views/quality/processInspect/processInspect-form.vue modified: src/views/quality/processconfiguration/index.vue modified: src/views/quality/processconfiguration/table-form.vue modified: src/views/quality/rawMaterial/QrcodeReader.vue modified: src/views/quality/rawMaterial/index.vue modified: src/views/quality/rawMaterial/rawMaterial-form.vue modified: src/views/quality/report/index.vue modified: src/views/quality/standardbind/standardbind-form.vue modified: src/views/quality/statistics/rateChart.vue modified: src/views/quality/testitemlayout/index.vue modified: src/views/quality/testplan/testplan-form.vue modified: src/views/quality/unqualifiedprocess/examineApproveform.vue modified: src/views/quality/unqualifiedprocess/index.vue modified: src/views/quality/unqualifiedprocess/loaction-form.vue modified: src/views/quality/unqualifiedprocess/unqualifiedprocessform.vue modified: src/views/technology/completeproductstructure/completeproductstructure-form.vue modified: src/views/technology/document/checkStandardTable.vue modified: src/views/technology/document/document-form.vue modified: src/views/technology/document/extendsOperation.vue modified: src/views/technology/document/extendsTestStandard.vue modified: src/views/technology/document/extendsTestStandardParam.vue modified: src/views/technology/document/teststandard.vue modified: src/views/technology/structure/single-structure-form.vue modified: src/views/warehouse/changestock/index.vue modified: src/views/warehouse/check/check-detail.vue modified: src/views/warehouse/pallettransports/ifslocation-form.vue modified: src/views/warehouse/pallettransports/ifsstock-form.vue modified: src/views/warehouse/pallettransports/index.vue modified: src/views/warehouse/returnstock/ifslocation-form.vue modified: src/views/warehouse/returnstock/index.vue modified: src/views/warehouse/returnstock/returnstock-form.vue modified: src/views/warehouse/returnstock/stock-part.vue modified: src/views/warehouse/stock/print-label-form.vue modified: src/views/warehouse/stock/small-print-label-form.vue modified: src/views/warehouse/stock/small-warehousing-label-form.vue modified: src/views/warehouse/stock/stock-table.vue modified: src/views/warehouse/stock/warehousing-label-form.vue modified: src/views/zte/pkgidbind/index.vue --- src/views/technology/completeproductstructure/completeproductstructure-form.vue | 319 +++++++++++++++++++++++++++-------------------------- 1 files changed, 162 insertions(+), 157 deletions(-) diff --git a/src/views/technology/completeproductstructure/completeproductstructure-form.vue b/src/views/technology/completeproductstructure/completeproductstructure-form.vue index 760d492..93e1376 100644 --- a/src/views/technology/completeproductstructure/completeproductstructure-form.vue +++ b/src/views/technology/completeproductstructure/completeproductstructure-form.vue @@ -25,17 +25,17 @@ <el-row> <el-col :span="24"> <el-form-item label="BOM缂栧彿"> - <el-input v-model="treeForm.number" placeholder="BOM缂栧彿"> + <el-input v-model="treeForm.number" disabled placeholder="BOM缂栧彿"> </el-input> </el-form-item> <el-form-item label="闆朵欢鍙�" prop="partNo"> - <el-input v-model="treeForm.partNo" placeholder="闆朵欢" readonly> - <el-button + <el-input v-model="treeForm.partNo" placeholder="闆朵欢" disabled> + <!-- <el-button slot="append" icon="el-icon-search" @click="showProductStructure = true" - ></el-button> + ></el-button> --> </el-input> </el-form-item> @@ -75,32 +75,26 @@ </el-input> </el-form-item> - <el-form-item label="鏇夸唬鍙�" prop="alternativeNo"> + <!-- <el-form-item label="鏇夸唬鍙�" prop="alternativeNo"> <el-input v-model="treeForm.alternativeNo" placeholder="鏇夸唬鍙�" disabled > </el-input> - </el-form-item> + </el-form-item> --> - <el-form-item label="鏇夸唬鎻忚堪" prop="alternativeDesc"> + <!-- <el-form-item label="鏇夸唬鎻忚堪" prop="alternativeDesc"> <el-input v-model="treeForm.alternativeDesc" placeholder="鏇夸唬鎻忚堪" disabled > </el-input> - </el-form-item> + </el-form-item> --> - <el-form-item label="缁濈紭棰滆壊"> - <el-input - v-model="treeForm.insulationColor" - placeholder="缁濈紭棰滆壊" - > - </el-input> - </el-form-item> - <el-form-item label="鎶ゅ棰滆壊"> + <!-- --> + <!-- <el-form-item label="鎶ゅ棰滆壊"> <el-input v-model="treeForm.sheathColor" placeholder="鎶ゅ棰滆壊"> </el-input> </el-form-item> @@ -110,15 +104,33 @@ placeholder="鐗规��1" > </el-input> - </el-form-item> + </el-form-item> --> </el-col> </el-row> </el-form> </div> <div class="completeProductStructure-detail"> <div class="completeProductStructure-design"> - <div class="completeProductStructure-design-title">鏋勫缓BOM</div> + <div class="completeProductStructure-design-title">BOM</div> <el-table + class="tree-select-table" + ref="tableRef" + :data="tableData" + style="width: 100%;" + row-key="id" + border + height="720" + default-expand-all + @expand-change="expandChange" + :row-class-name="tableRowClassName" + > + <el-table-column label="闆朵欢缂栧彿" prop="partNo"></el-table-column> + <el-table-column label="闆朵欢鍚嶇О" prop="partName"></el-table-column> + <el-table-column label="鍗曚綅" prop="unit"></el-table-column> + <el-table-column label="鏁伴噺" prop="qpa"></el-table-column> + <!-- <el-table-column label="鐩樻暟" prop="discNum"></el-table-column> --> + </el-table> + <!-- <el-table class="tree-select-table" ref="tableRef" :data="tableData" @@ -155,10 +167,10 @@ </el-table-column> <el-table-column prop="operationName" label="娑堣�楀伐搴�"> </el-table-column> - </el-table> + </el-table> --> </div> - <div class="completeProductStructure-queryPreview"></div> - <div class="completeProductStructure-preview"> + <!-- <div class="completeProductStructure-queryPreview"></div> --> + <!-- <div class="completeProductStructure-preview"> <div class="completeProductStructure-preview-title">缁撴灉棰勮</div> <el-table :data="preViewData" @@ -200,7 +212,7 @@ <el-table-column prop="operationName" label="娑堣�楀伐搴�"> </el-table-column> </el-table> - </div> + </div> --> </div> </div> <productStructureDialog @@ -221,7 +233,8 @@ getPartAllStructureExt, addObj, getObj, - putObj + putObj, + updateObj } from '@/api/technology/completeproductstructure' import { remote } from '@/api/admin/dict' import productStructureDialog from '@/views/common/productstructure.vue' @@ -281,7 +294,6 @@ }, computed: { editable: function() { - console.log() if (!this.dataForm.id) { return true } @@ -322,27 +334,11 @@ if (this.dataForm.id) { getObj(this.dataForm.id).then((response) => { var resultData = response.data.data - this.treeForm.partId = resultData.partId - this.treeForm.partNo = resultData.partNo - this.treeForm.partName = resultData.partName - this.treeForm.number = resultData.number - this.treeForm.insulationColor = resultData.insulationColor - this.treeForm.sheathColor = resultData.sheathColor - this.treeForm.characteristicOne = resultData.characteristicOne - this.treeForm.version = resultData.version - this.treeForm.alternativeNo = resultData.alternativeNo - this.treeForm.alternativeDesc = resultData.alternativeDesc - this.treeForm.bomTypeDb = resultData.bomTypeDb + this.treeForm = resultData this.dataForm.state = resultData.state this.preViewData = [] this.preViewData.push(resultData.tree) - this.tableData = [] - getPartAllStructureExt(this.treeForm).then((res) => { - const result = res.data - if (result.code === 0) { - this.tableData.push(result.data) - } - }) + this.tableData = resultData.bomComponentVOS }) } else { this.initDefaultForm() @@ -395,110 +391,119 @@ } }, dataFormSubmit() { - const mapTree = (org) => { - const haveChildren = - Array.isArray(org.children) && org.children.length > 0 - return { - checked: org.checked, - compId: org.compId, - discNum: org.discNum || 1, - expand: org.expand, - id: org.id, - operationId: org.operationId, - operationName: org.operationName, - operationNo: org.operationNo, - originalQpa: org.originalQpa, - parentId: org.parentId, - partId: org.partId, - partName: org.partName, - partNo: org.partNo, - version: org.version, - alternativeNo: org.alternativeNo, - alternativeDesc: org.alternativeDesc, - qpa: org.qpa, - structureId: org.structureId, - unit: org.unit, - color: org.color, - planningMethod: org.planningMethod, - children: haveChildren ? org.children.map((i) => mapTree(i)) : [] - } + let data = this.treeForm + if(data.id != null){ + updateObj(data).then(res=>{ + this.$message.success("淇濆瓨鎴愬姛") + + }).catch(error=>{ + this.$message.error("淇濆瓨澶辫触") + }) } + // const mapTree = (org) => { + // const haveChildren = + // Array.isArray(org.children) && org.children.length > 0 + // return { + // checked: org.checked, + // compId: org.compId, + // discNum: org.discNum || 1, + // expand: org.expand, + // id: org.id, + // operationId: org.operationId, + // operationName: org.operationName, + // operationNo: org.operationNo, + // originalQpa: org.originalQpa, + // parentId: org.parentId, + // partId: org.partId, + // partName: org.partName, + // partNo: org.partNo, + // version: org.version, + // alternativeNo: org.alternativeNo, + // alternativeDesc: org.alternativeDesc, + // qpa: org.qpa, + // structureId: org.structureId, + // unit: org.unit, + // color: org.color, + // planningMethod: org.planningMethod, + // children: haveChildren ? org.children.map((i) => mapTree(i)) : [] + // } + // } - this.isSubmit = true - this.generateStructure() - if (this.preViewData != null && this.preViewData.length > 0) { - if (this.preViewData.length === 1) { - if (this.dataForm.id) { - var updateObj = {} - updateObj.id = this.dataForm.id - updateObj.partId = this.treeForm.partId - updateObj.number = this.treeForm.number - updateObj.insulationColor = this.treeForm.insulationColor - updateObj.sheathColor = this.treeForm.sheathColor - updateObj.characteristicOne = this.treeForm.characteristicOne - updateObj.version = this.treeForm.version - updateObj.alternativeNo = this.treeForm.alternativeNo - updateObj.alternativeDesc = this.treeForm.alternativeDesc - updateObj.bomTypeDb = this.treeForm.bomTypeDb + // this.isSubmit = true + // this.generateStructure() + // if (this.preViewData != null && this.preViewData.length > 0) { + // if (this.preViewData.length === 1) { + // if (this.dataForm.id) { + // var updateObj = {} + // updateObj.id = this.dataForm.id + // updateObj.partId = this.treeForm.partId + // updateObj.number = this.treeForm.number + // updateObj.insulationColor = this.treeForm.insulationColor + // updateObj.sheathColor = this.treeForm.sheathColor + // updateObj.characteristicOne = this.treeForm.characteristicOne + // updateObj.version = this.treeForm.version + // updateObj.alternativeNo = this.treeForm.alternativeNo + // updateObj.alternativeDesc = this.treeForm.alternativeDesc + // updateObj.bomTypeDb = this.treeForm.bomTypeDb - // const tree = this.preViewData[0]; - const gxqTree = this.preViewData.map((org) => mapTree(org)) - // this.setDefaultDiscNum(gxqTree); - updateObj.tree = gxqTree[0] - putObj(updateObj) - .then((response) => { - var data = response.data - if (data.code === 0) { - this.$message.success('淇敼鎴愬姛') - } else { - this.$message.error('淇敼澶辫触') - } - this.isSubmit = false - }) - .catch((error) => { - this.isSubmit = false - console.log(error) - }) - } else { - var newObj = {} - newObj.id = null - newObj.partId = this.treeForm.partId - newObj.number = this.treeForm.number - newObj.insulationColor = this.treeForm.insulationColor - newObj.sheathColor = this.treeForm.sheathColor - newObj.characteristicOne = this.treeForm.characteristicOne - newObj.version = this.treeForm.version - newObj.alternativeNo = this.treeForm.alternativeNo - newObj.alternativeDesc = this.treeForm.alternativeDesc - newObj.bomTypeDb = this.treeForm.bomTypeDb - const gxqTree = this.preViewData.map((org) => mapTree(org)) + // // const tree = this.preViewData[0]; + // const gxqTree = this.preViewData.map((org) => mapTree(org)) + // // this.setDefaultDiscNum(gxqTree); + // updateObj.tree = gxqTree[0] + // putObj(updateObj) + // .then((response) => { + // var data = response.data + // if (data.code === 0) { + // this.$message.success('淇敼鎴愬姛') + // } else { + // this.$message.error('淇敼澶辫触') + // } + // this.isSubmit = false + // }) + // .catch((error) => { + // this.isSubmit = false + // console.log(error) + // }) + // } else { + // var newObj = {} + // newObj.id = null + // newObj.partId = this.treeForm.partId + // newObj.number = this.treeForm.number + // newObj.insulationColor = this.treeForm.insulationColor + // newObj.sheathColor = this.treeForm.sheathColor + // newObj.characteristicOne = this.treeForm.characteristicOne + // newObj.version = this.treeForm.version + // newObj.alternativeNo = this.treeForm.alternativeNo + // newObj.alternativeDesc = this.treeForm.alternativeDesc + // newObj.bomTypeDb = this.treeForm.bomTypeDb + // const gxqTree = this.preViewData.map((org) => mapTree(org)) - newObj.tree = gxqTree[0] - addObj(newObj) - .then((response) => { - var data = response.data - if (data.code === 0) { - this.dataForm.id = data.data.id - this.treeForm.number = data.data.number - this.$message.success('淇濆瓨鎴愬姛') - } else { - this.$message.error('淇濆瓨澶辫触') - } - this.isSubmit = false - }) - .catch((error) => { - this.isSubmit = false - console.log(error) - }) - } - } else { - this.isSubmit = false - this.$message.error('瀛樺湪澶氫釜鏍硅妭鐐癸紝鏃犳硶杩涜淇濆瓨') - } - } else { - this.isSubmit = false - this.$message.error('璇峰厛鏋勫缓BOM锛屽啀杩涜淇濆瓨') - } + // newObj.tree = gxqTree[0] + // addObj(newObj) + // .then((response) => { + // var data = response.data + // if (data.code === 0) { + // this.dataForm.id = data.data.id + // this.treeForm.number = data.data.number + // this.$message.success('淇濆瓨鎴愬姛') + // } else { + // this.$message.error('淇濆瓨澶辫触') + // } + // this.isSubmit = false + // }) + // .catch((error) => { + // this.isSubmit = false + // console.log(error) + // }) + // } + // } else { + // this.isSubmit = false + // this.$message.error('瀛樺湪澶氫釜鏍硅妭鐐癸紝鏃犳硶杩涜淇濆瓨') + // } + // } else { + // this.isSubmit = false + // this.$message.error('璇峰厛鏋勫缓BOM锛屽啀杩涜淇濆瓨') + // } }, // 鐢熸垚鏈�缁堢殑缁撴瀯 generateStructure() { @@ -924,19 +929,19 @@ } }, bomTypeDbChange(e) { - if (e) { - this.before = this.treeForm.bomTypeDb - } else { - if (this.before !== this.treeForm.bomTypeDb) { - this.treeForm.partId = null - this.treeForm.partNo = null - this.treeForm.partName = null - this.treeForm.version = null - this.treeForm.alternativeNo = null - this.treeForm.alternativeDesc = null - this.tableData = [] - } - } + // if (e) { + // this.before = this.treeForm.bomTypeDb + // } else { + // if (this.before !== this.treeForm.bomTypeDb) { + // this.treeForm.partId = null + // this.treeForm.partNo = null + // this.treeForm.partName = null + // this.treeForm.version = null + // this.treeForm.alternativeNo = null + // this.treeForm.alternativeDesc = null + // this.tableData = [] + // } + // } }, // table璁剧疆琛屾牱寮� tableRowClassName({ row, rowIndex }) { @@ -989,7 +994,7 @@ .completeProductStructure-design { float: left; - width: 48%; + width: 100%; height: 800px; padding: 10px 20px; border: 1px solid #ddd; @@ -1026,7 +1031,7 @@ color: #006eff; } .forbid-row .cell { - color: #c0c4cc; + color: #000; } .tree-select-table th.gutter { -- Gitblit v1.9.3