wente
2023-12-08 bc8ff037b8f01268a0a032d0ad8d503c48d5e9f8
web/src/views/modules/configItemChange/ConfigItemChange-AddOrUpdate.vue
@@ -1,14 +1,14 @@
<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">
             label-width="120px" class="configChangeFormAuto">
      <div>
        <el-form-item label-width="60px" label="编号:" style="width:100%;margin-bottom: -5px">
          <span>{{dataForm.configItemChange.code || '编号自动生成'}}</span>
        </el-form-item>
      </div>
      <div style="border: 1px solid rgba(0,0,0,.2);width: 99%">
        <div style="border-bottom: 1px solid rgba(0,0,0,.2);" class="warehouseContentWidth">
        <div style="border-bottom: 1px solid rgba(0,0,0,.2);" class="configChangeContentWidth">
          <el-form-item class="marginTopAndMarginBottom" label="项目编号" style="width: 49%">
            <el-input v-model="dataForm.project.code" placeholder="请输入项目编号"></el-input>
          </el-form-item>
@@ -16,12 +16,12 @@
            <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.configItemChange.applicant"
            <el-input :disabled="stepMarker!=='pzxbg_first'" v-model="dataForm.configItemChange.applicant"
                      placeholder="请输入申请人"></el-input>
          </el-form-item>
          <el-form-item label="申请日期" style="width: 49%">
            <el-date-picker
              :disabled="stepMarker!=='pzxrk_first'"
              :disabled="stepMarker!=='pzxbg_first'"
              v-model="dataForm.configItemChange.applyDate"
              type="date"
              placeholder="请选择申请日期">
@@ -31,9 +31,9 @@
            <zt-dict v-model="dataForm.configItemChange.libraryType" :radio="true" dict="library_type"></zt-dict>
          </el-form-item>
        </div>
        <div class="el-flexManageDialog el-border-bottom">
        <div class="el-configChangeDialog el-border-bottom">
          <div class="DFormWidth DAlign DHold">
            入库配置项
            变更申请配置项
          </div>
          <div class="el-border-left" style="width: calc(100% - 120px)">
            <div class="table-container">
