From b7ec55aba94cce1eb15d476690131d0181a50345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=98=81=E8=BE=89?= Date: Wed, 19 Jan 2022 10:07:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/trade.js | 2 +- pages/add-paper/index.vue | 8 +-- pages/mall/index.vue | 6 +-- pages/paper-detail/index.vue | 36 +++++++------- pages/submit-quotation/index.vue | 85 ++++++++++++++++++++++---------- 5 files changed, 84 insertions(+), 53 deletions(-) diff --git a/apis/trade.js b/apis/trade.js index 4330b0c..5ed1afb 100644 --- a/apis/trade.js +++ b/apis/trade.js @@ -33,7 +33,7 @@ export function getMyreplyList(data) { // 提交报价 export function updataEnquiryReply(data) { return http.post({ - url: '/base-paper-trading/update/enquiry-reply', + url: '/base-paper-trading/update/enquiry-reply?userId='+data.userId, data }) } diff --git a/pages/add-paper/index.vue b/pages/add-paper/index.vue index 0d3701a..f266425 100644 --- a/pages/add-paper/index.vue +++ b/pages/add-paper/index.vue @@ -134,7 +134,7 @@ text="right" placeholder="请输入账期售价" > - 元/张 + 元/{{ item.stockUnit === '1' ? '张' : '吨' }} @@ -151,7 +151,7 @@ text="right" placeholder="请输入纸品库存" > - + {{ item.stockUnit === '1' ? '张' : '吨' }} @@ -168,7 +168,7 @@ text="right" placeholder="请输入最低起送量" > - + {{ item.stockUnit === '1' ? '张' : '吨' }} @@ -465,7 +465,7 @@ export default { ...this.form, skuList: this.skuList, imgList:upImage, - supplierId:this.$store.state.supplierInfo.id + supplierId:this.$store.state.supplierInfo.supplierId } if (this.eidtFor === 0) { createProduct(params).then(res => { diff --git a/pages/mall/index.vue b/pages/mall/index.vue index 1df8007..7f37341 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -81,7 +81,7 @@ export default { pageSize: 10, storeId:null, name:null, - supplierId:this.$store.state.supplierInfo.id + supplierId:this.$store.state.supplierInfo.supplierId }, listData:[] } @@ -154,8 +154,8 @@ export default { go2('store-settings') }, // 详情点击事件 - detailInfo(){ - loginGo2('paper-detail') + detailInfo(item){ + loginGo2('paper-detail',item) }, // 上下架事件 productStatusChange(item){ diff --git a/pages/paper-detail/index.vue b/pages/paper-detail/index.vue index 0ba62b4..f7221f2 100644 --- a/pages/paper-detail/index.vue +++ b/pages/paper-detail/index.vue @@ -14,15 +14,15 @@ 纸厂信息: - 博汇 + {{form.manufacturerName}} 品牌信息: - 朱雀 + {{form.brandName}} 纸种信息: - 白卡纸 + {{form.categoryName}} @@ -39,12 +39,12 @@ 是否特价 - - 2500g + + {{item.weight}} 779*1092 - 4400.00元 - 8900张 - + {{item.listPrice}}元 + {{item.stock}}张 + {{item.isPromoting === ture ?'是':'否'}} @@ -53,28 +53,25 @@ 纸品图片 - - - - + 商品买点 - 月结30天价格,不加服务费! + {{form.sellingProposition}} 商品描述 - 售价全部为含税价,支持先用后付,欢迎来电查询!近期价格波动较大,请下单前先咨询价格。 + {{form.description}} 送货说明 - 分切纸不足重量的,另加调机费;低于送货重量或超出送货范围的,运费另计。 + {{form.shippingNote}} 其他说明 - 无其他说明。 + {{form.otherNote}} @@ -94,12 +91,15 @@ export default { imgList:[] } }, + onLoad(option) { + this.getDteailList(option) + }, methods: { back, //获取详情 - getDteailList(res) { + getDteailList(option) { var params = { - mallSupplierIds : null, + mallSupplierIds : option.id, productId : null } this.getSupplierDteail(params).then(res => { diff --git a/pages/submit-quotation/index.vue b/pages/submit-quotation/index.vue index 2959973..1d6e693 100644 --- a/pages/submit-quotation/index.vue +++ b/pages/submit-quotation/index.vue @@ -78,7 +78,7 @@ 有效时间: - {{ upDataObj.createTime }} + {{ upDataObj.enquiryValidTime }} 设置 @@ -194,7 +194,7 @@ {{ item }} - {{ item }}分钟 + {{ item }} @@ -221,11 +221,11 @@ export default { const months = [] const month = date.getMonth() + 1 const day = date.getDate() - for (let i = 1; i < 49; i++) { - years.push(i + '小时') + for (let i = 1; i < 3; i++) { + years.push(i + '天') } - for (let i = 1; i < 61; i++) { - months.push(i) + for (let i = 1; i < 24; i++) { + months.push(i + '小时') } return { value: '', @@ -241,16 +241,16 @@ export default { timeValue: [0, 0], pickerValue: [], upDataObj: { - otherFee:0, - totalAllPrice:0, - enquiryValidTimeSplit:[] + otherFee: 0, + totalAllPrice: 0, + enquiryValidTimeSplit: [] }, addObj: {}, prices: { totalPrice: 0 }, modifyIndex: 0, - pricesIndex: 0, + pricesIndex: 0 // items: [] } }, @@ -270,10 +270,9 @@ export default { this.upDataObj = res var timeb = this.upDataObj.enquiryValidTime.split(' ') var timeabs = timeb[1].split(':') - console.log('timeabs',timeabs) - this.$set(this.upDataObj,'enquiryValidTimeSplit',timeabs) - this.$set(this.upDataObj,'otherFee',0) - this.$set(this.upDataObj,'totalAllPrice',0) + this.$set(this.upDataObj, 'enquiryValidTimeSplit', timeabs) + this.$set(this.upDataObj, 'otherFee', 0) + this.$set(this.upDataObj, 'totalAllPrice', 0) console.log('this.upDataObj', res) } }) @@ -329,8 +328,40 @@ export default { }, // 时间设置确认 pickerSure() { - console.log('timeValue',this.timeValue) + console.log('timeValue', this.timeValue) this.$refs.popupTime.close() + var abs = this.addDate(new Date(), this.timeValue[0] + 1,this.timeValue[1] + 1) + var timeb = abs.split(' ') + var timeabs = timeb[1].split(':') + this.$set(this.upDataObj, 'enquiryValidTimeSplit', timeabs) + this.$set(this.upDataObj, 'enquiryValidTime', abs) + console.log(abs) + }, + addDate(date, days,hours) { + if (days == undefined || days == '') { + days = 1 + } + var date = new Date(date) + date.setDate(date.getDate() + days) + date.setHours(date.getHours()+ hours); + var month = date.getMonth() + 1 + var day = date.getDate() + var hours = date.getHours() + var min = date.getMinutes() + var second = date.getSeconds() + return date.getFullYear() + '-' + this.getFormatDate(month) + '-' + this.getFormatDate(day) +' ' + this.getFormatDate(hours) +':' + this.getFormatDate(min)+':' +this.getFormatDate(second) + }, + getFormatDate(arg) { + if (arg == undefined || arg == '') { + return '' + } + + var re = arg + '' + if (re.length < 2) { + re = '0' + re + } + + return re }, // 确认修改纸品 sureModifyPaper() { @@ -348,38 +379,38 @@ export default { pricesSure() { this.$set(this.upDataObj.itemList[this.pricesIndex], 'otherFee', this.prices.otherFee) this.$set(this.upDataObj.itemList[this.pricesIndex], 'unitFee', this.prices.unitFee) - var abs = parseFloat(this.prices.gramWeight) * parseFloat(this.prices.unitFee) + var abs = parseFloat(this.prices.gramWeight) * parseFloat(this.prices.unitFee) this.$set(this.upDataObj.itemList[this.pricesIndex], 'totalPrice', abs.toFixed(2)) this.upDataObj = JSON.parse(JSON.stringify(this.upDataObj)) this.$refs.popupPrice.close() console.log(this.upDataObj.itemList) this.priceFree() }, - priceFree(){ - for(let i = 0;i { - updataEnquiryReply( params ) + updataEnquiryReply(params) .then(res => { if (res) { uni.showToast({ title: '添加成功', icon: 'success' }) - setTimeout(()=>{ - back() - },800) - + setTimeout(() => { + back() + }, 800) } }) .catch(err => {