From 3913b3c5c8cde03f8c92d1c738d28c4a9bae7e55 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 22 十一月 2023 08:48:02 +0800
Subject: [PATCH] #
---
pages/business/goBusiness/addgoBusiness.vue | 61 +++++++++++++++++++++++-------
1 files changed, 47 insertions(+), 14 deletions(-)
diff --git a/pages/business/goBusiness/addgoBusiness.vue b/pages/business/goBusiness/addgoBusiness.vue
index 56ee301..f6c78f5 100644
--- a/pages/business/goBusiness/addgoBusiness.vue
+++ b/pages/business/goBusiness/addgoBusiness.vue
@@ -203,7 +203,7 @@
subTitle: '鍑哄彂鏃ユ湡',
placeholder: '璇烽�夋嫨鍑哄彂鏃ユ湡',
placeholderStyle: 'font-size:20rpx',
- value: '2021-5-3',
+ value: '',
type: 'businessStartTime',
inputType: 'data',
required: true
@@ -222,7 +222,7 @@
subTitle: '缁撴潫鏃ユ湡',
placeholder: '璇烽�夋嫨缁撴潫鏃ユ湡',
placeholderStyle: 'font-size:20rpx',
- value: '2021-5-3',
+ value: '',
type: 'businessEndTime',
inputType: 'data',
required: true
@@ -269,8 +269,15 @@
const eventChannel = this.getOpenerEventChannel();
eventChannel.on('goBusinessDel', function(data) {
if (data.data == 'add') {
-
_this.getOrderId('')
+ }
+ })
+ // 椤圭洰璺熻釜浼犺繃鏉ョ殑
+ eventChannel.on('addType', function(data) {
+ if (data.data.comeFrom == 'saleManage') {
+ _this.form2[0].info[0].submitVal = data.data.orderId
+ _this.form2[0].info[0].unshow = true
+ _this.form2[0].info[0].required = false
}
})
@@ -280,7 +287,6 @@
},
methods: {
getOrderId(condition) {
- // console.log(condition);
let _this = this
uni.request({
url: `${_this.baseUrl}/orderQueryName/auth`,
@@ -400,6 +406,8 @@
this.form[sub.type] = odd.id
}
}
+ } else {
+ this.form[sub.type] = sub.submitVal
}
} else {
this.form[sub.type] = sub.value
@@ -416,15 +424,40 @@
}
}
- // console.log(this.form.orderId);
- // console.log(this.orderIds);
-
- console.log(this.form);
+ this.formAdd(this.form)
// console.log(subPass);
if (subPass) {
// console.log(this.form);
}
+ },
+ formAdd(form) {
+ let _this = this
+ uni.request({
+ url: `${_this.baseUrl}/businessTrip/add/auth`,
+ header: {
+ 'token': uni.getStorageSync('token'),
+ 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
+ },
+ sslVerify: false,
+ data: form,
+ method: 'POST',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ uni.showToast({title: '娣诲姞鎴愬姛', icon: "none", position: 'top'})
+ setTimeout(()=>{
+ uni.navigateBack({})
+ },1000)
+ } else if (res.code === 500) {
+ uni.showToast({title: '娣诲姞鎴愬姛', icon: "none", position: 'top'})
+ } else {
+
+ }
+ }
+
+
+ })
},
showPicker(e) {
switch (e) {
@@ -449,25 +482,25 @@
}
},
businessTransportationConfirm(e) {
- console.log('confirm', e)
+ // console.log('confirm', e)
this.form2[1].info[0].value = e.value[0]
this.form2[1].info[0].submitVal = e.indexs[0]
this.businessTransportationShow = false
},
businessReturnConfirm(e) {
- console.log('confirm', e)
+ // console.log('confirm', e)
this.form2[1].info[1].value = e.value[0]
this.form2[1].info[1].submitVal = e.indexs[0]
this.businessReturnShow = false
},
businessStartTimeDayConfirm(e) {
- console.log('confirm', e)
+ // console.log('confirm', e)
this.form2[2].info[1].value = e.value[0]
this.form2[2].info[1].submitVal = e.indexs[0]
this.businessStartTimeDayShow = false
},
businessEndTimeDayConfirm(e) {
- console.log('confirm', e)
+ // console.log('confirm', e)
this.form2[2].info[3].value = e.value[0]
this.form2[2].info[3].submitVal = e.indexs[0]
this.businessEndTimeDayShow = false
@@ -504,7 +537,7 @@
// console.log(shen.value , shi.value, qu.value);
this.form2[1].info[4].value = e.value[0] + '/' + e.value[1] + '/' + e.value[2]
this.form2[1].info[4].submitVal = shen.value + ',' + shi.value + ',' + qu.value
- console.log(this.form2[1].info[4].value, this.form2[1].info[4].submitVal);
+ // console.log(this.form2[1].info[4].value, this.form2[1].info[4].submitVal);
},
pcdEndConfirm(e) {
// console.log('confirm', e)
@@ -523,7 +556,7 @@
// console.log(shen.value , shi.value, qu.value);
this.form2[1].info[6].value = e.value[0] + '/' + e.value[1] + '/' + e.value[2]
this.form2[1].info[6].submitVal = shen.value + ',' + shi.value + ',' + qu.value
- console.log(this.form2[1].info[6].value, this.form2[1].info[6].submitVal);
+ // console.log(this.form2[1].info[6].value, this.form2[1].info[6].submitVal);
}
}
}
--
Gitblit v1.9.1