@@ -93,24 +93,88 @@
                  </template>
                </el-table-column>
              </el-table>
              <div v-if="showAddAndEdit" class="icon-container">
                <el-dropdown @command="handleCommand">
                  <span class="el-dropdown-link">
                    <i class="el-icon-plus"></i>
                  </span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item v-for="item in menuOptions" :key="item.pageCode" :command="item.pageCode">
                      {{ item.name }}
                    </el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
              <div v-if="showAddAndEdit && !dataForm.disabled"  class="icon-container" @click="handleCommand">
                <!-- 放置固定的图标 -->
                <!-- <i class="el-icon-plus"></i>-->
                 <i class="el-icon-plus"></i>
              </div>
            </div>
          </div>
        </div>
        <div class="el-flexManageDialog el-border-bottom">
        <div class="el-configChangeDialog el-border-bottom">
          <div style="width: 120px;text-align: center;font-weight: 600">
            变更原因
          </div>
          <div class="el-border-left acceptDate" style="width: 90%;">
            <el-form-item style="width: 100%;padding-left:20px;margin:0;">
              <el-input v-model="dataForm.configItemChange.changeReason" placeholder="变更原因..."></el-input>
            </el-form-item>
          </div>
        </div>
        <div class="el-configChangeDialog el-border-bottom">
          <div style="width: 120px;text-align: center;font-weight: 600">
            变更影响分析
          </div>
          <div class="el-border-left acceptDate" style="width: 90%;">
            <el-form-item style="width: 100%;padding-left:20px;margin:0;">
              <el-input v-model="dataForm.configItemChange.changeAnalysis" placeholder="变更影响分析..."></el-input>
            </el-form-item>
          </div>
        </div>
        <div class="el-configChangeDialog el-border-bottom">
          <div style="width: 120px;text-align: center;font-weight: 600">
            变更内容
          </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=='pzxbg_cmcz'" type="textarea" :rows="2" placeholder="请输入内容"
                        v-model="dataForm.configItemChange.changeContent"></el-input>
              <span v-else>{{dataForm.configItemChange.changeContent}}</span>
            </el-form-item>
            <el-form-item label-width="80%" label="变更实施人:" style="width: 65%">
              <span>{{dataForm.configItemChange.implementer}}</span>
            </el-form-item>
            <el-form-item label="日期:" style="width: 20%">
              <span>{{dataForm.configItemChange.changeDate}}</span>
            </el-form-item>
          </div>
        </div>
        <div class="el-configChangeDialog el-border-bottom">
          <div class="DFormWidth DAlign DHold">
            批准意见
          </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!=='pzxbg_bmsh'" v-model="dataForm.configItemChange.approvalOpinions"
                       dict="is_pass" :radio="true"
                       clearable></zt-dict>
            </el-form-item>
            <el-form-item label-width="80%" label="签字:" style="width: 65%">
              <span>{{dataForm.configItemChange.approvalSign}}</span>
            </el-form-item>
            <el-form-item label="日期:" style="width: 20%">
              <span>{{dataForm.configItemChange.approvalDate}}</span>
            </el-form-item>
          </div>
        </div>
        <div class="el-configChangeDialog el-border-bottom">
          <div style="width: 120px;text-align: center;font-weight: 600">
            项目CM出库操作
          </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=='pzxbg_cmcz'" type="textarea" :rows="2" placeholder="请输入内容"
                        v-model="dataForm.configItemChange.outboundCmOperations"></el-input>
              <span v-else>{{dataForm.configItemChange.outboundCmOperations}}</span>
            </el-form-item>
            <el-form-item label-width="80%" label="操作人:" style="width: 65%">
              <span>{{dataForm.configItemChange.outboundOperator}}</span>
            </el-form-item>
            <el-form-item label="日期:" style="width: 20%">
              <span>{{dataForm.configItemChange.outboundOperateDate}}</span>
            </el-form-item>
          </div>
        </div>
        <div class="el-configChangeDialog el-border-bottom">
          <div class="DFormWidth DAlign DHold">
            项目QA审核
          </div>
@@ -122,21 +186,21 @@
              <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!=='pzxrk_qash'" v-model="scope.row.examineResult" placeholder="检查结果"
                  <zt-dict :disabled="stepMarker!=='pzxbg_qash'" v-model="scope.row.examineResult" placeholder="检查结果"
                           dict="tristate2" :radio="true"
                           clearable></zt-dict>
                </template>
              </el-table-column>
              <el-table-column align="center" width="120" label="不适用说明">
                <template v-slot="{ row }">
                  <el-input v-if="stepMarker=='pzxrk_qash'" v-model="row.notApplyExplan" placeholder="不适用说明"></el-input>
                  <el-input v-if="stepMarker=='pzxbg_qash'" v-model="row.notApplyExplan" placeholder="不适用说明"></el-input>
                  <span v-else>{{row.notApplyExplan}}</span>
                </template>
              </el-table-column>
            </el-table>
            <div class="el-border-top">
              <el-form-item label="审核结果" style="width: 99%">
                <zt-dict :disabled="stepMarker!=='pzxrk_qash'" v-model="dataForm.configItemChange.qaAuditResults"
                <zt-dict :disabled="stepMarker!=='pzxbg_qash'" v-model="dataForm.configItemChange.qaAuditResults"
                         dict="is_pass" :radio="true"
                         clearable></zt-dict>
              </el-form-item>
@@ -149,7 +213,7 @@
            </div>
          </div>
        </div>
        <div class="el-flexManageDialog el-border-bottom">
        <div class="el-configChangeDialog el-border-bottom">
          <div class="DFormWidth DAlign DHold">
            CM审核
          </div>
