6
jinlin
2023-12-06 da4cb0bcbb9c35105afe449b31b3e2b03828d5d2
web/src/views/modules/configItemWarehouse/ConfigItemWarehouse-AddOrUpdate.vue
@@ -1,6 +1,7 @@
<template>
  <zt-dialog ref="dialog" column="3" :title="title" :stepMarker="stepMarker"  @confirm="formSubmit" >
    <el-form ref="dataForm" style="padding-top: 0" :inline="true" :disabled="dataForm.disabled" :model="dataForm" label-width="120px" class="warehouseFormAuto">
    <el-form ref="dataForm" style="padding-top: 0" :inline="true" :disabled="dataForm.disabled" :model="dataForm"
             label-width="120px" class="warehouseFormAuto">
      <div >
        <el-form-item label-width="60px" label="编号:" style="width:100%;margin-bottom: -5px">
          <span>{{dataForm.configItemWarehouse.code || '编号自动生成'}}</span>
@@ -15,7 +16,8 @@
          <el-input v-model="dataForm.project.softwareName" placeholder="请输入项目名称"></el-input>
        </el-form-item>
        <el-form-item label="申请人" style="width: 49%">
          <el-input :disabled="stepMarker=='pzxrk_first'"v-model="dataForm.configItemWarehouse.applicant" placeholder="请输入申请人"></el-input>
            <el-input :disabled="stepMarker=='pzxrk_first'" v-model="dataForm.configItemWarehouse.applicant"
                      placeholder="请输入申请人"></el-input>
        </el-form-item>
        <el-form-item label="申请日期" style="width: 49%">
          <el-date-picker
@@ -35,7 +37,8 @@
          </div>
          <div class="el-border-left" style="width: calc(100% - 120px)">
            <div class="table-container">
            <el-table ref="tableConfigItemList" class="el-software el-margin-top-bot" style="width: 99%;margin-left: 5px" border :data="dataForm.configItemList"
              <el-table ref="tableConfigItemList" class="el-software el-margin-top-bot"
                        style="width: 99%;margin-left: 5px" border :data="dataForm.configItemList"
                      stripe>
              <el-table-column prop="no" align="center" width="60" label="序号">
                <template slot-scope="scope">
@@ -77,7 +80,12 @@
              </el-table-column>
              <el-table-column fixed="right" label="管理" width="80" align="center">
                <template v-slot="{ row }">
                  <zt-table-button @click="">管理</zt-table-button>
                    <zt-table-button v-if="row.checkId"
                                     @click="openCheckOrderWin(row)">修改检查单
                    </zt-table-button>
                    <zt-table-button v-else-if="',软件测试计划,软件测试说明,软件测试记录,软件测试报告'.indexOf(row.itemName)>0"
                                     @click="openCheckOrderWin(row)">新增检查单
                    </zt-table-button>
<!--                  <table-uploader busi-type="config_item_warehouse" model-name="row" :dataForm="row"-->
<!--                                  v-model="row.files"/>-->
                </template>
@@ -89,12 +97,11 @@
                    <i class="el-icon-plus"></i>
                  </span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item v-for="item in menuOptions" :key="item.command" :command="item.command">
                    <el-dropdown-item v-for="item in menuOptions" :key="item.pageCode" :command="item.pageCode">
                      {{ item.name }}
                    </el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
                <!-- 放置固定的图标 -->
<!--                <i class="el-icon-plus"></i>-->
              </div>
@@ -106,13 +113,15 @@
            项目QA审核
          </div>
          <div class="el-border-left" style="width: calc(100% - 120px)">
            <el-table class="el-software el-margin-top-bot" style="width: 99%;margin-left: 5px"  border :data="dataForm.qaAuditList"
            <el-table class="el-software el-margin-top-bot" style="width: 99%;margin-left: 5px" border
                      :data="dataForm.qaAuditList"
                      stripe>
              <el-table-column prop="no" align="center" width="80" label="序号"></el-table-column>
              <el-table-column prop="examineItem" min-width="300" label="检查项"></el-table-column>
              <el-table-column label="检查结果" width="250" align="center">
                <template slot-scope="scope">
                  <zt-dict :disabled="stepMarker=='wplz_qash'" v-model="scope.row.examineResult" placeholder="检查结果" dict="tristate2" :radio="true"
                  <zt-dict :disabled="stepMarker=='wplz_qash'" v-model="scope.row.examineResult" placeholder="检查结果"
                           dict="tristate2" :radio="true"
                           clearable></zt-dict>
                </template>
              </el-table-column>
