|
|
@@ -39,8 +39,8 @@
|
|
|
|
|
|
<view class="form_item">
|
|
|
<span class="icon">*</span>预计投标时间
|
|
|
- <picker mode="date" fields="month" :value="biddingTime" @change="bindDateChange">
|
|
|
- <uni-easyinput placeholder="请选择预计投标时间" suffixIcon="calendar-filled" v-model="biddingTime">
|
|
|
+ <picker mode="date" fields="month" :start="getCurrentDate()" :value="biddingTime" @change="bindDateChange">
|
|
|
+ <uni-easyinput disabled placeholder="请选择预计投标时间" suffixIcon="calendar-filled" v-model="biddingTime">
|
|
|
</uni-easyinput>
|
|
|
</picker>
|
|
|
</view>
|
|
|
@@ -94,23 +94,28 @@
|
|
|
// 用户单位绑定数据
|
|
|
const company = ref(uni.getStorageSync('form_company') || '')
|
|
|
// 客户名称
|
|
|
- const clientName = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).clientName : '')
|
|
|
+ const clientName = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).clientName :
|
|
|
+ '')
|
|
|
// 项目名称
|
|
|
- const projectName = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectName : '')
|
|
|
+ const projectName = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content'))
|
|
|
+ .projectName : '')
|
|
|
// 项目金额
|
|
|
- const projectAmount = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectAmount : '')
|
|
|
+ const projectAmount = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content'))
|
|
|
+ .projectAmount : '')
|
|
|
// 预计投标时间
|
|
|
- const biddingTime = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).biddingTime : '')
|
|
|
+ const biddingTime = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content'))
|
|
|
+ .biddingTime : '')
|
|
|
// 所属行业
|
|
|
const industry = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).industry : '')
|
|
|
// 产品类型
|
|
|
- const productType = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).productType : [])
|
|
|
+ const productType = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content'))
|
|
|
+ .productType : [])
|
|
|
// 项目基本情况
|
|
|
- const projectInformation = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content')).projectInformation : '')
|
|
|
+ const projectInformation = ref(uni.getStorageSync('form_content') ? JSON.parse(uni.getStorageSync('form_content'))
|
|
|
+ .projectInformation : '')
|
|
|
// 微信手机号码绑定数据
|
|
|
const wxPhone = ref(uni.getStorageSync('wxPhone') || '')
|
|
|
|
|
|
-
|
|
|
// 所属行业数组数据
|
|
|
const range = ref(
|
|
|
[{
|
|
|
@@ -218,13 +223,13 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 验证表格信息是否符合规范
|
|
|
const handleValidate = () => {
|
|
|
const reName = /^[\u4e00-\u9fa5]{2,4}$/
|
|
|
const rePhone = /^[1][3,4,5,7,8,9][0-9]{9}$/
|
|
|
- const reProjectAmount =/^\+?[1-9][0-9]*$/
|
|
|
-
|
|
|
+ const reProjectAmount = /^\+?[1-9][0-9]*$/
|
|
|
+
|
|
|
if (name.value == '') {
|
|
|
uni.showToast({
|
|
|
title: '请输入姓名',
|
|
|
@@ -314,11 +319,11 @@
|
|
|
|
|
|
// 请求提交接口回调
|
|
|
const submit = async () => {
|
|
|
- const bProduct =[]
|
|
|
- productType.value.forEach(item=>{
|
|
|
+ const bProduct = []
|
|
|
+ productType.value.forEach(item => {
|
|
|
bProduct.push(hobby.value[item].text)
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
const res = await myRequest({
|
|
|
url: "/informationReporting/add",
|
|
|
method: "post",
|
|
|
@@ -326,12 +331,12 @@
|
|
|
name: name.value,
|
|
|
phone: phone.value,
|
|
|
company: company.value,
|
|
|
- customerName:clientName.value,
|
|
|
- entryName:projectName.value,
|
|
|
- projectAmount:projectAmount.value,
|
|
|
- tenderTime:biddingTime.value,
|
|
|
- content:projectInformation.value,
|
|
|
- trade:range.value[industry.value].text,
|
|
|
+ customerName: clientName.value,
|
|
|
+ entryName: projectName.value,
|
|
|
+ projectAmount: projectAmount.value,
|
|
|
+ tenderTime: biddingTime.value,
|
|
|
+ content: projectInformation.value,
|
|
|
+ trade: range.value[industry.value].text,
|
|
|
bProduct,
|
|
|
wxPhone: wxPhone.value,
|
|
|
}
|
|
|
@@ -349,7 +354,7 @@
|
|
|
industry.value = ''
|
|
|
productType.value = []
|
|
|
projectInformation.value = ''
|
|
|
-
|
|
|
+
|
|
|
uni.removeStorageSync('form_content')
|
|
|
uni.setStorageSync('accredit', false)
|
|
|
} else {
|
|
|
@@ -359,6 +364,17 @@
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 获取当前时间 YY-MM-DD
|
|
|
+ const getCurrentDate = () => {
|
|
|
+ const date = new Date();
|
|
|
+ let year = date.getFullYear();
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
+ let day = date.getDate();
|
|
|
+ month = month > 9 ? month : '0' + month;
|
|
|
+ day = day > 9 ? day : '0' + day;
|
|
|
+ return `${year}-${month}-${day}`;
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -426,4 +442,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|