jinlin
2023-12-18 29fc8705dff6992e8f7278ec05fe2a327ce9e71b
web/src/views/modules/contractReview/ContractReview-AddOrUpdate.vue
@@ -31,19 +31,20 @@
              <el-table ref="tableConfigItemList" class="el-software el-margin-top-bot"
                        style="width: 99%;margin-left: 5px" border :data="dataForm.reviewItemList"
                        stripe>
                <el-table-column prop="no" align="center" width="60" label="序号">
                <el-table-column prop="no" align="center" width="60" >
                  <template slot-scope="scope">
                    <span v-html="indexFormat(scope.$index)"></span>
                  </template>
                </el-table-column>
                <el-table-column prop="item" min-width="400" label="配置项名称">
                <el-table-column prop="item" min-width="400" >
                  <template v-slot="{ row }">
                    <el-input v-model="row.item" placeholder="评审项"></el-input>
                  </template>
                </el-table-column>
                <el-table-column prop="result" label="密级" width="180" align="center">
                <el-table-column prop="result"  width="180" align="center">
                  <template v-slot="{ row }">
                    <zt-dict v-model="row.result" placeholder="评审结果" dict="tristate1"></zt-dict>
                    <zt-dict v-model="row.result" placeholder="评审结果" dict="tristate1" :radio="true"
                             clearable></zt-dict>
                  </template>
                </el-table-column>
              </el-table>
@@ -89,14 +90,19 @@
          </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="请输入内容"
              <el-input type="textarea" :rows="2" placeholder="请输入评审结论"
                        v-model="dataForm.contractReview.reviewConclusion"></el-input>
            </el-form-item>
            <el-form-item label="技术负责人:" style="width: 48%">
              <span>{{ dataForm.contractReview.technicalDirector }}</span>
              <el-input type="textarea" :rows="1" placeholder="请输入技术负责人"
                        v-model="dataForm.contractReview.technicalDirector"></el-input>
            </el-form-item>
            <el-form-item label="日期:" style="width: 48%">
            {{ dataForm.contractReview.reviewDate | filterTime('YYYY年MM月DD日') }}
              <el-date-picker
                v-model="dataForm.contractReview.reviewDate"
                type="date"
                placeholder="请选择日期">
              </el-date-picker>
            </el-form-item>
          </div>
        </div>
@@ -112,7 +118,12 @@
          </div>
        </div>
      </div>
      <add-or-update-check ref="addOrUpdate" @recall="setCheckId"/>
      <div class="el-flex order-sc" style="height: 60px">
        <el-form-item class="marginTopAndMarginBottom" style="width: 100%">
          <config-uploader :lineHeight="true" busi-type="contract_review" model-name="dataForm" :dataForm="dataForm"
                           v-model="dataForm.files"/>
        </el-form-item>
      </div>
    </el-form>
    <template v-slot:footer>
      <el-button v-if="dataForm.disabled" type="primary" @click="print()">打印</el-button>
@@ -130,6 +141,7 @@
    return {
      dataForm: {
        id: '',
        files:'',
        contractReview: {
          code: '',
          orderCode: '',
@@ -177,21 +189,22 @@
        ...this.dataForm,
        ...res.data
      }
      if(this.dataForm.contractReview === null){
        this.dataForm.contractReview={}
      }
      if(this.dataForm.testAgencyInfo === null){
        this.dataForm.testAgencyInfo={}
      }
      console.log(this.dataForm, "getInfo this.dataForm")
    },
    setCheckId(checkId, row) {
      console.log(checkId, row, "setCheckId(checkId, row)")
      this.$set(row, 'checkId', checkId)
    },
    /*async print(){
    async print(){
      var params = qs.stringify({
        token: Cookies.get('token'),
        id:this.dataForm.id
      })
      let apiURL = `/contractReview/ContractReview/exportWarehouseOrder`
      let apiURL = `/contractReview/ContractReview/exportReview`
      window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}`
    },*/
    },
    // 表单提交
    async formSubmit(submitType) {
      let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/contractReview/ContractReview/', this.dataForm)