@@ -161,21 +225,21 @@
              <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!=='pzxrk_cmsh'" v-model="scope.row.examineResult" placeholder="检查结果"
                  <zt-dict :disabled="stepMarker!=='pzxbg_cmsh'" v-model="scope.row.examineResult" placeholder="检查结果"
                           dict="tristate2" :radio="true"
                           clearable></zt-dict>
                </template>
              </el-table-column>
              <el-table-column prop="notApplyExplan" align="center" width="120" label="不适用说明">
                <template v-slot="{ row }">
                  <el-input v-if="stepMarker=='pzxrk_cmsh'" v-model="row.notApplyExplan" placeholder="不适用说明"></el-input>
                  <el-input v-if="stepMarker=='pzxbg_cmsh'" v-model="row.notApplyExplan" placeholder="不适用说明"></el-input>
                  <span v-else>{{row.notApplyExplan}}</span>
                </template>
              </el-table-column>
            </el-table>
            <div class="el-border-top">
              <el-form-item label="审核结果" style="width: 99%">
                <zt-dict :disabled="stepMarker!=='pzxrk_cmsh'" v-model="dataForm.configItemChange.cmAuditResults"
                <zt-dict :disabled="stepMarker!=='pzxbg_cmsh'" v-model="dataForm.configItemChange.cmAuditResults"
                         placeholder="审核结果" dict="is_pass" :radio="true"
                         clearable></zt-dict>
              </el-form-item>
@@ -188,43 +252,26 @@
            </div>
          </div>
        </div>
        <div class="el-flexManageDialog el-border-bottom">
        <div class="el-configChangeDialog el-border-bottom">
          <div class="DFormWidth DAlign DHold">
            批准意见
          </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!=='pzxrk_bmsh'" v-model="dataForm.configItemChange.approvalOpinions"
                       dict="is_pass" :radio="true"
                       clearable></zt-dict>
            </el-form-item>
            <el-form-item label-width="80%" label="签字:" style="width: 65%">
              <span>{{dataForm.configItemChange.approvalSign}}</span>
            </el-form-item>
            <el-form-item label="日期:" style="width: 20%">
              <span>{{dataForm.configItemChange.approvalDate}}</span>
            </el-form-item>
          </div>
        </div>
        <div class="el-flexManageDialog el-border-bottom">
          <div class="DFormWidth DAlign DHold">
            项目CM操作
            项目CM入库操作
          </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=='pzxrk_cmcz'" type="textarea" :rows="2" placeholder="请输入内容"
                        v-model="dataForm.configItemChange.projectCmOperations"></el-input>
              <span v-else>{{dataForm.configItemChange.projectCmOperations}}</span>
              <el-input v-if="stepMarker=='pzxbg_cmcz'" type="textarea" :rows="2" placeholder="请输入内容"
                        v-model="dataForm.configItemChange.warehouseCmOperations"></el-input>
              <span v-else>{{dataForm.configItemChange.warehouseCmOperations}}</span>
            </el-form-item>
            <el-form-item label-width="80%" label="操作人:" style="width: 65%">
              <span>{{dataForm.configItemChange.operator}}</span>
              <span>{{dataForm.configItemChange.warehouseOperator}}</span>
            </el-form-item>
            <el-form-item label="日期:" style="width: 20%">
              <span>{{dataForm.configItemChange.operateDate}}</span>
              <span>{{dataForm.configItemChange.warehouseOperateDate}}</span>
            </el-form-item>
          </div>
        </div>
        <div class="el-flexManageDialog">
        <div class="el-configChangeDialog">
          <div class="DFormWidth DAlign DHold">
            备注
          </div>
@@ -237,12 +284,14 @@
        </div>
      </div>
      <add-or-update-check ref="addOrUpdate" @recall="setCheckId"/>
      <ConfigItemList ref="configItemList"></ConfigItemList>
    </el-form>
  </zt-dialog>
