receipt-storage3.vue 14.4 KB
<template>
<div class="container resource" style="min-height: 746px;">
      <div class="pop-banner clearfix">{{dual}}
        <div class="operate-btns">
       <a href="javascript:void(0)" class="fbtn fb-add" @click="save" v-if="authoritySetting.threeSaveFlag">保存</a>

       <a href="javascript:void(0)" class="fbtn fb-add" @click="save" v-if="authoritySetting.threeReviewedFlag">评价完成</a>

    </div>
       <h3 class="current-module">供应商评价</h3>
      </div>
      <!--start-->
      <div class="purchase-storage clearfix">
        <div class="evaluation-box">
         <div class="evaluation-item">
          <div class="evaluation-tit">供货质量评价:
           <em>{{distributorReceptEvaluate.supplyQqualityEvaluation}}</em>
            </div>
           <div class="checkbox-control checkbox-block" >
           <input type="checkbox" name="cb" id="cball"  v-model="distributorReceptEvaluate.qualified" checked="checked1"> 
           <label class="checkbox" for="cball">合格</label>

           <input type="checkbox" name="cb" id="cbal2" v-model="distributorReceptEvaluate.appearanceDamage"  checked="checked2">
            <label class="checkbox" for="cbal2">外观破损</label>

            <input type="checkbox" name="cb" id="cbal3"   v-model="distributorReceptEvaluate.barCodeInforIsIncorrect" checked="checked3">
            <label class="checkbox" for="cbal3">条形码信息有误</label>

        <input type="checkbox" name="cb" id="cbal4" v-model="distributorReceptEvaluate.productionLotBatchNumberExpirationDateError"  checked="checked4">
              <label class="checkbox" for="cbal4">生产批号/灭菌批号/失效日期信息错误</label>

         <input type="checkbox" name="cb" id="cbal5"  v-model="distributorReceptEvaluate.productDamage"  checked="checked5">
              <label class="checkbox" for="cbal5">产品损毁</label>

          <input type="checkbox" name="cb" id="cbal6"   v-model="distributorReceptEvaluate.distributionNotInConformityWithTheGoods"  checked="checked6">
              <label class="checkbox" for="cbal6">配送单与货物不符</label>
            </div>
          </div>

          <div class="evaluation-item">
            <div class="evaluation-tit"    >证照完整率:
              <em>{{distributorReceptEvaluate.rateOfCompleteLicense}}%</em>
            </div>
            
            <div class="checkbox-control checkbox-block">
              <label>企业资料完整率{{distributorReceptEvaluate.enterpriseDataIntegrityOnehandround}}%</label>

              <label>商品资料完整率{{distributorReceptEvaluate.commodityDataIntegrityNinety}}%</label>

              <label class="text-color-red">产品注册证资料完整率{{distributorReceptEvaluate.productRegistrationcard}}%</label>

              <label class="text-color-red">生产厂商资料完整率{{distributorReceptEvaluate.manufacturerDataIntegrityThirty}}%</label>
              <label>代理商资料完整率{{distributorReceptEvaluate.agentDataIntegrityNinety}}%</label>

              <label>售后服务机构资料完整率{{distributorReceptEvaluate.serviceOrganizationDataIntegrityFifty}}%</label>

              <label>经销授权书资料完整率{{distributorReceptEvaluate.distributionAuthorityDataIntegrityTwenty}}%</label>

              <label>物价资料完整率{{distributorReceptEvaluate.priceDataIntegrityEighty}}%</label>

              <label>产品说明书完整率{{distributorReceptEvaluate.productSpecificationCompleteRateOnehandround}}%</label>

              <label>合规文件完整率{{distributorReceptEvaluate.complianceFileIntegrityOnehandround}}%</label>
            </div>
          </div>
          <div class="evaluation-item">
            <div class="evaluation-tit">供应及时率评价:
              <em>{{distributorReceptEvaluate.supplyIimelyRateEvaluation}}</em>
            </div>
            <div class="checkbox-control checkbox-block">
              <input type="checkbox" name="cb" id="cbal" v-model="distributorReceptEvaluate.withinTwentyfourHours" >
              <label class="checkbox" for="cbal">24小时以内</label>

              <input type="checkbox" name="cb" id="cba2" v-model="distributorReceptEvaluate.betweenTwentyfourToSeventytwoHours">
              <label class="checkbox" for="cba2">24~72小时</label>

              <input type="checkbox" name="cb" id="cba3" v-model="distributorReceptEvaluate.betweenSeventytwoToOnehandroundtwentyHours">
              <label class="checkbox" for="cba3">72~120小时</label>

              <input type="checkbox" name="cb" id="cba4" v-model="distributorReceptEvaluate.morethanOnehandroundtwentyHours">
              <label class="checkbox" for="cba4">120小时以上</label>
            </div>
          </div>
          <div class="evaluation-score clearfix">
            <span>当前评价得分:
              <em>{{distributorReceptEvaluate.comprehensiveEvaluationScore }}</em>
            </span>
          </div>
        </div>
      </div>
     
    </div>
