Administrator 4 anni fa
parent
commit
ea8600fedd

+ 15 - 43
src/main/resources/static/js/flea-market/form.js

@@ -50,6 +50,9 @@ var fleaMarketForm = new Vue({
             image1:'',//图片
             productDetails:'',//商品详细信息
             source:1,
+            dockingPeopleMobile:'',
+            dockingPeopleName:''
+
          },
         brandname:'请选择',
         checkbox:false,
@@ -78,6 +81,7 @@ var fleaMarketForm = new Vue({
         vShow_shopColor:false,
         vShow_contactName:false,
         vShow_contactMobile:false,
+        vShow_caimeiMobile:false,
         vShow_Address:false,
         vShow_TownId:false,
         vShow_Market:false,
@@ -161,6 +165,7 @@ var fleaMarketForm = new Vue({
         },
         submitBtn:function () {
          var _this = this;
+         var re = /^1\d{10}$/;
           if(_this.secondParams.secondHandType == ''){
                 _this.vShow_secondHandType = true;
                 _this.fromMessage = '请选择分类';
@@ -199,26 +204,6 @@ var fleaMarketForm = new Vue({
                 },2000);
                 return
          }
-         // if(_this.secondParams.secondHandType ==2) {
-         // if (_this.secondParams.normalPrice == '') {
-         //         _this.vShow_Market = true;
-         //         _this.fromMessage = '请输入市场价';
-         //         _this.scrollIntoView();
-         //         setTimeout(function () {
-         //             _this.vShow_Market = false;
-         //         }, 2000);
-         //         return
-         //     }
-         //     if (_this.secondParams.maturityYears == '') {
-         //         _this.vShow_expire = true;
-         //         _this.fromMessage = '请输入产品到期日';
-         //         _this.scrollIntoView();
-         //         setTimeout(function () {
-         //             _this.vShow_expire = false;
-         //         }, 2000);
-         //         return
-         //     }
-         // }
          if(_this.secondParams.price1 == ''){
                   _this.vShow_Price = true;
                   _this.fromMessage = '请输入交易价';
@@ -228,28 +213,6 @@ var fleaMarketForm = new Vue({
                     },2000);
                     return
              }
-         // if(_this.secondParams.secondHandType ==2){
-         //     if(_this.secondParams.originalPrice == ''){
-         //      _this.vShow_original = true;
-         //      _this.fromMessage = '请输入采购价/原价';
-         //      _this.scrollIntoView();
-         //        setTimeout(function(){
-         //            _this.vShow_original = false;
-         //        },2000);
-         //        return
-         //   }
-         // if(_this.secondParams.stock == ''){
-         //      _this.vShow_Number = true;
-         //      _this.fromMessage = '请输入数量';
-         //      _this.scrollIntoView();
-         //        setTimeout(function(){
-         //            _this.vShow_Number = false;
-         //        },2000);
-         //        return
-         //    }
-         // }
-
-
          if(_this.secondParams.productQuality == ''){
               _this.vShow_shopColor = true;
               _this.fromMessage = '请输入商品成色';
@@ -277,7 +240,7 @@ var fleaMarketForm = new Vue({
                 },2000);
                 return
          }
-         if(_this.secondParams.contactMobile.length !=11){
+         if(!re.test(_this.secondParams.contactMobile)){
               _this.vShow_contactMobile = true;
               _this.fromMessage = '联系方式格式不正确';
               _this.scrollIntoView();
@@ -286,6 +249,15 @@ var fleaMarketForm = new Vue({
                 },2000);
                  return
           }
+          if(_this.secondParams.dockingPeopleMobile!='' && !re.test(_this.secondParams.dockingPeopleMobile)){
+              _this.vShow_caimeiMobile = true;
+              _this.fromMessage = '联系方式格式不正确';
+              _this.scrollIntoView();
+                setTimeout(function(){
+                    _this.vShow_caimeiMobile = false;
+                },2000);
+                 return
+          }
           if(_this.secondParams.townId == ''|| _this.secondParams.townId == undefined){
               _this.vShow_TownId = true;
               _this.fromMessage = '请完善联系地址';

+ 11 - 26
src/main/resources/templates/flea-market/form.html

@@ -38,10 +38,6 @@
                         </div>
                          <span class="release-tips errTips icon mIcon" v-show="vShow_instrumentType">{{fromMessage}}</span>
                     </div>
-<!--                    <div class="linqi_text" v-show="secondParams.secondHandType==2">-->
-<!--                        <div class="jiaobiao"></div>-->
-<!--                        <p>临期产品是指临近保质期的产品,距离到期日最好在6个月以上</p>-->
-<!--                    </div>-->
                     <div class="unlogin-item input-item shrink-spacing">
                         <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>商品品牌:</div>
 
@@ -63,11 +59,6 @@
                         <div class="unlogin-label spacing" style="letter-spacing: 1px;">出厂日期:</div>
                         <input type="text"  v-model="secondParams.fixedYears" id="shopyear" maxlength="10" placeholder="请输入出厂日期 如:2020年06月">
                     </div>
-<!--                     <div class="unlogin-item input-item shrink-spacing"  v-show="secondParams.secondHandType==2">-->
-<!--                        <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>产品到期日:</div>-->
-<!--                        <input type="text"  v-model="secondParams.maturityYears" id="expire" maxlength="10" placeholder="请输入产品到期日,如:2020年12月">-->
-<!--                        <span class="release-tips errTips icon mIcon" v-show="vShow_expire">{{fromMessage}}</span>-->
-<!--                    </div>-->
                     <div class="unlogin-item input-item shrink-spacing">
                         <div class="unlogin-label spacing" style="letter-spacing: 1px;">公司名称:</div>
                         <input type="text"  v-model="secondParams.companyName" id="mechanismname" maxlength="30" placeholder="请输入公司名称,不超过30个汉字">
@@ -81,21 +72,6 @@
                         <span class="showflag" v-show="vShow_detailTalkFlag">(勾选代表同意不显示交易价)</span>
                         <span class="release-tips errTips icon mIcon" v-show="vShow_Price">{{fromMessage}}</span>
                     </div>
-<!--                     <div class="unlogin-item input-item shrink-spacing" v-show="secondParams.secondHandType==2">-->
-<!--                        <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>市场价:</div>-->
-<!--                        <input type="text"  v-model="secondParams.normalPrice" id="market" maxlength="30" oninput="value=value.replace(/[^\d]/g, '')"   placeholder="请输入市场价">-->
-<!--                        <span class="release-tips errTips icon mIcon" v-show="vShow_Market">{{fromMessage}}</span>-->
-<!--                    </div>-->
-<!--                    <div class="unlogin-item input-item shrink-spacing" v-show="secondParams.secondHandType==2">-->
-<!--                        <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>采购价/原价:</div>-->
-<!--                        <input type="text"  v-model="secondParams.originalPrice" id="original_price" maxlength="30" oninput="value=value.replace(/[^\d]/g, '')" placeholder="请输入采购价/原价"/>-->
-<!--                        <span class="release-tips errTips icon mIcon" v-show="vShow_original">{{fromMessage}}</span>-->
-<!--                    </div>-->
-<!--                     <div class="unlogin-item input-item shrink-spacing" v-show="secondParams.secondHandType==2">-->
-<!--                        <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>数量:</div>-->
-<!--                        <input type="text"  id="number" v-model="secondParams.stock" maxlength="30" oninput="value=value.replace(/[^\d]/g,'')" placeholder="请输入数量">-->
-<!--                       <span class="release-tips errTips icon mIcon" v-show="vShow_Number">{{fromMessage}}</span>-->
-<!--                    </div>-->
                     <div class="unlogin-item input-item shrink-spacing">
                         <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>商品成色:</div>
                         <input type="text" maxlength="10" id="shopcolor"v-model="secondParams.productQuality"  placeholder="请输入商品成色,如“9成新”">
@@ -103,13 +79,22 @@
                     </div>
                     <div class="unlogin-item input-item shrink-spacing">
                         <div class="unlogin-label spacing" style="letter-spacing: 1px;"><span class="red-color">*</span>联系人:</div>
-                        <input type="text" maxlength="6" v-model="secondParams.contactName" id="linkman"  placeholder="请输入联系人姓名">
+                        <input type="text" maxlength="15" v-model="secondParams.contactName" id="linkman"  placeholder="请输入联系人姓名">
                         <span class="release-tips errTips icon mIcon" v-show="vShow_contactName">{{fromMessage}}</span>
                     </div>
                     <div class="unlogin-item input-item shrink-spacing">
                         <div class="unlogin-label spacing"><span class="red-color">*</span>联系方式:</div>
-                        <input type="text"  v-model="secondParams.contactMobile"  oninput="value=value.replace(/[^\d]/g,'')"  id="phoneNum" maxlength="11" placeholder="请输入联系人手机号 / 固话">
+                        <input type="text"  v-model="secondParams.contactMobile"  oninput="value=value.replace(/[^\d]/g,'')"  id="phoneNum" maxlength="11" placeholder="请输入联系人手机号">
                         <span class="release-tips errTips icon mIcon" v-show="vShow_contactMobile">{{fromMessage}}</span>
+                    </div>
+                     <div class="unlogin-item input-item shrink-spacing">
+                        <div class="unlogin-label spacing" style="letter-spacing: 1px;">采美对接人:</div>
+                        <input type="text" maxlength="15" v-model="secondParams.dockingPeopleName"  placeholder="请输入采美对接人姓名">
+                    </div>
+                    <div class="unlogin-item input-item shrink-spacing">
+                        <div class="unlogin-label spacing">采美对接人联系方式:</div>
+                        <input type="text"  v-model="secondParams.dockingPeopleMobile"  oninput="value=value.replace(/[^\d]/g,'')"  maxlength="11" placeholder="请输入采美对接人手机号">
+                        <span class="release-tips errTips icon mIcon" v-show="vShow_caimeiMobile">{{fromMessage}}</span>
                     </div>
                     <div class="unlogin-item input-item shrink-spacing">
                         <div class="unlogin-label spacing">商品类型:</div>