| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257 |
- <template>
- <view class="page-container">
- <!-- <up-tabs
- class="tabs-box"
- :list="tabsList"
- lineColor="#cc9933"
- @click="click"
- ></up-tabs> -->
- <z-paging
- empty-view-error-text="暂无订单"
- :style="{
- marginTop: computedMarginTop,
- }"
- ref="pagingRef"
- class="pagingRef-container"
- :use-refresher-status-bar-placeholder="true"
- @query="handleQuery"
- v-model="dataList"
- >
- <template #top>
- <view class="tabs-container">
- <Tabs
- :tabsList="tabsList"
- :activeName="title"
- @tab-click="onTabClick"
- activeLineWidth="112rpx"
- activeLineColor="#f8c007"
- activeLineHeight="6rpx"
- ></Tabs>
- </view>
- <view
- v-if="title == '确认单' && role == '买家' && dataList.length"
- class="address acea-row row-between-wrapper"
- @tap="onAddress"
- >
- <view class="addressCon" v-if="addressInfo.realName">
- <view class="name"
- >{{ addressInfo.realName }}
- <text class="phone">{{ addressInfo.phone }}</text>
- </view>
- <view class="acea-row">
- <text class="default font-color" v-if="addressInfo.isDefault"
- >[默认]</text
- >
- <text class="line2"
- >{{ addressInfo.province }}{{ addressInfo.city
- }}{{ addressInfo.district }}{{ addressInfo.detail }}</text
- >
- </view>
- </view>
- <view class="addressCon" v-else>
- <view class="setaddress">设置收货地址</view>
- </view>
- <view class="iconfont icon-jiantou"></view>
- </view>
- </template>
- <view class="order-info-box animated">
- <view
- class="order-info-item"
- v-for="item in dataList"
- :key="item.orderNo"
- >
- <view class="title-box">
- <view class="order-num">订单号:{{ item.orderNo }}</view>
- <view class="order-time">{{ item.createTime }}</view>
- <view class="order-status" v-if="item.status == 0">待审核</view>
- </view>
- <!-- 待找款 /完成单-->
- <view class="order-container" style="width: 100%">
- <view class="order-content">
- <view class="image-box" @click="previewImage(item.images)">
- <image :src="item.images[0]"></image>
- </view>
- <view class="ordser-info-desc">
- <block v-if="title !== '完成单' && title !== '待评分'">
- <view class="info-desc-item">
- 预估克重:{{ item.estimatedWeight }}g
- </view>
- <view class="info-desc-item">
- 理想工费:{{ item.idealWage }}元/g
- </view>
- <view class="info-desc-item">
- 购买件数:{{ item.numberOfUnits }}件
- </view>
- <view
- class="info-desc-item buyer-message"
- v-if="title !== '完成单'"
- >买家留言:{{ item.description }}
- </view>
- </block>
- <block v-else>
- <view class="info-desc-item">
- 实际克重:{{ item.practicalWeight }}g
- </view>
- <view class="info-desc-item">
- 实际工费:{{ item.quoteWage }}元/g
- </view>
- <view class="info-desc-item">
- 购买件数:{{ item.numberOfUnits }}件
- </view>
- <view class="info-desc-item" v-if="title !== '完成单'">
- 买家留言:请帮我买一个有设计感的款式
- </view>
- <view
- class="info-desc-item"
- v-if="title == '完成单' && role == '买家'"
- >
- <up-copy :content="item.trackingNumber">
- 快递单号:{{
- item.trackingNumber
- ? item.trackingNumber
- : "暂无物流信息"
- }}
- </up-copy>
- </view>
- </block>
- <!-- 买家评分 -->
- <view class="rate" v-if="title === '完成单' && role === '代购'">
- <view class="lable">买家评分:</view>
- <!-- <up-rate
- :count="count"
- readonly
- v-model="item.score"
- activeColor="#cc9933"
- ></up-rate> -->
- <uni-rate
- readonly
- :value="item.score"
- color="#bbb"
- active-color="#f96400"
- />
- </view>
- </view>
- </view>
- <!-- 代购 -->
- <view
- class="Purchasing"
- v-if="role === '代购' && title === '待找款'"
- >
- <view class="Purchasing-btn" @click="takeOrderHandle(item)">
- <image
- class="sb-btn-img"
- src="/static/images/sb_btn.png"
- ></image>
- <text>点击接单</text>
- </view>
- <view class="Purchasing-tips"
- >温馨提示:48小时内需找到产品,切勿盲目接单。</view
- >
- </view>
- <view
- class="border-line"
- v-if="role === '买家' && title === '完成单'"
- ></view>
- <!-- 买家 -->
- <view
- class="Buyers"
- v-if="
- role === '买家' && (title === '完成单' || title == '待评分')
- "
- >
- <view class="Buyers-tips" v-show="!item.isScore">
- 请给我们打个服务分吧!</view
- >
- <view class="Buyers-rate-box">
- <text>订单评分</text>
- <!-- <up-rate
- :count="count"
- activeColor="#cc9933"
- gutter="1"
- v-model="item.score"
- :value="buyRate"
- @change="changeRate"
- :readonly="item.isScore ? true : false"
- ></up-rate> -->
- <uni-rate
- activeColor="#f96400"
- :value="item.isScore ? item.score : buyRate"
- @change="changeRate"
- :readonly="item.isScore ? true : false"
- />
- </view>
- <view
- class="Buyers-btn"
- v-show="!item.isScore"
- @click="submitRateHandle(item)"
- :class="{ disabled: item.isScore }"
- >
- <image
- v-show="!item.isScore"
- class="sb-btn-img"
- src="/static/images/sb_btn.png"
- ></image>
- <image
- v-show="item.isScore"
- class="sb-btn-img"
- src="/static/images/sb_refuse_btn.png"
- ></image>
- <text>提交评分</text>
- </view>
- </view>
- </view>
- <!-- 已接单 -->
- <view
- class="order-receive"
- v-if="title === '已接单' && role === '代购'"
- >
- <view class="find-funds-info">
- <view class="title-box">
- <view class="title">请上传1~3张产品图</view>
- <view class="f-title">图片越清晰越容易识别款式哦~</view>
- </view>
- <!-- 上传 -->
- <!-- 上传 -->
- <view class="upload-box">
- <up-upload
- :fileList="imageList"
- uploadIcon="plus"
- @afterRead="afterRead"
- @delete="deletePic"
- name="1"
- multiple
- :maxCount="3"
- >
- <template #trigger>
- <view class="upload-block">
- <uni-icons
- size="38"
- color="#ccc"
- type="plusempty"
- ></uni-icons>
- </view>
- </template>
- </up-upload>
- </view>
- <!-- 信息 -->
- <view class="info-box">
- <view class="info-item">
- <view class="info-label">实际重量(g)</view>
- <view class="info-input">
- <input type="number" v-model="practicalWeight" />
- </view>
- </view>
- <view class="info-item">
- <view class="info-label">报价工费(/g)</view>
- <view class="info-input">
- <input type="number" v-model="quoteWage" />
- </view>
- </view>
- <view class="info-item">
- <view class="info-label">卖家留言</view>
- </view>
- <view class="info-input info-item-message">
- <up-textarea
- v-model="acceptorText"
- placeholder="请输入您的留言"
- ></up-textarea>
- </view>
- </view>
- </view>
- </view>
- <!-- 确认单 -->
- <view class="order-confirm" v-if="title === '确认单'">
- <view class="image-box">
- <image v-for="p in item.productImages" :key="p" :src="p"></image>
- </view>
- <view class="confirm-info">
- <view class="confirm-info-left">
- <view class="label">实际重量:</view>
- <view class="value">{{ item.practicalWeight }}g</view>
- </view>
- <view class="confirm-info-right">
- <view class="label">报价工费:</view>
- <view class="value">{{ item.quoteWage }}元/g</view>
- </view>
- </view>
- <!-- 卖家留言 -->
- <view class="confirm-message">
- <view class="label">卖家留言:</view>
- <view class="value">
- {{ item.acceptorText }}
- </view>
- </view>
- <view
- class="express-box"
- v-if="title === '确认单' && role === '买家'"
- >
- <view class="info-item">
- <view class="info-label" @click="exShowPopup = true"
- >选择快递方式:
- {{
- selectedExpress?.label
- ? selectedExpress.label
- : "请选择快递公司"
- }}</view
- >
- </view>
- </view>
- <!-- 买家是否确认支付 -->
- <view
- class="confirm-pay-box"
- v-if="role === '买家' && title === '确认单'"
- >
- <view class="confirm pay" @tap="opPopup(item)">
- <image
- class="sb-btn-img"
- src="/static/images/sb_btn.png"
- ></image>
- <text>确认支付</text>
- </view>
- <view class="refuse pay" @click="refuse(item.id)">
- <image
- class="sb-btn-img"
- src="/static/images/sb_refuse_btn.png"
- ></image>
- <text>取消订单</text>
- </view>
- </view>
- </view>
- <!-- 提交信息等待买家确认 -->
- <view
- class="btn"
- v-if="title === '已接单' && role === '代购'"
- @click="submitFindFundsHandle(item)"
- >
- <image class="sb-btn-img" src="/static/images/sb_btn.png"></image>
- <text>提交信息等待买家确认</text>
- </view>
- </view>
- </view>
- </z-paging>
- <!-- 选择支付方式弹窗 -->
- <!-- <up-popup :show="show" closeOnClickOverlay @close="close">
- <view class="pay-list">
- <view class="pay-title">选择支付方式</view>
- <view
- class="pay-item"
- v-for="item in payments"
- :key="item.value"
- :class="{ active: item.value === payChannel }"
- @tap="changePayChannel(item)"
- >
-
- <view class="iconfont" :class="item.icon"> </view>
- <view class="pay-name">{{ item.name }}</view>
- </view>
- <view class="comfirm-btn" @tap="confirmPay"> 确认支付 </view>
- </view>
- </up-popup> -->
- <WPayment
- :payMode="payments"
- :showPopup="showPopup"
- @payComplete="payComplete"
- @close="payClose"
- :orderId="orderbanceId"
- :totalPrice="totalPrice"
- :addresssId="addressId"
- :mallType="0"
- :orderUserInfo="orderUserInfo"
- :goldType="goldType"
- @change="handlePaymentChange"
- :switchStatus="switchStatus"
- ref="paymentRef"
- ></WPayment>
- <!-- 取消订单支付弹出框 -->
- <up-modal
- :show="show"
- :content="content"
- :showCancelButton="true"
- @cancel="close"
- @confirm="confirm"
- ></up-modal>
- <!-- 收货地址组件 -->
- <addressWindow
- ref="addressWindowRef"
- :address="address"
- :pagesUrl="pagesUrl"
- @OnDefaultAddress="OnDefaultAddress"
- @OnChangeAddress="OnChangeAddress"
- @changeClose="changeClose"
- />
- <!-- 快递组件 -->
- <view class="express-popup">
- <up-popup :show="exShowPopup" @close="exShowPopup = false">
- <up-cell-group>
- <up-cell
- class="item-cell"
- v-for="item in expressList"
- :key="item.value"
- :title="`${item.label}¥${
- appStore.userInfo.svip ? item.value / 2 : item.value
- }`"
- @click="chooseExpress(item)"
- />
- <up-cell
- class="item-cell cancel"
- title="取消"
- @click="exShowPopup = false"
- />
- </up-cell-group>
- </up-popup>
- </view>
- <view class="white"></view>
- </view>
- </template>
- <script setup>
- import { reactive, ref, nextTick, computed } from "vue";
- import { onLoad, onShow } from "@dcloudio/uni-app";
- import Tabs from "@/components//tabsView/index.vue";
- import { useAppStore } from "@/stores/app";
- import { useToast } from "@/hooks/useToast";
- // 快递相关
- const selectedExpress = ref({});
- const exShowPopup = ref(false);
- const expressList = ref([
- { label: "顺丰陆运", value: 15, type: 2 },
- { label: "顺丰空运", value: 24, type: 3 },
- { label: "顺丰到付", value: 0, type: 4 },
- ]);
- const chooseExpress = (item) => {
- selectedExpress.value = item;
- exShowPopup.value = false;
- };
- // 导入地址选择组件
- import addressWindow from "@/components/addressWindow";
- // 导入用户地址详情API接口
- import { getAddressDetail, getAddressDefault } from "@/api/user.js";
- const { Toast } = useToast();
- // 地址相关
- //
- const textareaStatus = ref(true);
- const pagesUrl = ref("");
- const addressWindowRef = ref(null);
- const address = ref({
- address: false,
- addressId: 0,
- }); // 地址组件
- const addressInfo = ref({}); // 地址信息
- const addressId = ref(0); // 地址id
- // 首次进入页面时展示默认地址
- const OnDefaultAddress = (e) => {
- console.log("保存默认地址详情");
- addressInfo.value = e; // 保存默认地址详情
- address.value.addressId = e.id; // 更新选中地址ID
- };
- // 打开地址选择弹窗
- const onAddress = () => {
- textareaStatus.value = false; // 隐藏备注框
- address.value.address = true; // 显示地址弹窗
- // 设置地址页面跳转链接
- pagesUrl.value = "/pages/users/user_address_list/index";
- nextTick(() => {
- addressWindowRef.value.fetchAddressList();
- });
- };
- // 选择地址后触发的事件
- const OnChangeAddress = (e) => {
- console.log("OnChangeAddress", e);
- addressInfo.value = e; // 保存选中的地址详情
- address.value.addressId = e.id; // 更新选中地址ID
- textareaStatus.value = true; // 显示备注框
- address.value.address = false; // 关闭地址弹窗
- };
- // 获取默认地址或指定地址详情
- const getaddressInfo = () => {
- if (addressId.value) {
- // 若有指定地址ID,获取该地址详情
- getAddressDetail(addressId.value).then((res) => {
- if (res.data) {
- // 若地址存在
- res.data.isDefault = parseInt(res.data.isDefault); // 转换默认地址标识为数字
- addressInfo.value = res.data || {}; // 保存地址详情
- addressId.value = res.data.id || 0; // 更新地址ID
- address.value.addressId = res.data.id || 0; // 更新选中地址ID
- }
- });
- } else {
- // 若没有指定地址ID,获取默认地址
- getAddressDefault().then((res) => {
- // 注意:原代码中未导入getAddressDefault,可能是遗漏
- if (res.data) {
- // 若默认地址存在
- res.data.isDefault = parseInt(res.data.isDefault);
- addressInfo.value = res.data || {};
- addressId.value = res.data.id || 0;
- address.value.addressId = res.data.id || 0;
- }
- });
- }
- };
- // 关闭地址弹窗
- const changeClose = () => {
- address.value.address = false; // 隐藏地址弹窗
- };
- const computedMarginTop = computed(() => {
- return "50rpx";
- });
- onLoad(() => {
- // 若已登录且非支付页面,则获取地址信息(注释掉的逻辑,预留)
- if (appStore.isLogin) {
- // console.log(1111);
- getaddressInfo();
- // 等待DOM更新后,调用地址组件的方法获取地址列表
- nextTick(() => {
- addressWindowRef.value.fetchAddressList();
- });
- }
- });
- // 找款接口
- import {
- getUserFindFundsAPI,
- submitFindFundsAPI,
- acceptFindFundsAPI,
- cancelFindFundsAPI,
- paylFindFundsBalanceAPI,
- submitFindFundsRateAPI,
- } from "@/api/find_fund";
- // 导入支付相关工具(封装的支付逻辑,如提交支付、验证支付渠道等)
- import WPayment from "@/components/WPayment";
- import { usePayment } from "@/hooks/usePayment.js";
- import { useImageUpload } from "@/hooks/useImageUpload";
- // 初始化支付工具(获取支付相关方法)
- const { submitPayment, paymentConfig, getAvailableChannels } = usePayment();
- const { imageList, afterRead, deletePic, uploadLoading } = useImageUpload({
- pid: 11,
- model: "resubmit",
- });
- const appStore = useAppStore();
- console.log(appStore);
- const title = ref("全部");
- const count = ref(5);
- const message = ref("");
- const role = ref("买家");
- // 控制组件显示/隐藏
- const showPopup = ref(false);
- const totalPrice = ref("99");
- // 创建响应式数据
- const tabsList = reactive([
- { name: "全部", status: 6 },
- { name: "待找款", status: 1 },
- { name: "已接单", status: 2 },
- { name: "确认单", status: 3 },
- { name: "待评分", status: 5 },
- { name: "完成单", status: 4 },
- ]);
- // z-paing绑定数据
- const dataList = ref([]);
- const articleType = ref(6); // 订单类型(找款)
- const payChannel = ref("alipay");
- // 响应式变量:支付方式列表(包含支付宝、微信、余额等支付方式配置)
- const payments = reactive([
- // {
- // name: "支付宝支付", // 支付方式名称
- // icon: "icon-zhifubao", // 图标类名
- // value: "alipay", // 支付标识值
- // title: "支付宝快捷支付", // 支付说明
- // payType: "alipay", // 支付类型
- // payStatus: 1, // 支付状态(1-可用,0-不可用)
- // },
- // {
- // name: "微信支付",
- // icon: "icon-wechat",
- // value: "weixin",
- // title: "微信快捷支付",
- // payType: "weixin",
- // payStatus: 1,
- // },
- {
- name: "余额支付",
- icon: "icon-balance",
- value: "yue",
- title: "可用余额:",
- payType: "yue",
- payStatus: 1,
- },
- ]);
- const pagingRef = ref();
- // tabs点击事件
- const onTabClick = (item) => {
- title.value = item.name;
- articleType.value = item.status;
- pagingRef.value.reload();
- };
- async function handleQuery(page, pageSize) {
- try {
- uni.showLoading({ title: "加载中" });
- // 请求参数
- const params = {
- page: page,
- limit: pageSize,
- status: articleType.value,
- userId: appStore.uid,
- };
- const { data } = await getUserFindFundsAPI(params);
- const { list: originalList, total } = data.page;
- // 关键:为list中的每个项添加新属性(例如添加isNew: false)
- const processedList = originalList.map((item) => ({
- ...item, // 保留原有属性
- productImages: JSON.parse(item.acceptorImgs),
- images: JSON.parse(item.purchaserImgs),
- }));
- // console.log(processedList);
- // 角色判断逻辑
- data.is_by ? (role.value = "代购") : (role.value = "买家");
- uni.hideLoading();
- // 将处理后的列表传给z-paging,不影响分页功能
- pagingRef.value.complete(processedList, total);
- } catch (e) {
- pagingRef.value.complete(false);
- uni.hideLoading();
- console.error("查询失败:", e);
- }
- }
- // 点击接单
- const takeOrderHandle = async (order) => {
- const res = await acceptFindFundsAPI(order.id);
- // console.log(res);
- if (res.code == 200) {
- Toast({ title: "接单成功" });
- title.value = "已接单";
- articleType.value = 2;
- pagingRef.value.reload();
- }
- // console.log("点击接单", order);
- // title.value = "已接单";
- };
- // 提供给买家的信息
- const practicalWeight = ref("");
- const quoteWage = ref("");
- const acceptorText = ref("");
- // 提交信息等待买家确认
- const submitFindFundsHandle = async (order) => {
- console.log(order);
- const params = {
- orderId: order.id,
- practicalWeight: practicalWeight.value,
- quoteWage: quoteWage.value,
- acceptorText: acceptorText.value,
- acceptorImgs: imageList.value.map((v) => v.info.url),
- };
- const res = await submitFindFundsAPI(params);
- if (res.code == 200) {
- Toast({ title: "提交信息成功" });
- title.value = "确认单";
- articleType.value = 3;
- pagingRef.value.reload();
- }
- };
- // 取消支付
- const show = ref(false);
- const content = ref("确定取消订单?");
- const orderId = ref(null);
- const refuse = (id) => {
- orderId.value = id;
- show.value = true;
- };
- const confirm = async () => {
- const res = await cancelFindFundsAPI(orderId.value);
- if (res.code == 200) {
- Toast({ title: "取消订单成功" });
- pagingRef.value.reload();
- show.value = false;
- }
- };
- // 关闭弹窗
- function close() {
- show.value = false;
- }
- // 支付相关逻辑
- const goldType = ref("au");
- const orderbanceId = ref(null);
- const orderUserInfo = ref({});
- // 确认支付
- const opPopup = (item) => {
- if (!addressInfo.value.id) {
- return Toast({ title: "请选择收货地址" });
- }
- if (!selectedExpress.value.label) {
- return Toast({ title: "请选择快递公司" });
- }
- goldType.value = item.metalType;
- // goldType.value = "pt";
- orderbanceId.value = item.id;
- showPopup.value = true;
- getPayBalanceInfo(orderbanceId.value, false, selectedExpress.value.type);
- };
- const switchStatus = ref(false);
- const handlePaymentChange = async (value) => {
- // console.log("从子组件接收的开关状态:", value);
- const res = await paylFindFundsBalanceAPI(
- orderbanceId.value,
- value,
- selectedExpress.value.type
- );
- orderUserInfo.value = res.data;
- };
- // 获取订单金额/用户信息
- const getPayBalanceInfo = async (id, type) => {
- const res = await paylFindFundsBalanceAPI(
- id,
- type,
- selectedExpress.value.type
- );
- orderUserInfo.value = res.data;
- };
- const confirmPay = async () => {
- showPopup.value = true;
- };
- // 切换支付方式
- const changePayChannel = (item) => {
- payChannel.value = item.value;
- };
- // 关闭组件弹窗
- function payComplete() {
- payClose();
- title.value = "待评分";
- articleType.value = 5;
- pagingRef.value.reload();
- }
- const paymentRef = ref(null);
- function payClose() {
- showPopup.value = false;
- paymentRef.value.triggerChange(false);
- }
- const buyRate = ref(0);
- // 提交买家评分
- const submitRateHandle = async (item) => {
- if (item.isScore) {
- return Toast({ title: "您已评分,请勿重复操作" });
- }
- const res = await submitFindFundsRateAPI({
- orderId: item.id,
- rating: buyRate.value,
- });
- Toast({ title: "评分成功" });
- title.value = "完成单";
- articleType.value = 4;
- pagingRef.value.reload();
- };
- const changeRate = (e) => {
- // console.log(value);
- buyRate.value = e.value;
- };
- // 预览图片
- const previewImage = (item) => {
- console.log(item[0]);
- // 预览图片,支持多张图片传数组
- uni.previewImage({
- urls: item,
- current: item[0],
- });
- };
- </script>
- <style lang="scss" scoped>
- .express-popup {
- .item-cell {
- text-align: center;
- }
- }
- .tabs-container {
- width: 100%;
- // margin-top: 20rpx;
- }
- ::v-deep .top-nav {
- .u-navbar__content {
- background-color: $header-color !important;
- }
- }
- ::v-deep .pagingRef-container {
- margin-top: 50rpx;
- // background-color: #f8f8f8;
- // position: relative;
- }
- // 快递盒子
- .express-box {
- margin: 30rpx 0;
- }
- ::v-deep .u-radio-group--row {
- justify-content: space-between;
- }
- .page-container {
- width: 100%;
- height: auto;
- padding: 20rpx 30rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- min-height: 100vh;
- background: $uni-bg-primary;
- .upload-box {
- margin-top: 40rpx;
- .upload-block {
- width: 160rpx;
- height: 160rpx;
- border: 1px solid #ccc;
- border-radius: 10rpx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- color: #ccc;
- font-weight: 700;
- font-size: 26rpx;
- }
- }
- .order-info-box {
- width: 100%;
- margin-top: 50rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- .order-info-item {
- height: auto;
- background-color: #ffffff;
- box-shadow: 0rpx 3rpx 13rpx 0rpx rgba(0, 0, 0, 0.13);
- border-radius: 20rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- margin: 20rpx 0;
- align-items: center;
- padding-bottom: 30rpx;
- .title-box {
- width: 100%;
- display: flex;
- height: 78rpx;
- background-color: #f2f2f2;
- border-radius: 20rpx 20rpx 0rpx 0rpx;
- align-items: center;
- justify-content: space-between;
- box-sizing: border-box;
- font-size: 22rpx;
- color: #000000;
- padding: 0 20rpx;
- .order-status {
- padding: 5rpx;
- background: #cc9933;
- color: #fff;
- border-radius: 5rpx;
- font-size: 20rpx;
- }
- }
- .order-content {
- width: 100%;
- height: 344rpx;
- display: flex;
- align-items: center;
- box-sizing: border-box;
- padding: 0 25rpx;
- .image-box {
- width: 259rpx;
- height: 259rpx;
- border-radius: 10rpx;
- border: solid 1rpx #c2c2c2;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .ordser-info-desc {
- margin-left: 25rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .info-desc-item {
- width: 325rpx;
- font-size: 25rpx;
- color: #000000;
- margin-bottom: 15rpx;
- white-space: normal;
- }
- .buyer-message {
- white-space: pre-wrap;
- word-wrap: break-word;
- word-break: break-all;
- line-height: 1.4;
- }
- .rate {
- font-size: 25rpx;
- color: #000000;
- display: flex;
- align-items: center;
- }
- }
- }
- .Purchasing {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 100%;
- .Purchasing-btn {
- width: 270rpx;
- height: 66rpx;
- position: relative;
- .sb-btn-img {
- width: 100%;
- height: 100%;
- }
- text {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- }
- .Purchasing-tips {
- font-size: 20rpx;
- color: #7c7c7c;
- margin: 30rpx 0;
- }
- }
- .Buyers {
- margin-top: 40rpx;
- width: 100%;
- display: flex;
- align-items: center;
- flex-direction: column;
- .Buyers-tips {
- font-size: 25rpx;
- color: #000000;
- }
- .Buyers-rate-box {
- font-size: 25rpx;
- color: #000000;
- display: flex;
- align-items: center;
- margin: 30rpx 0;
- text {
- margin-right: 10rpx;
- }
- }
- .Buyers-btn {
- width: 269rpx;
- height: 66rpx;
- font-size: 28rpx;
- color: #000;
- margin: 30rpx 0 40rpx 0;
- position: relative;
- .sb-btn-img {
- width: 100%;
- height: 100%;
- }
- text {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- white-space: nowrap;
- }
- &.disabled {
- opacity: 0.6;
- cursor: not-allowed;
- background-color: #c2c2c2;
- }
- }
- }
- .border-line {
- width: 100%;
- height: 0rpx;
- border: dashed 1rpx #acacac;
- }
- .find-funds-info {
- width: 682rpx;
- height: 1069rpx;
- background-color: #ffffff;
- box-sizing: border-box;
- padding: 40rpx;
- .title-box {
- display: flex;
- flex-direction: column;
- align-items: center;
- // padding: 30rpx;
- box-sizing: border-box;
- background: #ffffff;
- .title {
- font-size: 28rpx;
- color: #000000;
- }
- .f-title {
- font-size: 21rpx;
- color: #848484;
- }
- }
- .upload-box {
- margin-top: 40rpx;
- }
- .info-box {
- .info-item {
- display: flex;
- align-items: center;
- margin: 40rpx 0rpx;
- position: relative;
- .info-label {
- font-size: 26rpx;
- color: #000000;
- width: 200rpx;
- }
- .info-input {
- width: 437rpx;
- height: 69rpx;
- background-color: #f3f3f3;
- border-radius: 10rpx;
- display: flex;
- align-items: center;
- input {
- width: 100%;
- height: 100%;
- padding-left: 10rpx;
- }
- }
- }
- }
- }
- // 确认单
- .order-confirm {
- width: 100%;
- margin-top: 30rpx;
- padding: 0 25rpx;
- .image-box {
- display: flex;
- justify-content: space-between;
- image {
- width: 195rpx;
- height: 195rpx;
- border-radius: 10rpx;
- }
- }
- .confirm-info {
- display: flex;
- align-items: center;
- margin: 40rpx 0;
- .confirm-info-left {
- flex: 1;
- display: flex;
- justify-content: center;
- }
- .confirm-info-right {
- flex: 1;
- display: flex;
- justify-content: center;
- }
- }
- .confirm-message {
- display: flex;
- // height: auto;
- align-items: center;
- .value {
- width: 468rpx;
- font-size: 26rpx;
- color: #7c7c7c;
- white-space: normal;
- overflow-wrap: break-word;
- }
- }
- .confirm-pay-box {
- display: flex;
- justify-content: space-between;
- align-items: center;
- width: 100%;
- .pay {
- width: 269rpx;
- height: 66rpx;
- position: relative;
- color: #000;
- .sb-btn-img {
- width: 100%;
- height: 100%;
- }
- text {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- white-space: nowrap;
- }
- }
- }
- }
- .btn {
- width: 367rpx;
- height: 73rpx;
- font-size: 28rpx;
- color: #000;
- margin-bottom: 100rpx;
- position: relative;
- .sb-btn-img {
- width: 100%;
- height: 100%;
- }
- text {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- white-space: nowrap;
- }
- }
- .white {
- height: 100rpx;
- }
- }
- }
- }
- // 弹出框样式
- .pay-list {
- width: 100%;
- // height: auto;
- height: auto;
- padding: 30rpx;
- .pay-title {
- font-size: 32rpx;
- color: #cc9933;
- margin: 10rpx 0;
- }
- .pay-item {
- display: flex;
- align-items: center;
- width: 100%;
- margin-bottom: 10rpx;
- height: 80rpx;
- border-radius: 30rpx;
- padding: 0 30rpx;
- box-sizing: border-box;
- border: 1px solid transparent;
- transition: all 0.3s ease;
- &.active {
- border-color: #e8c279;
- }
- .iconfont {
- width: 44rpx;
- height: 44rpx;
- border-radius: 50%;
- text-align: center;
- line-height: 44rpx;
- background-color: #fe960f;
- color: #fff;
- font-size: 30rpx;
- margin-right: 15rpx;
- &.icon-wechat {
- background-color: #41b035;
- }
- &.icon-zhifubao {
- background-color: #06b4fd;
- }
- }
- }
- .comfirm-btn {
- width: 200rpx;
- height: 60rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #fff;
- background: #e8c279;
- margin: 0 auto;
- border-radius: 30rpx;
- }
- }
- // 地址相关样式
- .address {
- width: 690rpx;
- max-height: 180rpx;
- padding: 28rpx;
- background-color: #fff;
- box-sizing: border-box;
- border-radius: 30rpx;
- margin: 0 auto;
- margin-top: 20rpx;
- .addressCon {
- width: 596rpx;
- font-size: 26rpx;
- color: #666;
- .name {
- font-size: 30rpx;
- color: #282828;
- font-weight: bold;
- margin-bottom: 10rpx;
- .phone {
- margin-left: 50rpx;
- }
- }
- .default {
- margin-right: 12rpx;
- }
- .setaddress {
- color: #333;
- font-size: 28rpx;
- }
- }
- .iconfont {
- font-size: 35rpx;
- color: #707070;
- }
- }
- </style>
|