@@ -125,7 +134,8 @@
            </el-table>
            <div class="el-border-top">
            <el-form-item label="审核结果" style="width: 99%">
              <zt-dict :disabled="stepMarker=='wplz_qash'" v-model="dataForm.configItemWarehouse.qaAuditResults" dict="is_pass" :radio="true"
                <zt-dict :disabled="stepMarker=='wplz_qash'" v-model="dataForm.configItemWarehouse.qaAuditResults"
                         dict="is_pass" :radio="true"
                       clearable></zt-dict>
            </el-form-item>
            <el-form-item label="审核人:" style="width: 48%">
@@ -142,13 +152,15 @@
            CM审核
          </div>
          <div class="el-border-left" style="width: calc(100% - 120px)">
            <el-table class="el-software el-margin-top-bot" style="width: 99%;margin-left: 5px"  border :data="dataForm.cmAuditList"
            <el-table class="el-software el-margin-top-bot" style="width: 99%;margin-left: 5px" border
                      :data="dataForm.cmAuditList"
                      stripe>
              <el-table-column prop="no" align="center" width="80" label="序号"></el-table-column>
              <el-table-column prop="examineItem" min-width="300" label="检查项"></el-table-column>
              <el-table-column label="检查结果" width="250" align="center">
                <template slot-scope="scope">
                  <zt-dict :disabled="stepMarker=='wplz_cmsh'" v-model="scope.row.examineResult" placeholder="检查结果" dict="tristate2" :radio="true"
                  <zt-dict :disabled="stepMarker!=='wplz_cmsh'" v-model="scope.row.examineResult" placeholder="检查结果"
                           dict="tristate2" :radio="true"
                           clearable></zt-dict>
                </template>
              </el-table-column>
@@ -161,7 +173,8 @@
            </el-table>
            <div class="el-border-top">
              <el-form-item label="审核结果" style="width: 99%">
                <zt-dict :disabled="stepMarker=='wplz_cmsh'" v-model="dataForm.configItemWarehouse.cmAuditResults" placeholder="审核结果" dict="is_pass" :radio="true"
                <zt-dict :disabled="stepMarker=='wplz_cmsh'" v-model="dataForm.configItemWarehouse.cmAuditResults"
                         placeholder="审核结果" dict="is_pass" :radio="true"
                         clearable></zt-dict>
              </el-form-item>
              <el-form-item label="审核人:" style="width: 48%">
@@ -179,7 +192,8 @@
          </div>
          <div style="width: calc(100% - 120px)" class="el-border-left">
            <el-form-item class="el-wt-form-item-margin" label-width="20px" style="width: 85%">
              <zt-dict :disabled="stepMarker!=='wplz_bmsh'" v-model="dataForm.configItemWarehouse.approvalOpinions" dict="is_pass" :radio="true"
              <zt-dict :disabled="stepMarker!=='wplz_bmsh'" v-model="dataForm.configItemWarehouse.approvalOpinions"
                       dict="is_pass" :radio="true"
                       clearable></zt-dict>
            </el-form-item>
            <el-form-item label-width="80%" label="签字:" style="width: 65%">
@@ -196,7 +210,8 @@
          </div>
          <div style="width: calc(100% - 120px)" class="el-border-left">
            <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px">
              <el-input v-if="stepMarker=='wplz_cmcz'" type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input>
              <el-input v-if="stepMarker=='wplz_cmcz'" type="textarea" :rows="2" placeholder="请输入内容"
                        v-model="dataForm.configItemWarehouse.projectCmOperations"></el-input>
              <span v-else>{{dataForm.configItemWarehouse.projectCmOperations}}</span>
            </el-form-item>
            <el-form-item label-width="80%" label="操作人:" style="width: 65%">
