From dcb6fddb6a6fd134d4dfd35956902af35c9df0ff Mon Sep 17 00:00:00 2001 From: wente <329538422@qq.com> Date: 星期三, 15 十一月 2023 11:21:05 +0800 Subject: [PATCH] 项目表 --- web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue | 102 ++++++++++++++++++++++++++++++++++---------------- 1 files changed, 69 insertions(+), 33 deletions(-) diff --git a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue index f499237..481bda5 100644 --- a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue +++ b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue @@ -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 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" 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> @@ -168,11 +172,11 @@ 娴嬭瘯绫诲瀷 </div> <div class="el-border-left" style="width: 98%"> - <el-form-item style="width: 40%;padding-left:5%;"> + <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> @@ -330,10 +334,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="230" 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 +354,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,7 +396,7 @@ <span>{{ dataForm.write }}</span> </div> <div class="el-flex"> - {{ dataForm.softwareTestOrder.updateDate | filterTime('YYYY骞碝M鏈圖D鏃�') }} + {{ dataForm.softwareTestOrder.deliveryDate | filterTime('YYYY骞碝M鏈圖D鏃�') }} </div> </div> </div> @@ -420,13 +424,12 @@ </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' export default { data() { @@ -435,8 +438,24 @@ editingCell:null, dataForm: { id: null, - testAgencyInfo: {}, projectId: null, + softwareTestOrder: { + optEnviron:'', + programLang:'', + testBasis:'', + testType1:'', + testType2:'', + testStandard:'', + startDate:'', + endDate:'', + testVenue:'', + otherRequire:'', + testDate:'', + deliveryDate:'', + testCost:'', + articleNature:'', + sampleStatus:'', + }, project: { code: '', creator: '', @@ -461,25 +480,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(() => { @@ -490,10 +506,12 @@ console.log(this.editingCell, 'this.editingCell') }, - init(data){ - this.dataForm.id = null - this.dataForm.projectId = data.id + 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() { @@ -501,15 +519,29 @@ 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.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(){ + let res = await this.$http.get(`/project/SoftwareTestOrder/exportWord/${this.dataForm.id}`) + console.log(res.data) + }, // 琛ㄥ崟鎻愪氦 async formSubmit() { console.log(this.dataForm, ' this.dataForm') @@ -531,6 +563,7 @@ .weiTuoDanAuto .el-radio { padding: 5px; + margin-right: 10px; } .zt .weiTuoDanAuto .el-form-item.el-form-item--default { @@ -612,7 +645,10 @@ 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); } -- Gitblit v1.9.1