</template>
<script>
  import AddOrUpdateCheck from '../testCheckOrder/TestCheckOrder-AddOrUpdate'
  import ConfigItemList from './configItemList.vue'
  export default {
    data() {
@@ -271,15 +320,23 @@
            qaAuditResults: "",
            qaAuditor: "",
            qaAuditDate: "",
            changeReason:'',
            cmAuditResults: "",
            cmAuditor: "",
            cmAuditDate: "",
            approvalOpinions: "",
            approvalSign: "",
            approvalDate: "",
            projectCmOperations: "",
            operator: "",
            operateDate: "",
            changeAnalysis: "",
            changeContent: "",
            implementer: "",
            changeDate: "",
            outboundCmOperations: "",
            outboundOperator: "",
            outboundOperateDate: "",
            warehouseCmOperations: "",
            warehouseOperator: "",
            warehouseOperateDate: "",
            remark: "",
          },
          project: {
@@ -304,7 +361,8 @@
    },
    computed: {},
    components: {
      AddOrUpdateCheck
      AddOrUpdateCheck,
      ConfigItemList
    },
    methods: {
      indexFormat(index) {
@@ -323,7 +381,7 @@
        this.getInfo()
        if (!this.dataForm.disabled) {
          if (!row.stepMarker) {
            this.stepMarker = 'pzxrk_first'
            this.stepMarker = 'pzxbg_first'
            this.title = '入库申请'
          } else {
            this.title = row.stepName
@@ -339,18 +397,16 @@
      //     tableBody.scrollTop = tableBody.scrollHeight;
      //   })
      // },
      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, pageCode: selectedItem.pageCode})
        }
        this.$nextTick(() => {
          const tableBody = this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
          tableBody.scrollTop = tableBody.scrollHeight;
      handleCommand() {
        this.$nextTick(()=>{
          console.log(this.dataForm.projectId,'this.dataForm.projectId')
          this.$refs.configItemList.$refs.dialog.init(this.dataForm.projectId,this.dataForm.id)
        })
        // this.dataForm.configItemList.push({})
        // this.$nextTick(() => {
        //   const tableBody = this.$refs.tableConfigItemList.$el.querySelector('.el-table__body-wrapper')
        //   tableBody.scrollTop = tableBody.scrollHeight;
        // })
      },
      openCheckOrderWin(row) {
        console.log(row, "openCheckOrderWin(row)")
@@ -372,10 +428,10 @@
      // 获取信息
      async getInfo() {
        let params = {
          warehouseId: this.dataForm.id,
          changeId: this.dataForm.id,
          projectId: this.dataForm.projectId
        }
        let res = await this.$http.get(`/configItemChange/ConfigItemWarehouse/getDto`, {params: params})
        let res = await this.$http.get(`/configItemChange/ConfigItemChange/getDto`, {params: params})
        this.dataForm = {
          ...this.dataForm,
          ...res.data
@@ -405,13 +461,13 @@
        }
        if (submitType == 'tj' || submitType == 'bl') {
          let flowInfo = {
            flowCode: 'pzxrk',
            flowCode: 'pzxbg',
            stepIdMark: this.stepMarker,
            submitType: submitType
          }
          this.dataForm.flowInfoDto = flowInfo;
        }
        let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/configItemChange/ConfigItemWarehouse/', this.dataForm)
        let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/configItemChange/ConfigItemChange/', this.dataForm)
        if (res.success) {
          await this.$tip.success()
          this.$refs.dialog.close()
@@ -431,7 +487,7 @@
    border: 1px solid;
  }
  .el-flexManageDialog {
  .el-configChangeDialog {
    display: flex;
    align-items: center;
  }
@@ -487,20 +543,22 @@
    font-size: 14px;
  }
  .warehouseContentWidth > .el-form-item > .el-form-item__content {
  .configChangeContentWidth > .el-form-item > .el-form-item__content {
    width: calc(100% - 120px);
  }
  .warehouseContentWidth > .el-form-item.lastChild > .el-form-item__content {
  .configChangeContentWidth > .el-form-item.lastChild > .el-form-item__content {
    width: calc(100% - 142px);
  }
  .warehouseFormAuto .marginTopAndMarginBottom {
  .configChangeFormAuto .acceptDate > .el-form-item > .el-form-item__content {
    width: 100%;
  }
  .configChangeFormAuto .marginTopAndMarginBottom {
    margin-top: 10px !important;
    margin-bottom: 0 !important;
  }
  .warehouseFormAuto .marginTopAndMarginBottom2 {
  .configChangeFormAuto .marginTopAndMarginBottom2 {
    margin-top: -10px !important;
    margin-bottom: 0 !important;
  }