From 735916a9ac00b8ef1a1e0a548e7804a3ffef396a Mon Sep 17 00:00:00 2001
From: wente <329538422@qq.com>
Date: 星期五, 12 一月 2024 10:39:45 +0800
Subject: [PATCH] 项目表
---
web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue | 85 +++++++++++++++++++++++++++++++++---------
1 files changed, 67 insertions(+), 18 deletions(-)
diff --git a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue
index 84a6df9..ca05f56 100644
--- a/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue
+++ b/web/src/views/modules/project/SoftwareTestOrder-AddOrUpdate.vue
@@ -1,5 +1,5 @@
<template>
- <zt-dialog ref="dialog" column="2" @confirm="formSubmit">
+ <zt-dialog ref="dialog" column="2" @confirm="formSubmit" >
<el-form ref="form" :inline="true" :model="dataForm" :disabled="dataForm.disabled" label-width="93px"
class="weiTuoDanAuto" style="padding-top: 0">
<div class="DManageForm">
@@ -86,8 +86,8 @@
<div style="width:88px !important;" class="DWidth DAlign DHold">
琚祴浠跺強鍏朵粬鐩稿叧鐗╁搧娓呭崟
</div>
- <div style="width: calc(100% - 120px);padding: 5px">
- <el-table class="el-software" height="230" border :data="dataForm.measuredList"
+ <div class="table-container" style="width: calc(100% - 120px);padding: 5px">
+ <el-table ref="tableMeasuredList" class="el-software" border :data="dataForm.measuredList"
@cell-click="handleCellClick"
stripe>
<el-table-column prop="no" align="center" width="80" label="搴忓彿"/>
@@ -105,8 +105,18 @@
<zt-dict v-model="scope.row.isMeasured" dict="is_or_not" :radio="true"></zt-dict>
</template>
</el-table-column>
+ <el-table-column fixed="right" label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <zt-table-button @click="deleteMeasuredRow(scope.$index)">鍒犻櫎</zt-table-button>
+ </template>
+ </el-table-column>
</el-table>
+ <div v-if="!dataForm.disabled" class="icon-container" @click="addMeasuredRow()">
+ <!-- 鏀剧疆鍥哄畾鐨勫浘鏍� -->
+ <i class="el-icon-plus"></i>
+ </div>
</div>
+
</div>
<div class="el-flex" style="height: 40px;">
<div class="DWidth DAlign DHold">
@@ -130,7 +140,7 @@
<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.testBasis" :radio="true" dict="test_basis"
- clearable :inputName="dataForm.softwareTestOrder.otherBasis"></zt-dict>
+ clearable :inputName="dataForm.softwareTestOrder.otherBasis" origin="otherBasis" @getChangeInputData="getChangeInputData"></zt-dict>
</el-form-item>
</div>
</div>
@@ -156,6 +166,7 @@
<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"
+ origin="otherStandard" @getChangeInputData="getChangeInputData"
dict="test_standard" :inputName="dataForm.softwareTestOrder.otherStandard">
</zt-dict>
</el-form-item>
@@ -203,7 +214,7 @@
</div>
<div class="el-border-left testVenue" style="width: 98%">
<el-form-item style="width: 98%;padding-left:20px;margin:0;">
- <el-input v-model="dataForm.softwareTestOrder.testVenue" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�"></el-input>
+ <el-input v-model="dataForm.softwareTestOrder.testVenue" placeholder="璇疯緭鍏ユ祴璇曞満鍦�"></el-input>
</el-form-item>
</div>
</div>
@@ -214,7 +225,8 @@
<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="other_require"></zt-dict>
+ dict="is_or_not"></zt-dict>
+ <span>鍏朵粬:<el-input class="requireOther" v-model="dataForm.softwareTestOrder.requireOther"></el-input></span>
</el-form-item>
</div>
</div>
@@ -227,8 +239,8 @@
<div class="" style="width: 100%;">
<div class="el-flex " style="height: 40px">
<div style="width: 60%">
-<!-- <span>{{ dataForm.softwareTestOrder.entrustSign }}</span>-->
- <zt-select v-model="dataForm.softwareTestOrder.entrustSign" url="/sys/userEx/getUsersList" :multiple="true" :clearable="true" placeholder="濮旀墭鏂逛汉鍛�"/>
+ <span>{{ dataForm.softwareTestOrder.entrustSign }}</span>
+<!-- <zt-select v-model="dataForm.softwareTestOrder.entrustSign" url="/sys/userEx/getUsersList" :multiple="true" :clearable="true" placeholder="濮旀墭鏂逛汉鍛�"/>-->
</div>
<div class="el-flex" style="margin-left: 10%">
<el-date-picker
@@ -293,9 +305,10 @@
<div class="DWidth DAlign DHold">
鐗╁搧鎬ц川
</div>
- <div class="el-border-left" style="width: 15%">
- <el-form-item style="width: 98%;padding-left:20px;margin:0;">
+ <div class="el-border-left" style="width: 98%">
+ <el-form-item style="width: 20%;padding-left:20px;margin:0;">
<zt-dict v-model="dataForm.softwareTestOrder.articleNature" :radio="true"
+ origin="otherNature" @getChangeInputData="getChangeInputData"
dict="article_nature" :inputName="dataForm.softwareTestOrder.otherNature"></zt-dict>
</el-form-item>
</div>
@@ -315,13 +328,22 @@
<div style="width:88px !important;" class="DWidth DAlign DHold">
浜や粯鐗╂竻鍗�
</div>
- <div style="width: calc(100% - 120px);padding: 5px">
- <el-table class="el-software" height="100" border :data="dataForm.deliverableList"
+ <div class="table-container" style="width: calc(100% - 120px);padding: 5px">
+ <el-table ref="tableDeliverableList" class="el-software" border :data="dataForm.deliverableList"
stripe>
<el-table-column type="index" align="center" width="80" label="搴忓彿"/>
<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-column fixed="right" label="鎿嶄綔" align="center">
+ <template slot-scope="scope">
+ <zt-table-button @click="deleteDeliverableRow(scope.$index)">鍒犻櫎</zt-table-button>
+ </template>
+ </el-table-column>
</el-table>
+ <div v-if="!dataForm.disabled" class="icon-container" @click="addDeliverableRow()">
+ <!-- 鏀剧疆鍥哄畾鐨勫浘鏍� -->
+ <i class="el-icon-plus"></i>
+ </div>
</div>
</div>
</div>
@@ -373,7 +395,7 @@
<div class="" style="width: 100%;">
<div class="el-flex" style="height: 40px">
<div style="width: 60%">
- <zt-select v-model="dataForm.softwareTestOrder.contractSign" url="/sys/userEx/getUsersList" :multiple="true" :clearable="true" placeholder="鎵挎墭鏂逛汉鍛�"/>
+ <zt-select v-model="dataForm.softwareTestOrder.contractSign" url="/sys/userEx/getUsersList" placeholder="鎵挎墭鏂逛汉鍛�"/>
<!-- <span>{{ dataForm.contractSign }}</span>-->
</div>
<div class="el-flex" style="margin-left: 10%">
@@ -407,11 +429,8 @@
</div>
</div>
<div class="el-flex order-sc" style="height: 60px">
-<!-- <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"
+ <config-uploader :lineHeight="true" busi-type="test_order" model-name="dataForm" :dataForm="dataForm"
v-model="dataForm.files"/>
</el-form-item>
</div>
@@ -508,6 +527,12 @@
// this.inputName='q14eeff'
// }
// },
+ getChangeInputData(data,ogn){
+ // console.log(ogn)
+ this.$set(this.dataForm.softwareTestOrder, ogn, data);
+ console.log(this.dataForm.softwareTestOrder[ogn]);
+ // console.log(this.dataForm.softwareTestOrder[ogn])
+ },
handleCellClick(row, column) {
this.editingCell = {row, column}
this.$nextTick(() => {
@@ -559,6 +584,27 @@
}
}
// console.log(this.dataForm, "this.dataForm")
+ console.log(this.dataForm,"getInfo this.dataForm")
+ },
+ addDeliverableRow() {
+ this.dataForm.deliverableList.push({})
+ this.$nextTick(() => {
+ const tableBody = this.$refs.tableDeliverableList.$el.querySelector('.el-table__body-wrapper')
+ tableBody.scrollTop = tableBody.scrollHeight
+ })
+ },
+ deleteDeliverableRow(index){
+ this.dataForm.deliverableList.splice(index, 1)
+ },
+ addMeasuredRow() {
+ this.dataForm.measuredList.push({})
+ this.$nextTick(() => {
+ const tableBody = this.$refs.tableMeasuredList.$el.querySelector('.el-table__body-wrapper')
+ tableBody.scrollTop = tableBody.scrollHeight
+ })
+ },
+ deleteMeasuredRow(index){
+ this.dataForm.measuredList.splice(index, 1)
},
async print(){
var params = qs.stringify({
@@ -570,7 +616,7 @@
},
// 琛ㄥ崟鎻愪氦
async formSubmit() {
- console.log(this.dataForm, ' this.dataForm')
+ console.log(this.dataForm, 'formSubmit this.dataForm')
if(this.dataForm.softwareTestOrder.testType1){
this.dataForm.softwareTestOrder.testType1=this.dataForm.softwareTestOrder.testType1.join(',')
}
@@ -709,4 +755,7 @@
.test-type-line-height>.el-form-item>.el-form-item__content{
line-height: 30px;
}
+.requireOther.el-input{
+ position: absolute;
+}
</style>
--
Gitblit v1.9.1