@@ -213,16 +228,20 @@
          </div>
          <div style="width: calc(100% - 120px)" class="el-border-left">
            <el-form-item class="el-CMTextarea" style="width: 100%;padding: 5px">
              <el-input  type="textarea" :rows="2" placeholder="请输入内容" v-model="dataForm.configItemWarehouse.remark"></el-input>
              <el-input type="textarea" :rows="2" placeholder="请输入内容"
                        v-model="dataForm.configItemWarehouse.remark"></el-input>
            </el-form-item>
          </div>
        </div>
      </div>
      <add-or-update-check ref="addOrUpdate" @recall="setCheckId"/>
    </el-form>
  </zt-dialog>
</template>
<script>
  import AddOrUpdateCheck from '../testCheckOrder/TestCheckOrder-AddOrUpdate'
  export default {
    data() {
      return {
@@ -230,11 +249,11 @@
        stepMarker: '',
        title: '查看',
        menuOptions: [
          { command: 'a', name: '软件测试委托单' },
          { command: 'b', name: '软件需求规格说明' },
          { command: 'c', name: '软件设计说明' },
          { command: 'd', name: '软件研制任务书' },
          { command: 'e', name: '其他' }
          {pageCode: 'plan', name: '软件测试计划'},
          {pageCode: 'explain', name: '软件测试说明'},
          {pageCode: 'record', name: '软件测试记录'},
          {pageCode: 'report', name: '软件测试报告'},
          {pageCode: 'other', name: '其他'}
        ],
        dataForm: {
          id: '',
@@ -275,6 +294,9 @@
        return this.$store.state.user.roleName || ''
      },
    },
    components: {
      AddOrUpdateCheck
    },
    methods: {
      indexFormat(index){
        return index += 1
@@ -308,18 +330,24 @@
      //     tableBody.scrollTop = tableBody.scrollHeight;
      //   })
      // },
      handleCommand(command){
        const selectedItem = this.menuOptions.find(item => item.command === command);
        if (selectedItem.command === 'e') {
      handleCommand(pageCode) {
        const selectedItem = this.menuOptions.find(item => item.pageCode === pageCode);
        console.log(selectedItem,"handleCommand(pageCode) selectedItem")
        if (selectedItem.pageCode === 'other') {
          this.dataForm.configItemList.push({})
        }else if(selectedItem){
          this.dataForm.configItemList.push({itemName:selectedItem.name})
          this.dataForm.configItemList.push({itemName: selectedItem.name, pageCode: selectedItem.pageCode})
        }
        this.$nextTick(()=>{
          const tableBody=this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
          tableBody.scrollTop = tableBody.scrollHeight;
        })
      },
      openCheckOrderWin(row) {
          this.$refs.addOrUpdate.$refs.dialog.init(null, row)
      },
      setCheckId(checkId, row) {
        row.checkId = checkId
      },
      // 获取信息
      async getInfo() {
@@ -368,6 +396,7 @@
  width: 70%;
  margin: 0 auto;
}
.confirmDAuto{
  border: 1px solid;
}
@@ -393,20 +422,25 @@
.DManageForm> .el-form-item > .el-form-item__content {
  width: calc(100% - 120px);
}
.el-form-item.el-CMTextarea>.el-form-item__content{
  width: 100%;
}
.el-form .el-form-item.el-wt-form-item-margin{
  margin-left: 120px;
}
.el-form-border{
  border-top: 1px solid;
  border-bottom: 1px solid;
}
.el-margin-top-bot{
  margin-top:5px;
  margin-bottom:5px;
}
.zt .el-table.el-software th {
  background: transparent;
}
@@ -414,22 +448,28 @@
.zt .el-table.el-software th > .cell {
  font-weight: 500;
}
.DHold{
  font-weight: 600;
}
.zt .el-table.el-software{
  font-size: 14px;
}
.warehouseContentWidth > .el-form-item > .el-form-item__content {
  width: calc(100% - 120px);
}
.warehouseContentWidth > .el-form-item.lastChild > .el-form-item__content {
  width: calc(100% - 142px);
}
.warehouseFormAuto .marginTopAndMarginBottom {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}
.warehouseFormAuto .marginTopAndMarginBottom2 {
  margin-top: -10px !important;
  margin-bottom: 0 !important;