|
|
@ -8,9 +8,9 @@ |
|
|
<text class="label__text">纸种</text> |
|
|
<text class="label__text">纸种</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<picker :value="paperIndex" :range="paperGradesList"> |
|
|
|
|
|
|
|
|
<picker :value="form.categoryIndex" @change="categoryChange" :range="categoryNameList"> |
|
|
<view> |
|
|
<view> |
|
|
<text class="uni-input">{{ paperGradesList[paperIndex] }}</text> |
|
|
|
|
|
|
|
|
<text class="uni-input">{{ form.categoryName }}</text> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
@ -18,13 +18,13 @@ |
|
|
</view> |
|
|
</view> |
|
|
<view class="qn-form-item qn-form-item"> |
|
|
<view class="qn-form-item qn-form-item"> |
|
|
<view class="label"> |
|
|
<view class="label"> |
|
|
<uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons> |
|
|
|
|
|
|
|
|
<uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons> |
|
|
<text class="label__text">品牌</text> |
|
|
<text class="label__text">品牌</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<picker :value="paperIndex" :range="brandList"> |
|
|
|
|
|
|
|
|
<picker :value="form.brandIndex" @change="brandChange" :range="brandNameList" > |
|
|
<view> |
|
|
<view> |
|
|
<text class="uni-input">{{ brandList[paperIndex] }}</text> |
|
|
|
|
|
|
|
|
<text class="uni-input">{{ form.brandName }}</text> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
@ -35,7 +35,7 @@ |
|
|
<uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons> |
|
|
<uni-icons custom-prefix="iconfont" type="icon-required" size="14" color="#F5222D"></uni-icons> |
|
|
<text class="label__text">纸品名称</text> |
|
|
<text class="label__text">纸品名称</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="value"><qn-easyinput :maxlength="20" v-model="form.shortName" :inputBorder="false" text="right" placeholder="请输入纸品名称"></qn-easyinput></view> |
|
|
|
|
|
|
|
|
<view class="value"><qn-easyinput :maxlength="20" v-model="form.paperName" :inputBorder="false" text="right" placeholder="请输入纸品名称"></qn-easyinput></view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="qn-form-item qn-form-item"> |
|
|
<view class="qn-form-item qn-form-item"> |
|
|
<view class="label"> |
|
|
<view class="label"> |
|
|
@ -43,9 +43,9 @@ |
|
|
<text class="label__text">克重(g)</text> |
|
|
<text class="label__text">克重(g)</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<picker :value="paperIndex" :range="gramWeightList"> |
|
|
|
|
|
|
|
|
<picker :value="form.gramWeightIndex" @change="gramWeightChange" :range="weightList"> |
|
|
<view> |
|
|
<view> |
|
|
<text class="uni-input">{{ gramWeightList[paperIndex] }}</text> |
|
|
|
|
|
|
|
|
<text class="uni-input">{{ form.gramWeight }}</text> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
@ -60,16 +60,16 @@ |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<!-- <qn-easyinput :maxlength="20" v-model="form.shortName" :inputBorder="false" text="right" placeholder="请输入数量"></qn-easyinput> --> |
|
|
<!-- <qn-easyinput :maxlength="20" v-model="form.shortName" :inputBorder="false" text="right" placeholder="请输入数量"></qn-easyinput> --> |
|
|
<radio-group> |
|
|
<radio-group> |
|
|
<label v-for="(item, index) in radioGroupList" :key="index"> |
|
|
|
|
|
<radio :value="item" :checked="index === 0" style="transform:scale(0.7)" /> |
|
|
|
|
|
<text class="uni-input">{{ item }}</text> |
|
|
|
|
|
|
|
|
<label v-for="(ritem, rindex) in radioGroupList" :key="rindex" @tap="specificationTap(ritem, rindex)"> |
|
|
|
|
|
<radio :checked="rindex === 0" style="transform:scale(0.7)" /> |
|
|
|
|
|
<text class="uni-input">{{ ritem.name }}</text> |
|
|
</label> |
|
|
</label> |
|
|
</radio-group> |
|
|
</radio-group> |
|
|
</view> |
|
|
</view> |
|
|
<view class="input-row"> |
|
|
<view class="input-row"> |
|
|
<view class=""><uni-easyinput :inputBorder="false" class="easyinput" type="number" v-model="form.shortName" placeholder="请输入"></uni-easyinput></view> |
|
|
|
|
|
|
|
|
<view class=""><uni-easyinput :inputBorder="false" class="easyinput" type="number" v-model="form.width" placeholder="请输入"></uni-easyinput></view> |
|
|
<view class="symbol">x</view> |
|
|
<view class="symbol">x</view> |
|
|
<view class=""><uni-easyinput :inputBorder="false" class="easyinput" type="number" v-model="form.shortName" placeholder="请输入"></uni-easyinput></view> |
|
|
|
|
|
|
|
|
<view class=""><uni-easyinput :inputBorder="false" class="easyinput" type="number" v-model="form.length" placeholder="请输入"></uni-easyinput></view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
@ -79,15 +79,15 @@ |
|
|
<text class="label__text">数量(张)</text> |
|
|
<text class="label__text">数量(张)</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<view class="value"><qn-easyinput :maxlength="20" v-model="form.shortName" :inputBorder="false" text="right" placeholder="请输入数量"></qn-easyinput></view> |
|
|
|
|
|
|
|
|
<view class="value"><qn-easyinput :maxlength="20" v-model="form.quantity" :inputBorder="false" text="right" placeholder="请输入数量"></qn-easyinput></view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="qn-form-item qn-form-item"> |
|
|
<view class="qn-form-item qn-form-item"> |
|
|
<view class="label"><text class="label__text">交货时间</text></view> |
|
|
<view class="label"><text class="label__text">交货时间</text></view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<picker :value="paperIndex" :range="deliveryTimeList"> |
|
|
|
|
|
|
|
|
<picker :value="paperIndex" :range="deliveryTimeList" @change="deliveryTimeChange"> |
|
|
<view> |
|
|
<view> |
|
|
<text class="uni-input">{{ deliveryTimeList[paperIndex] }}</text> |
|
|
|
|
|
|
|
|
<text class="uni-input">{{ form.deliveryDay }}</text> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
<uni-icons type="right" color="#000000" size="16"></uni-icons> |
|
|
</view> |
|
|
</view> |
|
|
</picker> |
|
|
</picker> |
|
|
@ -113,7 +113,7 @@ |
|
|
:localdata="items" |
|
|
:localdata="items" |
|
|
> |
|
|
> |
|
|
<text v-if="form.locDistrictId"> |
|
|
<text v-if="form.locDistrictId"> |
|
|
{{ `${form.locProvinceName || ''}/${form.locCityName || ''}/${form.locDistrictName || ''}/${form.locStreetName || ''}` }} |
|
|
|
|
|
|
|
|
{{ `${form.deliveryProvinceName || ''}/${form.deliveryCityName || ''}/${form.deliveryDistrictName || ''}/${form.deliveryStreetName || ''}` }} |
|
|
</text> |
|
|
</text> |
|
|
</qn-data-picker> |
|
|
</qn-data-picker> |
|
|
</view> |
|
|
</view> |
|
|
@ -126,7 +126,7 @@ |
|
|
class="paper-price-textArea" |
|
|
class="paper-price-textArea" |
|
|
:maxlength="200" |
|
|
:maxlength="200" |
|
|
:styles="{ disableColor: '#F7F8FA' }" |
|
|
:styles="{ disableColor: '#F7F8FA' }" |
|
|
v-model="form.shortName" |
|
|
|
|
|
|
|
|
v-model="form.remark" |
|
|
:inputBorder="false" |
|
|
:inputBorder="false" |
|
|
type="textarea" |
|
|
type="textarea" |
|
|
placeholder="请输入拜访对象" |
|
|
placeholder="请输入拜访对象" |
|
|
@ -152,62 +152,66 @@ import qnDataPicker from '@/components/qn-data-picker/qn-data-picker.vue' |
|
|
import qnDatetimePicker from '@/components/qn-datetime-picker/qn-datetime-picker.vue' |
|
|
import qnDatetimePicker from '@/components/qn-datetime-picker/qn-datetime-picker.vue' |
|
|
import qnFooter from '@/components/qn-footer/qn-footer.vue' |
|
|
import qnFooter from '@/components/qn-footer/qn-footer.vue' |
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
import uGap from '@/components/u-gap/u-gap.vue' |
|
|
import { createEnquiryOrder } from '@/apis/forComparisonApi.js' |
|
|
|
|
|
const validateFields = [ |
|
|
|
|
|
'name', |
|
|
|
|
|
'uniformSocialCreditCode', |
|
|
|
|
|
'legalPersonName', |
|
|
|
|
|
'locProvinceId', |
|
|
|
|
|
'locCityId', |
|
|
|
|
|
'locDistrictId', |
|
|
|
|
|
'locStreetId', |
|
|
|
|
|
'locProvinceName', |
|
|
|
|
|
'locCityName', |
|
|
|
|
|
'locDistrictName', |
|
|
|
|
|
'locStreetName', |
|
|
|
|
|
'locDetail', |
|
|
|
|
|
'legalPersonIdCardNo', |
|
|
|
|
|
'legalPersonIdCardFrontImg', |
|
|
|
|
|
'legalPersonIdCardBackImg', |
|
|
|
|
|
'businessLicenseImg', |
|
|
|
|
|
'registeredCapital', |
|
|
|
|
|
'foundDate' |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
import { createEnquiryOrder, getCategoryList } from '@/apis/forComparisonApi.js' |
|
|
|
|
|
const validateFields = ['categoryName', 'brandName', 'paperName', 'gramWeight', 'width', 'length', 'quantity'] |
|
|
export default { |
|
|
export default { |
|
|
components: { qnEasyinput, qnDataPicker, qnDatetimePicker, qnFooter, uGap }, |
|
|
components: { qnEasyinput, qnDataPicker, qnDatetimePicker, qnFooter, uGap }, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
paperIndex: 0, |
|
|
paperIndex: 0, |
|
|
paperGradesList: ['白卡板', '黑板纸', '灰板纸'], |
|
|
|
|
|
brandList: ['朱雀', '金蝶兰', '骄阳', '太阳', '丽品'], |
|
|
|
|
|
gramWeightList: ['300', '345', '350'], |
|
|
|
|
|
|
|
|
categoryNameList: [], |
|
|
|
|
|
brandNameList: [], |
|
|
|
|
|
weightList: [], |
|
|
deliveryTimeList: ['当天到', '明天到'], |
|
|
deliveryTimeList: ['当天到', '明天到'], |
|
|
radioGroupList: ['正度', '大度', '特规'], |
|
|
|
|
|
|
|
|
radioGroupList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
name: '正度', |
|
|
|
|
|
width: '787', |
|
|
|
|
|
length: '1092', |
|
|
|
|
|
disabled: true |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '特规分切', |
|
|
|
|
|
width: '889', |
|
|
|
|
|
length: '1194', |
|
|
|
|
|
disabled: true |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
name: '特规分切', |
|
|
|
|
|
width: '', |
|
|
|
|
|
length: '', |
|
|
|
|
|
disabled: false |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
form: { |
|
|
form: { |
|
|
id: null, |
|
|
|
|
|
name: null, |
|
|
|
|
|
shortName: null, |
|
|
|
|
|
contactName: null, |
|
|
|
|
|
contactMobile: null, |
|
|
|
|
|
contactTitle: null, |
|
|
|
|
|
uniformSocialCreditCode: null, |
|
|
|
|
|
locProvinceId: null, |
|
|
|
|
|
locCityId: null, |
|
|
|
|
|
locDistrictId: null, |
|
|
|
|
|
locStreetId: null, |
|
|
|
|
|
locProvinceName: null, |
|
|
|
|
|
locCityName: null, |
|
|
|
|
|
locDistrictName: null, |
|
|
|
|
|
locStreetName: null, |
|
|
|
|
|
locDetail: null, |
|
|
|
|
|
legalPersonName: null, |
|
|
|
|
|
legalPersonMobile: null, |
|
|
|
|
|
legalPersonIdCardNo: null, |
|
|
|
|
|
legalPersonIdCardFrontImg: null, |
|
|
|
|
|
legalPersonIdCardBackImg: null, |
|
|
|
|
|
businessLicenseImg: null, |
|
|
|
|
|
registeredCapital: null, |
|
|
|
|
|
foundDate: null |
|
|
|
|
|
|
|
|
deliveryArea: '', |
|
|
|
|
|
deliveryCityId: '', |
|
|
|
|
|
deliveryCityName: '', |
|
|
|
|
|
deliveryDay: '', |
|
|
|
|
|
deliveryDayIndex: 0, |
|
|
|
|
|
deliveryDistrictId: '', |
|
|
|
|
|
deliveryDistrictName: '', |
|
|
|
|
|
deliveryId: '', |
|
|
|
|
|
deliveryProvinceId: '', |
|
|
|
|
|
deliveryProvinceName: '', |
|
|
|
|
|
deliveryStreetId: '', |
|
|
|
|
|
deliveryStreetName: '', |
|
|
|
|
|
detailList: [], |
|
|
|
|
|
offerEnterprise: '', |
|
|
|
|
|
remark: '', |
|
|
|
|
|
brandId: '', |
|
|
|
|
|
brandName: '', |
|
|
|
|
|
brandIndex: 0, |
|
|
|
|
|
categoryId: '', |
|
|
|
|
|
categoryName: '', |
|
|
|
|
|
categoryIndex: 0, |
|
|
|
|
|
gramWeight: '', |
|
|
|
|
|
gramWeightIndex: 0, |
|
|
|
|
|
length: '1092', |
|
|
|
|
|
paperName: '', |
|
|
|
|
|
quantity: '', |
|
|
|
|
|
remark: '', |
|
|
|
|
|
width: '787' |
|
|
}, |
|
|
}, |
|
|
searchList: [], |
|
|
searchList: [], |
|
|
hasSelected: false, |
|
|
hasSelected: false, |
|
|
@ -221,29 +225,85 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
onLoad(option) { |
|
|
|
|
|
this.form.offerEnterprise = option.id |
|
|
|
|
|
this.getCategoryList() |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
back, |
|
|
back, |
|
|
|
|
|
// 查询纸种列表 |
|
|
|
|
|
getCategoryList() { |
|
|
|
|
|
const params = { |
|
|
|
|
|
paperSupplierId: this.$store.state.supplierId |
|
|
|
|
|
} |
|
|
|
|
|
getCategoryList(params).then(res => { |
|
|
|
|
|
console.log('纸种列表', res) |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.categoryNameList = res.categoryNameList |
|
|
|
|
|
this.brandNameList = res.brandNameList |
|
|
|
|
|
this.weightList = res.weightList |
|
|
|
|
|
this.form.categoryName = this.categoryNameList[0] |
|
|
|
|
|
this.form.brandName = this.brandNameList[0] |
|
|
|
|
|
this.form.gramWeight = this.weightList[0] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 选择纸种 |
|
|
|
|
|
categoryChange(e) { |
|
|
|
|
|
// console.log('e.target.value', e.target.value) |
|
|
|
|
|
let index = e.target.value |
|
|
|
|
|
this.form.categoryIndex = e.target.value |
|
|
|
|
|
this.form.categoryName = this.categoryNameList[index] |
|
|
|
|
|
}, |
|
|
|
|
|
// 选择品牌 |
|
|
|
|
|
brandChange(e) { |
|
|
|
|
|
let index = e.target.value |
|
|
|
|
|
this.form.brandIndex = e.target.value |
|
|
|
|
|
this.form.brandName = this.brandNameList[index] |
|
|
|
|
|
}, |
|
|
|
|
|
// 克重 |
|
|
|
|
|
gramWeightChange(e) { |
|
|
|
|
|
let index = e.target.value |
|
|
|
|
|
this.form.gramWeightIndex = e.target.value |
|
|
|
|
|
this.form.gramWeight = this.weightList[index] |
|
|
|
|
|
}, |
|
|
|
|
|
// 规格切换 |
|
|
|
|
|
specificationTap(item, index) { |
|
|
|
|
|
this.form.width = item.width |
|
|
|
|
|
this.form.length = item.length |
|
|
|
|
|
}, |
|
|
|
|
|
// 交货时间 |
|
|
|
|
|
deliveryTimeChange(e) { |
|
|
|
|
|
this.form.deliveryDayIndex = e.target.value |
|
|
|
|
|
// 0 当天 1明天 |
|
|
|
|
|
if (this.form.deliveryDayIndex == 0) { |
|
|
|
|
|
this.form.deliveryDay = this.getDay(0, 3600000) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.form.deliveryDay = this.getDay(1, 3600000) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onAreaChange(e) { |
|
|
onAreaChange(e) { |
|
|
console.log('e', e) |
|
|
|
|
|
if (e.detail.value && e.detail.value.length > 0) { |
|
|
if (e.detail.value && e.detail.value.length > 0) { |
|
|
const [province, city, district, street] = e.detail.value |
|
|
const [province, city, district, street] = e.detail.value |
|
|
this.form.locProvinceId = province.value |
|
|
|
|
|
this.form.locProvinceName = province.text |
|
|
|
|
|
this.form.locCityId = city.value |
|
|
|
|
|
this.form.locCityName = city.text |
|
|
|
|
|
this.form.locDistrictId = district.value |
|
|
|
|
|
this.form.locDistrictName = district.text |
|
|
|
|
|
this.form.locStreetId = street.value |
|
|
|
|
|
this.form.locStreetName = street.text |
|
|
|
|
|
|
|
|
this.form.deliveryProvinceId = province.value |
|
|
|
|
|
this.form.deliveryProvinceName = province.text |
|
|
|
|
|
this.form.deliveryCityId = city.value |
|
|
|
|
|
this.form.deliveryCityName = city.text |
|
|
|
|
|
this.form.deliveryDistrictId = district.value |
|
|
|
|
|
this.form.deliveryDistrictName = district.text |
|
|
|
|
|
this.form.deliveryStreetId = street.value |
|
|
|
|
|
this.form.deliveryStreetName = street.text |
|
|
|
|
|
this.form.deliveryArea = province.text + city.text + district.text + street.text |
|
|
} else { |
|
|
} else { |
|
|
this.form.locProvinceId = null |
|
|
|
|
|
this.form.locProvinceName = null |
|
|
|
|
|
this.form.locCityId = null |
|
|
|
|
|
this.form.locCityName = null |
|
|
|
|
|
this.form.locDistrictId = null |
|
|
|
|
|
this.form.locDistrictName = null |
|
|
|
|
|
this.form.locStreetId = null |
|
|
|
|
|
this.form.locStreetName = null |
|
|
|
|
|
|
|
|
this.form.deliveryProvinceId = null |
|
|
|
|
|
this.form.deliveryProvinceName = null |
|
|
|
|
|
this.form.deliveryCityId = null |
|
|
|
|
|
this.form.deliveryCityName = null |
|
|
|
|
|
this.form.deliveryDistrictId = null |
|
|
|
|
|
this.form.deliveryDistrictName = null |
|
|
|
|
|
this.form.deliveryStreetId = null |
|
|
|
|
|
this.form.deliveryStreetName = null |
|
|
|
|
|
this.form.deliveryArea = null |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
selectedImage(type) { |
|
|
selectedImage(type) { |
|
|
@ -266,39 +326,47 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
addUser() { |
|
|
addUser() { |
|
|
if (!this.form.id) { |
|
|
|
|
|
for (let i = 0; i < validateFields.length; i++) { |
|
|
|
|
|
if (this.form[validateFields[i]] === null || this.form[validateFields[i]] === '') { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '请完善信息', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (!/^1[3456789]\d{9}$/.test(this.form['legalPersonMobile'])) { |
|
|
|
|
|
|
|
|
for (let i = 0; i < validateFields.length; i++) { |
|
|
|
|
|
if (this.form[validateFields[i]] === null || this.form[validateFields[i]] === '') { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '请输入正确法人手机号', |
|
|
|
|
|
|
|
|
title: '请完善信息', |
|
|
icon: 'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// if (!/^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/.test(this.form['legalPersonIdCardNo'])) { |
|
|
|
|
|
// uni.showToast({ |
|
|
|
|
|
// title: '请输入正确法人身份证号', |
|
|
|
|
|
// icon: 'none' |
|
|
|
|
|
// }) |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
} |
|
|
} |
|
|
if (this.form.contactMobile && !/^1[3456789]\d{9}$/.test(this.form['contactMobile'])) { |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '请输入正确联系人手机号', |
|
|
|
|
|
icon: 'none' |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
const params = { |
|
|
|
|
|
deliveryArea: this.form.deliveryArea, |
|
|
|
|
|
deliveryCityId: this.form.deliveryCityId, |
|
|
|
|
|
deliveryCityName: this.form.deliveryCityName, |
|
|
|
|
|
deliveryDay: this.form.deliveryDay, |
|
|
|
|
|
deliveryDistrictId: this.form.deliveryDistrictId, |
|
|
|
|
|
deliveryDistrictName: this.form.deliveryDistrictName, |
|
|
|
|
|
deliveryId: this.form.deliveryId, |
|
|
|
|
|
deliveryProvinceId: this.form.deliveryProvinceId, |
|
|
|
|
|
deliveryProvinceName: this.form.deliveryProvinceName, |
|
|
|
|
|
deliveryStreetId: this.form.deliveryStreetId, |
|
|
|
|
|
deliveryStreetName: this.form.deliveryStreetName, |
|
|
|
|
|
detailList: [ |
|
|
|
|
|
{ |
|
|
|
|
|
brandId: this.form.brandId, |
|
|
|
|
|
brandName: this.form.brandName, |
|
|
|
|
|
categoryId: this.form.categoryId, |
|
|
|
|
|
categoryName: this.form.categoryName, |
|
|
|
|
|
gramWeight: this.form.gramWeight, |
|
|
|
|
|
length: this.form.length, |
|
|
|
|
|
paperName: this.form.paperName, |
|
|
|
|
|
quantity: this.form.quantity, |
|
|
|
|
|
remark: this.form.remark, |
|
|
|
|
|
width: this.form.width |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
offerEnterprise: this.form.offerEnterprise, |
|
|
|
|
|
remark: this.form.remark, |
|
|
|
|
|
enterpriseId: this.$store.state.companyInfo.id, |
|
|
|
|
|
userId: this.$store.state.userInfo.userId |
|
|
} |
|
|
} |
|
|
createEnquiryOrder(this.form).then(res => { |
|
|
|
|
|
|
|
|
createEnquiryOrder(params).then(res => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '添加成功', |
|
|
title: '添加成功', |
|
|
@ -309,9 +377,33 @@ export default { |
|
|
}, 1000) |
|
|
}, 1000) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @param {Object} day '昨天:', this.getDay(-1, 7200000) '今天:', this.getDay(0, 3600000) '明天:', this.getDay(1, 3600000) |
|
|
|
|
|
* @param {Object} hours |
|
|
|
|
|
* 获取当前时间的前一天 后一天 一周 或者是当前时间的几个小时 |
|
|
|
|
|
*/ |
|
|
|
|
|
getDay(day, hours) { |
|
|
|
|
|
var today = new Date() |
|
|
|
|
|
var targetday = today.getTime() + 1000 * 60 * 60 * 24 * day + hours |
|
|
|
|
|
today.setTime(targetday) |
|
|
|
|
|
var tYear = today.getFullYear() |
|
|
|
|
|
var tMonth = today.getMonth() |
|
|
|
|
|
var tDate = today.getDate() |
|
|
|
|
|
var getHours = today.getHours() |
|
|
|
|
|
tMonth = this.doHandleMonth(tMonth + 1) |
|
|
|
|
|
tDate = this.doHandleMonth(tDate) |
|
|
|
|
|
return tYear + '-' + tMonth + '-' + tDate + ' ' + '23:59:59' |
|
|
|
|
|
}, |
|
|
|
|
|
doHandleMonth(month) { |
|
|
|
|
|
var m = month |
|
|
|
|
|
if (month.toString().length === 1) { |
|
|
|
|
|
m = '0' + month |
|
|
|
|
|
} |
|
|
|
|
|
return m |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
|