|
@@ -12,23 +12,23 @@
|
|
|
<u-divider text="订单信息"></u-divider>
|
|
|
<view class="item" style="padding-top: 0px">
|
|
|
<text class="label">收购商品</text>
|
|
|
- <text class="desc">越南榴莲</text>
|
|
|
+ <text class="desc omit">{{ item.goodsName }}</text>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<text class="label">商品编号</text>
|
|
|
- <text class="desc">25吨</text>
|
|
|
+ <text class="desc">{{ item.goodsNo }}</text>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<text class="label">计价单位</text>
|
|
|
- <text class="desc">吨</text>
|
|
|
+ <text class="desc">{{ item.goodsUnit }}</text>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<text class="label">商品数量</text>
|
|
|
- <text class="desc">35</text>
|
|
|
+ <text class="desc">{{ item.goodsQuantity }}</text>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<text class="label">发布时间</text>
|
|
|
- <text class="desc">2023-08 15:35</text>
|
|
|
+ <text class="desc">{{ item.createTime }}</text>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<text class="label">订单状态</text>
|
|
@@ -36,12 +36,12 @@
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<text class="label">接单人</text>
|
|
|
- <text class="desc">张三</text>
|
|
|
+ <text class="desc">{{ user.name }}</text>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<text class="label">出价金额(必填)</text>
|
|
|
<text class="desc">
|
|
|
- <input type="number" v-model="price" placeholder="请输入" />
|
|
|
+ <input type="number" v-model="order.price" placeholder="请输入(元)" />
|
|
|
</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -60,34 +60,38 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ user: this.getUser(),
|
|
|
item: {},
|
|
|
- price: ''
|
|
|
+ order: {}
|
|
|
};
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
- if (e.id) {
|
|
|
- // let params = {
|
|
|
- // goodsDemandId: e.id,
|
|
|
- // isOrders: 1,
|
|
|
- // price: parseInt(this.price),
|
|
|
- // purchaserId:
|
|
|
- // }
|
|
|
- // this.http.request({
|
|
|
- // url: '/level-two-server/app/TbDemandQuotation/quotation',
|
|
|
- // success: res => {
|
|
|
- // this.content = res.data.data;
|
|
|
- // }
|
|
|
- // });
|
|
|
+ if (e.item) {
|
|
|
+ this.item = JSON.parse(e.item);
|
|
|
+ this.order.purchaserId = this.item.purchaserId;
|
|
|
+ this.order.goodsDemandId = this.item.id;
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
pay() {
|
|
|
+ let rule = [{ name: 'price', checkType: 'notnull', errorMsg: '请输入报价' }];
|
|
|
+ if (!this.verify.check(this.order, rule)) {
|
|
|
+ uni.showModal({ content: this.verify.error, showCancel: false });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
content: '我已核对订单信息无误',
|
|
|
success: res => {
|
|
|
if (res.confirm) {
|
|
|
- uni.navigateTo({ url: '/pages/market/two/leader/success' });
|
|
|
+ this.http.request({
|
|
|
+ url: '/level-two-server/app/TbDemandQuotation/quotation',
|
|
|
+ method: 'POST',
|
|
|
+ data:this.order,
|
|
|
+ success: res => {
|
|
|
+ uni.navigateTo({ url: '/pages/market/two/leader/success' });
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
});
|