This commit is contained in:
cclu 2025-01-22 18:06:17 +08:00
parent 0ee1877599
commit d55ef6950a
146 changed files with 3283 additions and 1140 deletions

10
App.vue
View File

@ -25,7 +25,7 @@ export default {
_this.globalData.hh = hh; _this.globalData.hh = hh;
}, },
}); });
this.globalData.initReady = this.login().then(() => { }); this.globalData.initReady = this.login().then(() => {});
const updateManager = uni.getUpdateManager(); const updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate((res) => { updateManager.onCheckForUpdate((res) => {
@ -43,8 +43,8 @@ export default {
} }
}); });
}, },
onShow: function () { }, onShow: function () {},
onHide: function () { }, onHide: function () {},
methods: { methods: {
...mapMutations({ setArea: "setHomeServer" }), ...mapMutations({ setArea: "setHomeServer" }),
login() { login() {
@ -52,8 +52,8 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.login({ uni.login({
success(res) { success(res) {
console.log('login', res); console.log("login", res);
uni.setStorageSync('openId', res.code) uni.setStorageSync("openId", res.code);
_this.$api _this.$api
.getCoop({ .getCoop({
action_type: "WeChatLogin", action_type: "WeChatLogin",

View File

@ -1,5 +1,5 @@
<template> <template>
<view class="main"> <view class="main" :style="{ zIndex: zIndex === 98 ? 98 : 99999 }">
<div class="content"> <div class="content">
<div class="tabItem" @click="goPages('/pages/shopMallPage/index/index')"> <div class="tabItem" @click="goPages('/pages/shopMallPage/index/index')">
<image <image
@ -120,6 +120,10 @@ export default {
type: Number, type: Number,
default: 0, default: 0,
}, },
zIndex: {
type: Number,
default: 99,
},
}, },
watch: { watch: {
page: { page: {

View File

@ -89,7 +89,7 @@ export default {
normalLen: 7, normalLen: 7,
nowIndex: -1, nowIndex: -1,
isShow: false, isShow: false,
saveCarText: ["", "A", "", "", "", "", "", ""], saveCarText: ["", "A", "", "", "", "", "", ""],
newEnergy: true, // newEnergy: true, //
haveCode: false, // code haveCode: false, // code
}; };
@ -284,7 +284,7 @@ export default {
_this.saveCarText = code.split(""); _this.saveCarText = code.split("");
_this.haveCode = true; _this.haveCode = true;
} else { } else {
_this.saveCarText = ["", "A", "", "", "", "", "", ""]; _this.saveCarText = ["", "A", "", "", "", "", "", ""];
_this.haveCode = false; _this.haveCode = false;
} }
uni.hideLoading(); uni.hideLoading();

View File

@ -18,11 +18,8 @@
mode="aspectFit" mode="aspectFit"
lazy-load="true" lazy-load="true"
:src=" :src="
saveMsg.merchantsId storeMsg.MERCHANTS_LOGO ||
? storeMsg.MERCHANTS_LOGO || 'https://eshangtech.com/ShopICO/no-picture.png'
'https://eshangtech.com/ShopICO/no-picture.png'
: storeMsg.MERCHANTS_LOGO ||
'https://eshangtech.com/ShopICO/no-picture.png'
" "
/> />
@ -47,6 +44,7 @@
<textarea <textarea
cols="30" cols="30"
rows="5" rows="5"
:disabled="detailObj.COMMENT_STATE !== 1"
:placeholder=" :placeholder="
saveMsg.merchantsId saveMsg.merchantsId
? '说说这家店的口味、环境、服务' ? '说说这家店的口味、环境、服务'
@ -70,100 +68,9 @@
</div> </div>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<div class="submitBox"> <div class="submitBox" v-if="detailObj.COMMENT_STATE !== 1">
<div class="submit" @click="postRate">提交</div> <div class="submit" @click="postRate">提交</div>
</div> </div>
<view class="card" v-if="false">
<view class="store-title">
<view v-if="saveMsg.merchantsId">
<image
mode="aspectFit"
lazy-load="true"
:src="
storeMsg.MERCHANTS_LOGO ||
'https://eshangtech.com/ShopICO/no-picture.png'
"
></image>
<text class="name">{{ storeMsg.MERCHANTS_EN }}</text>
</view>
<view v-else>
<image
mode="aspectFit"
lazy-load="true"
:src="
proMsg.IMAGE_PATH ||
'https://eshangtech.com/ShopICO/no-picture.png'
"
></image>
<text class="name-commodity">{{ proMsg.COMMODITY_NAME }}</text>
</view>
<!-- uni-app 不自带 Vant 组件可以用替代方案 -->
<checkbox
:checked="saveMsg.isAnonymous"
color="#CAA97F"
@change="isAnonymous($event, saveMsg)"
>
<text style="font-size: 26rpx">匿名评价</text>
</checkbox>
</view>
<view class="star-box">
<!-- 替换 van-rate 可以使用自定义评分组件 -->
<uni-rate
:size="32"
allowHalf
v-model="saveMsg.commentScore"
@change="changeRate($event, saveMsg)"
/>
<!-- <uni-rate
:value="saveMsg.commentScore"
size="32"
allowHalf
:color="starColor"
@change="changeRate($event, saveMsg)"
/>-->
<view class="rate-text" :style="{ color: starColor }">{{
rateText
}}</view>
</view>
<view class="evaluate-box">
<textarea
cols="30"
rows="5"
:placeholder="
saveMsg.merchantsId
? '说说这家店的口味、环境、服务'
: '商品满足你的期待吗?说说你的使用心得,分享给想买的他们吧'
"
v-model="saveMsg.commentContent"
></textarea>
<view class="photo-box">
<view class="images" v-for="(item, i) in imgsList" :key="i">
<image mode="aspectFit" :src="item" @click="seePhoto(item)"></image>
<i @click="deleteImg(i)"></i>
</view>
<view class="add-photo" @click="choeseImg">
<i></i>
上传照片
</view>
</view>
<view class="tip-text"> 评价文字不可少于3字 </view>
</view>
</view>
<view
v-if="false"
class="post-btn"
:class="{ active: saveMsg.commentContent.length > 2 && noPost }"
@click="postRate"
>
提交
</view>
</view> </view>
</template> </template>
@ -173,7 +80,7 @@ export default {
data() { data() {
return { return {
saveMsg: { saveMsg: {
action_type: "AddComment", action_type: "addMallComment",
commentScore: 4.5, commentScore: 4.5,
isAnonymous: 0, isAnonymous: 0,
commentContent: "", commentContent: "",
@ -240,19 +147,20 @@ export default {
src: rs.tempFiles[0].tempFilePath, // src: rs.tempFiles[0].tempFilePath, //
quality: quality, // quality: quality, //
success(res) { success(res) {
// console.log(rs.tempFilePaths[0]) // console.log(rs.tempFiles[0])
// console.log(res) console.log(res);
uni.showLoading({ uni.showLoading({
title: "图片上传中...", title: "图片上传中...",
// mask: true // mask: true
}); });
uni.uploadFile({ uni.uploadFile({
url: "https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment", url: "https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment",
filePath: res.tempFilePath, filePath: rs.tempFiles[0].tempFilePath,
fileType: "image", fileType: "image",
name: "data", name: "data",
success(res) { success(res) {
let _data = JSON.parse(res.data); let _data = JSON.parse(res.data);
console.log("_data", _data);
_this.imgsList.push(rs.tempFiles[0].tempFilePath); _this.imgsList.push(rs.tempFiles[0].tempFilePath);
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH); _this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH);
uni.hideLoading(); uni.hideLoading();
@ -275,12 +183,13 @@ export default {
// mask: true // mask: true
}); });
uni.uploadFile({ uni.uploadFile({
url: "https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment", url: "https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment",
filePath: rs.tempFilePaths[0], filePath: rs.tempFiles[0].tempFilePath,
fileType: "image", fileType: "image",
name: "data", name: "data",
success(res) { success(res) {
let _data = JSON.parse(res.data); let _data = JSON.parse(res.data);
console.log("_data", _data);
_this.imgsList.push(rs.tempFiles[0].tempFilePath); _this.imgsList.push(rs.tempFiles[0].tempFilePath);
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH); _this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH);
uni.hideLoading(); uni.hideLoading();
@ -306,11 +215,13 @@ export default {
}); });
}, },
deleteImg(index) { deleteImg(index) {
console.log("index", index);
let _this = this; let _this = this;
_this.$api _this.$api
.postCoop({ .postCoop({
action_type: "DelFile", action_type: "DelFile",
filePath: _this.saveMsg.imageArr[index], filePath: _this.saveMsg.imageArr[index],
requestType: "application/x-www-form-urlencoded",
}) })
.then((res) => { .then((res) => {
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
@ -330,7 +241,8 @@ export default {
// if (_this.saveMsg.commentContent.length > 2 && _this.noPost) { // if (_this.saveMsg.commentContent.length > 2 && _this.noPost) {
if (_this.saveMsg.commentContent.length > 2) { if (_this.saveMsg.commentContent.length > 2) {
_this.noPost = false; _this.noPost = false;
_this.postIt(); // _this.postIt();
_this.handlePostShop();
} else { } else {
uni.showToast({ uni.showToast({
title: "评价文字不可少于3字", title: "评价文字不可少于3字",
@ -338,19 +250,79 @@ export default {
}); });
} }
}, },
//
async handlePostShop() {
let list = this.detailObj.List;
if (list && list.length > 0) {
uni.showLoading({
title: "正在提交...",
mask: true,
});
let allTrue = true;
for (let i = 0; i < list.length; i++) {
let obj = list[0];
let req = {
action_type: "addMallComment",
merchantsId: obj.MERCHANTS_ID,
merchantsName: obj.MERCHANTS_NAME,
saleBillId: obj.SALEBILL_ID,
salebillChildId: obj.SALEBILL_CHILD_ID,
// salebillChildCode: "",
// supplierId: obj.SUPPLIER_ID,
commodityId: obj.COMMODITY_ID,
isAnonymous: this.saveMsg.isAnonymous,
commentContent: this.saveMsg.commentContent,
commentScore: this.saveMsg.commentScore,
imageArr: this.saveMsg.imageArr,
requestType: "application/x-www-form-urlencoded",
};
let data = await this.$api.postCoop(req);
console.log("data", data);
if (data.ResultCode == "100") {
} else {
allTrue = false;
}
}
uni.hideLoading();
if (allTrue) {
uni.showToast({
title: "评价成功!",
});
setTimeout(() => {
uni.navigateBack({
delta: 1,
});
}, 1000);
}
}
},
postIt() { postIt() {
let _this = this; // let _this = this;
let data = _this.saveMsg; // let data = _this.saveMsg;
data.requestType = "application/x-www-form-urlencoded"; // data.requestType = "application/x-www-form-urlencoded";
data.imageArr = data.imageArr.toString(); // data.imageArr = data.imageArr.toString();
// let req = {
// ..._this.saveMsg,
// saleBillId: _this.orderInternal,
// };
// console.log("req", req);
// delete data.__newReference;
let req = { let req = {
..._this.saveMsg, merchantsId: this.detailObj.MERCHANTS_ID,
saleBillId: _this.orderInternal, // merchantsName: this.detailObj.,
saleBillId: this.detailObj.SALEBILL_ID,
salebillChildId: this.detailObj.SALEBILL_CHILD_ID,
salebillChildCode: this.detailObj.SALEBILL_CODE,
supplierId: "",
isAnonymous: this.saveMsg.isAnonymous,
commentContent: this.saveMsg.commentContent,
commentScore: this.saveMsg.commentScore,
imageArr: this.saveMsg.imageArr,
}; };
console.log("req", req);
delete data.__newReference;
uni.showLoading({ uni.showLoading({
title: "正在提交...", title: "正在提交...",
mask: true, mask: true,
@ -418,13 +390,17 @@ export default {
.getCoop({ .getCoop({
action_type: "GetOrderDetail", action_type: "GetOrderDetail",
salebillId: _this.orderInternal, salebillId: _this.orderInternal,
saleBillChildId: _this.sellchildid,
}) })
.then((res) => { .then((res) => {
// console.log(res) // console.log(res)
if (res.ResultCode === "100") { if (res.ResultCode === "100") {
let _data = res.Data; let _data = res.Data;
console.log("订单详情", _data); console.log("订单详情", _data);
this.detailObj = _data; _this.detailObj = _data;
if (_data.COMMENT_STATE === 1) {
_this.handleGetEvaluateDetail();
}
// //
let list = _data.List; let list = _data.List;
let shopTitle = ""; let shopTitle = "";
@ -435,9 +411,20 @@ export default {
} }
} }
_this.currentShopName = shopTitle; _this.currentShopName = shopTitle;
_this.storeMsg.MERCHANTS_LOGO = list[0].IMAGE_PATH;
} }
}); });
}, },
//
async handleGetEvaluateDetail() {
let req = {
action_type: "getMallCommentList",
salebillId: this.orderInternal,
salebillChildId: this.sellchildid || "",
};
const data = await this.$api.getCoop(req);
console.log("data", data);
},
}, },
onUnload() { onUnload() {
this.saveMsg = { this.saveMsg = {
@ -458,6 +445,7 @@ export default {
this.sellchildid = option.sellchildid; this.sellchildid = option.sellchildid;
} }
this.orderInternal = option.orderInternal; this.orderInternal = option.orderInternal;
// //
this.getOrderType(); this.getOrderType();
// if (option.saleBillId) { // if (option.saleBillId) {
@ -535,7 +523,7 @@ export default {
.shopName { .shopName {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 28rpx;
color: #130f05; color: #130f05;
line-height: 44rpx; line-height: 44rpx;
text-align: left; text-align: left;

View File

@ -1,28 +1,58 @@
<template> <template>
<div class="flex-col list-item space-y-12"> <div class="flex-col list-item space-y-12">
<div class="flex-row justify-between" style="margin-bottom: 8px"> <div class="flex-row justify-between" style="margin-bottom: 8px">
<div style="display: flex;justify-content: space-between;align-items: center;width: 100%"> <div
style="
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
"
>
<!-- <div class="font_41" v-if="obj.SALEBILL_STATE === 1010 || obj.SALEBILL_STATE === 3050">期望送达: <!-- <div class="font_41" v-if="obj.SALEBILL_STATE === 1010 || obj.SALEBILL_STATE === 3050">期望送达:
{{ obj.RESERVATION_DATE }}</div> {{ obj.RESERVATION_DATE }}</div>
<div class="font_41" v-if="obj.SALEBILL_STATE === 4000 || obj.SALEBILL_STATE === 5000"> <div class="font_41" v-if="obj.SALEBILL_STATE === 4000 || obj.SALEBILL_STATE === 5000">
<p class="self-start font_7">{{ obj.ORDER_DATE }}</p> <p class="self-start font_7">{{ obj.ORDER_DATE }}</p>
</div> --> </div> -->
<span class="font_2 text_6" style="margin-left: 8px">{{ statusText }}</span> <span class="font_2 text_6" style="margin-left: 8px">{{
statusText
}}</span>
</div> </div>
</div> </div>
<div class="flex-col justify-start items-start relative info" <div
style="overflow: hidden;display: flex;align-items: center;"> class="flex-col justify-start items-start relative info"
<scroll-view class="flex-row space-x-8" :scroll-x="true" style="height: 82px;width:70%;white-space: nowrap;"> style="overflow: hidden; display: flex; align-items: center"
>
<scroll-view
class="flex-row space-x-8"
:scroll-x="true"
style="height: 82px; width: 70%; white-space: nowrap"
>
<view class="imgBox" v-for="(item, idx) in obj.IMAGELIST" :key="idx"> <view class="imgBox" v-for="(item, idx) in obj.IMAGELIST" :key="idx">
<view style="display: flex;flex-direction: column"> <view style="display: flex; flex-direction: column">
<!-- --> <!-- -->
<img class="equal-division-item" :src="item.IMAGE_URL || 'https://eshangtech.com/ShopICO/no-picture.png'" /> <img
class="equal-division-item"
:src="
item.IMAGE_URL ||
'https://eshangtech.com/ShopICO/no-picture.png'
"
/>
<text class="name">{{ item.COMMODITY_NAME }}</text> <text class="name">{{ item.COMMODITY_NAME }}</text>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<div class="section_7" <div
style="height: 82px;width:30%;display: flex;align-items: flex-end;justify-content: center;flex-direction: column;"> class="section_7"
style="
height: 82px;
width: 30%;
display: flex;
align-items: flex-end;
justify-content: center;
flex-direction: column;
"
>
<div> <div>
<span class="font_6">¥</span> <span class="font_6">¥</span>
<span class="font_5 text_7">{{ obj.ORDER_AMOUNT }}</span> <span class="font_5 text_7">{{ obj.ORDER_AMOUNT }}</span>
@ -30,10 +60,16 @@
<span class="font_7">{{ obj.TOTAL_COUNT }}</span> <span class="font_7">{{ obj.TOTAL_COUNT }}</span>
</div> </div>
</div> </div>
<div class="flex-row justify-between" style="display: flex; align-items: center"> <div
<div style="flex: 1;margin-right: 4px"> class="flex-row justify-between"
<p class="self-start font_7" v-if="obj.SALEBILL_STATE !== 4000 && obj.SALEBILL_STATE !== 5000">{{ obj.ORDER_DATE style="display: flex; align-items: center"
}} >
<div style="flex: 1; margin-right: 4px">
<p
class="self-start font_7"
v-if="obj.SALEBILL_STATE !== 4000 && obj.SALEBILL_STATE !== 5000"
>
{{ obj.ORDER_DATE }}
</p> </p>
<view class="desc" v-if="obj.SALEBILL_DESC"> <view class="desc" v-if="obj.SALEBILL_DESC">
<text>{{ obj.SALEBILL_DESC }}</text> <text>{{ obj.SALEBILL_DESC }}</text>
@ -43,102 +79,88 @@
<img class="shrink-0 image_9" src="/static/images/recons/deliver.svg" /> <img class="shrink-0 image_9" src="/static/images/recons/deliver.svg" />
<span class="font_1">催单</span> <span class="font_1">催单</span>
</div> --> </div> -->
<div class="section_8 view space-x-4" style="display: flex;align-items: center;" <div
v-if="obj.SALEBILL_STATE === 2010" @click.stop="handleConfirmReceipt(obj)"> class="section_8 view space-x-4"
style="display: flex; align-items: center"
v-if="obj.SALEBILL_STATE === 2010"
@click.stop="handleConfirmReceipt(obj)"
>
<img class="shrink-0 image_9" src="/static/images/home/notice.svg" /> <img class="shrink-0 image_9" src="/static/images/home/notice.svg" />
<span class="font_1">确认收货</span> <span class="font_1">确认收货</span>
</div> </div>
<div class="flex-row items-center section_8 view space-x-4" v-if="obj.SALEBILL_STATE === 4000"> <div
class="flex-row items-center section_8 view space-x-4"
v-if="obj.SALEBILL_STATE === 4000"
>
<img class="shrink-0 image_9" src="/static/images/recons/notice.svg" /> <img class="shrink-0 image_9" src="/static/images/recons/notice.svg" />
<span class="font_1">去评价</span> <span class="font_1">去评价</span>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
obj: {} obj: {},
}, },
data() { data() {
return { return {
timeText: '', timeText: "",
isCuntTime: false, isCuntTime: false,
isShowTime: false, isShowTime: false,
timeOut: 0 // 1 2 timeOut: 0, // 1 2
} };
}, },
computed: { computed: {
statusText() { statusText() {
let text = '' let text = "";
switch (this.obj.SALEBILL_STATE) { switch (this.obj.COMMENT_STATE) {
case 1005: case 0:
text = '待支付' text = "待评价";
break break;
case 1010: case 1:
text = '待发货' text = "已评价";
break break;
case 2010:
text = '待收货'
break
case 3000:
text = '已收货'
break
case 8000:
text = '退款申请中'
break
case 8010:
text = '商品退货中'
break
case 8020:
text = '退款处理中'
break
case 8900:
text = '订单已退款'
break
case 8999:
text = '退款已关闭'
break
case 9000:
text = '订单已关闭'
break
case 9999:
text = '订单已撤销'
break
default:
text = '待发货'
} }
return text return text;
}, },
imgList() { imgList() {
if (this.obj.IMAGELIST.length > 4) return this.obj.IMAGELIST.slice(0, 4) if (this.obj.IMAGELIST.length > 4) return this.obj.IMAGELIST.slice(0, 4);
return this.obj.IMAGELIST return this.obj.IMAGELIST;
}, },
toDeatil() { toDeatil() {
return function (item) { return function (item) {
this.$emit('toDeatil', item) this.$emit("toDeatil", item);
} };
} },
}, },
onLoad() { onLoad() {
this.countDownTime() this.countDownTime();
this.cuntDown() this.cuntDown();
}, },
methods: { methods: {
cuntDown() { cuntDown() {
let time = new Date(this.obj.RESERVATION_DATE).getTime() - new Date().getTime() let time =
new Date(this.obj.RESERVATION_DATE).getTime() - new Date().getTime();
if (time < 86400000) { if (time < 86400000) {
this.isCuntTime = true this.isCuntTime = true;
} }
}, },
countDownTime() { countDownTime() {},
},
handleToEvaluate(obj) { handleToEvaluate(obj) {
console.log('obj', obj) console.log("obj", obj);
uni.navigateTo({ url: '/pages/newEvaluate/index?sellchildid=' + obj.SALEBILL_CHILD_ID + '&orderInternal=' + obj.SALEBILL_ID + '&proid=' + obj.SALEBILL_ID + 'type=' + 'DeliverId' }) uni.navigateTo({
url:
"/pages/newEvaluate/index?sellchildid=" +
obj.SALEBILL_CHILD_ID +
"&orderInternal=" +
obj.SALEBILL_ID +
"&proid=" +
obj.SALEBILL_ID +
"type=" +
"DeliverId",
});
}, },
// //
async handleConfirmReceipt(obj) { async handleConfirmReceipt(obj) {
@ -148,19 +170,19 @@ export default {
saleBillChildId: obj.SALEBILL_CHILD_ID, saleBillChildId: obj.SALEBILL_CHILD_ID,
SALEBILL_STATE: 3000, SALEBILL_STATE: 3000,
// deliverDate: new Date() // deliverDate: new Date()
} };
const data = await this.$api.getCoop(req) const data = await this.$api.getCoop(req);
console.log('data', data); console.log("data", data);
uni.showToast({ uni.showToast({
title: data.msg, title: data.msg,
icon: 'none' icon: "none",
}) });
if (data.error === 1) { if (data.error === 1) {
this.$emit('handleGetOrderList') this.$emit("handleGetOrderList");
} }
}, },
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -174,21 +196,20 @@ export default {
.box { .box {
padding: 5px 15px; padding: 5px 15px;
box-sizing: border-box; box-sizing: border-box;
background: #F6F8F8; background: #f6f8f8;
width: 100%; width: 100%;
border-radius: 4px; border-radius: 4px;
margin-top: 5px; margin-top: 5px;
} }
.space-x-8 { .space-x-8 {
&>*:not(:first-child) { & > *:not(:first-child) {
margin-left: 16rpx; margin-left: 16rpx;
} }
.font_3 { .font_3 {
font-size: 28rpx; font-size: 28rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 40rpx; line-height: 40rpx;
color: #020e1a; color: #020e1a;
font-weight: 600; font-weight: 600;
@ -198,19 +219,19 @@ export default {
width: 150px; width: 150px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis text-overflow: ellipsis;
} }
.normal { .normal {
width: 275px; width: 275px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis text-overflow: ellipsis;
} }
.font_4 { .font_4 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #fa5151; color: #fa5151;
margin-left: 16rpx; margin-left: 16rpx;
@ -248,18 +269,23 @@ export default {
.font_2 { .font_2 {
font-size: 28rpx; font-size: 28rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 40rpx; line-height: 40rpx;
color: #1890ff; color: #1890ff;
} }
.section_7 { .section_7 {
padding: 24rpx 0 24rpx 24rpx; padding: 24rpx 0 24rpx 24rpx;
background-image: linear-gradient(270deg, #ffffff 0%, #ffffff 95.72%, #ffffff00 100%); background-image: linear-gradient(
270deg,
#ffffff 0%,
#ffffff 95.72%,
#ffffff00 100%
);
.font_6 { .font_6 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'DIN Alternate'; font-family: "DIN Alternate";
line-height: 28rpx; line-height: 28rpx;
font-weight: 700; font-weight: 700;
color: #020e1a; color: #020e1a;
@ -267,7 +293,7 @@ export default {
.font_5 { .font_5 {
font-size: 32rpx; font-size: 32rpx;
font-family: 'DIN Alternate'; font-family: "DIN Alternate";
line-height: 40rpx; line-height: 40rpx;
font-weight: 700; font-weight: 700;
color: #020e1a; color: #020e1a;
@ -280,7 +306,7 @@ export default {
.font_41 { .font_41 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #fa5151; color: #fa5151;
} }
@ -293,7 +319,7 @@ export default {
.font_7 { .font_7 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #9fa3a8; color: #9fa3a8;
} }
@ -302,7 +328,7 @@ export default {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FF6219; color: #ff6219;
line-height: 36rpx; line-height: 36rpx;
} }
@ -315,7 +341,7 @@ export default {
.font_1 { .font_1 {
font-size: 28rpx; font-size: 28rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 40rpx; line-height: 40rpx;
color: #6c737a; color: #6c737a;
} }
@ -330,14 +356,14 @@ export default {
} }
.space-x-4 { .space-x-4 {
&>*:not(:first-child) { & > *:not(:first-child) {
margin-left: 8rpx; margin-left: 8rpx;
} }
} }
} }
.space-y-12 { .space-y-12 {
&>*:not(:first-child) { & > *:not(:first-child) {
margin-top: 24rpx; margin-top: 24rpx;
} }
} }

View File

@ -15,7 +15,14 @@
</div> </div>
</div> </div>
<!-- <text @click="handleGoEvaluateDetail">评价详情</text> --> <!-- <text @click="handleGoEvaluateDetail">评价详情</text> -->
<template v-if="orderList && orderList.length > 0"> <scroll-view
v-if="orderList && orderList.length > 0"
class="srcollView"
scroll-y="true"
refresher-enabled="true"
@refresherrefresh="handleRefresherrefresh"
:refresher-triggered="triggered"
>
<div <div
@click="goEvaluate(item)" @click="goEvaluate(item)"
v-for="(item, idx) in orderList" v-for="(item, idx) in orderList"
@ -23,7 +30,7 @@
> >
<OrderItem :obj="item" /> <OrderItem :obj="item" />
</div> </div>
</template> </scroll-view>
<noData v-else :text="'您没有评价记录'" :isShow="orderList.length" /> <noData v-else :text="'您没有评价记录'" :isShow="orderList.length" />
</div> </div>
@ -60,6 +67,8 @@ export default {
], ],
currentTab: 1, currentTab: 1,
queryStatus: ["4000,5000", "4000", "5000"], queryStatus: ["4000,5000", "4000", "5000"],
pageType: "", //
triggered: false,
}; };
}, },
components: { components: {
@ -74,12 +83,22 @@ export default {
if (query.type) { if (query.type) {
this.currentTab = Number(query.type); this.currentTab = Number(query.type);
} }
if (query.pageType) {
this.pageType = query.pageType;
}
console.log("this.pageType", this.pageType);
this.getorderList(); this.getorderList();
}, },
methods: { methods: {
async handleRefresherrefresh() {
this.triggered = true;
await this.getorderList();
this.triggered = false;
},
handleTab(item) { handleTab(item) {
console.log("item", item); console.log("item", item);
this.currentTab = item; this.currentTab = item;
this.getorderList();
}, },
// //
async getorderList() { async getorderList() {
@ -89,7 +108,7 @@ export default {
}); });
const req = { const req = {
action_type: "GetMallOrderList", action_type: "GetMallOrderList",
salebillType: 3000, salebillType: this.pageType === "UnionMall" ? 3001 : 3000,
salebillState: 3000, salebillState: 3000,
PageIndex: this.pageMsg.pageIndex, PageIndex: this.pageMsg.pageIndex,
pageSize: this.pageMsg.pageSize, pageSize: this.pageMsg.pageSize,
@ -97,12 +116,23 @@ export default {
requestType: "application/x-www-form-urlencoded", requestType: "application/x-www-form-urlencoded",
}; };
const data = await this.$api.postCoop(req); const data = await this.$api.postCoop(req);
let list = []; let res = [];
if (data.Data && data.Data.List && data.Data.List.length > 0) { if (data.Data && data.Data.List && data.Data.List.length > 0) {
list = data.Data.List; let list = data.Data.List;
if (this.currentTab === 1) {
res = list;
} else {
list.forEach((item) => {
if (this.currentTab === 2 && item.COMMENT_STATE === 0) {
res.push(item);
} else if (this.currentTab === 3 && item.COMMENT_STATE === 1) {
res.push(item);
}
});
}
} }
console.log("getorderList", list); console.log("getorderList", res);
this.orderList = list; this.orderList = res;
uni.hideLoading(); uni.hideLoading();
}, },
// //
@ -187,6 +217,10 @@ export default {
line-height: 40px; line-height: 40px;
} }
} }
.srcollView {
width: 100%;
height: calc(100vh - 160rpx);
}
} }
.fliter { .fliter {
/*height: 258rpx;*/ /*height: 258rpx;*/

View File

@ -2,7 +2,10 @@
<div class="main"> <div class="main">
<div class="pageTitle">{{ detailObj.NOTICEINFO_TITLE || "" }}</div> <div class="pageTitle">{{ detailObj.NOTICEINFO_TITLE || "" }}</div>
<div class="time">{{ detailObj.START_DATE || "-" }}</div> <div class="time">{{ detailObj.START_DATE || "-" }}</div>
<div class="navList" v-if="detailObj.ImageList && detailObj.ImageList.length > 0"> <div
class="navList"
v-if="detailObj.ImageList && detailObj.ImageList.length > 0"
>
<image class="img" :src="detailObj.ImageList[0].ImageUrl" /> <image class="img" :src="detailObj.ImageList[0].ImageUrl" />
</div> </div>
<text class="content">{{ detailObj.NOTICEINFO_CONTENT || "" }}</text> <text class="content">{{ detailObj.NOTICEINFO_CONTENT || "" }}</text>
@ -51,6 +54,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx 32rpx; padding: 16rpx 32rpx;
background: #fff; background: #fff;
overflow-y: scroll;
.pageTitle { .pageTitle {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -98,4 +102,7 @@ export default {
overflow-y: auto; overflow-y: auto;
} }
} }
.main::-webkit-scrollbar {
display: none;
}
</style> </style>

View File

@ -19,6 +19,7 @@
@click="handleGoDetail(item)" @click="handleGoDetail(item)"
> >
<div class="left"> <div class="left">
<div class="title">{{ item.NOTICEINFO_TITLE || "" }}</div>
<div class="content">{{ item.NOTICEINFO_CONTENT || "" }}</div> <div class="content">{{ item.NOTICEINFO_CONTENT || "" }}</div>
<div class="descBox"> <div class="descBox">
<span class="name">{{ item.STAFF_NAME || "-" }}</span> <span class="name">{{ item.STAFF_NAME || "-" }}</span>
@ -189,10 +190,11 @@ export default {
border-bottom: 1px solid #f6f6f6; border-bottom: 1px solid #f6f6f6;
.left { .left {
width: calc(100% - 260rpx); width: calc(100% - 260rpx);
height: 220rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.content { .title {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
@ -207,6 +209,21 @@ export default {
-webkit-line-clamp: 3; /* 限制最多显示3行文本 */ -webkit-line-clamp: 3; /* 限制最多显示3行文本 */
text-overflow: ellipsis; /* 超出部分用省略号显示 */ text-overflow: ellipsis; /* 超出部分用省略号显示 */
} }
.content {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 24rpx;
color: #716f69;
line-height: 32rpx;
text-align: justify;
font-style: normal;
width: 100%;
display: -webkit-box; /* 使用弹性盒模型 */
-webkit-box-orient: vertical; /* 垂直排列 */
overflow: hidden; /* 超出部分隐藏 */
-webkit-line-clamp: 2; /* 限制最多显示3行文本 */
text-overflow: ellipsis; /* 超出部分用省略号显示 */
}
.descBox { .descBox {
width: 100%; width: 100%;
display: flex; display: flex;
@ -235,8 +252,10 @@ export default {
} }
.right { .right {
width: 220rpx; width: 220rpx;
height: 140rpx; height: 220rpx;
margin-left: 40rpx; margin-left: 40rpx;
border-radius: 16rpx;
overflow: hidden;
.leftIcon { .leftIcon {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@ -356,23 +356,35 @@
item.RETsmallNumber || "00" item.RETsmallNumber || "00"
}}</view }}</view
> >
<view class="priceBox"> <view
<view class="leftPrice"> style="
<span class="unit">¥</span> width: 100%;
<!-- <span class="price">{{ display: flex;
align-items: center;
justify-content: space-between;
"
>
<view class="priceBox">
<view class="leftPrice">
<span class="unit">¥</span>
<!-- <span class="price">{{
item.COMMODITY_MEMBERPRICE || "" item.COMMODITY_MEMBERPRICE || ""
}}</span> --> }}</span> -->
<span class="price" <span class="price"
>{{ item.bigNumber || "" }}.{{ >{{ item.bigNumber || "" }}.{{
item.smallNumber || "00" item.smallNumber || "00"
}}</span }}</span
>
</view>
<view class="shopState" v-if="!(item.COMMODITY_STOCK > 0)"
>已售罄</view
> >
</view> <!-- <view class="rightPrice"> -->
<view class="rightPrice">
<!-- <image <!-- <image
class="mallIcon" class="mallIcon"
src="/static/images/home/mallIcon.svg" src="/static/images/home/mallIcon.svg"
/> --> /> -->
<!-- </view> -->
</view> </view>
</view> </view>
</view> </view>
@ -726,12 +738,12 @@ export default {
}); });
} else if (obj.value === 5) { } else if (obj.value === 5) {
// //
// uni.navigateTo({
// url: "/pages/serviceList/index?type=food",
// });
uni.navigateTo({ uni.navigateTo({
url: `/pages/reservationOrder/index?id=${this.serviceDetail.SERVERPART_ID}`, url: "/pages/serviceList/index?type=food",
}); });
// uni.navigateTo({
// url: `/pages/reservationOrder/index?id=${this.serviceDetail.SERVERPART_ID}`,
// });
} else if (obj.value === 6) { } else if (obj.value === 6) {
// //
uni.navigateTo({ uni.navigateTo({
@ -1828,6 +1840,13 @@ export default {
height: 100%; height: 100%;
} }
} }
.shopState {
font-size: 24rpx;
color: #fff;
background: #bbbbbb;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
} }
} }
} }

View File

@ -26,7 +26,7 @@
</div> </div>
</div> --> </div> -->
<div class="tabs" v-if="searchType !== '4'"> <div class="tabs" v-if="searchType !== '6'">
<div <div
class="tabs_item" class="tabs_item"
:class="currentTab === item.value ? 'tab_active' : ''" :class="currentTab === item.value ? 'tab_active' : ''"
@ -45,21 +45,25 @@
</div> </div>
</div> </div>
<template v-if="orderList && orderList.length > 0"> <scroll-view
v-if="orderList && orderList.length > 0"
class="srcollView"
scroll-y="true"
refresher-enabled="true"
@refresherrefresh="handleRefresherrefresh"
:refresher-triggered="triggered"
>
<div <div
@click="goEvaluate(item)" @click="goEvaluate(item)"
v-for="(item, idx) in orderList" v-for="(item, idx) in orderList"
:key="idx" :key="idx"
> >
<OrderItem :obj="item" @handleGetOrderList="handleGetOrderList" /> <OrderItem :obj="item" @handleGetOrderList="handleGetTypeOrderList" />
</div> </div>
</template> </scroll-view>
<no-data text="暂无订单数据" v-else /> <no-data text="暂无订单数据" v-else />
</view> </view>
</template> </template>
</view>
</template>
<script> <script>
import NoData from "../../../components/noData.vue"; import NoData from "../../../components/noData.vue";
import OrderItem from "./components/orderItem.vue"; import OrderItem from "./components/orderItem.vue";
@ -95,6 +99,9 @@ export default {
pageSize: 10, pageSize: 10,
}, },
searchType: "", searchType: "",
pageType: "",
isFirst: true,
triggered: false,
}; };
}, },
components: { components: {
@ -102,11 +109,29 @@ export default {
NoData, NoData,
}, },
onLoad(query) { onLoad(query) {
console.log("query", query);
if (query.type) { if (query.type) {
this.searchType = query.type; this.searchType = query.type;
this.currentTab = Number(this.searchType) + 1;
} }
if (query.pageType) {
this.pageType = query.pageType;
}
console.log("this.currentTab", this.currentTab);
let type =
this.currentTab === 1
? ""
: this.currentTab === 2
? "1005"
: this.currentTab === 3
? "1010,2000"
: this.currentTab === 4
? "2010"
: this.currentTab === 5
? ""
: "";
// //
this.handleGetOrderList(); this.handleGetOrderList(type);
}, },
methods: { methods: {
handleTab(val) { handleTab(val) {
@ -122,10 +147,44 @@ export default {
: val === 4 : val === 4
? "2010" ? "2010"
: val === 5 : val === 5
? "3000" ? ""
: ""; : "";
this.handleGetOrderList(type); this.handleGetOrderList(type);
}, },
//
async handleRefresherrefresh() {
this.triggered = true;
let type =
this.currentTab === 1
? ""
: this.currentTab === 2
? "1005"
: this.currentTab === 3
? "1010,2000"
: this.currentTab === 4
? "2010"
: this.currentTab === 5
? ""
: "";
await this.handleGetOrderList(type);
this.triggered = false;
},
//
async handleGetTypeOrderList() {
let type =
this.currentTab === 1
? ""
: this.currentTab === 2
? "1005"
: this.currentTab === 3
? "1010,2000"
: this.currentTab === 4
? "2010"
: this.currentTab === 5
? ""
: "";
await this.handleGetOrderList(type);
},
// //
async handleGetOrderList(status) { async handleGetOrderList(status) {
uni.showLoading({ uni.showLoading({
@ -134,8 +193,13 @@ export default {
}); });
const req = { const req = {
action_type: "GetMallOrderList", action_type: "GetMallOrderList",
salebillType: 3000, salebillType:
salebillState: status || "", this.searchType === "6"
? 3999
: this.pageType === "UnionMall"
? 3001
: 3000,
salebillState: this.searchType === "6" ? "" : status || "",
PageIndex: this.pageMsg.pageIndex, PageIndex: this.pageMsg.pageIndex,
pageSize: this.pageMsg.pageSize, pageSize: this.pageMsg.pageSize,
ownerUnitId: 911, ownerUnitId: 911,
@ -147,7 +211,7 @@ export default {
let list = data.Data ? data.Data.List : []; let list = data.Data ? data.Data.List : [];
let resList = []; let resList = [];
if (list && list.length > 0) { if (list && list.length > 0) {
if (this.searchType === "4") { if (this.currentTab === 5) {
list.forEach((item) => { list.forEach((item) => {
if ( if (
item.SALEBILL_STATE >= 3000 && item.SALEBILL_STATE >= 3000 &&
@ -160,15 +224,7 @@ export default {
}); });
} else { } else {
list.forEach((item) => { list.forEach((item) => {
if ( resList.push(item);
item.SALEBILL_STATE === 1005 ||
item.SALEBILL_STATE === 1010 ||
item.SALEBILL_STATE === 2000 ||
item.SALEBILL_STATE === 2010 ||
item.SALEBILL_STATE === 3000
) {
resList.push(item);
}
}); });
} }
} }
@ -181,7 +237,7 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/order/orderdetail/index?sellchildid=" + "/pages/order/orderdetail/index?sellchildid=" +
item.SALEBILL_CHILD_ID + (item.SALEBILL_CHILD_ID || "") +
"&orderInternal=" + "&orderInternal=" +
item.SALEBILL_ID + item.SALEBILL_ID +
"&orderStatus=" + "&orderStatus=" +
@ -296,5 +352,10 @@ export default {
} }
} }
} }
.srcollView {
width: 100%;
height: calc(100vh - 160rpx);
}
} }
</style> </style>

View File

@ -128,6 +128,9 @@ export default {
case 2010: case 2010:
text = "已完成"; text = "已完成";
break; break;
case 3000:
text = "已完成";
break;
case 8000: case 8000:
text = "退款申请中"; text = "退款申请中";
break; break;

View File

@ -26,7 +26,7 @@
</div> </div>
</div> --> </div> -->
<div class="tabs" v-if="searchType !== '4'"> <div class="tabs">
<div <div
class="tabs_item" class="tabs_item"
:class="currentTab === item.value ? 'tab_active' : ''" :class="currentTab === item.value ? 'tab_active' : ''"
@ -45,7 +45,14 @@
</div> </div>
</div> </div>
<template v-if="orderList && orderList.length > 0"> <scroll-view
v-if="orderList && orderList.length > 0"
class="srcollView"
scroll-y="true"
refresher-enabled="true"
@refresherrefresh="handleRefresherrefresh"
:refresher-triggered="triggered"
>
<div <div
@click="goEvaluate(item)" @click="goEvaluate(item)"
v-for="(item, idx) in orderList" v-for="(item, idx) in orderList"
@ -53,7 +60,7 @@
> >
<OrderItem :obj="item" @handleGetOrderList="handleGetOrderList" /> <OrderItem :obj="item" @handleGetOrderList="handleGetOrderList" />
</div> </div>
</template> </scroll-view>
<no-data text="暂无订单数据" v-else /> <no-data text="暂无订单数据" v-else />
</view> </view>
</template> </template>
@ -95,6 +102,7 @@ export default {
pageSize: 10, pageSize: 10,
}, },
searchType: "", searchType: "",
triggered: false,
}; };
}, },
components: { components: {
@ -102,12 +110,44 @@ export default {
NoData, NoData,
}, },
onLoad(query) { onLoad(query) {
let searchType = query.type; if (query.type) {
this.searchType = searchType; this.searchType = query.type;
this.currentTab = Number(this.searchType) + 1;
}
let type =
this.currentTab === 1
? ""
: this.currentTab === 2
? "1005"
: this.currentTab === 3
? "1010"
: this.currentTab === 4
? "2000"
: this.currentTab === 5
? ""
: "";
// //
this.handleGetOrderList(); this.handleGetOrderList(type);
}, },
methods: { methods: {
//
async handleRefresherrefresh() {
this.triggered = true;
let type =
this.currentTab === 1
? ""
: this.currentTab === 2
? "1005"
: this.currentTab === 3
? "1010,2000"
: this.currentTab === 4
? "2010"
: this.currentTab === 5
? ""
: "";
await this.handleGetOrderList(type);
this.triggered = false;
},
handleTab(val) { handleTab(val) {
this.currentTab = val; this.currentTab = val;
this.orderList = []; this.orderList = [];
@ -121,7 +161,7 @@ export default {
: val === 4 : val === 4
? "2000" ? "2000"
: val === 5 : val === 5
? "2010" ? ""
: ""; : "";
this.handleGetOrderList(type); this.handleGetOrderList(type);
}, },
@ -146,7 +186,7 @@ export default {
let list = data.Data ? data.Data.List : []; let list = data.Data ? data.Data.List : [];
let resList = []; let resList = [];
if (list && list.length > 0) { if (list && list.length > 0) {
if (this.searchType === "4") { if (this.currentTab === 5) {
list.forEach((item) => { list.forEach((item) => {
if ( if (
item.SALEBILL_STATE >= 3000 && item.SALEBILL_STATE >= 3000 &&
@ -158,19 +198,10 @@ export default {
} }
}); });
} else { } else {
list.forEach((item) => { resList = list;
if (
item.SALEBILL_STATE === 1005 ||
item.SALEBILL_STATE === 1010 ||
item.SALEBILL_STATE === 2000 ||
item.SALEBILL_STATE === 2010
) {
resList.push(item);
}
});
} }
} }
console.log("获取订单数据", list); console.log("获取订单数据", resList);
this.orderList = resList; this.orderList = resList;
uni.hideLoading(); uni.hideLoading();
}, },
@ -294,5 +325,9 @@ export default {
} }
} }
} }
.srcollView {
width: 100%;
height: calc(100vh - 160rpx);
}
} }
</style> </style>

View File

@ -46,12 +46,13 @@
orderInfo.COMMENT_STATE === 0 orderInfo.COMMENT_STATE === 0
" "
> >
<div class="continu-btn" @click="handleRefund">发起退款</div> <!-- <div class="continu-btn" @click="handleRefund">发起退款</div> -->
<!-- <div class="back-btn" @click="goShop" v-if="orderInfo.SALEBILL_STATE!=1010">再来一单</div> --> <!-- <div class="back-btn" @click="goShop" v-if="orderInfo.SALEBILL_STATE!=1010">再来一单</div> -->
<div class="continu-btn" @click="goEvaluate">评价得积分</div> <div class="continu-btn" @click="goEvaluate">评价得积分</div>
</block> </block>
</div> </div>
</div> </div>
<!-- <text @click="handleChangeOrderStatus">收货</text> -->
<div class="hx-block"></div> <div class="hx-block"></div>
<div class="order-info"> <div class="order-info">
<p class="order-info-type order-info-h"> <p class="order-info-type order-info-h">
@ -252,20 +253,42 @@ export default {
content: "确认发起退款申请?", content: "确认发起退款申请?",
success: async function (res) { success: async function (res) {
if (res.confirm) { if (res.confirm) {
const req = { let reqOrder = {
action_type: "UpdateOrderState", action_type: "ScanOrder",
action_data: _this.orderInfo.SALEBILL_ID, salebillType: 3999,
saleBillChildId: _this.sellchildid, provinceCode: _this.user.PROVINCE_CODE,
SALEBILL_STATE: 8000, serverpartShopId: "5634",
// deliverDate: new Date() salebillDesc: "退款订单",
wechatOpenId: openId || "",
wechatUnionId: _this.user.USER_UNIONID || "",
// addressId: this.addressInfo.MEMBERADDRESS_ID,
// orderPersonTel: this.addressInfo.MOBILEPHONE,
// couponCode: '',//
t_saleorderdetail: JSON.stringify(_this.orderInfo.List),
requestType: "application/x-www-form-urlencoded",
}; };
const data = await _this.$api.getCoop(req); const orderData = await _this.$api.postCoop(reqOrder);
uni.showToast({ if (orderData.ResultCode === "100") {
title: data.msg, const req = {
icon: "none", action_type: "UpdateOrderState",
}); action_data: _this.orderInfo.SALEBILL_ID,
if (data.error === 1) { saleBillChildId: _this.sellchildid,
_this.getOrderType(); SALEBILL_STATE: 8000,
// deliverDate: new Date()
};
const data = await _this.$api.getCoop(req);
uni.showToast({
title: data.msg,
icon: "none",
});
if (data.error === 1) {
_this.getOrderType();
}
} else {
uni.showToast({
title: orderData.ResultDesc,
icon: "none",
});
} }
} }
}, },
@ -539,9 +562,12 @@ export default {
icon: "none", icon: "none",
}); });
if (data.error === 1) { if (data.error === 1) {
uni.redirectTo({ setTimeout(() => {
url: "/pages/order/orderFoodDetail/index", uni.navigateBack({ delta: 1 });
}); }, 1000);
// uni.redirectTo({
// url: "/pages/order/orderFoodDetail/index",
// });
} }
// _this.$api // _this.$api
// .postCoop({ // .postCoop({
@ -700,6 +726,19 @@ export default {
}); });
} }
}, },
//
async handleChangeOrderStatus() {
let _this = this;
const req = {
action_type: "UpdateOrderState",
action_data: _this.orderInfo.SALEBILL_ID,
saleBillChildId: _this.sellchildid > 0 ? _this.sellchildid : "",
SALEBILL_STATE: 3000,
// deliverDate: new Date()
};
console.log("req", req);
const data = await _this.$api.getCoop(req);
},
}, },
onUnload() { onUnload() {
this.orderInfo = {}; this.orderInfo = {};

View File

@ -249,25 +249,51 @@ export default {
// 退 // 退
handleRefund() { handleRefund() {
let _this = this; let _this = this;
let openId = uni.getStorageSync("openId");
console.log("openId", openId);
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
content: "确认发起退款申请?", content: "确认发起退款申请?",
success: async function (res) { success: async function (res) {
if (res.confirm) { if (res.confirm) {
const req = { let reqOrder = {
action_type: "UpdateOrderState", action_type: "ScanOrder",
action_data: _this.orderInfo.SALEBILL_ID, salebillType: 3999,
saleBillChildId: _this.sellchildid, provinceCode: _this.user.PROVINCE_CODE,
SALEBILL_STATE: 8000, serverpartShopId: "5634",
// deliverDate: new Date() salebillDesc: "退款订单",
wechatOpenId: openId || "",
wechatUnionId: _this.user.USER_UNIONID || "",
// addressId: this.addressInfo.MEMBERADDRESS_ID,
// orderPersonTel: this.addressInfo.MOBILEPHONE,
// couponCode: '',//
t_saleorderdetail: JSON.stringify(_this.orderInfo.List),
requestType: "application/x-www-form-urlencoded",
}; };
const data = await _this.$api.getCoop(req); const orderData = await _this.$api.postCoop(reqOrder);
uni.showToast({ if (orderData.ResultCode === "100") {
title: data.msg, const req = {
icon: "none", action_type: "UpdateOrderState",
}); action_data: _this.orderInfo.SALEBILL_ID,
if (data.error === 1) { saleBillChildId: _this.sellchildid,
_this.getOrderType(); SALEBILL_STATE: 8000,
// deliverDate: new Date()
};
const data = await _this.$api.getCoop(req);
uni.showToast({
title: data.msg,
icon: "none",
});
if (data.error === 1) {
_this.getOrderType();
}
} else {
uni.showToast({
title: orderData.ResultDesc,
icon: "none",
});
} }
} }
}, },
@ -428,6 +454,7 @@ export default {
.getCoop({ .getCoop({
action_type: "GetOrderDetail", action_type: "GetOrderDetail",
salebillId: _this.orderInternal, salebillId: _this.orderInternal,
saleBillChildId: _this.sellchildid ? _this.sellchildid : "",
}) })
.then((res) => { .then((res) => {
// console.log(res) // console.log(res)
@ -527,6 +554,10 @@ export default {
content: "您是否确认取消订单。", content: "您是否确认取消订单。",
async success(res) { async success(res) {
if (res.confirm) { if (res.confirm) {
uni.showLoading({
title: "取消中...",
icon: "none",
});
const req = { const req = {
action_type: "UpdateOrderState", action_type: "UpdateOrderState",
action_data: _this.orderInfo.SALEBILL_ID, action_data: _this.orderInfo.SALEBILL_ID,
@ -536,6 +567,7 @@ export default {
}; };
const data = await _this.$api.getCoop(req); const data = await _this.$api.getCoop(req);
console.log("data", data); console.log("data", data);
uni.hideLoading();
uni.showToast({ uni.showToast({
title: data.msg, title: data.msg,
icon: "none", icon: "none",
@ -667,12 +699,15 @@ export default {
_this.orderAmount = total; _this.orderAmount = total;
}, },
goEvaluate() { goEvaluate() {
console.log("this.orderInfo", this.orderInfo);
uni.navigateTo({ uni.navigateTo({
url: url:
"/pages/newEvaluate/main?merchantsId=" + "/pages/evaluateList/addEvaluate?merchantsId=" +
this.orderInfo.MERCHANTS_ID + this.orderInfo.MERCHANTS_ID +
"&saleBillId=" + "&orderInternal=" +
this.orderInfo.SALEBILL_ID, this.orderInfo.SALEBILL_ID +
"&sellchildid=" +
this.orderInfo.SALEBILL_CHILD_ID,
}); });
}, },
goShop() { goShop() {

View File

@ -300,8 +300,10 @@ export default {
border-radius: 16rpx; border-radius: 16rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 56rpx 64rpx; padding: 56rpx 64rpx;
background: url("https://eshangtech.com/minTestImg/caiyunyiRegister.svg") background-image: url("https://eshangtech.com/minTestImg/caiyunyiRegister.svg");
no-repeat; background-repeat: no-repeat;
background-size: contain;
background-position: 0 0;
.contentTitle { .contentTitle {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 600; font-weight: 600;

View File

@ -7,7 +7,7 @@
class="searchText" class="searchText"
v-model="searchText" v-model="searchText"
confirm-type="search" confirm-type="search"
@confirm="handleSearch" @confirm="handleGetServiceList"
placeholder="请输入想去的服务区" placeholder="请输入想去的服务区"
placeholder-style="font-size: 14px;color: #A69E9F;" placeholder-style="font-size: 14px;color: #A69E9F;"
/> />
@ -119,6 +119,14 @@
</view> </view>
</view> </view>
<view class="rightBottom"> <view class="rightBottom">
<div class="goOrder" v-if="pageType === 'food'">
<!-- @click.stop="goBuy(item)" -->
<image
class="orderIcon"
src="/static/images/home/goOrderIcon.png"
/>
<span class="goOrderText">去点餐</span>
</div>
<image <image
class="navigation" class="navigation"
src="/static/images/home/navigationIcon.svg" src="/static/images/home/navigationIcon.svg"
@ -355,9 +363,10 @@ export default {
.serviceItem { .serviceItem {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx; padding: 24rpx 16rpx;
background-color: #fff; background-color: #fff;
margin-bottom: 24rpx; margin-bottom: 24rpx;
border-radius: 16rpx;
.itemTop { .itemTop {
width: 100%; width: 100%;
@ -477,7 +486,29 @@ export default {
height: 50rpx; height: 50rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: space-between;
.goOrder {
padding: 10rpx 12rpx;
border-radius: 4rpx;
border: 2rpx solid #ae8d3e;
display: flex;
align-items: center;
.orderIcon {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
.goOrderText {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 22rpx;
color: #ba922f;
line-height: 32rpx;
text-align: left;
font-style: normal;
}
}
.navigation { .navigation {
width: 48rpx; width: 48rpx;

View File

@ -450,12 +450,25 @@
item.RETsmallNumber || "00" item.RETsmallNumber || "00"
}}</view }}</view
> >
<view class="nowPrice"> <view
<text class="unit">¥</text> style="
<text class="price" width: 100%;
>{{ item.bigNumber || "" }}.{{ display: flex;
item.smallNumber || "00" align-items: center;
}}</text justify-content: space-between;
"
>
<view class="nowPrice">
<text class="unit">¥</text>
<text class="price"
>{{ item.bigNumber || "" }}.{{
item.smallNumber || "00"
}}</text
>
</view>
<view class="shopState" v-if="!(item.COMMODITY_STOCK > 0)"
>已售罄</view
> >
</view> </view>
</div> </div>
@ -499,12 +512,25 @@
item.RETsmallNumber || "00" item.RETsmallNumber || "00"
}}</view }}</view
> >
<view class="nowPrice"> <view
<text class="unit">¥</text> style="
<text class="price" width: 100%;
>{{ item.bigNumber || "" }}.{{ display: flex;
item.smallNumber || "00" align-items: center;
}}</text justify-content: space-between;
"
>
<view class="nowPrice">
<text class="unit">¥</text>
<text class="price"
>{{ item.bigNumber || "" }}.{{
item.smallNumber || "00"
}}</text
>
</view>
<view class="shopState" v-if="!(item.COMMODITY_STOCK > 0)"
>已售罄</view
> >
</view> </view>
</div> </div>
@ -574,7 +600,7 @@ export default {
{ label: "新希望", value: 3 }, { label: "新希望", value: 3 },
{ label: "八宝贡", value: 4 }, { label: "八宝贡", value: 4 },
{ label: "福临门", value: 5 }, { label: "福临门", value: 5 },
{ label: "金斯利", value: 6 }, { label: "金丝莉", value: 6 },
{ label: "良品铺子", value: 7 }, { label: "良品铺子", value: 7 },
{ label: "云南白药", value: 8 }, { label: "云南白药", value: 8 },
{ label: "德和", value: 9 }, { label: "德和", value: 9 },
@ -1175,7 +1201,9 @@ export default {
// //
handleGoShopList(type) { handleGoShopList(type) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopPages/shopList/index?type=${type}&pageType=${this.pageType}`, url: `/pages/shopPages/shopList/index?type=${type}&pageType=${
this.pageType || ""
}`,
}); });
}, },
// //
@ -1731,6 +1759,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: 12rpx 24rpx; padding: 12rpx 24rpx;
margin-right: 16rpx; margin-right: 16rpx;
min-width: 320rpx;
.titleTopSort { .titleTopSort {
width: 100%; width: 100%;
@ -1783,6 +1812,7 @@ export default {
border-radius: 16rpx; border-radius: 16rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 12rpx 24rpx; padding: 12rpx 24rpx;
min-width: 160rpx;
.titleTopSort { .titleTopSort {
width: 100%; width: 100%;
@ -2151,6 +2181,13 @@ export default {
font-style: normal; font-style: normal;
} }
} }
.shopState {
font-size: 24rpx;
color: #fff;
background: #bbbbbb;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
.buyCarBox { .buyCarBox {
width: 100%; width: 100%;
@ -2318,6 +2355,13 @@ export default {
font-style: normal; font-style: normal;
} }
} }
.shopState {
font-size: 24rpx;
color: #fff;
background: #bbbbbb;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
.buyCarBox { .buyCarBox {
width: 100%; width: 100%;
@ -2376,7 +2420,7 @@ export default {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 26rpx; font-size: 26rpx;
color: #6c737a; color: #d0d0d0;
line-height: 40rpx; line-height: 40rpx;
text-align: justify; text-align: justify;
font-style: normal; font-style: normal;
@ -2386,8 +2430,8 @@ export default {
.bottomText::after { .bottomText::after {
content: ""; content: "";
width: 30vw; width: 30vw;
height: 4rpx; height: 2rpx;
background: #b2b8bd; background: #e0e0e0;
position: absolute; position: absolute;
left: -32vw; left: -32vw;
top: 50%; top: 50%;
@ -2395,8 +2439,8 @@ export default {
.bottomText::before { .bottomText::before {
content: ""; content: "";
width: 30vw; width: 30vw;
height: 4rpx; height: 2rpx;
background: #b2b8bd; background: #e0e0e0;
position: absolute; position: absolute;
right: -32vw; right: -32vw;
top: 50%; top: 50%;
@ -2416,7 +2460,7 @@ export default {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 26rpx; font-size: 26rpx;
color: #6c737a; color: #d0d0d0;
line-height: 40rpx; line-height: 40rpx;
text-align: justify; text-align: justify;
font-style: normal; font-style: normal;
@ -2426,8 +2470,8 @@ export default {
.bottomText::after { .bottomText::after {
content: ""; content: "";
width: 30vw; width: 30vw;
height: 4rpx; height: 2rpx;
background: #b2b8bd; background: #e0e0e0;
position: absolute; position: absolute;
left: -32vw; left: -32vw;
top: 50%; top: 50%;
@ -2435,8 +2479,8 @@ export default {
.bottomText::before { .bottomText::before {
content: ""; content: "";
width: 30vw; width: 30vw;
height: 4rpx; height: 2rpx;
background: #b2b8bd; background: #e0e0e0;
position: absolute; position: absolute;
right: -32vw; right: -32vw;
top: 50%; top: 50%;

View File

@ -19,9 +19,17 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
margin-top: 16rpx;
" "
> >
<div class="topLeft"> <div class="topLeft">
<view
style="display: flex; align-items: center"
@click="handleShowAddress"
>
<image class="topIcon" src="/static/images/home/fixed.svg" />
<text class="name">{{ showAddressObj.DOORPLATE || "" }}</text>
</view>
<!-- <picker :value="siteValue" :range="siteList" range-key="ServerpartShop_Address" @change="handleSiteChange"> <!-- <picker :value="siteValue" :range="siteList" range-key="ServerpartShop_Address" @change="handleSiteChange">
<view style="display: flex;align-items: center"> <view style="display: flex;align-items: center">
<image class="topIcon" src="/static/images/home/fixed.svg" /> <image class="topIcon" src="/static/images/home/fixed.svg" />
@ -49,12 +57,9 @@
:style="{ height: `calc(100vh - ${menu.bottom + 210}px)` }" :style="{ height: `calc(100vh - ${menu.bottom + 210}px)` }"
> >
<div class="shopBox"> <div class="shopBox">
<div <div class="shopItem" v-for="(item, index) in shopList" :key="index">
class="shopItem" <!-- :style="{ height: (item.rows - 1) * 28 + 210 + 'rpx' }" -->
v-for="(item, index) in shopList"
:key="index"
:style="{ height: (item.rows - 1) * 28 + 210 + 'rpx' }"
>
<!-- @touchmove="moveTouch" --> <!-- @touchmove="moveTouch" -->
<view <view
class="shopUp" class="shopUp"
@ -73,32 +78,48 @@
:key="index" :key="index"
> >
<div class="detailLeft"> <div class="detailLeft">
<radio <view style="display: flex">
v-if="pageType === 'normal'" <radio
:checked="item.select" v-if="pageType === 'normal'"
color="#1890FF" :checked="item.select"
@click="handleChangeSelect(item)" color="#1890FF"
></radio> @click="handleChangeSelect(item)"
<radio ></radio>
v-else <radio
:checked="item.selectDelete" v-else
color="#1890FF" :checked="item.selectDelete"
@click="handleChangeDelete(item)" color="#1890FF"
></radio> @click="handleChangeDelete(item)"
<image ></radio>
class="leftIcon" <image
:src="item.IMAGE_PATH || '/static/images/home/defultImg.png'" class="leftIcon"
/> :src="
item.IMAGE_PATH ||
item.DEFAULT_IMG ||
'/static/images/home/defultImg.png'
"
/>
</view>
<view class="simPriceBox">
<text class="sumPriceUnit"></text
>{{
$utils.handleFormatNumber(
item.COMMODITY_MEMBERPRICE * item.count
)
}}
</view>
</div> </div>
<div class="detailRight"> <div class="detailRight">
<div class="title">{{ item.COMMODITY_NAME }}</div> <div class="title">{{ item.COMMODITY_NAME }}</div>
<div class="otherBox"> <div class="otherBox">
<div class="priceBox"> <div class="priceBox">
<text class="priceIcon"></text> <view>
<text class="priceNumber">{{ <text class="priceIcon"></text>
item.COMMODITY_MEMBERPRICE <text class="priceNumber">{{
}}</text> item.COMMODITY_MEMBERPRICE
<text class="priceUnit">/{{ item.COMMODITY_UNIT }}</text> }}</text>
<text class="priceUnit">/{{ item.COMMODITY_UNIT }}</text>
</view>
</div> </div>
<div class="cartcontrol"> <div class="cartcontrol">
<div <div
@ -122,13 +143,12 @@
class="cart-count" class="cart-count"
confirm-type="done" confirm-type="done"
type="digit" type="digit"
:maxlength="inputMaxLength" :maxlength="7"
style="background: #fff; text-align: center" style="background: #fff; text-align: center"
placeholder="0" placeholder="0"
@blur="haveFocus($event, item)" @blur="haveFocus($event, item)"
@focus="haveFocus($event, item)" @focus="haveFocus($event, item)"
v-model="item.count" v-model="item.count"
@input="handleNumber"
/> />
<!-- @change="changInput($event, item)"--> <!-- @change="changInput($event, item)"-->
<div <div
@ -191,10 +211,60 @@
<div v-else class="deleteBtn" @click="handleDelete">删除</div> <div v-else class="deleteBtn" @click="handleDelete">删除</div>
</div> </div>
<uni-popup ref="addressPopup" :safe-area="false">
<view class="addressPopupBox">
<view class="addressPopupTitle">选择收货地址</view>
<view class="addressList">
<view
class="addressItem"
v-for="(item, index) in addressList"
:key="index"
>
<view class="addressItemTop">
<view class="itemTopLeft">
<radio
:checked="item.MEMBERADDRESS_ID === selectAddressId"
color="#1890FF"
@click="handleChangeAddress(item.MEMBERADDRESS_ID)"
></radio>
<text class="addressText"
>{{ item.ADDRESS || "" }}{{ item.DOORPLATE || "" }}</text
>
</view>
<view
class="itemTopRight"
@click="checkOrEdit(item.MEMBERADDRESS_ID)"
>
<img
class="pickerImg"
src="https://eshangtech.com/ShopICO/ahyd-mall/editIcon.svg"
/>
</view>
</view>
<view class="addressItemBottom">
<text class="bigName" style="margin-right: 8rpx">{{
item.USER_NAME || ""
}}</text>
<text class="name" style="margin-right: 8rpx">{{
item.USER_SEX_TEXT || ""
}}</text>
<text class="phone">{{ item.MOBILEPHONE || "" }}</text>
</view>
</view>
</view>
<navigator url="/pages/myAddress/newAdd/index" class="btn"
>新增收货地址</navigator
>
</view>
</uni-popup>
<shop-tabbar <shop-tabbar
:page="'/pages/shopMallPage/shopCar/index'" :page="'/pages/shopMallPage/shopCar/index'"
:pageType="bigPageType" :pageType="bigPageType"
:shopCarLength="shopCarListCount" :shopCarLength="shopCarListCount"
:zIndex="popupShow ? 98 : 99"
/> />
</view> </view>
</template> </template>
@ -223,6 +293,12 @@ export default {
storeId: "", storeId: "",
systemInfo: {}, systemInfo: {},
bigPageType: "", // bigPageType: "", //
userInfo: {}, //
addressList: [], //
showAddressObj: {}, //
popupShow: false, //
selectAddressId: 0, // id
goChangeAddress: false, //
}; };
}, },
watch: { watch: {
@ -247,7 +323,7 @@ export default {
user: "user", user: "user",
}), }),
}, },
onLoad(query) { async onLoad(query) {
console.log("query", query); console.log("query", query);
let systemInfo = uni.getSystemInfoSync(); let systemInfo = uni.getSystemInfoSync();
@ -259,6 +335,14 @@ export default {
this.bigPageType = query.pageType; this.bigPageType = query.pageType;
} }
//
if (this.bigPageType === "UnionMall") {
await this.handleGetUserBalance();
}
//
this.handleGetAddressList();
this.handleGetNowShopCarList(); this.handleGetNowShopCarList();
this.handleSum(); this.handleSum();
}, },
@ -271,6 +355,7 @@ export default {
shopCarList = this.$store.state.myShopCar; shopCarList = this.$store.state.myShopCar;
} }
console.log("shopCarList", shopCarList); console.log("shopCarList", shopCarList);
this.shopList = shopCarList;
let count = 0; let count = 0;
if (shopCarList && shopCarList.length > 0) { if (shopCarList && shopCarList.length > 0) {
shopCarList.forEach((item) => { shopCarList.forEach((item) => {
@ -278,8 +363,69 @@ export default {
}); });
} }
this.shopCarListCount = count; this.shopCarListCount = count;
this.handleSum();
this.handleGetAddressList();
}, },
methods: { methods: {
//
handleShowAddress() {
this.$refs.addressPopup.open("bottom");
this.popupShow = true;
},
//
handleChangeAddress(id) {
console.log("this.selectAddressId", this.selectAddressId);
this.addressList.forEach((item) => {
if (item.MEMBERADDRESS_ID === id) {
this.showAddressObj = item;
this.selectAddressId = item.MEMBERADDRESS_ID;
}
});
this.$forceUpdate();
this.$refs.addressPopup.close();
this.popupShow = false;
},
//
checkOrEdit(id) {
this.goChangeAddress = true;
uni.navigateTo({ url: "/pages/myAddress/newAdd/index?id=" + id });
},
//
async handleGetAddressList() {
const data = await this.$api.getCoop({ action_type: "GetAddressList" });
let list = data.Data.List;
let defaultAddress = {};
if (list && list.length > 0) {
list.forEach((item) => {
if (item.ISDEFAULT === 1) {
defaultAddress = item;
}
});
}
console.log("defaultAddress", defaultAddress);
console.log("address", list);
if (!defaultAddress.MEMBERADDRESS_ID) {
defaultAddress = list[0];
}
this.showAddressObj = defaultAddress;
this.selectAddressId = defaultAddress.MEMBERADDRESS_ID;
this.addressList = list;
},
//
async handleGetUserBalance() {
uni.showLoading({
title: "获取用户余额...",
});
const data = await this.$api.getCoop({
action_type: "GetMembershipInfo",
WechatUserId: this.user.WechatUserId,
});
this.userInfo = data.Data;
console.log("this.userInfo", this.userInfo);
uni.hideLoading();
},
// //
handleGetNowShopCarList() { handleGetNowShopCarList() {
let shopCarList = []; let shopCarList = [];
@ -392,9 +538,36 @@ export default {
// //
decreaseGoodToCartFn(e, item) { decreaseGoodToCartFn(e, item) {
if (item.count > 0) { if (item.count > 0) {
item.count -= 1; // item.count -= 1;
if (item.count < 0) { if (item.count - 1 <= 0) {
item.count = 0; let _this = this;
uni.showModal({
title: "确定移除该商品?",
success: function (res) {
if (res.confirm) {
item.count -= 1;
//
if (item.count === 0) {
let list = [];
_this.shopList.forEach((i) => {
if (i.COMMODITY_CODE !== item.COMMODITY_CODE) {
list.push(i);
}
});
_this.shopList = list;
}
_this.handleSum();
if (_this.bigPageType === "UnionMall") {
_this.$store.commit("unionMyShopCar", _this.shopList);
} else {
_this.$store.commit("myShopCar", _this.shopList);
}
_this.$forceUpdate();
}
},
});
} else {
item.count -= 1;
} }
} }
if (item.count === 0) { if (item.count === 0) {
@ -416,15 +589,49 @@ export default {
}, },
// //
haveFocus(e, item) { haveFocus(e, item) {
item.count = Number(e.mp.detail.value); console.log("e", e);
if (item.count === 0) { let value = e.detail.value;
let list = []; let number = 0;
this.shopList.forEach((subItem) => { if (value.indexOf(".") === -1) {
if (subItem.COMMODITY_CODE !== item.COMMODITY_CODE) { number = Number(value);
list.push(subItem); } else {
} let bigNumber = value.split(".")[0];
number = Number(bigNumber);
}
console.log("number", number);
let oldCount = item.count;
if (number === 0) {
let _this = this;
uni.showModal({
title: "确定移除该商品?",
success: function (res) {
if (res.confirm) {
item.count = number;
let list = [];
_this.shopList.forEach((subItem) => {
if (
subItem.COMMODITY_CODE !== item.COMMODITY_CODE &&
item.count > 0
) {
list.push(subItem);
}
});
_this.shopList = list;
console.log("this.dataList1111", _this.shopList);
if (_this.bigPageType === "UnionMall") {
_this.$store.commit("unionMyShopCar", _this.shopList);
} else {
_this.$store.commit("myShopCar", _this.shopList);
}
_this.handleSum();
_this.$forceUpdate();
} else if (res.cancel) {
item.count = Number(oldCount);
}
},
}); });
this.shopList = list; } else {
item.count = number;
} }
console.log("this.dataList1111", this.shopList); console.log("this.dataList1111", this.shopList);
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
@ -435,25 +642,6 @@ export default {
this.handleSum(); this.handleSum();
this.$forceUpdate(); this.$forceUpdate();
}, },
//
handleNumber(e) {
console.log("e", e);
if (e.mp.detail.value.indexOf(".") !== -1) {
const flag = e.mp.detail.value.indexOf(".");
console.log("flag", flag);
if (flag === 0) {
this.inputMaxLength = flag + 4;
} else {
this.inputMaxLength = flag + 3;
}
} else {
// if (e.mp.detail.value === '') {
// this.currentRow.count = 0
// }
this.inputMaxLength = -1;
}
console.log("inputMaxLength", this.inputMaxLength);
},
// //
touchOnGoods(e, item) { touchOnGoods(e, item) {
item.count += 1; item.count += 1;
@ -531,19 +719,27 @@ export default {
goPayFn() { goPayFn() {
// //
if (this.bigPageType === "UnionMall") { if (this.bigPageType === "UnionMall") {
if (!(this.user.ACCOUNT_BALANCE > 0)) { if (!(this.userInfo.ACCOUNT_BALANCE > 0)) {
uni.showToast({ uni.showToast({
title: "工会商城余额不足,无法下单!", title: "工会商城余额不足,无法下单!",
icon: "none", icon: "none",
}); });
return; return;
} else if (this.totalPay > Number(this.userInfo.ACCOUNT_BALANCE)) {
uni.showToast({
title: "账户余额不足!",
icon: "none",
});
return;
} }
} }
console.log("this.shopList", this.shopList);
if (this.shopList.length > 0) { if (this.shopList.length > 0) {
this.pageOut = true; this.pageOut = true;
let orderList = []; let orderList = [];
let noSelectList = []; let noSelectList = [];
this.shopList.forEach((item) => { this.shopList.forEach((item) => {
item.COMMODITY_INTRO = "";
// 西 // 西
if (item.select === true) { if (item.select === true) {
item.ORDER_COUNT = item.count; item.ORDER_COUNT = item.count;
@ -586,7 +782,7 @@ export default {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopPages/settlement/index?pageType=shopCar&shopCarList=${JSON.stringify( url: `/pages/shopPages/settlement/index?pageType=shopCar&shopCarList=${JSON.stringify(
orderList orderList
)}`, )}&pageType=${this.bigPageType}&addressId=${this.selectAddressId}`,
}); });
} else { } else {
uni.showToast({ title: "购物车内无勾选商品", icon: "none" }); uni.showToast({ title: "购物车内无勾选商品", icon: "none" });
@ -721,17 +917,40 @@ export default {
border-radius: 8px; border-radius: 8px;
margin-right: 8px; margin-right: 8px;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: flex-end;
.leftIcon { .leftIcon {
width: 72px; width: 72px;
height: 72px; height: 72px;
overflow: hidden; overflow: hidden;
} }
.simPriceBox {
height: 20px;
font-size: 18px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #ff6219;
line-height: 18px;
width: 100%;
margin-top: 24rpx;
text-align: center;
.sumPriceUnit {
font-size: 12px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
// color: #ff6219;
color: #ff6219;
line-height: 18px;
}
}
} }
.detailRight { .detailRight {
width: 100%; width: 100%;
height: 104px;
z-index: 2; z-index: 2;
background: #fff; background: #fff;
@ -747,7 +966,7 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
margin-bottom: 12px; margin-bottom: 8rpx;
} }
.otherBox { .otherBox {
@ -758,22 +977,24 @@ export default {
.priceBox { .priceBox {
display: flex; display: flex;
align-items: flex-end; flex-direction: column;
align-items: flex-start;
.priceIcon { .priceIcon {
font-size: 12px; font-size: 12px;
font-family: DINAlternate-Bold, DINAlternate; font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold; font-weight: bold;
color: #ff6219; // color: #ff6219;
line-height: 16px; color: #9fa3a8;
line-height: 18px;
} }
.priceNumber { .priceNumber {
font-size: 20px; font-size: 12px;
font-family: DINAlternate-Bold, DINAlternate; font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold; font-weight: bold;
color: #ff6219; // color: #ff6219;
line-height: 20px; color: #9fa3a8;
line-height: 18px;
} }
.priceUnit { .priceUnit {
@ -783,6 +1004,23 @@ export default {
color: #9fa3a8; color: #9fa3a8;
line-height: 18px; line-height: 18px;
} }
.sumPrice {
font-size: 18px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #ff6219;
line-height: 18px;
width: 100%;
.sumPriceUnit {
font-size: 12px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
// color: #ff6219;
color: #ff6219;
line-height: 18px;
}
}
} }
.cartcontrol { .cartcontrol {
@ -932,5 +1170,96 @@ export default {
border-radius: 4px; border-radius: 4px;
} }
} }
.addressPopupBox {
width: 100%;
height: 60vh;
background-color: #fff;
box-sizing: border-box;
padding: 16rpx;
z-index: 999999;
.addressPopupTitle {
font-family: PingFangSC, PingFang SC;
font-weight: 600;
font-size: 32rpx;
color: #020e1a;
line-height: 40rpx;
text-align: left;
font-style: normal;
display: block;
text-align: center;
}
.addressList {
margin-top: 24rpx;
width: 100%;
height: calc(60vh - 250rpx);
overflow-y: auto;
.addressItem {
width: 100%;
padding: 16rpx 0;
box-sizing: border-box;
border-bottom: 1px solid #f6f6f6;
.addressItemTop {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
.itemTopLeft {
display: flex;
align-items: center;
.addressText {
font-size: 28rpx;
display: inline-block;
width: 70vw;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
.itemTopRight {
.pickerImg {
width: 18px;
height: 18px;
}
}
}
.addressItemBottom {
width: 100%;
margin-top: 8rpx;
box-sizing: border-box;
padding-left: 64rpx;
color: #9fa3a8;
font-size: 24rpx;
}
}
}
.addressList::-webkit-scrollbar {
display: none;
}
.btn {
height: 88rpx;
width: 90%;
line-height: 88rpx;
background: linear-gradient(to right, #1f1f1f, #62605f);
color: #f0dccf;
text-align: center;
font-size: 30rpx;
position: fixed;
bottom: 32rpx;
transform: translateX(-50%);
left: 50%;
border-radius: 12rpx;
}
}
} }
</style> </style>

View File

@ -26,7 +26,12 @@
</div> </div>
</div> </div>
<div class="pageContent" :style="{ height: 'calc(100vh - 214px)' }"> <div
class="pageContent"
:style="{
height: `calc(100vh - ${menu.top + menu.height + 36 + 50 + 38 + 30}px)`,
}"
>
<scroll-view class="bigTabBox" scroll-x :scroll-into-view="bigTypeScroll"> <scroll-view class="bigTabBox" scroll-x :scroll-into-view="bigTypeScroll">
<div <div
class="scrollBox" class="scrollBox"
@ -105,7 +110,7 @@
</div> </div>
</div> </div>
</scroll-view> </scroll-view>
<!-- :style="{ height: `calc(100vh - 95rpx)` }" -->
<div class="shopListBox"> <div class="shopListBox">
<!-- 左侧商品种类 --> <!-- 左侧商品种类 -->
<div class="smallShopList"> <div class="smallShopList">
@ -204,6 +209,7 @@
>{{ item.count }}</span >{{ item.count }}</span
> >
<div <div
v-if="item.COMMODITY_STOCK > 0"
class="addShopCar" class="addShopCar"
@click.stop="touchOnGoods($event, item)" @click.stop="touchOnGoods($event, item)"
:id=" :id="
@ -218,6 +224,7 @@
src="/static/images/home/add.svg" src="/static/images/home/add.svg"
/> />
</div> </div>
<div v-else class="shopState">已售罄</div>
</div> </div>
</div> </div>
</div> </div>
@ -376,6 +383,7 @@ export default {
pageType: "", // pageType: "", //
leftId: "", // leftId: "", //
good: {}, // good: {}, //
systemInfo: {},
}; };
}, },
watch: { watch: {
@ -402,6 +410,9 @@ export default {
}), }),
}, },
onLoad(query) { onLoad(query) {
let systemInfo = uni.getSystemInfoSync();
this.systemInfo = systemInfo;
console.log("this.systemInfo ", this.systemInfo);
console.log("query", query); console.log("query", query);
if (query.selectIndex) { if (query.selectIndex) {
this.activeTabs = Number(query.selectIndex); this.activeTabs = Number(query.selectIndex);
@ -412,8 +423,28 @@ export default {
if (query.leftId) { if (query.leftId) {
this.leftId = query.leftId; this.leftId = query.leftId;
} }
let shopCarList = [];
if (this.pageType === "UnionMall") {
shopCarList = this.$store.state.unionMyShopCar;
} else {
shopCarList = this.$store.state.myShopCar;
}
if (shopCarList && shopCarList.length > 0) {
this.shopCarList = shopCarList;
}
if (this.pageType === "UnionMall") {
//
this.handleGetUnionMallShopType();
} else {
//
this.handleGetShopType();
//
// this.handleGetAllShopItem();
}
}, },
onShow() { onShow() {
this.menu = uni.getMenuButtonBoundingClientRect();
// 西 // 西
let shopCarList = []; let shopCarList = [];
if (this.pageType === "UnionMall") { if (this.pageType === "UnionMall") {
@ -423,20 +454,24 @@ export default {
} }
console.log("shopCarList", shopCarList); console.log("shopCarList", shopCarList);
console.log("this.shopCarList", this.shopCarList);
if (shopCarList && shopCarList.length > 0) { //
this.shopCarList = shopCarList; if (JSON.stringify(shopCarList) === JSON.stringify(this.shopCarList)) {
}
this.menu = uni.getMenuButtonBoundingClientRect();
if (this.pageType === "UnionMall") {
//
this.handleGetUnionMallShopType();
} else { } else {
// if (shopCarList && shopCarList.length > 0) {
this.handleGetShopType(); this.shopCarList = shopCarList;
// }
// this.handleGetAllShopItem();
if (this.pageType === "UnionMall") {
//
this.handleGetUnionMallShopType();
} else {
//
this.handleGetShopType();
//
// this.handleGetAllShopItem();
}
} }
}, },
onHide() { onHide() {
@ -591,9 +626,9 @@ export default {
}; };
const data = await this.$api.getCoop(req); const data = await this.$api.getCoop(req);
let typeList = data.Data.List; let typeList = data.Data.List;
console.log("typeList", typeList); console.log("typeList321", typeList);
let resList = []; let resList = [];
let indexOfList = [1249, 1250, 1252, 1253]; let indexOfList = [1249, 1250, 1320, 1252, 1253];
if (typeList && typeList.length > 0) { if (typeList && typeList.length > 0) {
typeList.forEach((item) => { typeList.forEach((item) => {
if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) { if (indexOfList.indexOf(item.UserdefinedType_Id) !== -1) {
@ -758,6 +793,28 @@ export default {
}); });
} }
console.log("拿到当前的所有子类", thisAllType); console.log("拿到当前的所有子类", thisAllType);
let haveAll = false;
if (thisAllType && thisAllType.length > 0) {
thisAllType.forEach((item) => {
if (item.USERDEFINEDTYPE_NAME === "全部") {
haveAll = true;
}
});
}
//
list.unshift({
UserdefinedType_Name: "全部",
UserdefinedType_Id: -1,
});
if (!haveAll) {
//
thisAllType.unshift({
UserdefinedType_Name: "全部",
UserdefinedType_Id: -1,
});
}
let leftIndex = -1; let leftIndex = -1;
console.log("this.pageType", this.pageType); console.log("this.pageType", this.pageType);
console.log("this.leftId", this.leftId); console.log("this.leftId", this.leftId);
@ -771,16 +828,55 @@ export default {
}); });
} }
} }
console.log("leftIndex", leftIndex); console.log("list", list);
console.log("thisAllType", thisAllType);
if (leftIndex === -1) { if (leftIndex === -1) {
leftIndex = this.leftSelectIndex; leftIndex = this.leftSelectIndex;
} }
console.log("this.leftSelectIndex", this.leftSelectIndex); console.log("this.leftSelectIndex23", this.leftSelectIndex);
console.log("this.thisAllType31", thisAllType);
//
let shopList = []; let shopList = [];
if (list && list.length > 0) { if (list && list.length > 0) {
shopList = list[leftIndex].COMMODITYLIST; console.log("list", list);
console.log("list[leftIndex]", list[leftIndex]);
//
let thisTypeAllShop = [];
list.forEach((item) => {
if (item.UserdefinedType_Name !== "全部") {
if (
item.COMMODITYLIST &&
item.COMMODITYLIST.length > 0 &&
(item.USERDEFINEDTYPE_PID === id ||
item.USERDEFINEDTYPE_ID === id)
) {
item.COMMODITYLIST.forEach((subItem) => {
thisTypeAllShop.push(subItem);
});
}
}
});
list[0].COMMODITYLIST = thisTypeAllShop;
console.log("thisTypeAllShop", thisTypeAllShop);
console.log("list", list);
console.log("leftIndex", leftIndex);
if (
leftIndex !== -1 &&
list[leftIndex] &&
list[leftIndex].COMMODITYLIST &&
list[leftIndex].COMMODITYLIST.length > 0
) {
console.log("this.leftId", this.leftId);
if (this.pageType === "UnionMall" && this.leftId) {
shopList = list[leftIndex - 1].COMMODITYLIST;
} else {
shopList = list[leftIndex].COMMODITYLIST;
}
}
if (shopList && shopList.length > 0) { if (shopList && shopList.length > 0) {
shopList.forEach((item) => { shopList.forEach((item) => {
// //
@ -843,11 +939,25 @@ export default {
}); });
} }
this.leftTypeList = newList; //
let allShopList = [];
if (newList && newList.length > 0) { if (newList && newList.length > 0) {
this.leftToView = this.leftToView =
"left_" + leftIndex + "_" + newList[leftIndex].USERDEFINEDTYPE_ID; "left_" + leftIndex + "_" + newList[leftIndex].USERDEFINEDTYPE_ID;
newList.forEach((item) => {
if (item.COMMODITYLIST && item.COMMODITYLIST.length > 0) {
item.COMMODITYLIST.forEach((subItem) => {
if (subItem.USERDEFINEDTYPE_NAME !== "全部") {
allShopList.push(subItem);
}
});
}
});
} }
newList[0].COMMODITYLIST = allShopList;
this.leftTypeList = newList;
console.log("this.leftTypeList", this.leftTypeList);
this.leftSelectIndex = leftIndex; this.leftSelectIndex = leftIndex;
this.rightShopList = shopList; this.rightShopList = shopList;
this.changBigTypeLoading = true; this.changBigTypeLoading = true;
@ -965,8 +1075,10 @@ export default {
}, },
// //
handleToggleTab(index) { handleToggleTab(index) {
console.log("this.shopTypeList", this.shopTypeList);
this.activeTabs = index; this.activeTabs = index;
this.leftSelectIndex = 0; this.leftSelectIndex = 0;
console.log("index", index);
this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id); this.handleGetAllShopItem(this.shopTypeList[index].UserdefinedType_Id);
}, },
// //
@ -1592,6 +1704,14 @@ export default {
height: 100%; height: 100%;
} }
} }
.shopState {
font-size: 24rpx;
color: #fff;
background: #bbbbbb;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
} }
.specifications { .specifications {

View File

@ -10,7 +10,9 @@
src="/static/images/home/backArrowWhite.svg" src="/static/images/home/backArrowWhite.svg"
@click="handleBackHome" @click="handleBackHome"
/> />
<text class="pageTitle">我的</text> <text class="pageTitle">{{
pageType === "UnionMall" ? "工会商城我的" : "我的"
}}</text>
<view class="backArrow"></view> <view class="backArrow"></view>
</view> </view>
</view> </view>
@ -41,7 +43,7 @@
<text class="itemText">{{ item.label }}</text> <text class="itemText">{{ item.label }}</text>
<text class="itemValue">{{ <text class="itemValue">{{
item.value === 1 item.value === 1
? obligation_Count ? Unpaid_Count
: item.value === 2 : item.value === 2
? Deliver_Count ? Deliver_Count
: item.value === 3 : item.value === 3
@ -120,12 +122,14 @@ export default {
{ src: "/static/images/home/fead.svg", label: "已评价", value: 2 }, { src: "/static/images/home/fead.svg", label: "已评价", value: 2 },
{}, {},
], // tab ], // tab
Deliver_Count: 0, // Deliver_Count: 0, //
Complete_Count: 0, // Complete_Count: 0, //
Evaluated_Count: 0, // Evaluated_Count: 0, //
CheckOrder_Count: 0, // CheckOrder_Count: 0, //
Comment_Count: 0, // Comment_Count: 0, //
obligation_Count: 0, // Unpaid_Count: 0, //
pageType: "", // pageType: "", //
shopCarListCount: 0, // shopCarListCount: 0, //
}; };
@ -151,6 +155,7 @@ export default {
if (query.pageType) { if (query.pageType) {
this.pageType = query.pageType; this.pageType = query.pageType;
} }
console.log("this.pageType", this.pageType);
}, },
onShow() { onShow() {
if (!this.user.MEMBERSHIP_ID) { if (!this.user.MEMBERSHIP_ID) {
@ -185,6 +190,7 @@ export default {
// memberShipId: this.user.MEMBERSHIP_ID, // memberShipId: this.user.MEMBERSHIP_ID,
WechatUserId: this.user.WechatUserId, WechatUserId: this.user.WechatUserId,
RegisterType: 0, RegisterType: 0,
saleBillType: this.pageType === "UnionMall" ? "3001" : "3000",
}) })
.then(function (data) { .then(function (data) {
if (data.ResultCode === "100") { if (data.ResultCode === "100") {
@ -194,6 +200,7 @@ export default {
_this.Evaluated_Count = _data.Evaluated_Count; _this.Evaluated_Count = _data.Evaluated_Count;
_this.CheckOrder_Count = _data.CheckOrder_Count; _this.CheckOrder_Count = _data.CheckOrder_Count;
_this.Comment_Count = _data.Comment_Count; _this.Comment_Count = _data.Comment_Count;
_this.Unpaid_Count = _data.Unpaid_Count;
_this.user.MEMBERSHIP_LEVEL_TEXT = _this.user.MEMBERSHIP_LEVEL_TEXT =
_data.MEMBERSHIP_LEVEL_TEXT || ""; _data.MEMBERSHIP_LEVEL_TEXT || "";
_this.user.COUPON_COUNT = _data.COUPON_COUNT || ""; _this.user.COUPON_COUNT = _data.COUPON_COUNT || "";
@ -220,7 +227,9 @@ export default {
handleGo(url) { handleGo(url) {
// 1 2 3 4 // 1 2 3 4
console.log("url", url); console.log("url", url);
uni.navigateTo({ url: `/pages/order/buyOrder/index?type=${url}` }); uni.navigateTo({
url: `/pages/order/buyOrder/index?type=${url}&pageType=${this.pageType}`,
});
}, },
// //
goToEvaluate(type) { goToEvaluate(type) {
@ -229,7 +238,9 @@ export default {
1: 2, 1: 2,
2: 3, 2: 3,
}; };
uni.navigateTo({ url: `/pages/evaluateList/index?type=${obj[type]}` }); uni.navigateTo({
url: `/pages/evaluateList/index?type=${obj[type]}&pageType=${this.pageType}`,
});
}, },
// //
goAddressManager() { goAddressManager() {

View File

@ -1,21 +1,38 @@
<template> <template>
<div class="flex-row space-x-12"> <div class="flex-row space-x-12">
<img class="shrink-0 self-start image_9" :src="obj.IMAGE_PATH || '/static/images/home/defultImg.png'" /> <img
class="shrink-0 self-start image_9"
:src="obj.IMAGE_PATH || '/static/images/home/defultImg.png'"
/>
<div class="flex-col info"> <div class="flex-col info">
<div class="flex-row justify-between"> <div class="flex-row justify-between">
<span class="font_3 titleName">{{ obj.COMMODITY_NAME }}</span> <div class="font_3 titleName">{{ obj.COMMODITY_NAME }}</div>
<span class="font_3" style="width:120px;text-align: right">x{{ obj.count }}{{ obj.COMMODITY_UNIT }}</span> <div class="font_3" style="width: 100px; text-align: right">
x{{ obj.count }}{{ obj.COMMODITY_UNIT }}
</div>
</div> </div>
<div class="flex-row justify-between"> <div class="flex-row justify-between">
<span class="font_2">单价: {{ obj.COMMODITY_MEMBERPRICE }}/{{ obj.COMMODITY_UNIT }}</span> <span class="font_2"
>单价: {{ obj.COMMODITY_MEMBERPRICE }}/{{
obj.COMMODITY_UNIT
}}</span
>
<span class="font_2">¥{{ obj.cartItemAoumt }}</span> <span class="font_2">¥{{ obj.cartItemAoumt }}</span>
</div> </div>
<div class="remark" v-if="isSubmit && obj.SALEDETAIL_DESC"> <div class="remark" v-if="isSubmit && obj.SALEDETAIL_DESC">
<input :disabled="isSubmit" class="input" v-model="obj.SALEDETAIL_DESC" /> <input
:disabled="isSubmit"
class="input"
v-model="obj.SALEDETAIL_DESC"
/>
</div> </div>
<div class="remark" v-if="!isSubmit"> <div class="remark" v-if="!isSubmit">
<input class="input" @blur="handleChangeValue($event, obj)" :value="obj.SALEDETAIL_DESC" <input
placeholder="这里是备注的内容" /> class="input"
@blur="handleChangeValue($event, obj)"
:value="obj.SALEDETAIL_DESC"
placeholder="这里是备注的内容"
/>
</div> </div>
<!-- <div class="flex-col justify-start items-start text-wrapper_2" v-if="obj.SALEDETAIL_DESC">--> <!-- <div class="flex-col justify-start items-start text-wrapper_2" v-if="obj.SALEDETAIL_DESC">-->
<!-- <span class="font_5 text_6">{{obj.SALEDETAIL_DESC}}</span>--> <!-- <span class="font_5 text_6">{{obj.SALEDETAIL_DESC}}</span>-->
@ -28,19 +45,17 @@
export default { export default {
props: { props: {
obj: {}, obj: {},
isSubmit: false isSubmit: false,
}, },
data() { data() {
return { return {};
}
}, },
methods: { methods: {
handleChangeValue(e, obj) { handleChangeValue(e, obj) {
obj.SALEDETAIL_DESC = e.mp.detail.value obj.SALEDETAIL_DESC = e.mp.detail.value;
} },
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -56,7 +71,7 @@ export default {
justify-content: space-between; justify-content: space-between;
margin-bottom: 24rpx; margin-bottom: 24rpx;
&>*:not(:first-child) { & > *:not(:first-child) {
margin-left: 24rpx; margin-left: 24rpx;
} }
@ -66,7 +81,7 @@ export default {
.remark { .remark {
.input { .input {
width: 100%; width: 100%;
background: #F2F4F5; background: #f2f4f5;
font-size: 12px; font-size: 12px;
border-radius: 4rpx; border-radius: 4rpx;
box-sizing: border-box; box-sizing: border-box;
@ -84,19 +99,23 @@ export default {
.font_3 { .font_3 {
font-size: 28rpx; font-size: 28rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 40rpx; line-height: 40rpx;
color: #020e1a; color: #020e1a;
} }
.titleName { .titleName {
display: inline-block; width: calc(100% - 100px);
width: 80%; display: -webkit-box;
-webkit-line-clamp: 3; /* 设置显示的行数 */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
} }
.font_2 { .font_2 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #9fa3a8; color: #9fa3a8;
} }
@ -109,7 +128,7 @@ export default {
.font_5 { .font_5 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #6c737a; color: #6c737a;
} }

View File

@ -11,25 +11,46 @@
<div class="mobile">{{ addressInfo.MOBILEPHONE }}</div> <div class="mobile">{{ addressInfo.MOBILEPHONE }}</div>
</div> </div>
<div class="addressBox"> <div class="addressBox">
<div @click="handleOpenAddress" style="display: flex; align-items: center"> <div
@click="handleOpenAddress"
style="display: flex; align-items: center"
>
<text class="addressText">选择地址</text> <text class="addressText">选择地址</text>
<img class="pickerImg" src="https://eshangtech.com/ShopICO/ahyd-mall/editIcon.svg" /> <img
class="pickerImg"
src="https://eshangtech.com/ShopICO/ahyd-mall/editIcon.svg"
/>
</div> </div>
<div class="address_text"> <div class="address_text">
{{ addressInfo.ADDRESS || "" }}{{ addressInfo.DOORPLATE || "" }} {{ addressInfo.ADDRESS || "" }}{{ addressInfo.DOORPLATE || "" }}
</div> </div>
</div> </div>
</div> </div>
<img src="/static/images/home/addressShopCar.png" alt="" class="addrss_bg" /> <img
src="/static/images/home/addressShopCar.png"
alt=""
class="addrss_bg"
/>
</div> </div>
<div class="commodity margin_auto"> <div class="commodity margin_auto">
<CommodityItem :isSubmit="isSubmit" :obj="item" v-for="(item, index) in shopOrder.slice(0, 5)" :key="index" /> <CommodityItem
:isSubmit="isSubmit"
:obj="item"
v-for="(item, index) in shopOrder.slice(0, 5)"
:key="index"
/>
<div class="is_more" @click="isShowMore = !isShowMore"> <div class="is_more" @click="isShowMore = !isShowMore">
<img v-if="shopOrder.length > 5" :src="isShowMore <img
? '/static/images/home/up_arrow.png' v-if="shopOrder.length > 5"
: '/static/images/home/down_arrow.png' :src="
" alt="" class="arrow_icon" /> isShowMore
? '/static/images/home/up_arrow.png'
: '/static/images/home/down_arrow.png'
"
alt=""
class="arrow_icon"
/>
{{ shopOrder.length }}个品项{{ shopCount }}件商品 {{ shopOrder.length }}个品项{{ shopCount }}件商品
</div> </div>
</div> </div>
@ -49,7 +70,8 @@
<div class="place_order"> <div class="place_order">
<div class="place_order_box" v-if="!isSubmit"> <div class="place_order_box" v-if="!isSubmit">
<div class="sum_count"> <div class="sum_count">
合计<span class="unit"></span><span class="price">{{ couponOrder }}</span> 合计<span class="unit"></span
><span class="price">{{ couponOrder }}</span>
</div> </div>
<div class="place_order_btn" @click="createOrder">立即下单</div> <div class="place_order_btn" @click="createOrder">立即下单</div>
</div> </div>
@ -57,7 +79,11 @@
</div> </div>
<div v-if="datePicker" class="dataTimeSelect"> <div v-if="datePicker" class="dataTimeSelect">
<date-time :show="datePicker" @change="handleTimeChange" :currentDate="currentDate"></date-time> <date-time
:show="datePicker"
@change="handleTimeChange"
:currentDate="currentDate"
></date-time>
</div> </div>
<loading v-if="isShowLoading"></loading> <loading v-if="isShowLoading"></loading>
<div v-if="isShowLoading" class="meng"></div> <div v-if="isShowLoading" class="meng"></div>
@ -67,31 +93,48 @@
<view class="addressPopupBox"> <view class="addressPopupBox">
<view class="addressPopupTitle">选择收货地址</view> <view class="addressPopupTitle">选择收货地址</view>
<view class="addressList"> <view class="addressList">
<view class="addressItem" v-for="(item, index) in addressList" :key="index"> <view
class="addressItem"
v-for="(item, index) in addressList"
:key="index"
>
<view class="addressItemTop"> <view class="addressItemTop">
<view class="itemTopLeft"> <view class="itemTopLeft">
<radio :checked="item.MEMBERADDRESS_ID === selectAddressId" color="#1890FF" <radio
@click="handleChangeAddress(item.MEMBERADDRESS_ID)"></radio> :checked="item.MEMBERADDRESS_ID === selectAddressId"
<text class="addressText">{{ item.ADDRESS || "" }}{{ item.DOORPLATE || "" }}</text> color="#1890FF"
@click="handleChangeAddress(item.MEMBERADDRESS_ID)"
></radio>
<text class="addressText"
>{{ item.ADDRESS || "" }}{{ item.DOORPLATE || "" }}</text
>
</view> </view>
<view class="itemTopRight" @click="checkOrEdit(item.MEMBERADDRESS_ID)"> <view
<img class="pickerImg" src="https://eshangtech.com/ShopICO/ahyd-mall/editIcon.svg" /> class="itemTopRight"
@click="checkOrEdit(item.MEMBERADDRESS_ID)"
>
<img
class="pickerImg"
src="https://eshangtech.com/ShopICO/ahyd-mall/editIcon.svg"
/>
</view> </view>
</view> </view>
<view class="addressItemBottom"> <view class="addressItemBottom">
<text class="bigName" style="margin-right: 8rpx">{{ <text class="bigName" style="margin-right: 8rpx">{{
item.USER_NAME || "" item.USER_NAME || ""
}}</text> }}</text>
<text class="name" style="margin-right: 8rpx">{{ <text class="name" style="margin-right: 8rpx">{{
item.USER_SEX_TEXT || "" item.USER_SEX_TEXT || ""
}}</text> }}</text>
<text class="phone">{{ item.MOBILEPHONE || "" }}</text> <text class="phone">{{ item.MOBILEPHONE || "" }}</text>
</view> </view>
</view> </view>
</view> </view>
<navigator url="/pages/myAddress/newAdd/index" class="btn">新增收货地址</navigator> <navigator url="/pages/myAddress/newAdd/index" class="btn"
>新增收货地址</navigator
>
</view> </view>
</uni-popup> </uni-popup>
</div> </div>
@ -136,6 +179,8 @@ export default {
addressInfo: {}, // addressInfo: {}, //
selectAddressId: 0, selectAddressId: 0,
isFirst: true, // isFirst: true, //
pageType: "", //
userInfo: {}, //
}; };
}, },
computed: { computed: {
@ -162,7 +207,7 @@ export default {
this.handleGetAddressList(); this.handleGetAddressList();
} }
}, },
onUnload() { }, onUnload() {},
async onLoad(option) { async onLoad(option) {
console.log("option", option); console.log("option", option);
if (option.shopCarList) { if (option.shopCarList) {
@ -176,6 +221,12 @@ export default {
this.shopOrder = shopList; this.shopOrder = shopList;
this.shopCount = sum; this.shopCount = sum;
} }
if (option.addressId) {
this.selectAddressId = Number(option.addressId);
}
if (option.pageType) {
this.pageType = option.pageType;
}
console.log("this.shopOrder", this.shopOrder); console.log("this.shopOrder", this.shopOrder);
// //
await this.handleGetAddressList(); await this.handleGetAddressList();
@ -196,13 +247,19 @@ export default {
let defaultAddress = {}; let defaultAddress = {};
if (list && list.length > 0) { if (list && list.length > 0) {
list.forEach((item) => { list.forEach((item) => {
if (this.isFirst) { if (this.selectAddressId > 0) {
if (item.ISDEFAULT === 1) { if (item.MEMBERADDRESS_ID === this.selectAddressId) {
defaultAddress = item; defaultAddress = item;
} }
} else { } else {
if (item.MEMBERADDRESS_ID === this.addressInfo.MEMBERADDRESS_ID) { if (this.isFirst) {
defaultAddress = item; if (item.ISDEFAULT === 1) {
defaultAddress = item;
}
} else {
if (item.MEMBERADDRESS_ID === this.addressInfo.MEMBERADDRESS_ID) {
defaultAddress = item;
}
} }
} }
}); });
@ -259,15 +316,14 @@ export default {
} }
}); });
} }
let openId = uni.getStorageSync('openId') let openId = uni.getStorageSync("openId");
console.log('openId', openId); console.log("openId", openId);
let req = { let req = {
action_type: "ScanOrder", action_type: "ScanOrder",
salebillType: "3000", salebillType: this.pageType === "UnionMall" ? "3001" : "3000",
provinceCode: this.user.PROVINCE_CODE, provinceCode: this.user.PROVINCE_CODE,
serverpartShopId: '5634', serverpartShopId: "5634",
salebillDesc: this.remark || "", salebillDesc: this.remark || "",
wechatOpenId: openId || "", wechatOpenId: openId || "",
wechatUnionId: this.user.USER_UNIONID || "", wechatUnionId: this.user.USER_UNIONID || "",
@ -285,31 +341,47 @@ export default {
console.log("data", data); console.log("data", data);
if (data.ResultCode === "100") { if (data.ResultCode === "100") {
let shopCarList = this.$store.state.myShopCar; let shopCarList = [];
if (this.pageType === "UnionMall") {
shopCarList = this.$store.state.unionMyShopCar;
} else {
shopCarList = this.$store.state.myShopCar;
}
if (shopCarList && shopCarList.length > 0) { if (shopCarList && shopCarList.length > 0) {
let newList = [] let newList = [];
shopCarList.forEach((item) => { shopCarList.forEach((item) => {
let find = false let find = false;
this.shopOrder.forEach((subItem) => { this.shopOrder.forEach((subItem) => {
if (item.COMMODITY_ID === subItem.COMMODITY_ID) { if (item.COMMODITY_ID === subItem.COMMODITY_ID) {
find = true find = true;
} }
}) });
if (find) { if (find) {
} else { } else {
newList.push(item) newList.push(item);
} }
}) });
// list // list
this.$store.commit("myShopCar", newList); if (this.pageType === "UnionMall") {
this.$store.commit("unionMyShopCar", newList);
} else {
this.$store.commit("myShopCar", newList);
}
} else { } else {
this.$store.commit("myShopCar", []); if (this.pageType === "UnionMall") {
this.$store.commit("unionMyShopCar", []);
} else {
this.$store.commit("myShopCar", []);
}
} }
//
//
this.getOrderInfo(data.Data); if (this.pageType === "UnionMall") {
this.handleBalancePayment(data.Data);
} else {
this.getOrderInfo(data.Data);
}
} else { } else {
// uni.showToast({ // uni.showToast({
// title: data.ResultDesc, // title: data.ResultDesc,
@ -317,20 +389,65 @@ export default {
// duration: 2000, // duration: 2000,
// }); // });
uni.showModal({ uni.showModal({
title: '提示', title: "提示",
content: data.ResultDesc, content: data.ResultDesc,
success: function (res) { success: function (res) {},
}
}); });
} }
}, },
//
async handleBalancePayment(obj) {
console.log("this.user", this.user);
console.log("obj", obj);
//
uni.showLoading({
title: "获取用户余额...",
});
const userData = await this.$api.getCoop({
action_type: "GetMembershipInfo",
WechatUserId: this.user.WechatUserId,
});
this.userInfo = userData.Data;
console.log("this.userInfo", this.userInfo);
uni.hideLoading();
if (this.userInfo.ACCOUNT_BALANCE < Number(obj.PAY_AMOUNT)) {
uni.showToast({
title: "余额不足!无法支付",
icon: "none",
});
return;
}
const req = {
action_type: "ECodeConsume",
saleBill: obj.SALEBILL_ID,
industryMembershipId: this.user.INDUSTRY_MEMBERSHIP_ID,
requestType: "application/x-www-form-urlencoded",
};
const data = await this.$api.postCoop(req);
console.log("data", data);
if (data.ResultCode === "100") {
uni.showToast({
title: "支付成功!",
icon: "none",
});
setTimeout(() => {
uni.redirectTo({
url: `/pages/order/orderdetail/index?orderInternal=${obj.SALEBILL_ID}`,
});
}, 1500);
}
},
// //
generateOutTradeNo(length) { generateOutTradeNo(length) {
// //
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_|\*'; const characters =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_|*";
// //
let orderNumber = ''; let orderNumber = "";
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * characters.length); const randomIndex = Math.floor(Math.random() * characters.length);
orderNumber += characters[randomIndex]; orderNumber += characters[randomIndex];
@ -349,87 +466,103 @@ export default {
// //
async getOrderInfo(obj) { async getOrderInfo(obj) {
let _this = this; let _this = this;
console.log("_this.couponOrder", _this.couponOrder);
// //
let mchid = "1672298991"; let mchid = "1672298991";
let timeStamp = Math.ceil(new Date().getTime() / 1000); let timeStamp = Math.ceil(new Date().getTime() / 1000);
let nonceStr = Math.random().toString(36).substring(2, 8) let nonceStr = Math.random().toString(36).substring(2, 8);
let serial_no = "5BA7C0F427FC042DB5BF299E35B373D5EFCECD35" let serial_no = "5BA7C0F427FC042DB5BF299E35B373D5EFCECD35";
// let out_trade_no = this.generateOutTradeNo(32) // let out_trade_no = this.generateOutTradeNo(32)
let out_trade_no = obj.SALEBILL_CODE let out_trade_no = obj.SALEBILL_CODE;
let req = { let req = {
appid: "wxee018fb96955552a", // ID appid: "wxee018fb96955552a", // ID
mchid: "1672298991", // mchid: "1672298991", //
description: "彩云驿商城", // description: "彩云驿商城", //
out_trade_no: out_trade_no, // out_trade_no: out_trade_no, //
notify_url: "https://mp.eshangtech.com/Coop.Merchant/Handler/Handler_Trade.ashx", // notify_url:
"https://mp.eshangtech.com/Coop.Merchant/Handler/Handler_Trade.ashx", //
amount: { amount: {
total: Number(_this.couponOrder) * 100 || 1, total: Number(obj.PAY_AMOUNT) * 100 || 1,
currency: "CNY", currency: "CNY",
}, // }, //
payer: { payer: {
openid: _this.user.WECHATAPP_OPENID, openid: _this.user.WECHATAPP_OPENID,
}, // }, //
} };
console.log('req', req); console.log("req", req);
let reqSign = { let reqSign = {
parameters: "POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n" parameters:
} "POST\n/v3/pay/transactions/jsapi\n" +
console.log("POST\n/v3/pay/transactions/jsapi\n" + timeStamp + "\n" + nonceStr + "\n" + JSON.stringify(req) + "\n"); timeStamp +
"\n" +
const data = await this.$api.$get( nonceStr +
"/WeChat/GenerateSign", "\n" +
reqSign JSON.stringify(req) +
"\n",
};
console.log(
"POST\n/v3/pay/transactions/jsapi\n" +
timeStamp +
"\n" +
nonceStr +
"\n" +
JSON.stringify(req) +
"\n"
); );
console.log('data3213123', data.Result_Data);
let Authorization = `mchid="${mchid}",nonce_str="${nonceStr}",signature="${data.Result_Data}",timestamp="${timeStamp}",serial_no="${serial_no}"`
let AuthorizationStr = `WECHATPAY2-SHA256-RSA2048 ${Authorization}`
console.log('AuthorizationStr', AuthorizationStr);
const data = await this.$api.$get("/WeChat/GenerateSign", reqSign);
console.log("data3213123", data.Result_Data);
let Authorization = `mchid="${mchid}",nonce_str="${nonceStr}",signature="${data.Result_Data}",timestamp="${timeStamp}",serial_no="${serial_no}"`;
let AuthorizationStr = `WECHATPAY2-SHA256-RSA2048 ${Authorization}`;
console.log("AuthorizationStr", AuthorizationStr);
uni.request({ uni.request({
url: "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi", // url: "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi", //
method: "POST", method: "POST",
data: req, data: req,
header: { header: {
"Authorization": AuthorizationStr, Authorization: AuthorizationStr,
"Accept": "application/json", // Accept: "application/json", //
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
success: async (res) => { success: async (res) => {
console.log(res.data.prepay_id); console.log(res.data.prepay_id);
this.text = "request success"; this.text = "request success";
let paySign = '' let paySign = "";
let reqSign = { let reqSign = {
parameters: "wxee018fb96955552a\n" + timeStamp + "\n" + nonceStr + "\nprepay_id=" + res.data.prepay_id + "\n" parameters:
} "wxee018fb96955552a\n" +
const data = await this.$api.$get( timeStamp +
"/WeChat/GenerateSign", "\n" +
reqSign nonceStr +
); "\nprepay_id=" +
paySign = data.Result_Data res.data.prepay_id +
"\n",
};
const data = await this.$api.$get("/WeChat/GenerateSign", reqSign);
paySign = data.Result_Data;
wx.requestPayment({ wx.requestPayment({
timeStamp: timeStamp.toString(), timeStamp: timeStamp.toString(),
nonceStr: nonceStr, nonceStr: nonceStr,
package: `prepay_id=${res.data.prepay_id}`, package: `prepay_id=${res.data.prepay_id}`,
signType: 'RSA', signType: "RSA",
paySign: paySign, paySign: paySign,
total_fee: Number(_this.couponOrder) * 100 || 1, total_fee: Number(obj.PAY_AMOUNT) * 100 || 1,
success(res) { success(res) {
console.log('res', res); console.log("res", res);
}, },
fail(res) { fail(res) {
console.log('fail', res); console.log("fail", res);
}, },
complete(res) { complete(res) {
uni.redirectTo({ uni.redirectTo({
url: `/pages/order/orderdetail/index?orderInternal=${obj.SALEBILL_ID}` url: `/pages/order/orderdetail/index?orderInternal=${obj.SALEBILL_ID}`,
}); });
} },
}) });
}, },
}); });
return; return;
@ -476,7 +609,7 @@ export default {
if (res.errMsg === "requestPayment:fail cancel") { if (res.errMsg === "requestPayment:fail cancel") {
} }
}, },
complete(res) { }, complete(res) {},
}); });
} else { } else {
uni.showToast({ uni.showToast({

View File

@ -160,13 +160,58 @@
</div> </div>
</div> </div>
<div class="product-detail" style="padding-bottom: 16rpx"> <div
<div class="product-detail"
class="detail-unit" style="background: #fff; padding: 16rpx 0"
style="flex-direction: column" v-if="
id="detail" new Date(good.UPPER_DATE).getTime() > new Date().getTime() ||
v-if="good.COMMODITY_DESC" good.SEND_MODE > 0 ||
good.DELIVER_AREA ||
good.LIMIT_TOTALCOUNT > 0 ||
good.LIMIT_TOTALCOUNT > 0
"
>
<view
class="detail-right"
style="width: 100%; box-sizing: border-box; padding: 0 32rpx"
> >
<view v-if="new Date(good.UPPER_DATE).getTime() > new Date().getTime()"
>预售时间{{ good.UPPER_DATE || "-" }}-{{
good.OFF_DATE || "-"
}}</view
>
<view>{{
good.SEND_MODE === 1000
? "发货模式:自提"
: good.SEND_MODE === 2000
? "发货模式:邮寄"
: good.SEND_MODE === 3000
? "发货模式:免发货"
: ""
}}</view>
<view>{{
good.DELIVER_AREA ? "配送区域:仅限云南省即江浙沪包邮区购买" : ""
}}</view>
<view>{{
good.LIMIT_TOTALCOUNT
? `限购数量:每人限购${good.LIMIT_TOTALCOUNT}`
: ""
}}</view>
<view>{{
good.LIMIT_TOTALCOUNT
? `每日限购:每人每日限购${good.LIMIT_TOTALCOUNT}`
: ""
}}</view>
</view>
</div>
<div
class="product-detail"
style="padding-bottom: 16rpx"
v-if="good.COMMODITY_DESC"
>
<div class="detail-unit" style="flex-direction: column" id="detail">
<div <div
class="detail-title desc-ico" class="detail-title desc-ico"
style="margin-bottom: 32rpx; box-sizing: border-box; padding: 0 32rpx" style="margin-bottom: 32rpx; box-sizing: border-box; padding: 0 32rpx"
@ -179,13 +224,11 @@
</div> </div>
</div> </div>
<div class="product-detail"> <div
<div class="product-detail"
class="detail-unit" v-if="!(good.ContentImgList && good.ContentImgList.length > 0)"
style="flex-direction: column" >
id="detail" <div class="detail-unit" style="flex-direction: column" id="detail">
v-if="!(good.ContentImgList && good.ContentImgList.length > 0)"
>
<div <div
class="detail-title desc-ico" class="detail-title desc-ico"
style="margin-bottom: 32rpx; box-sizing: border-box; padding: 0 32rpx" style="margin-bottom: 32rpx; box-sizing: border-box; padding: 0 32rpx"
@ -256,10 +299,10 @@
/> />
<text class="btnItemText">首页</text> <text class="btnItemText">首页</text>
</view> </view>
<view class="btnItem"> <!-- <view class="btnItem">
<image class="btnItemImg" src="/static/images/home/collect.svg" /> <image class="btnItemImg" src="/static/images/home/collect.svg" />
<text class="btnItemText">收藏</text> <text class="btnItemText">收藏</text>
</view> </view> -->
<view class="btnItem" @click="handleShowShopCar"> <view class="btnItem" @click="handleShowShopCar">
<image class="btnItemImg" src="/static/images/home/shopCarIcon.svg" /> <image class="btnItemImg" src="/static/images/home/shopCarIcon.svg" />
<text class="btnItemText">购物车</text> <text class="btnItemText">购物车</text>
@ -382,12 +425,15 @@
class="cart-count" class="cart-count"
confirm-type="done" confirm-type="done"
type="digit" type="digit"
:maxlength="inputMaxLength" :maxlength="7"
style="background: #fff; text-align: center; width: 100px" style="background: #fff; text-align: center; width: 100px"
placeholder="0" placeholder="0"
:value="good.count" @blur="haveFocus($event, good)"
@input="handleNumber" @focus="haveFocus($event, good)"
v-model="good.count"
/> />
<!-- @input="handleNumber" -->
<div class="subtract" @click="handleDetailAdd($event, good)"> <div class="subtract" @click="handleDetailAdd($event, good)">
<image <image
class="img" class="img"
@ -475,6 +521,7 @@ export default {
scale: windows.pixelRatio, scale: windows.pixelRatio,
}, },
menu: {}, menu: {},
inputMaxLength: -1,
bottomBtnType: 0, bottomBtnType: 0,
shopCarList: [], // shopCarList: [], //
funList: [ funList: [
@ -516,6 +563,44 @@ export default {
setOrder: "ORDERGOOD", setOrder: "ORDERGOOD",
}), }),
...mapMutations(["setInvitedCode"]), ...mapMutations(["setInvitedCode"]),
//
haveFocus(e, item) {
console.log("e", e);
let value = e.detail.value.toString();
let number = 0;
if (value.indexOf(".") === -1) {
number = Number(value);
} else {
let bigNumber = value.split(".")[0];
number = Number(bigNumber);
}
console.log("number", number);
item.count = Number(number);
console.log("item", item);
this.good = item;
console.log("this.good", this.good);
this.$forceUpdate();
},
//
// handleNumber(e) {
// console.log("e", e);
// if (e.detail.value.indexOf(".") !== -1) {
// const flag = e.detail.value.indexOf(".");
// console.log("flag", flag);
// if (flag === 0) {
// this.inputMaxLength = flag + 4;
// } else {
// this.inputMaxLength = flag + 3;
// }
// } else {
// // if (e.mp.detail.value === '') {
// // this.currentRow.count = 0
// // }
// this.inputMaxLength = -1;
// }
// console.log("inputMaxLength", this.inputMaxLength);
// },
handleClosePop() { handleClosePop() {
this.good.COMMODITY_RULE = undefined; this.good.COMMODITY_RULE = undefined;
this.$refs.shopPopup.close(); this.$refs.shopPopup.close();
@ -616,6 +701,23 @@ export default {
}, },
// //
handleAddShopCar() { handleAddShopCar() {
//
if (this.good.COMMODITY_STOCK === 0) {
uni.showToast({
title: "商品已售罄!",
icon: "none",
});
return;
}
if (this.good.COMMODITY_STOCK < this.good.count) {
uni.showToast({
title: "商品库存不足!",
icon: "none",
});
return;
}
console.log("this.good", this.good); console.log("this.good", this.good);
if (this.shopCarList && this.shopCarList.length > 0) { if (this.shopCarList && this.shopCarList.length > 0) {
let nowShopList = []; let nowShopList = [];
@ -695,9 +797,9 @@ export default {
).toString(36); ).toString(36);
if (orderList.length > 0) { if (orderList.length > 0) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/shopPages/settlement/index?pageType=shopCar&shopCarList=${JSON.stringify( url: `/pages/shopPages/settlement/index?pageType=${
orderList this.pageType
)}`, }&shopCarList=${JSON.stringify(orderList)}`,
}); });
} else { } else {
uni.showToast({ title: "购物车内无勾选商品", icon: "none" }); uni.showToast({ title: "购物车内无勾选商品", icon: "none" });
@ -707,7 +809,11 @@ export default {
// //
handleDetailSubtract(e, obj) { handleDetailSubtract(e, obj) {
if (obj.count > 0) { if (obj.count > 0) {
obj.count -= 1; if (obj.count - 1 === 0) {
obj.count = 1;
} else {
obj.count -= 1;
}
this.good = obj; this.good = obj;
this.$forceUpdate(); this.$forceUpdate();
} }
@ -1681,11 +1787,11 @@ button:after {
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-around;
box-sizing: border-box; box-sizing: border-box;
padding: 0 0 0 12rpx; padding: 0 0 0 12rpx;
.btnItem { .btnItem {
width: calc(100% / 3); width: calc(100% / 2);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;

View File

@ -36,12 +36,24 @@
subItem.RETsmallNumber || "00" subItem.RETsmallNumber || "00"
}}</view }}</view
> >
<view class="nowPrice"> <view
<text class="unit">¥</text> style="
<text class="price" width: 100%;
>{{ subItem.bigNumber || "" }}.{{ display: flex;
subItem.smallNumber || "00" align-items: center;
}}</text justify-content: space-between;
"
>
<view class="nowPrice">
<text class="unit">¥</text>
<text class="price"
>{{ subItem.bigNumber || "" }}.{{
subItem.smallNumber || "00"
}}</text
>
</view>
<view class="shopState" v-if="!(subItem.COMMODITY_STOCK > 0)"
>已售罄</view
> >
</view> </view>
</div> </div>
@ -120,7 +132,7 @@ export default {
title: "加载中...", title: "加载中...",
}); });
let req = {}; let req = {};
if (this.pageType === "UnionMall") { if (this.queryType === "UnionMall") {
req = { req = {
action_type: "WeChat_GetMallGoodsInfo", action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911, ownerUnitId: 911,
@ -139,7 +151,7 @@ export default {
Page_Size: this.shopMsg.pageSize, Page_Size: this.shopMsg.pageSize,
Page_Index: this.shopMsg.pageIndex, Page_Index: this.shopMsg.pageIndex,
}; };
} else if (this.pageType === "brand") { } else if (this.queryType === "brand") {
req = { req = {
action_type: "WeChat_GetMallGoodsInfo", action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911, ownerUnitId: 911,
@ -150,7 +162,7 @@ export default {
Page_Size: this.shopMsg.pageSize, Page_Size: this.shopMsg.pageSize,
Page_Index: this.shopMsg.pageIndex, Page_Index: this.shopMsg.pageIndex,
}; };
} else if (this.pageType === "pointsMall") { } else if (this.queryType === "pointsMall") {
req = { req = {
action_type: "WeChat_GetMallGoodsInfo", action_type: "WeChat_GetMallGoodsInfo",
ownerUnitId: 911, ownerUnitId: 911,
@ -349,6 +361,13 @@ export default {
font-style: normal; font-style: normal;
} }
} }
.shopState {
font-size: 24rpx;
color: #fff;
background: #bbbbbb;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
.buyCarBox { .buyCarBox {
width: 100%; width: 100%;
@ -497,7 +516,7 @@ export default {
text-align: center; text-align: center;
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
color: #9999; color: #d0d0d0;
font-size: 24rpx; font-size: 24rpx;
} }
} }

View File

@ -74,17 +74,23 @@
<view class="userBottom"> <view class="userBottom">
<view class="bottomItem"> <view class="bottomItem">
<view class="label">优惠券</view> <view class="label">优惠券</view>
<view class="value">{{ user.COUPON_COUNT || 0 }}</view> <view class="value">{{
$utils.handleFormatNumber(user.COUPON_COUNT || 0)
}}</view>
<view class="rightLine"></view> <view class="rightLine"></view>
</view> </view>
<view class="bottomItem"> <view class="bottomItem">
<view class="label">积分</view> <view class="label">积分</view>
<view class="value">{{ user.MEMBERSHIP_POINT || 0 }}</view> <view class="value">{{
$utils.handleFormatNumber(user.MEMBERSHIP_POINT || 0)
}}</view>
<view class="rightLine"></view> <view class="rightLine"></view>
</view> </view>
<view class="bottomItem"> <view class="bottomItem">
<view class="label">余额</view> <view class="label">余额</view>
<view class="value">{{ user.ACCOUNT_BALANCE || 0 }}</view> <view class="value">{{
$utils.handleFormatNumber(user.ACCOUNT_BALANCE || 0)
}}</view>
</view> </view>
<!-- <view class="line"></view> --> <!-- <view class="line"></view> -->
</view> </view>
@ -92,7 +98,7 @@
<!-- 我的商城订单栏 --> <!-- 我的商城订单栏 -->
<view class="orderFun"> <view class="orderFun">
<view class="boxTitleTop" @click="handleGoOrder"> <view class="boxTitleTop" @click="handleGoOrder(0)">
<text class="boxTitle">商城订单</text> <text class="boxTitle">商城订单</text>
<image class="rightArrow" src="/static/images/home/rightArrow.svg" /> <image class="rightArrow" src="/static/images/home/rightArrow.svg" />
</view> </view>
@ -112,7 +118,7 @@
<view class="orderRight"> <view class="orderRight">
<view <view
class="orderFunItem" class="orderFunItem"
@click="handleGo(`/pages/order/buyOrder/index?type=4`)" @click="handleGo(`/pages/order/buyOrder/index?type=6`)"
> >
<image <image
class="orderFunIcon" class="orderFunIcon"
@ -126,12 +132,12 @@
<!-- 我的点餐订单栏 --> <!-- 我的点餐订单栏 -->
<view class="orderFun"> <view class="orderFun">
<view class="boxTitleTop" @click="handleGoFoodOrder"> <view class="boxTitleTop" @click="handleGoFoodOrder(0)">
<text class="boxTitle">我的点餐</text> <text class="boxTitle">我的点餐</text>
<image class="rightArrow" src="/static/images/home/rightArrow.svg" /> <image class="rightArrow" src="/static/images/home/rightArrow.svg" />
</view> </view>
<view class="orderContent"> <view class="orderContent">
<view class="orderLeft"> <view class="newOrderLeft" style="width: 100%; paddingright: 0">
<view <view
class="orderFunItem" class="orderFunItem"
v-for="(item, index) in foodFunList" v-for="(item, index) in foodFunList"
@ -142,10 +148,10 @@
<text class="orderFunText">{{ item.label }}</text> <text class="orderFunText">{{ item.label }}</text>
</view> </view>
</view> </view>
<view class="orderRight"> <!-- <view class="orderRight">
<view <view
class="orderFunItem" class="orderFunItem"
@click="handleGo(`/pages/order/foodOrder/index?type=4`)" @click="handleGo(`/pages/order/foodOrder/index?type=6`)"
> >
<image <image
class="orderFunIcon" class="orderFunIcon"
@ -153,7 +159,7 @@
/> />
<text class="orderFunText">退换/售后</text> <text class="orderFunText">退换/售后</text>
</view> </view>
</view> </view> -->
</view> </view>
</view> </view>
@ -664,7 +670,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
.orderLeft { .orderLeft,
.newOrderLeft {
width: calc(100% - 108rpx); width: calc(100% - 108rpx);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -166,8 +166,8 @@ var _default = {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
uni.login({ uni.login({
success: function success(res) { success: function success(res) {
console.log('login', res); console.log("login", res);
uni.setStorageSync('openId', res.code); uni.setStorageSync("openId", res.code);
_this.$api.getCoop({ _this.$api.getCoop({
action_type: "WeChatLogin", action_type: "WeChatLogin",
code: res.code code: res.code

View File

@ -23953,7 +23953,7 @@ var api = {
data.appId = data.appId || 'wxee018fb96955552a'; // 'wx4c497eddcec4a0e7' data.appId = data.appId || 'wxee018fb96955552a'; // 'wx4c497eddcec4a0e7'
data.weChatAppId = data.appId || 'wxee018fb96955552a'; // 'wx4c497eddcec4a0e7' data.weChatAppId = data.appId || 'wxee018fb96955552a'; // 'wx4c497eddcec4a0e7'
data.wechatAppAppId = data.appId || 'wxee018fb96955552a'; // 'wx4c497eddcec4a0e7' data.wechatAppAppId = data.appId || 'wxee018fb96955552a'; // 'wx4c497eddcec4a0e7'
data.ownerUnitId = _index.default.getters.ownerUnitId || data.ownerUnitId || ''; data.ownerUnitId = '911';
data.Membership_Id = _index.default.getters.user.MEMBERSHIP_ID || _index.default.getters.user.MemberShipID || data.MEMBERSHIP_ID || ''; data.Membership_Id = _index.default.getters.user.MEMBERSHIP_ID || _index.default.getters.user.MemberShipID || data.MEMBERSHIP_ID || '';
data.MembershipId = _index.default.getters.user.MEMBERSHIP_ID || _index.default.getters.user.MemberShipID || data.MEMBERSHIP_ID || ''; data.MembershipId = _index.default.getters.user.MEMBERSHIP_ID || _index.default.getters.user.MemberShipID || data.MEMBERSHIP_ID || '';
var requstOptions = { var requstOptions = {
@ -24064,6 +24064,7 @@ exports.default = void 0;
exports.formatDate = formatDate; exports.formatDate = formatDate;
exports.formatTime = formatTime; exports.formatTime = formatTime;
exports.getLocalTime = getLocalTime; exports.getLocalTime = getLocalTime;
exports.handleFormatNumber = handleFormatNumber;
exports.wrapTreeNode = wrapTreeNode; exports.wrapTreeNode = wrapTreeNode;
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@ -24072,7 +24073,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
* @Author: cclu 1106109051@qq.com * @Author: cclu 1106109051@qq.com
* @Date: 2024-12-04 16:02:53 * @Date: 2024-12-04 16:02:53
* @LastEditors: cclu 1106109051@qq.com * @LastEditors: cclu 1106109051@qq.com
* @LastEditTime: 2025-01-06 09:39:44 * @LastEditTime: 2025-01-20 14:23:01
* @FilePath: \wanmeiyizhan\utils\index.js * @FilePath: \wanmeiyizhan\utils\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@ -24164,6 +24165,24 @@ function formatDate(dateStr) {
// 返回格式化后的结果 // 返回格式化后的结果
return "".concat(month, ".").concat(day); return "".concat(month, ".").concat(day);
} }
// 格式化数字
function handleFormatNumber(num) {
// 将数字转为字符串,避免浮点数精度问题
var str = num.toString();
// 如果有小数点
if (str.indexOf('.') !== -1) {
// 截取小数点后两位,不做四舍五入
var decimalPart = str.split('.')[1];
if (decimalPart.length > 2) {
return str.split('.')[0] + '.' + decimalPart.slice(0, 2);
}
return str;
} else {
// 没有小数点,补齐后两位
return str + '.00';
}
}
var _default = { var _default = {
formatNumber: formatNumber, formatNumber: formatNumber,
formatTime: formatTime, formatTime: formatTime,
@ -24173,7 +24192,8 @@ var _default = {
qrc: qrc, qrc: qrc,
cutDate: cutDate, cutDate: cutDate,
wrapTreeNode: wrapTreeNode, wrapTreeNode: wrapTreeNode,
formatDate: formatDate formatDate: formatDate,
handleFormatNumber: handleFormatNumber
}; };
exports.default = _default; exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

View File

@ -1,4 +1,4 @@
{ {
"component": true, "usingComponents": {},
"usingComponents": {} "component": true
} }

View File

@ -147,6 +147,10 @@ var _default = {
shopCarLength: { shopCarLength: {
type: Number, type: Number,
default: 0 default: 0
},
zIndex: {
type: Number,
default: 99
} }
}, },
watch: { watch: {

View File

@ -1 +1 @@
<view class="main data-v-066c6722"><view class="content _div data-v-066c6722"><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/index/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/index/index'?'/static/images/shopTabbar/active_home.png':'/static/images/shopTabbar/home.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/index/index'?'#1890FF':'#3A3D48')+';'}}">首页</label></view><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/shopType/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/shopType/index'?'/static/images/shopTabbar/active_classification.png':'/static/images/shopTabbar/classification.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/shopType/index'?'#1890FF':'#3A3D48')+';'}}">分类</label></view><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/shopCar/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><block wx:if="{{shopCount>0}}"><label class="shopCarNumber _span data-v-066c6722">{{shopCount}}</label></block><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/shopCar/index'?'/static/images/shopTabbar/active_shopCar.png':'/static/images/shopTabbar/shopCar.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/shopCar/index'?'#1890FF':'#3A3D48')+';'}}">购物车</label></view><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/user/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/user/index'?'/static/images/shopTabbar/active_user.png':'/static/images/shopTabbar/user.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/user/index'?'#1890FF':'#3A3D48')+';'}}">我的</label></view></view></view> <view class="main data-v-066c6722" style="{{'z-index:'+(zIndex===98?98:99999)+';'}}"><view class="content _div data-v-066c6722"><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/index/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/index/index'?'/static/images/shopTabbar/active_home.png':'/static/images/shopTabbar/home.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/index/index'?'#1890FF':'#3A3D48')+';'}}">首页</label></view><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/shopType/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/shopType/index'?'/static/images/shopTabbar/active_classification.png':'/static/images/shopTabbar/classification.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/shopType/index'?'#1890FF':'#3A3D48')+';'}}">分类</label></view><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/shopCar/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><block wx:if="{{shopCount>0}}"><label class="shopCarNumber _span data-v-066c6722">{{shopCount}}</label></block><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/shopCar/index'?'/static/images/shopTabbar/active_shopCar.png':'/static/images/shopTabbar/shopCar.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/shopCar/index'?'#1890FF':'#3A3D48')+';'}}">购物车</label></view><view data-event-opts="{{[['tap',[['goPages',['/pages/shopMallPage/user/index']]]]]}}" class="tabItem _div data-v-066c6722" bindtap="__e"><image class="tabItemIcon data-v-066c6722" src="{{selectIndex==='/pages/shopMallPage/user/index'?'/static/images/shopTabbar/active_user.png':'/static/images/shopTabbar/user.png'}}"></image><label class="tabItemText _span data-v-066c6722" style="{{'color:'+(selectIndex==='/pages/shopMallPage/user/index'?'#1890FF':'#3A3D48')+';'}}">我的</label></view></view></view>

View File

@ -1,4 +1,4 @@
{ {
"component": true, "usingComponents": {},
"usingComponents": {} "component": true
} }

View File

@ -170,7 +170,7 @@ var _default = {
normalLen: 7, normalLen: 7,
nowIndex: -1, nowIndex: -1,
isShow: false, isShow: false,
saveCarText: ["", "A", "", "", "", "", "", ""], saveCarText: ["", "A", "", "", "", "", "", ""],
newEnergy: true, newEnergy: true,
// 是否是新能源 // 是否是新能源
haveCode: false // 判断是否已经有了code haveCode: false // 判断是否已经有了code
@ -353,7 +353,7 @@ var _default = {
_this.saveCarText = code.split(""); _this.saveCarText = code.split("");
_this.haveCode = true; _this.haveCode = true;
} else { } else {
_this.saveCarText = ["", "A", "", "", "", "", "", ""]; _this.saveCarText = ["", "A", "", "", "", "", "", ""];
_this.haveCode = false; _this.haveCode = false;
} }
uni.hideLoading(); uni.hideLoading();

View File

@ -125,15 +125,6 @@ var render = function () {
var _vm = this var _vm = this
var _h = _vm.$createElement var _h = _vm.$createElement
var _c = _vm._self._c || _h var _c = _vm._self._c || _h
var g0 = false ? undefined : null
_vm.$mp.data = Object.assign(
{},
{
$root: {
g0: g0,
},
}
)
} }
var recyclableRender = false var recyclableRender = false
var staticRenderFns = [] var staticRenderFns = []
@ -174,6 +165,8 @@ Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports.default = void 0;
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 30));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _vuex = __webpack_require__(/*! vuex */ 33); var _vuex = __webpack_require__(/*! vuex */ 33);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@ -182,7 +175,7 @@ var _default = {
data: function data() { data: function data() {
return { return {
saveMsg: { saveMsg: {
action_type: "AddComment", action_type: "addMallComment",
commentScore: 4.5, commentScore: 4.5,
isAnonymous: 0, isAnonymous: 0,
commentContent: "", commentContent: "",
@ -254,20 +247,21 @@ var _default = {
quality: quality, quality: quality,
// 压缩质量 // 压缩质量
success: function success(res) { success: function success(res) {
// console.log(rs.tempFilePaths[0]) // console.log(rs.tempFiles[0])
// console.log(res) console.log(res);
uni.showLoading({ uni.showLoading({
title: "图片上传中..." title: "图片上传中..."
// mask: true // mask: true
}); });
uni.uploadFile({ uni.uploadFile({
url: "https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment", url: "https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment",
filePath: res.tempFilePath, filePath: rs.tempFiles[0].tempFilePath,
fileType: "image", fileType: "image",
name: "data", name: "data",
success: function success(res) { success: function success(res) {
var _data = JSON.parse(res.data); var _data = JSON.parse(res.data);
console.log("_data", _data);
_this.imgsList.push(rs.tempFiles[0].tempFilePath); _this.imgsList.push(rs.tempFiles[0].tempFilePath);
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH); _this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH);
uni.hideLoading(); uni.hideLoading();
@ -291,12 +285,13 @@ var _default = {
}); });
uni.uploadFile({ uni.uploadFile({
url: "https://user.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment", url: "https://mp.eshangtech.com/Coop.Merchant/Handler/handler_ajax.ashx?action_type=UploadFile&folder=Comment",
filePath: rs.tempFilePaths[0], filePath: rs.tempFiles[0].tempFilePath,
fileType: "image", fileType: "image",
name: "data", name: "data",
success: function success(res) { success: function success(res) {
var _data = JSON.parse(res.data); var _data = JSON.parse(res.data);
console.log("_data", _data);
_this.imgsList.push(rs.tempFiles[0].tempFilePath); _this.imgsList.push(rs.tempFiles[0].tempFilePath);
_this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH); _this.saveMsg.imageArr.push(_data.Data.IMAGE_PATH);
uni.hideLoading(); uni.hideLoading();
@ -323,10 +318,12 @@ var _default = {
}); });
}, },
deleteImg: function deleteImg(index) { deleteImg: function deleteImg(index) {
console.log("index", index);
var _this = this; var _this = this;
_this.$api.postCoop({ _this.$api.postCoop({
action_type: "DelFile", action_type: "DelFile",
filePath: _this.saveMsg.imageArr[index] filePath: _this.saveMsg.imageArr[index],
requestType: "application/x-www-form-urlencoded"
}).then(function (res) { }).then(function (res) {
// eslint-disable-next-line eqeqeq // eslint-disable-next-line eqeqeq
if (res.ResultCode == "100") { if (res.ResultCode == "100") {
@ -345,7 +342,8 @@ var _default = {
// if (_this.saveMsg.commentContent.length > 2 && _this.noPost) { // if (_this.saveMsg.commentContent.length > 2 && _this.noPost) {
if (_this.saveMsg.commentContent.length > 2) { if (_this.saveMsg.commentContent.length > 2) {
_this.noPost = false; _this.noPost = false;
_this.postIt(); // _this.postIt();
_this.handlePostShop();
} else { } else {
uni.showToast({ uni.showToast({
title: "评价文字不可少于3字", title: "评价文字不可少于3字",
@ -353,16 +351,105 @@ var _default = {
}); });
} }
}, },
// 批量评价商品
handlePostShop: function handlePostShop() {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var list, allTrue, i, obj, req, data;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
list = _this2.detailObj.List;
if (!(list && list.length > 0)) {
_context.next = 18;
break;
}
uni.showLoading({
title: "正在提交...",
mask: true
});
allTrue = true;
i = 0;
case 5:
if (!(i < list.length)) {
_context.next = 16;
break;
}
obj = list[0];
req = {
action_type: "addMallComment",
merchantsId: obj.MERCHANTS_ID,
merchantsName: obj.MERCHANTS_NAME,
saleBillId: obj.SALEBILL_ID,
salebillChildId: obj.SALEBILL_CHILD_ID,
// salebillChildCode: "",
// supplierId: obj.SUPPLIER_ID,
commodityId: obj.COMMODITY_ID,
isAnonymous: _this2.saveMsg.isAnonymous,
commentContent: _this2.saveMsg.commentContent,
commentScore: _this2.saveMsg.commentScore,
imageArr: _this2.saveMsg.imageArr,
requestType: "application/x-www-form-urlencoded"
};
_context.next = 10;
return _this2.$api.postCoop(req);
case 10:
data = _context.sent;
console.log("data", data);
if (data.ResultCode == "100") {} else {
allTrue = false;
}
case 13:
i++;
_context.next = 5;
break;
case 16:
uni.hideLoading();
if (allTrue) {
uni.showToast({
title: "评价成功!"
});
setTimeout(function () {
uni.navigateBack({
delta: 1
});
}, 1000);
}
case 18:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
},
postIt: function postIt() { postIt: function postIt() {
var _this = this; // let _this = this;
var data = _this.saveMsg; // let data = _this.saveMsg;
data.requestType = "application/x-www-form-urlencoded"; // data.requestType = "application/x-www-form-urlencoded";
data.imageArr = data.imageArr.toString(); // data.imageArr = data.imageArr.toString();
var req = _objectSpread(_objectSpread({}, _this.saveMsg), {}, {
saleBillId: _this.orderInternal // let req = {
}); // ..._this.saveMsg,
console.log("req", req); // saleBillId: _this.orderInternal,
delete data.__newReference; // };
// console.log("req", req);
// delete data.__newReference;
var req = {
merchantsId: this.detailObj.MERCHANTS_ID,
// merchantsName: this.detailObj.,
saleBillId: this.detailObj.SALEBILL_ID,
salebillChildId: this.detailObj.SALEBILL_CHILD_ID,
salebillChildCode: this.detailObj.SALEBILL_CODE,
supplierId: "",
isAnonymous: this.saveMsg.isAnonymous,
commentContent: this.saveMsg.commentContent,
commentScore: this.saveMsg.commentScore,
imageArr: this.saveMsg.imageArr
};
uni.showLoading({ uni.showLoading({
title: "正在提交...", title: "正在提交...",
mask: true mask: true
@ -420,17 +507,20 @@ var _default = {
}, },
// 获取订单状态 // 获取订单状态
getOrderType: function getOrderType() { getOrderType: function getOrderType() {
var _this2 = this;
var _this = this; var _this = this;
_this.$api.getCoop({ _this.$api.getCoop({
action_type: "GetOrderDetail", action_type: "GetOrderDetail",
salebillId: _this.orderInternal salebillId: _this.orderInternal,
saleBillChildId: _this.sellchildid
}).then(function (res) { }).then(function (res) {
// console.log(res) // console.log(res)
if (res.ResultCode === "100") { if (res.ResultCode === "100") {
var _data = res.Data; var _data = res.Data;
console.log("订单详情", _data); console.log("订单详情", _data);
_this2.detailObj = _data; _this.detailObj = _data;
if (_data.COMMENT_STATE === 1) {
_this.handleGetEvaluateDetail();
}
// 拿到商品列表 // 拿到商品列表
var list = _data.List; var list = _data.List;
var shopTitle = ""; var shopTitle = "";
@ -441,8 +531,36 @@ var _default = {
} }
} }
_this.currentShopName = shopTitle; _this.currentShopName = shopTitle;
_this.storeMsg.MERCHANTS_LOGO = list[0].IMAGE_PATH;
} }
}); });
},
// 评价详情
handleGetEvaluateDetail: function handleGetEvaluateDetail() {
var _this3 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
var req, data;
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
req = {
action_type: "getMallCommentList",
salebillId: _this3.orderInternal,
salebillChildId: _this3.sellchildid || ""
};
_context2.next = 3;
return _this3.$api.getCoop(req);
case 3:
data = _context2.sent;
console.log("data", data);
case 5:
case "end":
return _context2.stop();
}
}
}, _callee2);
}))();
} }
}, },
onUnload: function onUnload() { onUnload: function onUnload() {
@ -465,6 +583,7 @@ var _default = {
this.sellchildid = option.sellchildid; this.sellchildid = option.sellchildid;
} }
this.orderInternal = option.orderInternal; this.orderInternal = option.orderInternal;
// 获取订单详情 // 获取订单详情
this.getOrderType(); this.getOrderType();
// if (option.saleBillId) { // if (option.saleBillId) {

File diff suppressed because one or more lines are too long

View File

@ -56,7 +56,7 @@
.main .content .starRate .rateBox .shopName.data-v-4496319b { .main .content .starRate .rateBox .shopName.data-v-4496319b {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 32rpx; font-size: 28rpx;
color: #130f05; color: #130f05;
line-height: 44rpx; line-height: 44rpx;
text-align: left; text-align: left;

View File

@ -182,13 +182,55 @@ var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/r
// //
// //
// //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default = { var _default = {
props: { props: {
obj: {} obj: {}
}, },
data: function data() { data: function data() {
return { return {
timeText: '', timeText: "",
isCuntTime: false, isCuntTime: false,
isShowTime: false, isShowTime: false,
timeOut: 0 // 1超时 2不超时 timeOut: 0 // 1超时 2不超时
@ -197,43 +239,14 @@ var _default = {
computed: { computed: {
statusText: function statusText() { statusText: function statusText() {
var text = ''; var text = "";
switch (this.obj.SALEBILL_STATE) { switch (this.obj.COMMENT_STATE) {
case 1005: case 0:
text = '待支付'; text = "待评价";
break; break;
case 1010: case 1:
text = '待发货'; text = "已评价";
break; break;
case 2010:
text = '待收货';
break;
case 3000:
text = '已收货';
break;
case 8000:
text = '退款申请中';
break;
case 8010:
text = '商品退货中';
break;
case 8020:
text = '退款处理中';
break;
case 8900:
text = '订单已退款';
break;
case 8999:
text = '退款已关闭';
break;
case 9000:
text = '订单已关闭';
break;
case 9999:
text = '订单已撤销';
break;
default:
text = '待发货';
} }
return text; return text;
}, },
@ -243,7 +256,7 @@ var _default = {
}, },
toDeatil: function toDeatil() { toDeatil: function toDeatil() {
return function (item) { return function (item) {
this.$emit('toDeatil', item); this.$emit("toDeatil", item);
}; };
} }
}, },
@ -260,9 +273,9 @@ var _default = {
}, },
countDownTime: function countDownTime() {}, countDownTime: function countDownTime() {},
handleToEvaluate: function handleToEvaluate(obj) { handleToEvaluate: function handleToEvaluate(obj) {
console.log('obj', obj); console.log("obj", obj);
uni.navigateTo({ uni.navigateTo({
url: '/pages/newEvaluate/index?sellchildid=' + obj.SALEBILL_CHILD_ID + '&orderInternal=' + obj.SALEBILL_ID + '&proid=' + obj.SALEBILL_ID + 'type=' + 'DeliverId' url: "/pages/newEvaluate/index?sellchildid=" + obj.SALEBILL_CHILD_ID + "&orderInternal=" + obj.SALEBILL_ID + "&proid=" + obj.SALEBILL_ID + "type=" + "DeliverId"
}); });
}, },
// 确认收货按钮 // 确认收货按钮
@ -285,13 +298,13 @@ var _default = {
return _this.$api.getCoop(req); return _this.$api.getCoop(req);
case 3: case 3:
data = _context.sent; data = _context.sent;
console.log('data', data); console.log("data", data);
uni.showToast({ uni.showToast({
title: data.msg, title: data.msg,
icon: 'none' icon: "none"
}); });
if (data.error === 1) { if (data.error === 1) {
_this.$emit('handleGetOrderList'); _this.$emit("handleGetOrderList");
} }
case 7: case 7:
case "end": case "end":

View File

@ -1 +1 @@
<view class="flex-col list-item space-y-12 _div data-v-bf4c8652"><view class="flex-row justify-between _div data-v-bf4c8652" style="margin-bottom:8px;"><view style="display:flex;justify-content:space-between;align-items:center;width:100%;" class="_div data-v-bf4c8652"><label class="font_2 text_6 _span data-v-bf4c8652" style="margin-left:8px;">{{statusText}}</label></view></view><view class="flex-col justify-start items-start relative info _div data-v-bf4c8652" style="overflow:hidden;display:flex;align-items:center;"><scroll-view class="flex-row space-x-8 data-v-bf4c8652" style="height:82px;width:70%;white-space:nowrap;" scroll-x="{{true}}"><block wx:for="{{obj.IMAGELIST}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view class="imgBox data-v-bf4c8652"><view style="display:flex;flex-direction:column;" class="data-v-bf4c8652"><image class="equal-division-item _img data-v-bf4c8652" src="{{item.IMAGE_URL||'https://eshangtech.com/ShopICO/no-picture.png'}}"></image><text class="name data-v-bf4c8652">{{item.COMMODITY_NAME}}</text></view></view></block></scroll-view><view class="section_7 _div data-v-bf4c8652" style="height:82px;width:30%;display:flex;align-items:flex-end;justify-content:center;flex-direction:column;"><view class="_div data-v-bf4c8652"><label class="font_6 _span data-v-bf4c8652">¥</label><label class="font_5 text_7 _span data-v-bf4c8652">{{obj.ORDER_AMOUNT}}</label></view><label class="font_7 _span data-v-bf4c8652">{{"共"+obj.TOTAL_COUNT+"件"}}</label></view></view><view class="flex-row justify-between _div data-v-bf4c8652" style="display:flex;align-items:center;"><view style="flex:1;margin-right:4px;" class="_div data-v-bf4c8652"><block wx:if="{{obj.SALEBILL_STATE!==4000&&obj.SALEBILL_STATE!==5000}}"><view class="self-start font_7 _p data-v-bf4c8652">{{obj.ORDER_DATE+''}}</view></block><block wx:if="{{obj.SALEBILL_DESC}}"><view class="desc data-v-bf4c8652"><text class="data-v-bf4c8652">{{obj.SALEBILL_DESC}}</text></view></block></view><block wx:if="{{obj.SALEBILL_STATE===2010}}"><view data-event-opts="{{[['tap',[['handleConfirmReceipt',['$0'],['obj']]]]]}}" class="section_8 view space-x-4 _div data-v-bf4c8652" style="display:flex;align-items:center;" catchtap="__e"><image class="shrink-0 image_9 _img data-v-bf4c8652" src="/static/images/home/notice.svg"></image><label class="font_1 _span data-v-bf4c8652">确认收货</label></view></block><block wx:if="{{obj.SALEBILL_STATE===4000}}"><view class="flex-row items-center section_8 view space-x-4 _div data-v-bf4c8652"><image class="shrink-0 image_9 _img data-v-bf4c8652" src="/static/images/recons/notice.svg"></image><label class="font_1 _span data-v-bf4c8652">去评价</label></view></block></view></view> <view class="flex-col list-item space-y-12 _div data-v-bf4c8652"><view class="flex-row justify-between _div data-v-bf4c8652" style="margin-bottom:8px;"><view style="display:flex;justify-content:space-between;align-items:center;width:100%;" class="_div data-v-bf4c8652"><label class="font_2 text_6 _span data-v-bf4c8652" style="margin-left:8px;">{{statusText}}</label></view></view><view class="flex-col justify-start items-start relative info _div data-v-bf4c8652" style="overflow:hidden;display:flex;align-items:center;"><scroll-view class="flex-row space-x-8 data-v-bf4c8652" style="height:82px;width:70%;white-space:nowrap;" scroll-x="{{true}}"><block wx:for="{{obj.IMAGELIST}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view class="imgBox data-v-bf4c8652"><view style="display:flex;flex-direction:column;" class="data-v-bf4c8652"><image class="equal-division-item _img data-v-bf4c8652" src="{{item.IMAGE_URL||'https://eshangtech.com/ShopICO/no-picture.png'}}"></image><text class="name data-v-bf4c8652">{{item.COMMODITY_NAME}}</text></view></view></block></scroll-view><view class="section_7 _div data-v-bf4c8652" style="height:82px;width:30%;display:flex;align-items:flex-end;justify-content:center;flex-direction:column;"><view class="_div data-v-bf4c8652"><label class="font_6 _span data-v-bf4c8652">¥</label><label class="font_5 text_7 _span data-v-bf4c8652">{{obj.ORDER_AMOUNT}}</label></view><label class="font_7 _span data-v-bf4c8652">{{"共"+obj.TOTAL_COUNT+"件"}}</label></view></view><view class="flex-row justify-between _div data-v-bf4c8652" style="display:flex;align-items:center;"><view style="flex:1;margin-right:4px;" class="_div data-v-bf4c8652"><block wx:if="{{obj.SALEBILL_STATE!==4000&&obj.SALEBILL_STATE!==5000}}"><view class="self-start font_7 _p data-v-bf4c8652">{{''+obj.ORDER_DATE+''}}</view></block><block wx:if="{{obj.SALEBILL_DESC}}"><view class="desc data-v-bf4c8652"><text class="data-v-bf4c8652">{{obj.SALEBILL_DESC}}</text></view></block></view><block wx:if="{{obj.SALEBILL_STATE===2010}}"><view data-event-opts="{{[['tap',[['handleConfirmReceipt',['$0'],['obj']]]]]}}" class="section_8 view space-x-4 _div data-v-bf4c8652" style="display:flex;align-items:center;" catchtap="__e"><image class="shrink-0 image_9 _img data-v-bf4c8652" src="/static/images/home/notice.svg"></image><label class="font_1 _span data-v-bf4c8652">确认收货</label></view></block><block wx:if="{{obj.SALEBILL_STATE===4000}}"><view class="flex-row items-center section_8 view space-x-4 _div data-v-bf4c8652"><image class="shrink-0 image_9 _img data-v-bf4c8652" src="/static/images/recons/notice.svg"></image><label class="font_1 _span data-v-bf4c8652">去评价</label></view></block></view></view>

View File

@ -8,14 +8,14 @@
.list-item .box.data-v-bf4c8652 { .list-item .box.data-v-bf4c8652 {
padding: 5px 15px; padding: 5px 15px;
box-sizing: border-box; box-sizing: border-box;
background: #F6F8F8; background: #f6f8f8;
width: 100%; width: 100%;
border-radius: 4px; border-radius: 4px;
margin-top: 5px; margin-top: 5px;
} }
.list-item .space-x-8 .font_3.data-v-bf4c8652 { .list-item .space-x-8 .font_3.data-v-bf4c8652 {
font-size: 28rpx; font-size: 28rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 40rpx; line-height: 40rpx;
color: #020e1a; color: #020e1a;
font-weight: 600; font-weight: 600;
@ -34,7 +34,7 @@
} }
.list-item .space-x-8 .font_4.data-v-bf4c8652 { .list-item .space-x-8 .font_4.data-v-bf4c8652 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #fa5151; color: #fa5151;
margin-left: 16rpx; margin-left: 16rpx;
@ -66,7 +66,7 @@
} }
.list-item .font_2.data-v-bf4c8652 { .list-item .font_2.data-v-bf4c8652 {
font-size: 28rpx; font-size: 28rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 40rpx; line-height: 40rpx;
color: #1890ff; color: #1890ff;
} }
@ -76,14 +76,14 @@
} }
.list-item .section_7 .font_6.data-v-bf4c8652 { .list-item .section_7 .font_6.data-v-bf4c8652 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'DIN Alternate'; font-family: "DIN Alternate";
line-height: 28rpx; line-height: 28rpx;
font-weight: 700; font-weight: 700;
color: #020e1a; color: #020e1a;
} }
.list-item .section_7 .font_5.data-v-bf4c8652 { .list-item .section_7 .font_5.data-v-bf4c8652 {
font-size: 32rpx; font-size: 32rpx;
font-family: 'DIN Alternate'; font-family: "DIN Alternate";
line-height: 40rpx; line-height: 40rpx;
font-weight: 700; font-weight: 700;
color: #020e1a; color: #020e1a;
@ -93,7 +93,7 @@
} }
.list-item .font_41.data-v-bf4c8652 { .list-item .font_41.data-v-bf4c8652 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #fa5151; color: #fa5151;
} }
@ -104,7 +104,7 @@
} }
.list-item .font_7.data-v-bf4c8652 { .list-item .font_7.data-v-bf4c8652 {
font-size: 24rpx; font-size: 24rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 34rpx; line-height: 34rpx;
color: #9fa3a8; color: #9fa3a8;
} }
@ -112,7 +112,7 @@
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FF6219; color: #ff6219;
line-height: 36rpx; line-height: 36rpx;
} }
.list-item .section_8 .image_9.data-v-bf4c8652 { .list-item .section_8 .image_9.data-v-bf4c8652 {
@ -122,7 +122,7 @@
} }
.list-item .section_8 .font_1.data-v-bf4c8652 { .list-item .section_8 .font_1.data-v-bf4c8652 {
font-size: 28rpx; font-size: 28rpx;
font-family: 'PingFang SC'; font-family: "PingFang SC";
line-height: 40rpx; line-height: 40rpx;
color: #6c737a; color: #6c737a;
} }

View File

@ -191,7 +191,10 @@ var _default = {
value: 3 value: 3
}], }],
currentTab: 1, currentTab: 1,
queryStatus: ["4000,5000", "4000", "5000"] queryStatus: ["4000,5000", "4000", "5000"],
pageType: "",
// 页面类型
triggered: false
}; };
}, },
components: { components: {
@ -204,21 +207,46 @@ var _default = {
if (query.type) { if (query.type) {
this.currentTab = Number(query.type); this.currentTab = Number(query.type);
} }
if (query.pageType) {
this.pageType = query.pageType;
}
console.log("this.pageType", this.pageType);
this.getorderList(); this.getorderList();
}, },
methods: { methods: {
handleTab: function handleTab(item) { handleRefresherrefresh: function handleRefresherrefresh() {
console.log("item", item);
this.currentTab = item;
},
// 拿到待评价列表
getorderList: function getorderList() {
var _this = this; var _this = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() { return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
var req, data, list;
return _regenerator.default.wrap(function _callee$(_context) { return _regenerator.default.wrap(function _callee$(_context) {
while (1) { while (1) {
switch (_context.prev = _context.next) { switch (_context.prev = _context.next) {
case 0:
_this.triggered = true;
_context.next = 3;
return _this.getorderList();
case 3:
_this.triggered = false;
case 4:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
},
handleTab: function handleTab(item) {
console.log("item", item);
this.currentTab = item;
this.getorderList();
},
// 拿到待评价列表
getorderList: function getorderList() {
var _this2 = this;
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
var req, data, res, list;
return _regenerator.default.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0: case 0:
uni.showLoading({ uni.showLoading({
title: "正在加载...", title: "正在加载...",
@ -226,30 +254,41 @@ var _default = {
}); });
req = { req = {
action_type: "GetMallOrderList", action_type: "GetMallOrderList",
salebillType: 3000, salebillType: _this2.pageType === "UnionMall" ? 3001 : 3000,
salebillState: 3000, salebillState: 3000,
PageIndex: _this.pageMsg.pageIndex, PageIndex: _this2.pageMsg.pageIndex,
pageSize: _this.pageMsg.pageSize, pageSize: _this2.pageMsg.pageSize,
ownerUnitId: 911, ownerUnitId: 911,
requestType: "application/x-www-form-urlencoded" requestType: "application/x-www-form-urlencoded"
}; };
_context.next = 4; _context2.next = 4;
return _this.$api.postCoop(req); return _this2.$api.postCoop(req);
case 4: case 4:
data = _context.sent; data = _context2.sent;
list = []; res = [];
if (data.Data && data.Data.List && data.Data.List.length > 0) { if (data.Data && data.Data.List && data.Data.List.length > 0) {
list = data.Data.List; list = data.Data.List;
if (_this2.currentTab === 1) {
res = list;
} else {
list.forEach(function (item) {
if (_this2.currentTab === 2 && item.COMMENT_STATE === 0) {
res.push(item);
} else if (_this2.currentTab === 3 && item.COMMENT_STATE === 1) {
res.push(item);
}
});
}
} }
console.log("getorderList", list); console.log("getorderList", res);
_this.orderList = list; _this2.orderList = res;
uni.hideLoading(); uni.hideLoading();
case 10: case 10:
case "end": case "end":
return _context.stop(); return _context2.stop();
} }
} }
}, _callee); }, _callee2);
}))(); }))();
}, },
// 跳转去评价详情页面 // 跳转去评价详情页面

View File

@ -1 +1 @@
<view class="order _div data-v-386c38d3"><view class="fliter _div data-v-386c38d3"><view class="tabs _div data-v-386c38d3"><block wx:for="{{tabList}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view data-event-opts="{{[['tap',[['handleTab',['$0'],[[['tabList','',idx,'value']]]]]]]}}" class="{{['_div','data-v-386c38d3',currentTab===item.value?'tabs_item tab_active':'tabs_item']}}" bindtap="__e">{{''+item.label+''}}</view></block></view></view><block wx:if="{{$root.g0}}"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view data-event-opts="{{[['tap',[['goEvaluate',['$0'],[[['orderList','',idx]]]]]]]}}" bindtap="__e" class="_div data-v-386c38d3"><order-item vue-id="{{'55c93ada-1-'+idx}}" obj="{{item}}" class="data-v-386c38d3" bind:__l="__l"></order-item></view></block></block><block wx:else><no-data vue-id="55c93ada-2" text="您没有评价记录" isShow="{{$root.g1}}" class="data-v-386c38d3" bind:__l="__l"></no-data></block></view> <view class="order _div data-v-386c38d3"><view class="fliter _div data-v-386c38d3"><view class="tabs _div data-v-386c38d3"><block wx:for="{{tabList}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view data-event-opts="{{[['tap',[['handleTab',['$0'],[[['tabList','',idx,'value']]]]]]]}}" class="{{['_div','data-v-386c38d3',currentTab===item.value?'tabs_item tab_active':'tabs_item']}}" bindtap="__e">{{''+item.label+''}}</view></block></view></view><block wx:if="{{$root.g0}}"><scroll-view class="srcollView data-v-386c38d3" scroll-y="true" refresher-enabled="true" refresher-triggered="{{triggered}}" data-event-opts="{{[['refresherrefresh',[['handleRefresherrefresh',['$event']]]]]}}" bindrefresherrefresh="__e"><block wx:for="{{orderList}}" wx:for-item="item" wx:for-index="idx" wx:key="idx"><view data-event-opts="{{[['tap',[['goEvaluate',['$0'],[[['orderList','',idx]]]]]]]}}" bindtap="__e" class="_div data-v-386c38d3"><order-item vue-id="{{'55c93ada-1-'+idx}}" obj="{{item}}" class="data-v-386c38d3" bind:__l="__l"></order-item></view></block></scroll-view></block><block wx:else><no-data vue-id="55c93ada-2" text="您没有评价记录" isShow="{{$root.g1}}" class="data-v-386c38d3" bind:__l="__l"></no-data></block></view>

View File

@ -51,6 +51,10 @@
text-align: center; text-align: center;
line-height: 40px; line-height: 40px;
} }
.order .srcollView.data-v-386c38d3 {
width: 100%;
height: calc(100vh - 160rpx);
}
.fliter.data-v-386c38d3 { .fliter.data-v-386c38d3 {
/*height: 258rpx;*/ /*height: 258rpx;*/
background: #fff; background: #fff;

View File

@ -163,6 +163,9 @@ var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/r
// //
// //
// //
//
//
//
var _default = { var _default = {
data: function data() { data: function data() {
return { return {

View File

@ -4,6 +4,7 @@
box-sizing: border-box; box-sizing: border-box;
padding: 16rpx 32rpx; padding: 16rpx 32rpx;
background: #fff; background: #fff;
overflow-y: scroll;
} }
.main .pageTitle.data-v-24542bf6 { .main .pageTitle.data-v-24542bf6 {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
@ -46,4 +47,7 @@
font-style: normal; font-style: normal;
overflow-y: auto; overflow-y: auto;
} }
.main.data-v-24542bf6::-webkit-scrollbar {
display: none;
}

Some files were not shown because too many files have changed in this diff Show More