jinlin
2023-12-12 b89ff3ae8af0424292bd7c2674f1e0e01c315a6e
web/src/views/modules/testCheckOrder/TestCheckOrder-AddOrUpdate.vue
@@ -30,7 +30,7 @@
        </div>
        <div style="border-bottom: 1px solid rgba(0,0,0,.2);">
          <div style="padding-left:5px;padding-right:5px;">
            <div style="padding: 5px">{{subtitle}}</div>
            <div style="padding: 5px">检查项目:{{subtitle}}</div>
            <div class="table-container">
              <el-table ref="tableCirculatOrderList" class="el-software el-margin-top-bot" border
                        :data="dataForm.checkOrderList"
@@ -115,10 +115,16 @@
    <template v-slot:footer>
      <el-button v-if="dataForm.disabled" type="primary" @click="print()">打印</el-button>
    </template>
    <template v-slot:footer>
      <el-button v-if="dataForm.disabled" type="primary" @click="print()">打印</el-button>
    </template>
  </zt-dialog>
</template>
<script>
  import qs from "qs";
  import Cookies from "js-cookie";
  export default {
    data() {
      return {
@@ -148,14 +154,19 @@
    },
    methods: {
      init(id, row) {
        console.log(row,'TestCheckOrder-AddOrUpdate.vue init row')
        this.configDetailRow = row
        if (row.checkId) {
          console.log('配置项入库审核进来的 TestCheckOrder-AddOrUpdate.vue init row.checkId')
          if (row.checkId != -1) {
            console.log('TestCheckOrder-AddOrUpdate.vue init row.checkId!=-1')
            this.dataForm.id = row.checkId
          }
        } else if (id) {
          console.log(this.dataForm,'从检查单进来的 TestCheckOrder-AddOrUpdate.vue init this.dataForm')
          this.dataForm.id = id
        } else {
          console.log(this.dataForm,'从检查单进来的 TestCheckOrder-AddOrUpdate.vue init this.dataForm')
          this.dataForm.id = row.id
        }
        this.pageCode = row.pageCode
@@ -197,6 +208,15 @@
        }
        console.log(this.dataForm,'this.dataForm this.dataForm')
      },
      async print(){
        var params = qs.stringify({
          token: Cookies.get('token'),
          id:this.dataForm.id,
          pageCode: this.pageCode
        })
        let apiURL = `/testCheckOrder/TestCheckOrder/exportCheckOrder`
        window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}`
      },
      // 表单提交
      async formSubmit(submitType) {
        let isFlow = false