From dea9682d0b8691585932bbed51a6bcaf34d8ab96 Mon Sep 17 00:00:00 2001 From: wente <329538422@qq.com> Date: 星期五, 17 十一月 2023 09:40:24 +0800 Subject: [PATCH] 项目表 --- web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue | 226 ++++++++++++++++++++++++++++++++------------------------ 1 files changed, 130 insertions(+), 96 deletions(-) diff --git a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue index 3a1c953..8ea3e84 100644 --- a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue +++ b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue @@ -1,10 +1,10 @@ <template> <zt-dialog ref="dialog" column="2" @confirm="formSubmit"> <el-form ref="form" :inline="true" :model="dataForm" :disabled="dataForm.disabled" label-width="120px" - class="weiTuoDanAuto"> + class="weiTuoDanAuto" style="padding-top: 0"> <div class="DManageForm"> - <el-form-item readonly label-width="60px" label="缂栧彿:" style="width: 99% ;margin-bottom:-5px"> - <span>{{ dataForm.project.code }}</span> + <el-form-item readonly label-width="50px" label="缂栧彿:" style="width: 99% ;margin-bottom:-5px"> + <span>{{ dataForm.softwareTestOrder.code}}</span> </el-form-item> </div> <div style="border: 1px solid rgba(0,0,0,.2)"> @@ -76,7 +76,7 @@ </el-form-item> <!-- 鑱旂郴浜� --> <el-form-item class="marginTopAndMarginBottom" label="杞欢鏍囪瘑" style="width: 49%"> - <el-input readonly v-model="dataForm.project.identity" placeholder="璇疯緭鍏ヨ蒋浠舵爣璇�"></el-input> + <el-input readonly v-model="dataForm.project.softwareIdentity" placeholder="璇疯緭鍏ヨ蒋浠舵爣璇�"></el-input> </el-form-item> <!-- 璇︾粏鍦板潃 --> <el-form-item label="瀵嗙骇" style="width: 49%"> @@ -102,15 +102,19 @@ 琚祴浠跺強鍏朵粬鐩稿叧鐗╁搧娓呭崟 </div> <div style="width: calc(100% - 120px);padding: 5px"> - <el-table class="el-software" height="230" border :data="dataForm.softwareTestOrderMeasuredList" + <el-table class="el-software" height="230" border :data="dataForm.measuredList" @cell-click="handleCellClick" stripe> - <el-table-column type="index" align="center" width="80" label="搴忓彿"/> - <el-table-column prop="dictLabel" min-width="300" label="鍚嶇О"></el-table-column> - <el-table-column align="center" width="180" label="鏍囪瘑/鐗堟湰"> + <el-table-column prop="no" align="center" width="80" label="搴忓彿"/> + <el-table-column min-width="300" label="鍚嶇О"> + <template slot-scope="scope"> + <span>{{ (dataForm.project.softwareName||'') + scope.row.name }}</span> + </template> + </el-table-column> + <el-table-column align="center" prop="identify" width="180" label="鏍囪瘑/鐗堟湰"> <template slot-scope="scope"> <span v-if="editingCell && editingCell.row === scope.row && editingCell.column.property === scope.column.property"> - <el-input ref="editInput" @change="changeExpireSituation(scope.row)" v-model="scope.row.identify" placeholder="鏍囪瘑/鐗堟湰"></el-input> + <el-input ref="editInput" v-model="scope.row.identify" placeholder="鏍囪瘑/鐗堟湰"></el-input> </span> <span v-else>{{ scope.row.identify }}</span> </template> @@ -118,10 +122,6 @@ <el-table-column label="鏄惁琚祴浠�" width="180" align="center"> <template slot-scope="scope"> <zt-dict v-model="scope.row.isMeasured" dict="is_or_not" :radio="true"></zt-dict> - <!-- <el-radio-group v-model="scope.row.isMeasured">--> - <!-- <el-radio :label="1">鏄�</el-radio>--> - <!-- <el-radio :label="0">鍚�</el-radio>--> - <!-- </el-radio-group>--> </template> </el-table-column> </el-table> @@ -133,11 +133,6 @@ </div> <div style="width: calc(100% - 120px)"> <zt-dict v-model="dataForm.project.softwareType" :radio="true" dict="software_type"></zt-dict> - <!-- <el-checkbox-group v-model="dataForm.checkList">--> - <!-- <el-checkbox :label="0">閫氱敤搴旂敤杞欢</el-checkbox>--> - <!-- <el-checkbox :label="1">琛屼笟搴旂敤杞欢</el-checkbox>--> - <!-- <el-checkbox :label="2">宓屽叆寮忚蒋浠�</el-checkbox>--> - <!-- </el-checkbox-group>--> </div> </div> </div> @@ -155,11 +150,6 @@ <el-form-item style="width: 20%;padding-left:5%;margin-bottom: 0"> <zt-dict v-model="dataForm.softwareTestOrder.testBasis" :radio="true" dict="test_basis" clearable></zt-dict> - <!-- <el-checkbox-group v-model="dataForm.checkList">--> - <!-- <el-checkbox :label="0">GB/T 25000.21-2016</el-checkbox>--> - <!-- <el-checkbox :label="1">GJB/Z 141-2004</el-checkbox>--> - <!-- <el-checkbox :label="2">鍏朵粬锛歿{dataForm.other}}</el-checkbox>--> - <!-- </el-checkbox-group>--> </el-form-item> </div> </div> @@ -167,12 +157,12 @@ <div class="DWidth DAlign DHold"> 娴嬭瘯绫诲瀷 </div> - <div class="el-border-left" style="width: 98%"> - <el-form-item style="width: 40%;padding-left:5%;"> + <div class="el-border-left test-type-line-height" style="width: 98%"> + <el-form-item style="width: 40%;padding-left:5%;margin-bottom: 0"> <zt-dict-checkbox v-model="dataForm.softwareTestOrder.testType1" column="2" dict="test_type1" clearable></zt-dict-checkbox> </el-form-item> - <el-form-item style="width: 60%;padding-left: 15%;border-left: 1px solid rgba(0,0,0,.2);"> + <el-form-item style="width: 60%;padding-left: 15%;border-left: 1px solid rgba(0,0,0,.2);margin-bottom: 0"> <zt-dict-checkbox v-model="dataForm.softwareTestOrder.testType2" dict="test_type2" clearable></zt-dict-checkbox> </el-form-item> @@ -184,15 +174,7 @@ </div> <div class="el-border-left" style="width: 98%"> <el-form-item style="width: 20%;padding-left:5%;margin-bottom: 0"> - <zt-dict v-model="dataForm.softwareTestOrder.testStandard" :radio="true" - dict="test_standard"></zt-dict> - <!-- <el-checkbox-group v-model="dataForm.checkList">--> - <!-- <el-checkbox :label="0">GJB 438B-2009銆婂啗鐢ㄨ蒋浠跺紑鍙戞枃妗i�氱敤瑕佹眰銆�</el-checkbox>--> - <!-- <el-checkbox :label="1">HJB 754-2017 銆婃捣鍐涘啗鐢ㄨ蒋浠跺畾鍨嬫祴璇勫ぇ绾茬紪鍒惰姹傘��</el-checkbox>--> - <!-- <el-checkbox :label="2">HJB 753-2017 銆婃捣鍐涘啗鐢ㄨ蒋浠跺畾鍨嬫祴璇勬姤鍛婄紪鍒惰姹傘��</el-checkbox>--> - <!-- <el-checkbox :label="3">銆婃捣鍐涜澶囪蒋浠舵祴璇曠粏鍒欍��</el-checkbox>--> - <!-- <el-checkbox :label="4">鍏朵粬锛歿{dataForm.other}}</el-checkbox>--> - <!-- </el-checkbox-group>--> + <zt-dict v-model="dataForm.softwareTestOrder.testStandard" :radio="true" dict="test_standard"></zt-dict> </el-form-item> </div> </div> @@ -202,11 +184,7 @@ </div> <div class="el-border-left" style="width: 98%"> <el-form-item style="padding-left:5%;margin-bottom:0"> - <zt-dict v-model="dataForm.project.testLevel" :radio="true" dict="test_level"></zt-dict> - <!-- <el-checkbox-group v-model="dataForm.checkList">--> - <!-- <el-checkbox :label="0">閰嶇疆椤规祴璇�</el-checkbox>--> - <!-- <el-checkbox :label="1">绯荤粺娴嬭瘯</el-checkbox>--> - <!-- </el-checkbox-group>--> + <zt-dict v-model="dataForm.softwareTestOrder.testLevel" :radio="true" dict="test_level"></zt-dict> </el-form-item> </div> </div> @@ -239,7 +217,7 @@ <div class="el-border-left" style="width: 98%;"> <el-form-item label="鏄惁鐩朇NAS绔�" label-width="130px" style="padding-left:5%;margin-bottom:0"> <zt-dict v-model="dataForm.softwareTestOrder.otherRequire" :radio="true" - dict="is_or_not"></zt-dict> + dict="other_require"></zt-dict> </el-form-item> </div> </div> @@ -277,7 +255,6 @@ 娴嬭瘯淇℃伅 </div> <div class="DOldForm el-border-left"> - <!-- 鍗曚綅鍚嶇О --> <el-form-item class="marginTopAndMarginBottom" label="娴嬭瘯鏃ユ湡" style="width: 49%"> <el-date-picker v-model="dataForm.softwareTestOrder.testDate" @@ -285,7 +262,6 @@ placeholder="娴嬭瘯鏃ユ湡"> </el-date-picker> </el-form-item> - <!-- 鑱旂郴浜� --> <el-form-item class="marginTopAndMarginBottom" label="浜や粯鏃ユ湡" style="width: 49%"> <el-date-picker v-model="dataForm.softwareTestOrder.deliveryDate" @@ -293,22 +269,12 @@ placeholder="浜や粯鏃ユ湡"> </el-date-picker> </el-form-item> - <!-- 璇︾粏鍦板潃 --> <el-form-item label="妫�娴嬭垂鐢�" style="width: 98%"> <el-input v-model="dataForm.softwareTestOrder.testCost" placeholder="璇疯緭鍏ユ娴嬭垂鐢�"></el-input> </el-form-item> - <!-- <zt-form-item label="淇濆瘑绾у埆" prop="secretClass" style="width: 25%">--> - <!-- <zt-dict v-model="datadataForm.secretClass" dict="secret_class" placeholder="淇濆瘑绾у埆" style="width:200px"></zt-dict>--> - <!-- </zt-form-item>--> - <!-- 鑱旂郴鏂瑰紡 --> <el-form-item class="el-border-bottom marginTopAndMarginBottom2" label="鐗╁搧鎬ц川" style="width: 100%"> <zt-dict v-model="dataForm.softwareTestOrder.articleNature" :radio="true" dict="article_nature"></zt-dict> - <!-- <el-radio-group v-model="dataForm.criticalLevel">--> - <!-- <el-radio :label="0">鐜板満妫�娴�</el-radio>--> - <!-- <el-radio :label="1">瀹㈡埛閫佹牱</el-radio>--> - <!-- <el-radio :label="2">鍏朵粬锛歿{dataForm.other}}</el-radio>--> - <!-- </el-radio-group>--> </el-form-item> <div class="el-flex el-border-bottom" style="margin-top: -10px;"> <div class="DWidth DAlign DHold"> @@ -318,10 +284,6 @@ <el-form-item label="鏄惁婊¤冻娴嬭瘯瑕佹眰:" label-width="160px" style="margin-bottom: 0"> <zt-dict v-model="dataForm.softwareTestOrder.sampleStatus" :radio="true" dict="is_satisfy"></zt-dict> - <!-- <el-radio-group v-model="dataForm.checkList">--> - <!-- <el-radio :label="0">鏄�</el-radio>--> - <!-- <el-radio :label="1">鍚�</el-radio>--> - <!-- </el-radio-group>--> </el-form-item> </div> </div> @@ -330,10 +292,10 @@ 浜や粯鐗╂竻鍗� </div> <div style="width: calc(100% - 120px);padding: 5px"> - <el-table class="el-software" height="230" border :data="dataForm.softwareTestOrderDeliverableList" + <el-table class="el-software" height="100" border :data="dataForm.deliverableList" stripe> <el-table-column type="index" align="center" width="80" label="搴忓彿"/> - <el-table-column prop="dictLabel" min-width="300" label="鍚嶇О"></el-table-column> + <el-table-column prop="name" min-width="300" label="鍚嶇О"></el-table-column> <el-table-column prop="identify" align="center" width="380" label="鏍囪瘑/鐗堟湰"></el-table-column> </el-table> </div> @@ -350,7 +312,7 @@ <el-input v-model="dataForm.testAgencyInfo.agencyName" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�"></el-input> </el-form-item> <!-- 鑱旂郴浜� --> - <el-form-item class="marginTopAndMarginBottom2" label-width="130px" label="鍦板潃" style="width: 98%"> + <el-form-item class="marginTopAndMarginBottom3" label-width="130px" label="鍦板潃" style="width: 98%"> <el-input v-model="dataForm.testAgencyInfo.site" placeholder="璇疯緭鍏ヨ仈绯讳汉"></el-input> </el-form-item> <!-- 璇︾粏鍦板潃 --> @@ -392,25 +354,14 @@ <span>{{ dataForm.write }}</span> </div> <div class="el-flex"> - <div style="width: 60px;text-align: center"> - {{ getYearMonDay(dataForm.softwareTestOrder.startDate).year }} - </div> - 骞� - <div style="width: 40px;text-align: center"> - {{ getYearMonDay(dataForm.softwareTestOrder.startDate).month }} - </div> - 鏈� - <div style="width: 40px;text-align: center"> - {{ getYearMonDay(dataForm.softwareTestOrder.startDate).day }} - </div> - 鏃� + {{ dataForm.softwareTestOrder.deliveryDate | filterTime('YYYY骞碝M鏈圖D鏃�') }} </div> </div> </div> </div> </div> </div> - <div class="el-flex"> + <div class="el-flex el-border-bottom"> <div class="DPadding3 DAlign DHold"> 璇存槑 </div> @@ -427,18 +378,27 @@ </div> </div> </div> + <div class="el-flex order-sc" style="height: 170px"> +<!-- <div class="DPadding3 DAlign DHold">--> +<!-- 濮旀墭鍗曚笂浼�--> +<!-- </div>--> + <el-form-item class="marginTopAndMarginBottom" style="width: 100%"> + <config-uploader busi-type="test_order" model-name="dataForm" :dataForm="dataForm" + v-model="dataForm.files"/> + </el-form-item> + </div> </div> </el-form> <template v-slot:footer> - <el-button perm="project:view" type="primary">鎵撳嵃</el-button> + <el-button v-if="dataForm.disabled" type="primary" @click="print()">鎵撳嵃</el-button> </template> </zt-dialog> </template> <script> -import {getYearMonDay} from '@/commonJS/common' - + import Cookies from 'js-cookie' + import qs from 'qs' export default { data() { return { @@ -446,8 +406,25 @@ editingCell:null, dataForm: { id: null, - testAgencyInfo: {}, projectId: null, + softwareTestOrder: { + code:'', + optEnviron:'', + programLang:'', + testBasis:'', + testType1:'', + testType2:'', + testStandard:'', + startDate:'', + endDate:'', + testVenue:'', + otherRequire:'', + testDate:'', + deliveryDate:'', + testCost:'', + articleNature:'', + sampleStatus:'', + }, project: { code: '', creator: '', @@ -460,7 +437,7 @@ entrustUnitContWay: '', entrustUnitContact: '', entrustUnitName: '', - identity: '', + softwareIdentity: '', isContract: '', projectLeader: '', projectReviewer: '', @@ -472,25 +449,22 @@ testLevel: '', }, - softwareTestOrder: {}, - softwareTestOrderDeliverableList: [], - softwareTestOrderMeasuredList: [], + testAgencyInfo: { + agencyName:'', + site:'', + businContact:'', + businComplaint:'', + laborContact:'', + labContactNum:'', + postalCode:'', + fax:'' + }, + deliverableList: [], + measuredList: [], } } }, - computed: { - getYear() { - return getYearMonDay(this.dataForm.softwareTestOrder.startDate).year - }, - getMon() { - return getYearMonDay(this.dataForm.softwareTestOrder.startDate).month - }, - getDay() { - return getYearMonDay(this.dataForm.softwareTestOrder.startDate).day - }, - }, methods: { - getYearMonDay, handleCellClick(row, column) { this.editingCell = {row, column} this.$nextTick(() => { @@ -500,29 +474,79 @@ }) console.log(this.editingCell, 'this.editingCell') }, + + init(id,row){ + this.dataForm.id = row.id + this.dataForm.projectId = row.projectId + // this.dataForm.disabled + this.getInfo() + console.log(this.dataForm.id,this.dataForm.projectId,'params params') + }, // 鑾峰彇淇℃伅 async getInfo() { let params = { orderId: this.dataForm.id, projectId: this.dataForm.projectId } + console.log(this.dataForm, "this.dataForm") let res = await this.$http.get(`/project/SoftwareTestOrder/getDto`, {params: params}) if (res.data) { this.dataForm = { + ...this.dataForm, ...res.data } + if(this.dataForm.softwareTestOrder){ + if(this.dataForm.softwareTestOrder.testType1){ + this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',') + console.log(this.dataForm.softwareTestOrder.testType1) + } + if(this.dataForm.softwareTestOrder.testType2){ + this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',') + console.log(this.dataForm.softwareTestOrder.testType2) + } + } + if(this.dataForm.project === null){ + this.dataForm.project={} + } + if(this.dataForm.softwareTestOrder === null){ + this.dataForm.softwareTestOrder={} + } + if(this.dataForm.testAgencyInfo === null){ + this.dataForm.testAgencyInfo={} + } } - - console.log(this.dataForm, "this.dataForm") + // console.log(this.dataForm, "this.dataForm") + }, + async print(){ + var params = qs.stringify({ + token: Cookies.get('token'), + id:this.dataForm.id + }) + let apiURL = `/project/SoftwareTestOrder/exportWord/` + window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}` }, // 琛ㄥ崟鎻愪氦 async formSubmit() { console.log(this.dataForm, ' this.dataForm') + if(this.dataForm.softwareTestOrder.testType1){ + this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.join(',') + } + if(this.dataForm.softwareTestOrder.testType2){ + this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.join(',') + } + console.log(this.dataForm.softwareTestOrder.testType1) let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/project/SoftwareTestOrder/', this.dataForm) if (res.success) { await this.$tip.success() this.$refs.dialog.close() this.$emit('refreshDataList') + }else{ + if(this.dataForm.softwareTestOrder.testType1){ + this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.split(',') + } + if(this.dataForm.softwareTestOrder.testType2){ + this.dataForm.softwareTestOrder.testType2=this.dataForm.softwareTestOrder.testType2.split(',') + } } } } @@ -536,6 +560,7 @@ .weiTuoDanAuto .el-radio { padding: 5px; + margin-right: 10px; } .zt .weiTuoDanAuto .el-form-item.el-form-item--default { @@ -617,8 +642,17 @@ margin-top: -10px !important; margin-bottom: 10px !important; } - +.weiTuoDanAuto .marginTopAndMarginBottom3 { + margin-top: 0 !important; + margin-bottom: 10px !important; +} .csjgxx > .el-form-item > .el-form-item__content { width: calc(100% - 130px); } +.order-sc > .el-form-item > .el-form-item__content { + width:100%; +} +.test-type-line-height>.el-form-item>.el-form-item__content{ + line-height: 30px; +} </style> -- Gitblit v1.9.1