Просмотр исходного кода

修改供应商资料回显bug

zhengjinyi 4 лет назад
Родитель
Сommit
de79bfba03

+ 5 - 0
src/main/resources/static/js/account/register-supplier.js

@@ -81,6 +81,11 @@ var registerPage = new Vue({
                     CAIMEI.dialog('两次密码输入不一致',false,function () {});
                     return;
                 }
+                if(_self.supplierUser.townId == ''){
+                    $('#cProvince').parent().addClass("error");
+                    $('#cProvince').siblings('.errTips').text('请选择省市区').addClass("show");
+                    return;
+                }
                 if(!_self.supplierUser.businessLicense){
                     $('#formbusinessLicenseImage').parent().addClass("error").find('.checked').removeClass("show");
                     $('#formbusinessLicenseImage').siblings('.errTips').text('请上传营业执照图片').addClass("show");

+ 15 - 15
src/main/resources/static/js/supplier-center/setting/information.js

@@ -17,10 +17,10 @@
             linkMan:'',//联系人
             contractEmail:'',//
             contractPhone:'',//固定电话
-            fax:'',//传真
+            faxNumber:'',//传真
             legalPerson:'',//法人代表
             registeredCapital:'',//注册资本
-            nature:'',//公司性质
+            companyNature:'',//公司性质
             turnover:'',//年营业额
         },
         form:{
@@ -46,7 +46,7 @@
             socialCreditCode:'',//营业执照编号
             businessLicense:'',//营业执照
             logo:'',//公司logo
-            productionLicence:'',//生产
+            operationLicence:'',//生产
             hygienicLicense:'',//卫生
             taxLicense:'',//税务
             honorCertification:'',//荣誉
@@ -121,25 +121,25 @@
     },
          shopInfo:function(){
             var _this = this;
-            console.log()
              SupplierApi.shopInfo({userId:_this.params.userId},function(res){
                 if(res.code==0){
+                    console.log('asda-=======',res.data);
                     _this.isRequset=false;
                     var shop = res.data.shop;
                     var user = res.data.user;
                     _this.params.name = shop.name;
                     _this.params.shortName = shop.shortName;
                     _this.params.linkMan = shop.linkMan;
-                    _this.params.contractEmail = user.contractEmail;
+                    _this.params.contractEmail = shop.contractEmail;
                     _this.params.address = shop.provincialAddress;
                     _this.params.provinceId = shop.provinceId;
                     _this.params.cityId = shop.cityId;
                     _this.params.townId = shop.townId;
                     _this.params.contractPhone = shop.contractPhone;
-                    _this.params.fax = shop.fax;
+                    _this.params.faxNumber = shop.faxNumber;
                     _this.params.legalPerson = shop.legalPerson;
                     _this.params.registeredCapital = shop.registeredCapital;
-                    _this.params.nature = shop.nature;
+                    _this.params.companyNature = shop.companyNature;
                     _this.params.turnover = shop.turnover;
                     // _this.shopMainPros = _this.setNewMainpro(shop.mainpro);
                     // _this.shopScope = _this.setNewScope(shop.businessScope);
@@ -154,7 +154,7 @@
                     _this.params3.socialCreditCode = shop.socialCreditCode;
                     _this.params3.businessLicense = shop.businessLicense;
                     _this.params3.logo = shop.logo;
-                    _this.params3.productionLicence = shop.productionLicence;
+                    _this.params3.operationLicence = shop.operationLicence;
                     _this.params3.hygienicLicense = shop.hygienicLicense;
                     _this.params3.taxLicense = shop.taxLicense;
                     _this.params3.honorCertification = shop.honorCertification;
@@ -228,17 +228,17 @@
                         return false;
                     }
                 }
-              SupplierApi.modifiedData(params,function (res) {
-                     console.log(res)
-                      if(res.code === 0){
+            params = Object.assign(_self.params,_self.params2,_self.params3);
+            SupplierApi.modifiedData(params,function (res) {
+                  if(res.code === 0){
                         CAIMEI.dialog('修改成功',true,function () {
                             window.location.href='/supplier/dashboard.html';
                             _self.loginLoading = false;
                         });
-                    } else {
+                  } else {
                         CAIMEI.Alert(res.msg,'确定',false);
                         _self.loginLoading = false;
-                    }
+                  }
                 })
             })
          },
@@ -308,7 +308,7 @@
             var file = inputDOM.files;
             _this.formData.append('file', file[0]);
             PublicApi.uploadimg(_this.formData,function(response){
-                _this.params3.productionLicence = response.data;
+                _this.params3.operationLicence = response.data;
                 event.target.value = '';
             });
         },
@@ -361,7 +361,7 @@
             this.params3.hygienicLicense = '';
         },
         deleteproducImage:function(){//删除生产
-            this.params3.productionLicence = '';
+            this.params3.operationLicence = '';
         },
          deletelogoImage:function(){//删除logo图片
             this.params3.logo = '';

+ 7 - 5
src/main/resources/templates/account/register-supplier.html

@@ -100,9 +100,12 @@
                             <option value="">请选择</option>
                             <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
                         </select>
-                        <textarea placeholder="请输入您的详细联系地址"  v-model="supplierUser.address" @blur="blurHandle($event)" needverify></textarea>
+                        <span class="errTips icon mIcon"></span>
+                    </div>
+                    <div class="formLine">
+                        <textarea placeholder="请输入您的详细联系地址"  v-model="supplierUser.address" @blur="blurHandle($event)" style="margin-top: 0;" needverify></textarea>
                         <i class="checked icon mIcon"></i>
-                        <span class="errTips icon mIcon" tips="请输入正确的联系地址"></span>
+                        <span class="errTips icon mIcon" tips="请输入的联系地址"></span>
                     </div>
                     <div class="formLine">
                         <p><em>*</em>营业执照编号:</p>
@@ -153,9 +156,8 @@
                     </div>
                     <div class="formLine">
                         <p>官网地址:</p>
-                        <input type="text" v-model="supplierUser.website" placeholder="请输入网址" maxlength="100" id="website"  @blur="blurHandle($event)">
-                        <i class="checked icon mIcon"></i>
-                        <span class="errTips icon mIcon" tips="请输入正确的公司名称"></span>
+                        <input type="text" v-model="supplierUser.website" placeholder="请输入网址" maxlength="100" id="website">
+                        <span class="errTips icon mIcon"></span>
                     </div>
                     <div class="formLine">
                         <p>微信公众号:</p>

+ 4 - 4
src/main/resources/templates/supplier-center/setting/information.html

@@ -88,7 +88,7 @@
                             </div>
                             <div class="formLine rightTxt">
                                 <p>传真:</p>
-                                <input class="massageBtn"  type="text" v-model.trim="params.fax" placeholder="请输入公司传真号" onkeyup="if(isNaN(value))execCommand('undo')">
+                                <input class="massageBtn"  type="text" v-model.trim="params.faxNumber" placeholder="请输入公司传真号" onkeyup="if(isNaN(value))execCommand('undo')">
                                 <i class="checked icon mIcon"></i>
                                 <span class="errTips"></span>
                             </div>
@@ -106,7 +106,7 @@
                             </div>
                             <div class="formLine">
                                 <p><em>*</em>公司性质:</p>
-                                <input type="text" v-model.trim="params.nature" placeholder="请填写公司性质" :rule="rule.name"  @blur="blurHandle($event)" needverify>
+                                <input type="text" v-model.trim="params.companyNature" placeholder="请填写公司性质" :rule="rule.name"  @blur="blurHandle($event)" needverify>
                                 <i class="checked icon mIcon"></i>
                                 <span class="errTips icon mIcon" tips="请输入公司性质"></span>
                             </div>
@@ -251,8 +251,8 @@
                             <div class="formLine clear">
                                 <p><em>*</em>资质认证:</p>
                                 <div class="form-upload" id="zizhiImage">
-                                    <div class="form-upload-image" v-if="params3.productionLicence!='' && params3.productionLicence!=null">
-                                        <img class="upload-img" :src="params3.productionLicence" alt="" id="productionLicence" @click="showViewerImageFn2()">
+                                    <div class="form-upload-image" v-if="params3.operationLicence!='' && params3.operationLicence!=null">
+                                        <img class="upload-img" :src="params3.operationLicence" alt="" id="productionLicence" @click="showViewerImageFn2()">
                                         <i class="icon mIcon" @click="deleteproducImage()"></i>
                                     </div>
                                     <div class="formLine-file" v-else>