jinlin
2024-01-02 a38a1ac77bb6ac9ea8bf0cf5f5f6b68d0e6e6974
web/src/views/modules/itemCirculatOrder/ItemCirculatOrder-AddOrUpdate.vue
@@ -4,7 +4,7 @@
             label-width="120px" class="circulationFormAuto">
      <div>
        <el-form-item label-width="60px" label="编号:" style="width:100%;margin-bottom: -5px">
          <span>{{dataForm.circulatOrder.code}}</span>
          <span>{{dataForm.circulatOrder.code || '编号自动生成'}}</span>
        </el-form-item>
      </div>
      <div style="border: 1px solid rgba(0,0,0,.2);width: 99%">
@@ -78,7 +78,6 @@
                </el-table-column>
                <el-table-column fixed="right" prop="files" label="上传附件" width="300" align="center">
                  <template v-slot="{ row }">
                    <!--                    <zt-table-button @click="files(row.id)">上传附件</zt-table-button>-->
                    <table-uploader busi-type="circulat_order" model-name="row" :dataForm="row"
                                    v-model="row.files"/>
                  </template>
@@ -98,11 +97,11 @@
          <div style="width: calc(100% - 120px);">
            <div class="el-border-left">
              <el-form-item label="物品是否需要返还" label-width="150px" style="width:100%;padding-left:20px;margin-bottom:0">
                <zt-dict v-model="dataForm.circulatOrder.itemRequire" :radio="true"
                <zt-dict :disabled="stepMarker!=='wplz_first'" v-model="dataForm.circulatOrder.itemRequire" :radio="true"
                         dict="is_or_not"></zt-dict>
              </el-form-item>
              <el-form-item label="物品的其他要求:" label-width="150px" style="width:100%;padding-left:20px;margin-bottom:0">
                <el-input v-model="dataForm.circulatOrder.itemOther"></el-input>
                <el-input :disabled="stepMarker!=='wplz_first'" v-model="dataForm.circulatOrder.itemOther"></el-input>
              </el-form-item>
            </div>
          </div>
@@ -121,7 +120,7 @@
          </div>
          <div class="el-border-left-right acceptDate" style="width: 20%;height: 80px;">
            <el-form-item style="width: 100%;padding-left:20px;margin:0;">
              {{dataForm.circulatOrder.acceptDate}}
              {{ dataForm.circulatOrder.acceptDate | filterTime('YYYY年MM月DD日') }}
            </el-form-item>
          </div>
          <div style="width: 84px;text-align: center;font-weight: 600">
@@ -129,10 +128,10 @@
          </div>
          <div class="el-border-left " style="width: 35%;height: 80px;">
            <el-form-item label="是否完成病毒查杀" label-width="150px" style="padding-left:20px;margin-bottom:0">
              <zt-dict v-model="dataForm.circulatOrder.acceptSituation" :radio="true" dict="is_or_not"></zt-dict>
              <zt-dict :disabled="stepMarker!=='wplz_first'" v-model="dataForm.circulatOrder.acceptSituation" :radio="true" dict="is_or_not"></zt-dict>
            </el-form-item>
            <el-form-item label="病毒库版本:" label-width="150px" style="width:100%;padding-left:20px;margin-bottom:0">
              <el-input v-model="dataForm.circulatOrder.virusLibraryVersion"></el-input>
              <el-input :disabled="stepMarker!=='wplz_first'" v-model="dataForm.circulatOrder.virusLibraryVersion"></el-input>
            </el-form-item>
          </div>
        </div>
@@ -176,7 +175,8 @@
          </div>
          <div class="el-border-left-right" style="width: 20%;height: 40px;">
            <el-form-item style="width: 100%;padding-left:20px;margin:0;">
              {{dataForm.circulatOrder.detectDate}}
<!--              {{dataForm.circulatOrder.detectDate}}-->
              {{ dataForm.circulatOrder.detectDate | filterTime('YYYY年MM月DD日') }}
            </el-form-item>
          </div>
          <div style="width: 84px;text-align: center;font-weight: 600">
