Compare commits

...

2 Commits

Author SHA1 Message Date
tianyi 265d629513 11 1 day ago
tianyi f15081d210 11 1 day ago
  1. 8
      package1/order/orderDetail.vue
  2. 110
      package1/order/orderEvaluate.vue
  3. 7
      package1/order/orderList.vue
  4. 55
      package2/shop/merchantCenter.vue

8
package1/order/orderDetail.vue

@ -446,7 +446,7 @@
<uni-popup ref="imgPopup" background-color="#fff">
<view class="img-popup-content" @tap="$refs.imgPopup.close()">
<uqrcode :hide='true' ref="uqrcode" size="160" sizeUnit="rpx" canvas-id="qrcode"
:value="orderDetail.id">
:value="orderDetail.id + '@@'+ orderDetail.shopId">
</uqrcode>
<img :src="newQRList" alt="" style="width: 330rpx;height: 330rpx;margin: 282rpx 0 0 136rpx;border: 20rpx solid rgba(222, 255, 248, 1);border-radius: 20rpx;">
</view>
@ -666,11 +666,11 @@
this.$refs.imgPopup.open()
this.$refs.uqrcode.toTempFilePath({
success: res => {
data.path = res.tempFilePath
that.newQRList = data
console.log(res)
that.newQRList = res.tempFilePath
},
fail: err => {
console.log(err)
}
});
},

110
package1/order/orderEvaluate.vue

