diff --git a/apis/trade.js b/apis/trade.js
index 5c7bdc5..4330b0c 100644
--- a/apis/trade.js
+++ b/apis/trade.js
@@ -45,7 +45,28 @@ export function enquiryReplyDetail(data) {
},
{ hideLoading: true }
)
-}
+}
+// 消息列表
+export function systemMessageList(data) {
+ return http.get(
+ {
+ url: '/base-paper-trading/get/system-message/list',
+ data
+ },
+ { hideLoading: true }
+ )
+}
+// 系统消息已读
+export function systemRead(data) {
+ return http.post({
+ url: '/base-paper-trading/set/message-read',
+ data
+ })
+}
+
+
+
+
diff --git a/pages/add-paper/index.vue b/pages/add-paper/index.vue
index 8b3a5ca..0d3701a 100644
--- a/pages/add-paper/index.vue
+++ b/pages/add-paper/index.vue
@@ -203,7 +203,7 @@
class="paper-price-textArea"
:maxlength="200"
:styles="{ disableColor: '#F7F8FA' }"
- v-model="form.remark"
+ v-model="form.sellingProposition"
:inputBorder="false"
type="textarea"
placeholder="请输入商品卖点"
@@ -219,7 +219,7 @@
class="paper-price-textArea"
:maxlength="200"
:styles="{ disableColor: '#F7F8FA' }"
- v-model="form.remark"
+ v-model="form.description"
:inputBorder="false"
type="textarea"
placeholder="请输入商品描述"
@@ -234,7 +234,7 @@
class="paper-price-textArea"
:maxlength="200"
:styles="{ disableColor: '#F7F8FA' }"
- v-model="form.remark"
+ v-model="form.shippingNote"
:inputBorder="false"
type="textarea"
placeholder="请输入送货说明"
@@ -249,7 +249,7 @@
class="paper-price-textArea"
:maxlength="200"
:styles="{ disableColor: '#F7F8FA' }"
- v-model="form.remark"
+ v-model="form.otherNote"
:inputBorder="false"
type="textarea"
placeholder="请输入其他说明"
@@ -281,7 +281,7 @@
diff --git a/pages/my-offer/index.vue b/pages/my-offer/index.vue
index f908179..2667869 100644
--- a/pages/my-offer/index.vue
+++ b/pages/my-offer/index.vue
@@ -10,7 +10,7 @@
- 广州民族印刷有限公司
+ {{items.belongEnterpriseName}}
{{ controlItems[items.orderStatus - 1] }}
@@ -26,7 +26,7 @@
- 三分钟前
+ {{items.deliveryDay}}
¥{{ items.totalOfferPrice }}
@@ -59,9 +59,7 @@ export default {
pageNum: 0, // 初始会执行一次下拉加载
pageSize: 10
},
- orderData: [
- {"id":"638458876659896320","totalOfferPrice":10,"orderItemList":[{"id":"123456","productName":"交易大厅-订单商品","pieceQuantity":0,"productImg":null,"gramWeight":"300","width":"1024","length":"789","brandName":"丽盈","categoryName":"白卡纸"}],"deliveryDay":null,"orderStatus":3}
- ],
+ orderData: [],
controlCurrent: 0,
controlItems: ['待付款', '待发货', '待收货', '已完成', '已关闭'],
orderOption: {
@@ -101,7 +99,7 @@ export default {
// 获取我的报价
getMyreplyListQuery() {
return new Promise((resolve, reject) => {
- getMyreplyList({ ...this.orderParams, ...this.orderPagination })
+ getMyreplyList({...this.orderPagination })
.then(res => {
if (res) {
if (this.orderPagination.pageNum == 1) {
diff --git a/pages/submit-quotation/index.vue b/pages/submit-quotation/index.vue
index dfaa92c..2959973 100644
--- a/pages/submit-quotation/index.vue
+++ b/pages/submit-quotation/index.vue
@@ -26,33 +26,33 @@
报价截止
- {{ upDataObj.enquiryValidTime[0] }}
+ {{ upDataObj.enquiryValidTimeSplit[0] }}
:
- {{ upDataObj.enquiryValidTime[1] }}
+ {{ upDataObj.enquiryValidTimeSplit[1] }}
:
- {{ upDataObj.enquiryValidTime[2] }}
+ {{ upDataObj.enquiryValidTimeSplit[2] }}
- {{ items.brandName }}|{{ items.gramWeight }}|{{ items.length }}*{{ items.width }}|{{ items.quantity }}
-
+ {{ items.paperName }}|{{ items.gramWeight }}|{{ items.length }}*{{ items.width }}|{{ items.quantity }}
+
重量(吨):
- 1.6544
+ {{ items.gramWeight }}
单价(元/吨):
{{ items.unitFee }}
-
+
@@ -67,18 +67,18 @@
其他费用:
- ¥ 80.00
+ ¥ {{ upDataObj.otherFee }}
合计:
- ¥ 13800.32
+ ¥ {{ upDataObj.totalAllPrice }}
有效时间:
- 24小时
+ {{ upDataObj.createTime }}
设置
@@ -97,11 +97,16 @@
-
+
+
+
+
-
+
+
+
@@ -111,7 +116,7 @@
:inputBorder="false"
class="submit-popup-input submit-popup-specifications"
type="number"
- v-model="value"
+ v-model="addObj.length"
placeholder="请输入内容"
>
@@ -121,7 +126,7 @@
:inputBorder="false"
class="submit-popup-input submit-popup-specifications"
type="number"
- v-model="value"
+ v-model="addObj.width"
placeholder="请输入内容"
>
@@ -130,11 +135,11 @@
-
+
@@ -145,25 +150,34 @@
-
+
-
+
+
+
合计:
- ¥ 0
+ ¥ {{ prices.totalPrice }}
-
+
@@ -180,7 +194,7 @@
{{ item }}
- {{ item }}小时
+ {{ item }}分钟
@@ -193,7 +207,7 @@
import { back, go2 } from '@/utils/hook.js'
import qnHeader from '@/components/qn-header/qn-header.vue'
import uGap from '@/components/u-gap/u-gap.vue'
-import { updataEnquiryReply } from '@/apis/trade'
+import { updataEnquiryReply, enquiryReplyDetail } from '@/apis/trade'
export default {
components: {
@@ -202,15 +216,15 @@ export default {
},
data() {
const date = new Date()
- const years = ['长期']
+ const years = []
const year = date.getFullYear()
const months = []
const month = date.getMonth() + 1
const day = date.getDate()
- for (let i = 0; i <= 31; i++) {
- years.push(i+'天')
+ for (let i = 1; i < 49; i++) {
+ years.push(i + '小时')
}
- for (let i = 1; i <= 12; i++) {
+ for (let i = 1; i < 61; i++) {
months.push(i)
}
return {
@@ -224,79 +238,71 @@ export default {
year,
months,
month,
- timeValue: [0, 1],
- pickerValue:[],
- upDataObj:{
- belongEnterpriseName:'东莞市隆兴纸业有限公司',
- deliveryArea:'广东省/广州市/天河区',
- deliveryDay:'2021/12/29 12:30',
- enquiryValidTime:[12,11,10],
- itemList:[
- {
- brandName:'丽品白卡',
- categoryName:"",
- gramWeight:'200g',
- length:'787',
- quantity:'5000张',
- width:'1092',
- unitFee:'1000',
- totalPrice:'1202'
- },
- {
- brandName:'丽品白卡',
- categoryName:"",
- gramWeight:'200g',
- length:'787',
- quantity:'5000张',
- width:'1092',
- unitFee:'1000',
- totalPrice:'1202'
- }
- ]
+ timeValue: [0, 0],
+ pickerValue: [],
+ upDataObj: {
+ otherFee:0,
+ totalAllPrice:0,
+ enquiryValidTimeSplit:[]
},
- items: [
- {
- text: '一年级',
- value: '1-0'
- },
- {
- text: '二年级',
- value: '2-0'
- },
- {
- text: '三年级',
- value: '3-0'
- },
- {
- text: '一年级',
- value: '1-0'
- },
- {
- text: '二年级',
- value: '2-0'
- },
- {
- text: '三年级',
- value: '3-0'
- }
- ]
+ addObj: {},
+ prices: {
+ totalPrice: 0
+ },
+ modifyIndex: 0,
+ pricesIndex: 0,
+ // items: []
}
},
onLoad(option) {
- if (option) {
- console.log(option)
- this.title = option.title
- }
+ if (option) {
+ this.title = option.title
+ this.getDetail(option.id)
+ }
},
methods: {
back,
+ // 获取详情
+ getDetail(id) {
+ enquiryReplyDetail(id)
+ .then(res => {
+ if (res) {
+ 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)
+ console.log('this.upDataObj', res)
+ }
+ })
+ .catch(err => {
+ reject(err)
+ })
+ },
+ // 确认报价
+ surePrice() {
+ updateEnquiry(thids.upDataObj)
+ .then(res => {
+ if (res) {
+ }
+ })
+ .catch(err => {
+ reject(err)
+ })
+ },
// 商品操作按钮
- commodityModify(item) {
- console.log(111)
+ commodityModify(item, index) {
+ this.modifyIndex = index
+ this.addObj = JSON.parse(JSON.stringify(item))
+ console.log(this.addObj)
this.$refs.popup.open('bottom')
},
// 单价操作按钮
- priceModify() {
+ priceModify(item, index) {
+ this.pricesIndex = index
+ this.prices = JSON.parse(JSON.stringify(item))
this.$refs.popupPrice.open('bottom')
},
// 事件设置
@@ -305,6 +311,7 @@ export default {
},
// 事件选择change事件
bindChange(e) {
+ this.timeValue = e.detail.value
console.log(e.detail.value)
},
close() {
@@ -317,31 +324,69 @@ export default {
this.pickerValue = e.detail.value
},
// 时间设置取消
- pickerCancel(){
+ pickerCancel() {
this.$refs.popupTime.close()
},
// 时间设置确认
- pickerSure(){
+ pickerSure() {
+ console.log('timeValue',this.timeValue)
this.$refs.popupTime.close()
},
+ // 确认修改纸品
+ sureModifyPaper() {
+ this.$refs.popup.close()
+ this.upDataObj.itemList[this.modifyIndex] = JSON.parse(JSON.stringify(this.addObj))
+ this.upDataObj = JSON.parse(JSON.stringify(this.upDataObj))
+ this.priceFree()
+ },
+ // 单价合计
+ pricesUnutFee(item) {
+ var abs = parseFloat(this.prices.unitFee) * parseFloat(this.prices.gramWeight)
+ this.prices.totalPrice = abs.toFixed(2)
+ },
+ // 单价确认报价
+ 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)
+ 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) {
-
- resolve({ list: this.quotationData, total: res.total })
+ uni.showToast({
+ title: '添加成功',
+ icon: 'success'
+ })
+ setTimeout(()=>{
+ back()
+ },800)
+
}
})
.catch(err => {
reject(err)
})
})
-
- },
-
+ }
}
}
diff --git a/pages/trade/quotationList.vue b/pages/trade/quotationList.vue
index ca3df60..8a83da8 100644
--- a/pages/trade/quotationList.vue
+++ b/pages/trade/quotationList.vue
@@ -46,7 +46,7 @@
报价截止:
{{ item.enquiryValidTime }}
-
+
@@ -171,9 +171,10 @@ export default {
})
},
// 报价按钮事件
- offerClick() {
+ offerClick(item) {
var params = {
- title: '提交报价'
+ ...item,
+ title: '提交报价',
}
go2('submit-quotation', params)
},
diff --git a/utils/hook.js b/utils/hook.js
index 611ce9c..34ceae8 100644
--- a/utils/hook.js
+++ b/utils/hook.js
@@ -141,6 +141,7 @@ export function uploadFile(path, type = 'image') {
let result = JSON.parse(res.data)
if (result.data) {
resolve(result.data)
+ return result.data
} else {
reject(result.message)
}