Compare commits

...

2 Commits

Author SHA1 Message Date
tianyi 265d629513 11 2 days ago
tianyi f15081d210 11 2 days 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"> <uni-popup ref="imgPopup" background-color="#fff">
<view class="img-popup-content" @tap="$refs.imgPopup.close()"> <view class="img-popup-content" @tap="$refs.imgPopup.close()">
<uqrcode :hide='true' ref="uqrcode" size="160" sizeUnit="rpx" canvas-id="qrcode" <uqrcode :hide='true' ref="uqrcode" size="160" sizeUnit="rpx" canvas-id="qrcode"
:value="orderDetail.id"> :value="orderDetail.id + '@@'+ orderDetail.shopId">
</uqrcode> </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;"> <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> </view>
@ -666,11 +666,11 @@
this.$refs.imgPopup.open() this.$refs.imgPopup.open()
this.$refs.uqrcode.toTempFilePath({ this.$refs.uqrcode.toTempFilePath({
success: res => { success: res => {
data.path = res.tempFilePath console.log(res)
that.newQRList = data that.newQRList = res.tempFilePath
}, },
fail: err => { fail: err => {
console.log(err)
} }
}); });
}, },

110
package1/order/orderEvaluate.vue

@ -14,27 +14,27 @@
<view class="content"> <view class="content">
<view class="box1"> <view class="box1">
<view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;"> <view style="width: 100%;line-height: 70rpx;font-size: 28rpx;font-weight: 700;">
竹仔园牛仔农庄(第六分店) {{shopData.shopName}}
</view> </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"> <view class="goods-img">
<img src="/static/images/img/shangpintu.png" alt=""> <img :src="item.productPicture" alt="">
</view> </view>
<view class="goods-content"> <view class="goods-content">
<view class="goods-name"> <view class="goods-name">
牛仔农庄(医专店) {{item.productName}}
</view> </view>
<view class="goods-content-center"> <view class="goods-content-center">
<view class="goods-deal1"> <view class="goods-deal1">
打分不要啦 {{item.specs}}
</view> </view>
</view> </view>
<view class="goods-content-bottom"> <view class="goods-content-bottom">
<view style="width: 50%;"> <view style="width: 50%;">
X1 X{{item.quantity}}
</view> </view>
<view class="pintuan-left-price"> <view class="pintuan-left-price">
90.00 {{item.price}}
</view> </view>
</view> </view>
</view> </view>
@ -46,7 +46,7 @@
</view> </view>
<view class="eval-name"> <view class="eval-name">
<view class="eval-name1"> <view class="eval-name1">
竹仔园牛仔农庄(第六分店) {{shopData.shopName}}
</view> </view>
<view class="eval-num"> <view class="eval-num">
<view class="eval-num1"> <view class="eval-num1">
@ -60,6 +60,24 @@
</view> </view>
</view> </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-num">
<view class="eval-num1"> <view class="eval-num1">
您对本次配送人员还满意吗 您对本次配送人员还满意吗
@ -73,17 +91,17 @@
</view> </view>
</view> </view>
<view class="eval-num" style="border: none;"> <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>
<view class="eval-num" style="border: none;padding: 0 30rpx;display: flex;"> <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;"> style="background: #eee;text-align: center;line-height: 160rpx;">
<uni-icons type="camera" size="28" color="#777"></uni-icons> <uni-icons type="camera" size="28" color="#777"></uni-icons>
</view> </view>
<view style="flex: 1;display: flex;"> <view style="flex: 1;display: flex;">
<view v-if="orderPicture !=''" <view v-if="manPicture !=''"
:key="index" style="width: 160rpx;height: 160rpx;margin-left: 20rpx;"> :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>
<view style="height: 160rpx;line-height: 40rpx;padding: 40rpx 0 0 20rpx;color: #777;"> <view style="height: 160rpx;line-height: 40rpx;padding: 40rpx 0 0 20rpx;color: #777;">
发图/发视频能更有效地帮助他人哦~ 发图/发视频能更有效地帮助他人哦~
@ -105,7 +123,7 @@
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="bottom-btn"> <view class="bottom-btn" @tap="submit">
发布 发布
</view> </view>
</view> </view>
@ -118,10 +136,13 @@
data() { data() {
return { return {
selected:'niming', selected:'niming',
orderPicture:'',
menuButtonInfo: {}, menuButtonInfo: {},
shopEvaluateNum:0, shopEvaluateNum:5,
manEvaluateNum:0, manEvaluateNum:5,
shopRemark:'',
manRemark:'',
shopPicture:'',
manPicture:'',
evalNumList:[{ evalNumList:[{
name:'很糟糕', name:'很糟糕',
checked:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/aa045ef1faca4130a9483688054e5620.png', 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', checked:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/90ef5af58d314c1bbabe8bd48aa49d22.png',
noChecked:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/c1cce0db39264c6ea9b533137153fc36.png', noChecked:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/c1cce0db39264c6ea9b533137153fc36.png',
index:5 index:5
}] }],
shopData:{}
} }
}, },
onLoad(option) { onLoad(option) {
this.shopData = JSON.parse(option.item)
}, },
onShow() { onShow() {
this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() this.menuButtonInfo = uni.getMenuButtonBoundingClientRect()
}, },
methods: { 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) { checkVoucher(type) {
this.selected = type; this.selected = type;
}, },
pictureAdd(id, huan) { pictureAdd(type) {
let that = this let that = this
uni.chooseMedia({ uni.chooseMedia({
count: 1, count: 1,
@ -172,13 +234,13 @@
mask: true mask: true
}) })
for (let i = 0; i < res.tempFiles.length; i++) { 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 that = this;
let hiver_token = uni.getStorageSync("hiver_token") let hiver_token = uni.getStorageSync("hiver_token")
await uni.uploadFile({ await uni.uploadFile({
@ -192,7 +254,11 @@
formData: {}, formData: {},
success: (uploadFileRes) => { success: (uploadFileRes) => {
let pathData = JSON.parse(uploadFileRes.data) let pathData = JSON.parse(uploadFileRes.data)
this.orderPicture = pathData.result if(type == 'shop'){
this.shopPicture = pathData.result
}else{
this.manPicture = pathData.result
}
that.$forceUpdate() that.$forceUpdate()
}, },
fail: (err) => { 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 class="btn1" style="background: rgba(166, 255, 234, 0.3);color: #000;" @tap.stop="orderDetail(item.id)">
查看订单 查看订单
</view> </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>
<!-- <view class="btn1"> <!-- <view class="btn1">
@ -462,6 +462,11 @@
url: '/package1/order/orderDetail?id=' + id url: '/package1/order/orderDetail?id=' + id
}); });
}, },
goEvaluate(item){
uni.redirectTo({
url: '/package1/order/orderEvaluate?item=' + JSON.stringify(item)
});
},
checkTabs2(type) { checkTabs2(type) {
this.tab2Checked = type; this.tab2Checked = type;
this.searchForm.searchStatus = type; this.searchForm.searchStatus = type;

55
package2/shop/merchantCenter.vue

@ -271,37 +271,36 @@
uni.scanCode({ uni.scanCode({
success: (res) => { success: (res) => {
if (res.scanType == "QR_CODE") { // if (res.scanType == "QR_CODE") { //
console.log('二维码',res) let shopId = res.result.split('@@')[1]
// let shopId = base.decode(res.result.split(',')[1]) if (shopId == uni.getStorageSync('shopId')) {
// if (shopId == uni.getStorageSync('shopId').substring('10', '12')) { let productId = res.result.split('@@')[0]
// that.productId = base.decode(res.result.split(',')[0]) uni.showModal({
// that.toggle('bottom', base.decode(res.result.split(',')[0])); 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('未查询到此订单信息,请核实!')
// } else { }
// that.tui.toast(res.message)
// }
// }).catch((res) => {
// that.tui.toast(res)
// })
} }
}, },
fail: (res) => { fail: (res) => {
uni.showToast({ uni.showToast({

Loading…
Cancel
Save