@ -14,27 +14,27 @@
<view class="content">
<view class="box1">
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;">
竹仔园牛仔农庄(第六分店)
{{shopData.shopName}}
</view>
<view style="display: flex;padding: 20rpx;background: rgba(247, 248, 248, 1);border-radius: 20rpx;">
<view v-for="(item,index) in shopData.goodsList" :key="index" style="display: flex;padding: 20rpx;background: rgba(247, 248, 248, 1);border-radius: 20rpx;">
<view class="goods-img">
<img src="/static/images/img/shangpintu.png" alt="">
<img :src="item.productPicture" alt="">
</view>
<view class="goods-content">
<view class="goods-name">
牛仔农庄(医专店)
{{item.productName}}
</view>
<view class="goods-content-center">
<view class="goods-deal1">
打分不要啦
{{item.specs}}
</view>
</view>
<view class="goods-content-bottom">
<view style="width: 50%;">
X1
X{{item.quantity}}
</view>
<view class="pintuan-left-price">
90.00
{{item.price}}
</view>
</view>
</view>
@ -46,7 +46,7 @@
</view>
<view class="eval-name">
<view class="eval-name1">
竹仔园牛仔农庄(第六分店)
{{shopData.shopName}}
</view>
<view class="eval-num">
<view class="eval-num1">
@ -60,6 +60,24 @@
</view>
</view>
</view>
<view class="eval-num" style="border: none;">
<textarea name="" v-model="shopRemark" id="" cols="30" rows="10" placeholder="有什么想说的吗?可以写下来,提交给我们" style="width: 100%;font-size: 28rpx;padding: 30rpx;height: 200rpx;"></textarea>
</view>
<view class="eval-num" style="border: none;padding: 0 30rpx 20rpx;display: flex;border-bottom: 1px solid #eee;">
<view class="upload-img" @tap="pictureAdd('shop')"
style="background: #eee;text-align: center;line-height: 160rpx;">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
<view style="flex: 1;display: flex;">
<view v-if="shopPicture !=''"
:key="index" style="width: 160rpx;height: 160rpx;margin-left: 20rpx;">
<img :src="shopPicture" alt="" class="upload-img">
</view>
<view style="height: 160rpx;line-height: 40rpx;padding: 40rpx 0 0 20rpx;color: #777;">
发图/发视频能更有效地帮助他人哦~
</view>
</view>
</view>
<view class="eval-num">
<view class="eval-num1">
您对本次配送人员还满意吗
@ -73,17 +91,17 @@
</view>
</view>
<view class="eval-num" style="border: none;">
<textarea name="" id="" cols="30" rows="10" placeholder="有什么想说的吗?可以写下来,提交给我们" style="width: 100%;font-size: 28rpx;padding: 30rpx;height: 200rpx;"></textarea>
<textarea name="" v-model="manRemark" id="" cols="30" rows="10" placeholder="有什么想说的吗?可以写下来,提交给我们" style="width: 100%;font-size: 28rpx;padding: 30rpx;height: 200rpx;"></textarea>
</view>
<view class="eval-num" style="border: none;padding: 0 30rpx;display: flex;">
<view class="upload-img" @tap="pictureAdd"
<view class="upload-img" @tap="pictureAdd('man')"
style="background: #eee;text-align: center;line-height: 160rpx;">
<uni-icons type="camera" size="28" color="#777"></uni-icons>
</view>
<view style="flex: 1;display: flex;">
<view v-if="orderPicture !=''"
<view v-if="manPicture !=''"
:key="index" style="width: 160rpx;height: 160rpx;margin-left: 20rpx;">
<img :src="orderPicture" alt="" class="upload-img">
<img :src="manPicture" alt="" class="upload-img">
</view>
<view style="height: 160rpx;line-height: 40rpx;padding: 40rpx 0 0 20rpx;color: #777;">
发图/发视频能更有效地帮助他人哦~
@ -105,7 +123,7 @@
</view>
</view>
<view class="bottom">
<view class="bottom-btn">
<view class="bottom-btn" @tap="submit">
发布
</view>
</view>
@ -118,10 +136,13 @@
data() {
return {
selected:'niming',
orderPicture:'',
menuButtonInfo: {},
shopEvaluateNum:0,
manEvaluateNum:0,
shopEvaluateNum:5,
manEvaluateNum:5,
shopRemark:'',
manRemark:'',
shopPicture:'',
manPicture:'',
evalNumList:[{
name:'很糟糕',
checked:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/aa045ef1faca4130a9483688054e5620.png',
@ -147,20 +168,61 @@
checked:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/90ef5af58d314c1bbabe8bd48aa49d22.png',
noChecked:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/c1cce0db39264c6ea9b533137153fc36.png',
index:5
}]
}],
shopData:{}
}
},
onLoad(option) {
this.shopData = JSON.parse(option.item)
},
onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
},
methods: {
submit(){
let that = this;
let data = [{ //
parentId:'',
leve:0,
remark:this.shopRemark,
picture:this.shopPicture,
createBy:uni.getStorageSync('id'),
createByName:'微信用户',
createByIcon:'https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png',
score:this.shopEvaluateNum,
orderId:this.shopData.id,
shopId:this.shopData.shopId,
},{ //
parentId:'',
leve:0,
remark:this.shopRemark,
picture:this.manPicture,
createBy:uni.getStorageSync('id'),
createByName:'微信用户',
createByIcon:'https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png',
score:this.manEvaluateNum,
orderId:this.shopData.id,
shopId:this.shopData.shopId,
}]
that.tui.request("/app/comment/save", "POST", data, false, true).then((res) => {
if (res.code == 200) {
uni.showToast({
title: "评论成功",
icon: 'none'
})
setTimeout(res => {
this.back()
}, 1000)
} else {
that.tui.toast(res.message);
}
uni.hideLoading();
}).catch((res) => {});
},
checkVoucher(type) {
this.selected = type;
},
pictureAdd(id, huan) {
pictureAdd(type) {
let that = this
uni.chooseMedia({
count: 1,
@ -172,13 +234,13 @@
mask: true
})
for (let i = 0; i < res.tempFiles.length; i++) {
that.upLoadFile(res.tempFiles[i].tempFilePath)
that.upLoadFile(res.tempFiles[i].tempFilePath,type)
}
}
})
},
async upLoadFile(path) {
async upLoadFile(path,type) {
let that = this;
let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({
@ -192,7 +254,11 @@
formData: {},
success: (uploadFileRes) => {
let pathData = JSON.parse(uploadFileRes.data)
this.orderPicture = pathData.result
if(type == 'shop'){
this.shopPicture = pathData.result
}else{
this.manPicture = pathData.result
}
that.$forceUpdate()
},
fail: (err) => {

7
package1/order/orderList.vue

@ -195,7 +195,7 @@
<view class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;" @tap.stop="orderDetail(item.id)">
查看订单
</view>
<view v-if="item.status == 5" class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;">
<view @tap.stop="goEvaluate(item)" v-if="item.status == 5" class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;">
去评价
</view>
<!-- <view class="btn1">
@ -462,6 +462,11 @@
url: '/package1/order/orderDetail?id=' + id
});
},
goEvaluate(item){
uni.redirectTo({
url: '/package1/order/orderEvaluate?item=' + JSON.stringify(item)
});
},
checkTabs2(type) {
this.tab2Checked = type;
this.searchForm.searchStatus = type;

55
package2/shop/merchantCenter.vue

@ -271,37 +271,36 @@
uni.scanCode({
success: (res) => {
if (res.scanType == "QR_CODE") { //
console.log('二维码',res)
// let shopId = base.decode(res.result.split(',')[1])
// if (shopId == uni.getStorageSync('shopId').substring('10', '12')) {
// that.productId = base.decode(res.result.split(',')[0])
// that.toggle('bottom', base.decode(res.result.split(',')[0]));
let shopId = res.result.split('@@')[1]
if (shopId == uni.getStorageSync('shopId')) {
let productId = res.result.split('@@')[0]
uni.showModal({
title: '提示',
content: '确定要核销该订单吗?',
success: function (res1) {
if (res1.confirm) {
that.tui.request("/mall/order/complete", "post", {
orderId: productId
}, false, true).then((res) => {
if (res.code == 200) {
uni.showToast({
title: '核销成功',
icon: 'none'
})
} else {
that.tui.toast(res.message)
}
uni.hideLoading()
}).catch((res) => {})
}
}
});
// } else {
// that.tui.toast('')
// }
} else {
console.log('条形码',res)
// that.tui.request("/app/product/getByBarcode", "POST", {
// barcode: res.result
// }, false, true).then((res1) => {
// if (res1.code == 200) {
// that.productId = res1.result[0].id
// if (res1.result == '') {
// that.tui.toast('')
// } else {
// that.toggle('bottom', res1.result[0].id);
// }
// } else {
// that.tui.toast(res.message)
// }
// }).catch((res) => {
// that.tui.toast(res)
// })
} else {
that.tui.toast('未查询到此订单信息,请核实!')
}
}
},
fail: (res) => {
uni.showToast({

Loading…
Cancel
Save