@@ -184,7 +184,7 @@
          </div>
          <div class="el-border-left " style="width: 35%;height: 40px;">
            <el-form-item label="是否满足测试要求" label-width="150px" style="padding-left:20px;margin-bottom:0">
              <zt-dict v-model="dataForm.circulatOrder.detectSituation" :radio="true" dict="is_or_not"></zt-dict>
              <zt-dict :disabled="stepMarker!=='wplz_xzjc'" v-model="dataForm.circulatOrder.detectSituation" :radio="true" dict="is_or_not"></zt-dict>
            </el-form-item>
          </div>
        </div>
@@ -228,7 +228,8 @@
          </div>
          <div class="el-border-left-right " style="width: 20%;height: 40px;">
            <el-form-item style="width: 100%;padding-left:20px;margin:0;">
              {{dataForm.circulatOrder.issueDate}}
<!--              {{dataForm.circulatOrder.issueDate}}-->
              {{ dataForm.circulatOrder.issueDate | filterTime('YYYY年MM月DD日') }}
            </el-form-item>
          </div>
          <div style="width: 84px;text-align: center;font-weight: 600">
@@ -236,7 +237,7 @@
          </div>
          <div class="el-border-left " style="width: 35%;height: 40px;">
            <el-form-item label="是否完成样品发放" label-width="150px" style="padding-left:20px;margin-bottom:0">
              <zt-dict v-model="dataForm.circulatOrder.issueSituation" :radio="true" dict="is_or_not"></zt-dict>
              <zt-dict :disabled="stepMarker!=='wplz_wpff'"v-model="dataForm.circulatOrder.issueSituation" :radio="true" dict="is_or_not"></zt-dict>
            </el-form-item>
          </div>
        </div>
@@ -246,16 +247,22 @@
          </div>
          <div class="el-border-left " style="width: 20%;height: 40px">
            <el-form-item style="width: 100%;padding-left:20px;margin:0;">
              <el-input v-model="dataForm.circulatOrder.itemAcceptr"></el-input>
              <el-input v-model="dataForm.circulatOrder.remark"></el-input>
            </el-form-item>
          </div>
        </div>
      </div>
    </el-form>
    <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 {
@@ -295,17 +302,27 @@
        }
      }
    },
    computed:{
      getRoleName(){
        console.log(this.$store.state.user.roleName,'this.$store.state.user.roleName')
        return this.$store.state.user.roleName || ''
      },
    },
    methods: {
      indexFormat(index) {
        return index += 1
      },
      init(id, row) {
        console.log(id,row,'流转单的')
        if (id) {
          this.dataForm.id = id
        } else {
          this.dataForm.id = row.id
        }
        this.dataForm.projectId = row.projectId
        if(row.projectId){
          this.dataForm.projectId =row.projectId
        }
        // this.dataForm.disabled
        this.getInfo()
        if (!this.dataForm.disabled) {
@@ -337,8 +354,28 @@
          ...this.dataForm,
          ...res.data
        }
        if(this.dataForm.project === null){
          this.dataForm.project={}
        }
        if(this.dataForm.circulatOrder === null){
          this.dataForm.circulatOrder={}
        }
        if(this.dataForm.testAgencyInfo === null){
          this.dataForm.testAgencyInfo={}
        }
        if(this.dataForm.flowInfoDto === null){
          this.dataForm.flowInfoDto={}
        }
        console.log(this.dataForm, "getInfo this.dataForm")
      },
      async print(){
        var params = qs.stringify({
          token: Cookies.get('token'),
          id:this.dataForm.id
        })
        let apiURL = `/itemCirculatOrder/ItemCirculatOrder/exportCirculatOrder/`
        window.location.href = `${window.SITE_CONFIG['apiURL']}${apiURL}?${params}`
      },
      // 表单提交
      async formSubmit(submitType) {
        console.log(this.dataForm, "this.dataForm11111")