|
@@ -262,20 +262,20 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
- // var that = this
|
|
|
- // this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
|
|
|
- // commonId: that.userInfo.id
|
|
|
- // }).then(res => {
|
|
|
- // if (res.data.code == 200) {
|
|
|
- // if (res.data.data.customerTypeFlag == 1) {
|
|
|
- // that.$set(that.deptList, 'buyer', res.data.data.customerName)
|
|
|
- // } else {
|
|
|
- // that.$set(that.deptList, 'buyer', res.data.data.compName)
|
|
|
- // }
|
|
|
- // that.goods = res.data.data
|
|
|
- // }
|
|
|
- // uni.hideLoading()
|
|
|
- // })
|
|
|
+ var that = this
|
|
|
+ this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
|
|
|
+ commonId: that.userInfo.id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if (res.data.data.customerTypeFlag == 1) {
|
|
|
+ that.$set(that.deptList, 'buyer', res.data.data.customerName)
|
|
|
+ } else {
|
|
|
+ that.$set(that.deptList, 'buyer', res.data.data.compName)
|
|
|
+ }
|
|
|
+ that.goods = res.data.data
|
|
|
+ }
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
async amendprice() {
|
|
@@ -476,6 +476,14 @@
|
|
|
this.$api.msg('买方手机号不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.deptList.buyerPhone.length!=11) {
|
|
|
+ this.$api.msg('买方手机号输入错误')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!this.verifyCode){
|
|
|
+ this.$api.msg('验证码不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.checked == false) {
|
|
|
if (this.deptList.waterContent && this.deptList.waterContent < 1 ||
|
|
|
this.deptList.waterContent && this.deptList.waterContent > 40) {
|
|
@@ -558,20 +566,42 @@
|
|
|
this.insertProcurementPlanInfo.commonId = this.userInfo.id
|
|
|
this.insertProcurementPlanInfo.procurementPlanNo='CGJH'+this.getdate()+this.verifyinit()
|
|
|
this.insertProcurementPlanInfo.compId = "2710b21efc1e4393930c5dc800010dc4"
|
|
|
- this.$api.doRequest('post', '/procurementPlanInfo/api/insertProcurementPlanInfo', this
|
|
|
- .insertProcurementPlanInfo).then(res => {
|
|
|
+ var that = this
|
|
|
+ this.$api.doRequest('get', '/commonUser/loginVerifyCode', {
|
|
|
+ phone: this.deptList.buyerPhone,
|
|
|
+ verifyCode: this.verifyCode
|
|
|
+ }).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: "发布成功",
|
|
|
- icon: 'none',
|
|
|
- })
|
|
|
- // setTimeout(() => {
|
|
|
- // uni.navigateBack({})
|
|
|
- // }, 1000)
|
|
|
- this.deptList = {}
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/release/release`
|
|
|
- })
|
|
|
+ that.$api.doRequest('post', '/procurementPlanInfo/api/insertProcurementPlanInfo', that
|
|
|
+ .insertProcurementPlanInfo).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "发布成功",
|
|
|
+ icon: 'none',
|
|
|
+ })
|
|
|
+ // setTimeout(() => {
|
|
|
+ // uni.navigateBack({})
|
|
|
+ // }, 1000)
|
|
|
+ that.deptList = {}
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/release/release`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.data.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(res => {
|
|
|
+ uni.showToast({
|
|
|
+ title: res.errmsg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ });
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: res.data.message,
|
|
@@ -579,11 +609,10 @@
|
|
|
duration: 2000
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
})
|
|
|
.catch(res => {
|
|
|
uni.showToast({
|
|
|
- title: res.errmsg,
|
|
|
+ title: res.data.message,
|
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
|
})
|