</template>
 

<script>
module.exports={
  data: function(){
    return {
   billCategory:{},
distributorReceptEvaluate:{},
 checked1:'',
 checked2:'',
 checked3:'',
 checked4:'',
 checked5:'',
 checked6:'',

 checked: [{
        value: "1",
        label: "合格"
      }, {
        value: "0",
        label: "不合格"
      }],
// distrbutorwarehouseGoodsList :[],
      /*searchList: [],*/
  search: {
      pageSize: 5,
      page: 1,
      totalPages: 0,
      search_EQ_distrbguid:'',
  },
  authoritySetting: {
      threeSaveFlag:false,
      threeReviewedFlag:false,
  },
 };
},
  computed: {
      dual: function () {
        var self = this;
        var curMenuRole = this.$store.state.user.curMenuRole;
        self.search.search_EQ_distrbguid = this.$store.state.user.curUser.distrbguid;
        
        if (self.search.search_EQ_distrbguid!=undefined && self.search.search_EQ_distrbguid!=null) {
           self.getData();
        if (curMenuRole!=undefined && curMenuRole!=null) {
            for (var i=0;i<curMenuRole.length;i++) {
                if(curMenuRole[i].menu != null) {
                    if (curMenuRole[i].menu.name.trim() == '入库收货') {
                        for (var j=0;j<curMenuRole[i].buttonList.length;j++) {
                             var name = curMenuRole[i].buttonList[j].name.trim();
                             var isValid = curMenuRole[i].buttonList[j].isvalid;
                             var level = curMenuRole[i].buttonList[j].level;
                            if (!self.authoritySetting.threeSaveFlag && level=='3' && name =='保存' && isValid=='y') {
                                self.authoritySetting.threeSaveFlag = true;
                             }
                            if (!self.authoritySetting.threeReviewedFlag && level=='3' && name =='评价完成' && isValid=='y') {
                                self.authoritySetting.threeReviewedFlag = true;
                             }
                         }
                       break;
                    }
                }
            }
        }
        }
        return '';
      }
    },
  methods: {
   getData: function(){
      var self = this;
      if(this.$route.params.id != 0 ){
         Ajax.get('/distrbutorwarehouse/evaluationList/'+this.$route.params.id)
        .then(function (response){
          var data = response.data.data;
          self.$set('distributorReceptEvaluate',data);
        })
     }
      },
 
 save:function() {
   

 var self = this; 

   Ajax.post('/distrbutorwarehouse/saveEvaluationList',this.distributorReceptEvaluate)
        .then(function (response){
         if(confirm("评价成功")){
         }else{
            self.$route.router.go('/receiptstorage3');
        }

        });  

    },



 
  },
  route:{
    activate : function(){
      //this.getData();
         
    }
  }
};

  

   //   // 合格
   //    if(self.distributorReceptEvaluate.qualified === false && self.distributorReceptEvaluate.qualified=='0'){
   //        self.distributorReceptEvaluate.qualified= '0';
   //     }else{
   //        self.distributorReceptEvaluate.qualified = '1';
   //     }
        
   //    // 外观破损
   //   if(self.distributorReceptEvaluate.appearanceDamage === false && self.distributorReceptEvaluate.appearanceDamage=='0'){
   //        self.distributorReceptEvaluate.appearanceDamage= '0';
   //     }else{
   //        self.distributorReceptEvaluate.appearanceDamage = '1';
   //     }

   //     // 条形码信息有误
   //     if(self.distributorReceptEvaluate.barCodeInforIsIncorrect === false && self.distributorReceptEvaluate.barCodeInforIsIncorrect=='0'){
   //        self.distributorReceptEvaluate.barCodeInforIsIncorrect= '0';
   //     }else{
   //        self.distributorReceptEvaluate.barCodeInforIsIncorrect = '1';
   //     }

   // // 配送单与货物不符
   //    if(self.distributorReceptEvaluate.distributionNotInConformityWithTheGoods === false && self.distributorReceptEvaluate.distributionNotInConformityWithTheGoods=='0'){
   //        self.distributorReceptEvaluate.distributionNotInConformityWithTheGoods= '0';
   //     }else{
   //        self.distributorReceptEvaluate.distributionNotInConformityWithTheGoods = '1';
   //     }
   //     // 生产批号/灭菌批号/失效日期信息错误
   //  if(self.distributorReceptEvaluate.productionLotBatchNumberExpirationDateError === false && self.distributorReceptEvaluate.productionLotBatchNumberExpirationDateError=='0'){
   //        self.distributorReceptEvaluate.productionLotBatchNumberExpirationDateError= '0';
   //     }else{
   //        self.distributorReceptEvaluate.productionLotBatchNumberExpirationDateError = '1';
   //     }
   //      // 产品损毁
   //    if(self.distributorReceptEvaluate.productDamage === false && self.distributorReceptEvaluate.productDamage=='0'){
   //        self.distributorReceptEvaluate.productDamage= '0';
   //     }else{
   //        self.distributorReceptEvaluate.productDamage = '1';
   //     }
   //    // 未验货
   //  if(self.distributorReceptEvaluate.noInspection === false  && self.distributorReceptEvaluate.noInspection=='0') {
   //        self.distributorReceptEvaluate.noInspection= '0';
   //     }else{
   //        self.distributorReceptEvaluate.noInspection = '1';
   //     }
   //   // 24小时以内
   //     if(self.distributorReceptEvaluate.withinTwentyfourHours === false && self.distributorReceptEvaluate.withinTwentyfourHours=='0'){
   //        self.distributorReceptEvaluate.withinTwentyfourHours= '0';
   //     }else{
   //        self.distributorReceptEvaluate.withinTwentyfourHours = '1';
   //     }
   //    // 24~72小时
   //    if(self.distributorReceptEvaluate.betweenTwentyfourToSeventytwoHours === false && self.distributorReceptEvaluate.betweenTwentyfourToSeventytwoHours=='0'){
   //        self.distributorReceptEvaluate.betweenTwentyfourToSeventytwoHours= '0';
   //     }else{
   //        self.distributorReceptEvaluate.betweenTwentyfourToSeventytwoHours = '1';
   //     }
   //      // 72~120小时
   //  if(self.distributorReceptEvaluate.betweenSeventytwoToOnehandroundtwentyHours === false && self.distributorReceptEvaluate.betweenSeventytwoToOnehandroundtwentyHours=='0'){
   //        self.distributorReceptEvaluate.betweenSeventytwoToOnehandroundtwentyHours= '0';
   //     }else{
   //        self.distributorReceptEvaluate.betweenSeventytwoToOnehandroundtwentyHours = '1';
   //     }

   //   // 120小时以上
   //    if(self.distributorReceptEvaluate.morethanOnehandroundtwentyHours === false && self.distributorReceptEvaluate.morethanOnehandroundtwentyHours=='0'){
   //        self.distributorReceptEvaluate.morethanOnehandroundtwentyHours= '0';
   //     }else{
   //        self.distributorReceptEvaluate.morethanOnehandroundtwentyHours = '1';
   //     }








  
    //     // 企业资料完整率
    // if(self.distributorReceptEvaluate.enterpriseDataIntegrityOnehandround === false){
    //       self.distributorReceptEvaluate.enterpriseDataIntegrityOnehandround= '0';
    //    }else{
    //       self.distributorReceptEvaluate.enterpriseDataIntegrityOnehandround = '1';
    //    }
    //    // 商品资料完整率
    //    if(self.distributorReceptEvaluate.commodityDataIntegrityNinety === false){
    //       self.distributorReceptEvaluate.commodityDataIntegrityNinety= '0';
    //    }else{
    //       self.distributorReceptEvaluate.commodityDataIntegrityNinety = '1';
    //    }

    //    // 合格
    //   if(self.distributorReceptEvaluate.qualified === false){
    //       self.distributorReceptEvaluate.qualified= '0';
    //    }else{
    //       self.distributorReceptEvaluate.qualified = '1';
    //    }
    //     // 代理商资料完整率
    // if(self.distributorReceptEvaluate.agentDataIntegrityNinety === false){
    //       self.distributorReceptEvaluate.agentDataIntegrityNinety= '0';
    //    }else{
    //       self.distributorReceptEvaluate.agentDataIntegrityNinety = '1';
    //    }

    //   // 生产厂商资料完整率
    //   if(self.distributorReceptEvaluate.manufacturerDataIntegrityThirty === false){
    //       self.distributorReceptEvaluate.manufacturerDataIntegrityThirty= '0';
    //    }else{
    //       self.distributorReceptEvaluate.manufacturerDataIntegrityThirty = '1';
    //    }
    //     // 售后服务机构资料完整率
    // if(self.distributorReceptEvaluate.serviceOrganizationDataIntegrityFifty === false){
    //       self.distributorReceptEvaluate.serviceOrganizationDataIntegrityFifty= '0';
    //    }else{
    //       self.distributorReceptEvaluate.serviceOrganizationDataIntegrityFifty = '1';
    //    }
    //    // 物价资料完整率
    //    if(self.distributorReceptEvaluate.barCodeInforIsIncorrect === false){
    //       self.distributorReceptEvaluate.barCodeInforIsIncorrect= '0';
    //    }else{
    //       self.distributorReceptEvaluate.barCodeInforIsIncorrect = '1';
    //    }

    //   // 产品说明书完整率
    //   if(self.distributorReceptEvaluate.productSpecificationCompleteRateOnehandround === false){
    //       self.distributorReceptEvaluate.productSpecificationCompleteRateOnehandround= '0';
    //    }else{
    //       self.distributorReceptEvaluate.productSpecificationCompleteRateOnehandround = '1';
    //    }
    //    // 合规文件完整率
    // if(self.distributorReceptEvaluate.complianceFileIntegrityOnehandround === false){
    //       self.distributorReceptEvaluate.complianceFileIntegrityOnehandround= '0';
    //    }else{
    //       self.distributorReceptEvaluate.complianceFileIntegrityOnehandround = '1';
    //    }
</script>