|
@@ -79,11 +79,21 @@
|
|
|
<input placeholder="请输入买方手机号" name="input" v-model="deptList.sellerPhone"></input>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="c-row ">
|
|
|
+ <!-- <view class="c-row ">
|
|
|
<text class="validate">获取验证码</text>
|
|
|
<view class="con-list">
|
|
|
<input placeholder="请填写6位短信验证码" name="input" v-model="deptList.title1"></input>
|
|
|
</view>
|
|
|
+ </view> -->
|
|
|
+
|
|
|
+ <view style='width:100%;border-bottom:1px solid #E8E9ED;position:relative;padding:10px;' class="flex">
|
|
|
+ <button :class='codestatus&&!sendDisabled?"active":""' @click='getcode'
|
|
|
+ class='getcode'>{{sendText}}</button>
|
|
|
+ <view style='width:70%;position:relative;margin-left: 200px;'>
|
|
|
+ <view class="con-list">
|
|
|
+ <input v-model='verifyCode' placeholder="请输入验证码" type="text">
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="buylow">
|
|
@@ -240,7 +250,12 @@
|
|
|
baoIndex: 0,
|
|
|
baoType: ['不限(默认)', '散装', '大袋', '小袋'],
|
|
|
chengIndex: -1,
|
|
|
- chengType: ['可议', '买方承担', '卖方承担']
|
|
|
+ chengType: ['可议', '买方承担', '卖方承担'],
|
|
|
+ codestatus: false,
|
|
|
+ sendDisabled: false,
|
|
|
+ sendText: '获取验证码',
|
|
|
+ verifyCode:"",
|
|
|
+ verification:true,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -268,6 +283,79 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ async amendprice() {
|
|
|
+ var that = this
|
|
|
+ this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
|
|
|
+ phone: this.deptList.sellerPhone,
|
|
|
+ verifyCode: this.verifyCode
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ that.verification = false
|
|
|
+ console.log(that.verification,"1")
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ that.verification = false
|
|
|
+ console.log(that.verification,"2")
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getcode() {
|
|
|
+ var that = this
|
|
|
+ if (/^0?1[3|4|5|6|7|8][0-9]\d{8}$/.test(that.deptList.sellerPhone)) {
|
|
|
+ this.$api.doRequest('get', '/commonUser/sendVerifyCode', {
|
|
|
+ phone: that.deptList.sellerPhone
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.sendDisabled = true
|
|
|
+ let sec = 60
|
|
|
+ let interval = setInterval(() => {
|
|
|
+ sec--;
|
|
|
+ that.sendText = sec + 's后重发'
|
|
|
+ if (sec <= 0) {
|
|
|
+ that.sendDisabled = false
|
|
|
+ that.sendText = "获取验证码"
|
|
|
+ clearInterval(interval)
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ return
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入正确的手机号',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
regionpicker(e) {
|
|
|
this.deptList.sendPrivate = e.province.label
|
|
|
this.deptList.sendCity = e.city.label
|
|
@@ -470,11 +558,22 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
+ if(this.amendprice() == false){
|
|
|
+ this.$api.msg('验证码输入有误!')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.insertProcurementPlanInfo = this.deptList
|
|
|
+ this.insertProcurementPlanInfo.basisPrice = -this.insertProcurementPlanInfo.basisPrice
|
|
|
+ this.insertProcurementPlanInfo.commonId = this.userInfo.id
|
|
|
+ this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
|
|
|
+=======
|
|
|
this.insertSalePlanInfo = this.deptList
|
|
|
this.insertSalePlanInfo.basisPrice = -this.insertSalePlanInfo.basisPrice
|
|
|
this.insertSalePlanInfo.commonId = this.userInfo.id
|
|
|
this.insertSalePlanInfo.salePlanNo='XSJH'+this.getdate()+this.verifyinit()
|
|
|
this.insertSalePlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
|
|
|
+>>>>>>> cf82327deab7b10c1c2181e90bf088a14545c10f
|
|
|
this.$api.doRequest('post', '/salePlanInfo/api/insertSalePlanInfo', this
|
|
|
.insertSalePlanInfo).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
@@ -631,4 +730,23 @@
|
|
|
text-align: center;
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
+ .getcode {
|
|
|
+ font-size: 14px;
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ color: #AFB3BF;
|
|
|
+ background: #F5F6F9;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .getcode.active {
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .getcode.active {
|
|
|
+ background: #22C572;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
</style>
|