123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119 |
- <template>
- <view class="container">
- <navbar :config="config" backColor="#666"></navbar>
- <view class="top-state u-font24 u-00321E">
- <!--待付款-->
- <view class="obligation" v-if="payment_status == 0">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">{{
- close_mode == 0 ? "待付款" : "订单已关闭"
- }}</view>
- <view class="u-flex u-font26" v-if="close_mode == 0"
- >请在{{
- $mUtil.patTime(expired_pay_time)
- }}内完成支付,超时订单将自动关闭</view
- >
- <view class="u-flex u-font26" v-if="close_mode == 1"
- >原因:主动取消</view
- >
- <view class="u-flex u-font26" v-if="close_mode == 2"
- >原因:商家撤销关闭</view
- >
- <view class="u-flex u-font26" v-if="close_mode == 3"
- >原因:支付过期关闭</view
- >
- </view>
- </view>
- </view>
- <!--等待确认提货-->
- <view class="refund-underway obligation" v-if="payment_status == 3">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">待使用</view>
- <view class="u-flex u-font26" v-if="service_expire_time > 0"
- >您的商品,还剩{{
- $mUtil.patTime(service_expire_time)
- }}过期</view
- >
- </view>
- </view>
- </view>
- <!--交易成功-->
- <!-- <view class="refund-underway" v-if="payment_status==4">
- <view class="u-font28">交易成功</view>
- </view> -->
- <view class="obligation" v-if="payment_status == 4 && !end">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">待评价</view>
- <view class="u-flex u-font26"
- >您的订单已签收,请评价一下商品,剩{{
- $mUtil.patTime(last_comment_time)
- }}自动评价</view
- >
- </view>
- </view>
- </view>
- <!--待评价-->
- <view
- class="refund-underway obligation"
- v-if="payment_status == 4 && end"
- >
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">已完成</view>
- <view class="u-flex u-font26">您的订单已完成,祝你购物愉快</view>
- </view>
- </view>
- </view>
- <view class="refund-underway obligation" v-if="payment_status == 5">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">已完成</view>
- <view class="u-flex u-font26">您的订单已完成,祝你购物愉快</view>
- </view>
- </view>
- </view>
- <view class="refund-underway obligation" v-if="payment_status == -1">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">退款中</view>
- <view class="u-flex u-font26">您的订单在退款中</view>
- </view>
- </view>
- </view>
- <view class="refund-underway obligation" v-if="payment_status == -2">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">退款完成</view>
- <view class="u-flex u-font26"
- >您的订单已完成退款,祝您生活愉快</view
- >
- </view>
- </view>
- </view>
- <view class="refund-underway obligation" v-if="payment_status == -3">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">退款退货维权中</view>
- <view class="u-flex u-font26">您的订单在退款退货维权中</view>
- </view>
- </view>
- </view>
- <view class="refund-underway obligation" v-if="payment_status == -4">
- <view class="u-flex-center u-flex1">
- <image class="timeImg" :src="imgUrl+'/time.png'"></image>
- <view class="u-flex1">
- <view class="u-font32 u-bold">退款退货完成</view>
- <view class="u-flex u-font26"
- >您的订单已完成退款退货完成,祝您生活愉快</view
- >
- </view>
- </view>
- </view>
- </view>
- <view class="u-flex-column-center u-bg-fff" v-if="payment_status == 3">
- <text class="u-font22 u-999 u-mt15">出示数字码向店长核销</text>
- <view class="u-flex-center u-ptb30">
- <text class="u-font40 u-333 u-bold">{{ pickCode }}</text>
- <text class="u-font28 u-666 u-ml20" @click="copy(pickCode)">复制</text>
- </view>
- </view>
- <view v-if="orderListPay.length > 0">
- <view class="pabox" v-for="item in orderListPay" :key="item.id">
- <ldshop
- :shopStatus="shopStatus"
- :value="item.source_shop_name"
- :proxy="item.proxy"
- ></ldshop>
- <view class="u-mt20"></view>
- <view v-for="items in item.child_order_list" :key="items.id">
- <ldgoods :value="items"></ldgoods>
- </view>
- <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
- <view class="u-flex-center-sb u-border-one pt-pb25">
- <view>商品金额</view>
- <view class="u-999 u-font3"
- >¥ {{ item.original_goods_amount }}</view
- >
- </view>
- <view class="u-flex-center-sb u-border-one pt-pb25">
- <view>运费</view>
- <view class="u-999 u-font30">+¥{{ item.real_freight }} </view>
- </view>
- <view
- class="u-flex-center-sb u-border-one pt-pb25"
- v-if="item.first_order_reduced > 0"
- >
- <view>首单优惠 <text class="u-999 u-font24"></text> </view>
- <view class="u-999 u-font30"
- >-¥ {{ item.first_order_reduced }}</view
- >
- </view>
- <view class="u-flex-center-sb u-border-one pt-pb25">
- <view>服务商品优惠</view>
- <!-- {{ item.user_role_name }} -->
- <view class="u-999 u-font30">-¥ {{ item.discount_amount }}</view>
- </view>
- <view
- class="u-flex-center u-border-one pt-pb25"
- style="justify-content: flex-end"
- >
- <view class="">共{{ item.goods_number }}件商品,小计</view>
- <view class="u-bold u-FF0000"
- ><rich-text
- :nodes="$mUtil.priceBigSmall(item.total_amount)"
- ></rich-text
- ></view>
- </view>
- <view class="u-flex-column-start">
- <view style="margin-top: 20rpx;">购买备注</view>
- <view class="boxTextarea">{{
- item.user_remark ? item.user_remark : "无"
- }}</view>
- </view>
- </view>
- </view></view
- >
- <view class="pabox" v-if="orderList.length > 0 && service_card">
- <ldshop :shopStatus="shopStatus" :value="source_shop_name"></ldshop>
- <view class="u-mt20"></view>
- <view v-for="(item, index) in orderList" :key="item.id">
- <ldgoods
- :value="item"
- @parentevaluation="parentevaluation"
- :keys="index"
- ></ldgoods>
- </view>
- <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
- <view class="u-flex-center-sb u-border-one pt-pb25">
- <view>商品金额</view>
- <view class="u-999 u-font3">¥ {{ original_goods_amount }}</view>
- </view>
- <view class="u-flex-center-sb u-border-one pt-pb25">
- <view>运费</view>
- <view class="u-999 u-font30">+¥{{ real_freight }} </view>
- </view>
- <view class="u-flex-center-sb u-border-one pt-pb25">
- <view v-if="marketing_type == 1">秒杀活动折扣</view>
- <view v-else>服务商品优惠</view>
- <view class="u-999 u-font30">-¥ {{ discount_amount }}</view>
- </view>
- <view
- class="u-flex-center-sb u-border-one pt-pb25"
- v-if="first_order_reduced > 0"
- >
- <view>首单优惠 <text class="u-999 u-font24"></text> </view>
- <view class="u-999 u-font30">-¥ {{ first_order_reduced }}</view>
- </view>
- <view
- class="u-flex-center u-border-one pt-pb25"
- style="justify-content: flex-end"
- >
- <view class="">共{{ goodNum }}件商品,小计</view>
- <view class="u-bold u-FF0000"
- ><rich-text :nodes="$mUtil.priceBigSmall(total_amount)"></rich-text
- ></view>
- </view>
- <view class="u-flex-column-start" style="padding-bottom: 20rpx">
- <view style="margin-top: 20rpx;">购买备注</view>
- <view class="boxTextarea">{{
- user_remark ? user_remark : "无"
- }}</view>
- </view>
- </view>
- </view>
- <view class="upb120">
- <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
- <view class="u-flex-center-sb u-plr30 pt-pb25">
- <view>支付金额</view>
- <view class="u-FF0000 u-font32 u-bold"
- ><rich-text :nodes="$mUtil.priceBigSmall(total_amount)"></rich-text
- ></view>
- </view>
- </view>
- <view class="u-font28 u-1A1A1A u-mt30 bg-fff" v-if="service_card">
- <view class="u-plr30 pt-pb25">
- <view class="u-flex-center-sb w100 pt-pb25">套餐内容</view></view
- >
- <view
- class="u-flex-center-sb u-plr30 pt-pb25"
- v-for="item in service_card.service_item_list"
- :key="item.id"
- >
- <view style="flex: 1;padding-right: 20rpx;">{{ item.item_name }}</view>
- <view class="u-999 u-font3"
- >¥ {{ item.item_price }} x {{ item.num }}</view
- >
- </view>
- </view>
- <view class="u-font28 u-1A1A1A u-mt30 bg-fff" v-if="service_card">
- <view class="u-flex-center-sb u-plr30 pt-pb25">
- <view >福利</view>
- <view class="u-999 u-font3" style="flex: 1;margin-left: 20rpx;">{{ service_card.welfare_items }}</view>
- </view>
- <view class="u-flex-center-sb u-plr30 pt-pb25">
- <view>服务次数</view>
- <view class="u-999 u-font3">{{ service_card.service_count }}次</view>
- </view>
- <view class="u-flex-center-sb u-plr30 pt-pb25">
- <view>已使用</view>
- <view class="u-999 u-font3">{{ service_card.use_count }} 次</view>
- </view>
- <view
- class="u-flex-center-sb u-plr30 pt-pb25"
- v-if="service_order_contacts"
- >
- <view>联系人</view>
- <view class="u-999 u-font3"
- >{{ service_order_contacts.contacts }}</view
- >
- </view>
- <view
- class="u-flex-center-sb u-plr30 pt-pb25"
- v-if="service_order_contacts"
- >
- <view>联系电话</view>
- <view class="u-999 u-font3">{{ service_order_contacts.mobile }}</view>
- </view>
- </view>
- <view
- class="u-font28 u-1A1A1A u-mt30 bg-fff"
- @click="goWriteOff"
- >
- <view class="u-flex-center-sb u-plr30 pt-pb25">
- <view>核销记录</view>
- <view class="u-999">查看</view>
- </view>
- </view>
- <view class="u-font28 u-1A1A1A u-mt30 bg-fff">
- <view class="u-plr30">
- <div class="u-border-one u-flex-center-sb pt-pb25">
- <view>订单编号</view>
- <view class="u-999 u-font3">{{ order_code }} </view>
- </div>
- </view>
- <view class="u-plr30 ">
- <div class="u-flex-center-sb u-border-one pt-pb25">
- <view>下单时间</view>
- <view class="u-999">{{ format_order_time }}</view>
- </div>
- </view>
- <view
- class="u-flex-center-sb u-plr30 pt-pb25"
- v-if="payment_status >= 1 || payment_status < 0"
- >
- <div class="u-flex-center-sb w100 u-border-one pt-pb25">
- <view>支付时间</view>
- <view class="u-999">{{ format_pay_time }}</view>
- </div>
- </view>
- <view
- class="u-flex-center-sb u-plr30 pt-pb25"
- v-if="payment_status >= 1 || payment_status < 0"
- >
- <div class="u-flex-center-sb w100 u-border-one pt-pb25">
- <view>支付方式</view>
- <view class="u-999" v-if="pay_mode == 0">余额 </view>
- <view class="u-999" v-if="pay_mode == 1">微信 </view>
- <view class="u-999" v-if="pay_mode == 2">支付宝 </view>
- </div>
- </view>
- <view
- class="u-flex-center-sb u-plr30 pt-pb25"
- v-if="payment_status >= 2 && address"
- >
- <view>配送方式</view>
- <view class="u-999">{{ freighMoney }}</view>
- </view>
- <!-- <view class="u-flex-center-sb u-plr30 pt-pb25" v-if="payment_status>=2">
- <view>发货时间</view>
- <view class="u-999">{{format_last_ship_time}}</view>
- </view> -->
- <!-- <view class="u-flex-center-sb u-plr30 pt-pb25" v-if="payment_status>=4">
- <view>收货时间</view>
- <view class="u-999">{{format_last_receipt_time}}</view>
- </view> -->
- <!-- <view
- class="u-flex-center-sb u-plr30 pt-pb25"
- v-if="payment_status >= 4"
- >
- <view>获得积分</view>
- <view class="u-999">可获得{{ final_give_back_point }}积分</view>
- </view> -->
- </view>
- </view>
- <!--待付款-->
- <view
- class="bg-fff u-mt30 btn u-flex"
- v-if="payment_status == 0 && close_mode == 0 && !end"
- >
- <button class="cancel-btn u-br-999 u-999" @click="cancelOrder">
- 取消订单
- </button>
- <button
- class="pay-btn bg-00321e u-FFF"
- @click="goPay(orderid, total_amount, expired_pay_time)"
- >
- 去付款
- </button>
- </view>
- <!--待使用 已使用-->
- <view
- class="bg-fff u-mt30 u-plr30 ptb22 btn u-flex-column-end"
- v-if="payment_status == 3"
- >
- <view class="u-flex-center u-mr25">
- <button class="u-order-btn u-br-999 u-999" @click="goRefundType(1)">
- 申请售后
- </button>
- <button class="u-order-btn u-br-999 u-999" @click="goPhone(mobile)">
- 联系客服
- </button>
- </view>
- </view>
- <!--弹窗评价-->
- <uniPopup type="bottom" ref="uniPopup">
- <view class="popup">
- <view class="u-flex-sb u-plr30">
- <view class="u-flex">
- <image class="pic" :src="choseGoods.goods_img"></image>
- <view class="u-ml30 wt378">
- <view class="u-1A1A1A u-font28">{{
- choseGoods.goods_title
- }}</view>
- <view class="u-999 u-font22 u-mt10" v-if="choseGoods.sku_set_name"
- >规格:{{ choseGoods.sku_set_name }}</view
- >
- <view class="u-mt10 u-flex-center">
- <view class="u-FF0000 u-font32"
- ><rich-text
- :nodes="$mUtil.priceBigSmall(choseGoods.sale_price)"
- ></rich-text
- ></view>
- <text class="u-ml10 u-999 u-font24"
- >x {{ choseGoods.number }}</text
- >
- </view>
- </view>
- </view>
- <view class="iconfont u-999 closeIcon" @click="close"></view>
- </view>
- <view class="u-bg-fff u-plr30 u-mt5">
- <view class="pt-pb25 u-font28 u-flex-center">
- <text>总体评价:</text>
- <view>
- <text
- v-for="(item, index) in 5"
- :key="index"
- @click="startNum(index)"
- class="iconfont u-font34"
- :class="gradeNum >= item ? 'grade-active' : 'u-B3B3B3'"
- ></text
- >
- </view>
- </view>
- <view class="u-font26">
- <textarea
- class="u-font26"
- @input="textareaInput"
- :value="textareaVal"
- placeholder="请输入文字评价"
- placeholder-class="cccfont"
- ></textarea>
- </view>
- <view class="u-mt25 u-font30">添加图片</view>
- <view class="u-mt25">
- <uploadImg
- imgCount="6"
- :type="upimgtype"
- :imgArr="imgArray"
- url=""
- @result="resultUrl"
- @delImg="delImg"
- ></uploadImg>
- </view>
- <view class="evaluate-submit" @click="submitCom">
- <button class="u-btn-two">确认提交</button>
- </view>
- </view>
- </view>
- </uniPopup>
- <!--页面加载动画-->
- <ldLoading isFullScreen :active="loading"></ldLoading>
- </view>
- </template>
- <script>
- import ldgoods from "../../../components/ld-goods/ld-goods.vue";
- import ldAddress from "../../../components/ld-address/ld-address.vue";
- import ldAddresszt from "../../../components/ld-address/ld-addresszt.vue";
- import uniPopup from "../../../components/uni-popup/uni-popup.vue";
- import uploadImg from "../../../components/uploadImg/imgUpload.vue";
- import ldshop from "../../../components/ld-shop/ld-shop.vue";
- export default {
- components: {
- ldAddress,
- ldAddresszt,
- uniPopup,
- uploadImg,
- ldgoods,
- ldshop,
- },
- data() {
- return {
- upimgtype: "comment",
- final_give_back_point: 0,
- payment_status: null, //0:待付款,1:待发货
- expired_pay_time: null, //订单剩余支付时间
- total_amount: null, //总金额
- orderid: null,
- goods_amount: null, //商品价格
- first_order_reduced: 0, //首单优惠多少
- real_freight: null, //配送费
- discount_amount: null, //商品会员折扣
- pay_mode: null, //(0余额,1微信,2支付宝)
- order_code: null, //订单编号
- format_order_time: null, //下单时间
- format_pay_time: null, //支付时间
- format_last_ship_time: null, //发货时间
- format_last_receipt_time: null, //收货时间
- receipt_expire_time: "", //自提包裹时间
- freighMoney: null, //物流公司
- goodNum: null, //数量
- shipment_mode: 0,
- pickCode: "", //核销码
- original_goods_amount: null, //原价
- total_reduced: null, //vip优惠
- vipcode: "",
- shopStatus: false,
- loading: true,
- config: {
- back: true, //false是tolbar页面 是则不写
- title: '订单详情',
- color: '#1A1A1A',
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, "#FFFFFF"],
- statusBarFontColor: '#1A1A1A'
- },
- isSubmit: false,
- index: 0,
- mobile: "",
- end: false,
- logImg: "", //物流图片
- address: null,
- addresszt: null,
- last_ship_time: 0, //发货时间
- last_receipt_time: 0, //收货时间
- orderList: [],
- orderListPay: [],
- source_shop_name: "",
- user_remark: "", //备注
- payStatus: "",
- goodsid: null, //评价商品的id
- choseGoods: {},
- textareaVal: "",
- upimg: [],
- imgArray: [],
- gradeNum: 0,
- close_mode: 0, //0未关闭,1用户撤销关闭,2商家撤销关闭,3支付过期关闭,4退货成功,5退款成功,6支付成功,但条件已经不允许购买,发生自动退款关闭,7自提过期
- marketing_type: null, //折扣类型
- service_card: null, //服务卡
- service_expire_time: null,
- service_order_contacts: null,
- imgUrl: this.$mConfig.staticUrl
- };
- },
- onLoad(options) {
- if (options.id) {
- this.orderid = options.id;
- this.payStatus = options.status;
- if (options.status == "pay") {
- this.orderDetail(options.id);
- }
- if (options.status == "waitpay") {
- this.orderDetailPay(options.id);
- }
- }
- //
- },
- methods: {
- goWriteOff() {
- uni.navigateTo({
- url: "./log?id=" + this.orderid + "&childId=" + this.orderList[0].id,
- });
- },
- //复制
- copy(code) {
- uni.setClipboardData({
- data: code,
- success: () => {
- uni.showToast({
- title: "复制成功",
- });
- },
- });
- },
- goPhone(phone) {
- if (phone) {
- uni.makePhoneCall({
- phoneNumber: phone, //仅为示例
- });
- }
- },
- restCom() {
- this.textareaVal = "";
- this.gradeNum = 0;
- },
- //提交评价
- submitCom() {
- if (this.gradeNum == 0) {
- this.$mUtil.toast("请评价星星");
- } else if (this.textareaVal == "") {
- this.$mUtil.toast("请输入文字评价");
- } else {
- let imgs = "";
- if (this.upimg.length > 0) {
- imgs = this.upimg.join(",");
- } else {
- imgs = "";
- }
- let data = {
- chlid_order_id: this.goodsid,
- order_id: this.orderid,
- level: this.gradeNum,
- content: this.textareaVal,
- img: imgs,
- };
- this.$http
- .post("/comment/orderGoods/saveservicegoods", data)
- .then((res) => {
- if (res && res.code == 200) {
- this.$mUtil.toast("评价成功");
- this.$refs.uniPopup.close();
- setTimeout(() => {
- uni.reLaunch({
- url: "/pages/order/orderList/serviceOrder",
- });
- }, 1000);
- }
- });
- }
- },
- textareaInput(e) {
- this.textareaVal = e.detail.value;
- },
- resultUrl(e) {
- if (e) {
- this.upimg = e;
- }
- },
- delImg(e) {
- if (e) {
- this.upimg = e;
- }
- },
- startNum(index) {
- this.gradeNum = index * 1 + 1;
- },
- //评价
- parentevaluation(data) {
- this.choseGoods = this.orderList[data.keys];
- this.goodsid = data.id;
- this.$refs.uniPopup.open();
- },
- //确认收货
- sureGetOrder() {
- uni.showModal({
- title: "提示",
- content: "确定已经收到了该商品?",
- success: (res) => {
- if (res.confirm) {
- this.$http
- .post("/order/receipt", { order_id: this.orderid })
- .then((res) => {
- if (res && res.code == 200) {
- this.$mUtil.toast("收货成功");
- setTimeout(() => {
- uni.reLaunch({
- url: "/pages/order/orderList/orderList",
- });
- }, 1000);
- }
- });
- } else if (res.cancel) {
- }
- },
- });
- },
- //选完地址回选
- otherFun(object) {
- if (!!object) {
- console.log(object.addressid);
- this.$http
- .put("/order/update-receipt/" + this.orderid + "/" + object.addressid)
- .then((res) => {
- if (res && res.code == 200) {
- this.$mUtil.toast("修改成功");
- this.orderDetail(this.orderid);
- }
- });
- }
- },
- //取消订单
- cancelOrder() {
- uni.showModal({
- title: "提示",
- content: "确定取消该订单吗?",
- success: (res) => {
- if (res.confirm) {
- this.$http.post("/order/cancel-pay/" + this.orderid).then((res) => {
- if (res && res.code == 200) {
- this.$mUtil.toast("取消成功");
- setTimeout(() => {
- uni.reLaunch({
- url: "/pages/order/orderList/orderList",
- });
- }, 1000);
- }
- });
- } else if (res.cancel) {
- }
- },
- });
- },
- orderDetail(id) {
- this.$http.get("/order/info/" + id).then((res) => {
- this.loading = false;
- if (res && res.code == 200) {
- let target = res.data;
- this.mobile = target.shop.customer_service_phone;
- this.final_give_back_point = target.final_give_back_point;
- this.address = target.receipt;
- this.addresszt = target.shop;
- this.orderList = target.child_order_list;
- this.source_shop_name = target.source_shop_name;
- this.user_remark = target.user_remark;
- this.total_amount = target.total_amount;
- this.vipcode = target.user_role_name; //vipcode
- this.goods_amount = target.goods_amount; //商品价格
- this.original_goods_amount = target.original_goods_amount; //商品原价价格
- this.total_reduced = target.total_reduced; //vip优惠
- this.first_order_reduced = target.first_order_reduced; //首单优惠多少
- this.real_freight = target.real_freight; //配送费
- this.discount_amount = target.discount_amount; //商品会员折扣
- this.pay_mode = target.pay_mode; //(0余额,1微信,2支付宝)
- this.order_code = target.order_code; //订单编号
- this.format_order_time = target.format_order_time; //下单时间
- this.format_pay_time = target.format_pay_time; //支付时间
- this.format_last_ship_time = target.format_last_ship_time; //发货时间
- this.format_last_receipt_time = target.format_last_receipt_time; //收货时间
- this.last_ship_time = target.last_ship_time; //发货时间
- this.last_receipt_time = target.last_receipt_time; //收货时间
- this.goodNum = target.goods_number; //数量
- this.logImg = target.child_order_list[0].goods_img;
- this.last_comment_time = target.child_order_list[0].last_comment_time; //评价时间
- this.shipment_mode = target.shipment_mode;
- this.end = target.end;
- this.marketing_type = target.marketing_type;
- if (target.child_order_list[0].service_card.verification_code) {
- this.service_expire_time =
- target.child_order_list[0].service_card.expired_use_time;
-
-
- this.pickCode =
- target.child_order_list[0].service_card.verification_code;
- this.service_card = target.child_order_list[0].service_card;
- this.service_order_contacts = target.service_order_contacts;
- }
- if (target.order_package) {
- this.receipt_expire_time = target.order_package.receipt_expire_time;
- if (target.order_package.express) {
- this.freighMoney = target.order_package.express.express_name; //物流公司
- }
- }
- if (target.rights_type == 0 && target.rights_status == 0) {
- if (target.use_status == 0 || target.use_status) {
- //待使用 部分使用
- this.payment_status = 3;
- }
- if (target.transaction_status == 5 && target.comment_status == 0) {
- //交易完成未评价
- this.payment_status = 4;
- this.service_card = target.child_order_list[0].service_card;
- }
- if (target.transaction_status == 5 && target.end) {
- //交易完成已评价
- this.payment_status = 5;
- this.service_card = target.child_order_list[0].service_card;
- }
- }
- if (target.transaction_status == 6) {
- //关闭
- this.payment_status = 6;
- }
- //rights_type:0没有,1仅退款,2退款退货,rights_status:(0没有,1维权中,2完成)
- if (target.rights_type == 1 && target.rights_status == 1) {
- //退款维权中
- this.payment_status = -1;
- }
- if (target.rights_type == 1 && target.rights_status == 2) {
- //退款完成
- this.payment_status = -2;
- }
- if (target.rights_type == 2 && target.rights_status == 1) {
- //退款退货维权中
- this.payment_status = -3;
- }
- if (target.rights_type == 2 && target.rights_status == 2) {
- //退款退货完成
- this.payment_status = -4;
- }
- }
- });
- },
- orderDetailPay(id) {
- this.$http.get("/pay/order/sale-detail/" + id).then((res) => {
- this.loading = false;
- if (res && res.code == 200) {
- let target = res.page.order_list[0];
- this.address = res.page.receipt;
- this.addresszt = res.page.self_take_shop;
- this.orderListPay = res.page.order_list;
- if (res.page.pay_order.payment_status != 5) {
- this.payment_status = 0;
- } else {
- this.payment_status = res.page.pay_order.payment_status;
- }
- this.expired_pay_time = res.page.pay_order.expired_pay_time;
- this.total_amount = res.page.pay_order.total_amount;
- this.close_mode = res.page.pay_order.close_mode;
- this.user_remark = target.user_remark;
- // this.goods_amount=target.goods_amount//商品价格
- // this.first_order_reduced=target.first_order_reduced//首单优惠多少
- // this.real_freight=target.real_freight//配送费
- this.pay_mode = target.pay_mode; //(0余额,1微信,2支付宝)
- this.order_code = target.order_code; //订单编号
- this.format_order_time = target.format_order_time; //下单时间
- this.format_pay_time = target.format_pay_time; //支付时间
- this.format_last_ship_time = target.format_last_ship_time; //发货时间
- this.format_last_receipt_time = target.format_last_receipt_time; //收货时间
- }
- });
- },
- close() {
- this.$refs.uniPopup.close();
- this.restCom();
- },
- //支付页
- goPay(id, total_amount, expired_pay_time) {
- uni.navigateTo({
- url:
- "../../order/pay?id=" +
- id +
- "&total_amount=" +
- total_amount +
- "&expired_pay_time=" +
- expired_pay_time +
- "&type=service",
- });
- },
- //申请售后
- goRefundType(i) {
- //i:1未发货,退款,2收到货退款/退货
- uni.setStorageSync("blackgoodsList", this.orderList);
- if (i == 1) {
- uni.navigateTo({
- url:
- "applicationDrawback?keystatus=" +
- i +
- "&title=申请退款" +
- "&orderid=" +
- this.orderid+"&type=service",
- });
- } else {
- uni.navigateTo({
- url:
- "refundType?order_code=" +
- this.order_code +
- "&format_order_time=" +
- this.format_order_time +
- "&keystatus=" +
- i +
- "&orderid=" +
- this.orderid,
- });
- }
- },
- //查看物流
- goLogistics() {
- uni.navigateTo({
- url:
- "../logistics?id=" +
- this.orderid +
- "&num=" +
- this.goodNum +
- "&img=" +
- this.logImg +
- "&type=1",
- });
- },
- //填写物流信息
- logisticsOpen() {
- this.$refs.logisticsOpen.open();
- },
- //选择快递
- deliveryPicker(e) {
- this.index = e.target.value;
- },
- //提交表单物流信息
- logisticsSubmit(e) {
- let target = e.detail.value;
- console.log(target);
- if (!target.deliveryOdd) {
- this.$mUtil.toast("请输入快递单号");
- return false;
- }
- },
- },
- };
- </script>
- <style lang="scss">
- page {
- background-color: #f5f5f5;
- }
- .cccfont {
- font-size: 26rpx;
- color: #eee;
- }
- .grade-active {
- color: #ff5112;
- }
- .u-B3B3B3 {
- color: #b3b3b3;
- }
- .user_remark {
- background-color: #fff;
- padding: 30rpx;
- border-top: 1px solid #eee;
- }
- .boxTextarea {
- width: 686rpx;
- border: 1px solid #ededed;
- border-radius: 20rpx;
- background-color: #fafafa;
- padding: 20rpx;
- box-sizing: border-box;
- margin-top: 20rpx;
- }
- .pabox {
- background-color: #fff;
- padding: 0 30rpx 0;
- // margin-top: 30rpx;
- }
- .upb120 {
- padding-bottom: 140rpx;
- }
- .bg-fff {
- background-color: #ffffff;
- }
- .ptb22 {
- padding-top: 22rpx;
- padding-bottom: 22rpx;
- }
- .pt-pb25 {
- // padding-top: 25rpx;
- // padding-bottom: 25rpx;
- height: 90rpx;
- }
- .pt28-pb24 {
- padding-top: 28rpx;
- padding-bottom: 24rpx;
- }
- .iconfont58 {
- font-size: 58rpx;
- }
- .mt44 {
- margin-top: 44rpx;
- }
- .ml38 {
- margin-left: 38rpx;
- }
- .ml82 {
- margin-left: 82rpx;
- }
- .wt378 {
- width: 378rpx;
- }
- .wt504 {
- width: 504rpx;
- }
- .u-br-999 {
- border: 1px solid #999999;
- }
- .u-br-f00 {
- border: 1px solid #ff0000;
- }
- .bg-00321e {
- background: #0B844A;
- }
- .account-paid {
- padding: 44rpx 0rpx;
- }
- .account-paid image {
- width: 202rpx;
- height: 124rpx;
- }
- .btn {
- width: 100%;
- position: fixed;
- bottom: 0rpx;
- padding: 22rpx 0rpx;
- }
- .cancel-btn {
- margin-left: auto;
- }
- .cancel-btn,
- .pay-btn {
- width: 202rpx;
- height: 70rpx;
- line-height: 70rpx;
- border-radius: 35px;
- font-size: 28rpx;
- margin-right: 30rpx;
- }
- .top-state {
- background-color: #d9f9dd;
- color: #139145;
- padding: 35rpx 30rpx;
- // 待支付
- .obligation {
- display: flex;
- justify-content: space-between;
- .timeImg {
- display: none;
- width: 70rpx;
- height: 54rpx;
- margin-right: 40rpx;
- }
- }
- }
- .address {
- background-color: #ffffff;
- padding-top: 72rpx;
- .linkman {
- padding-bottom: 34rpx;
- }
- .remark {
- padding: 35rpx 0rpx 35rpx 50rpx;
- }
- }
- //弹窗填写物流信息
- .logisticsPopup {
- background-color: #ffffff;
- width: 100%;
- border-radius: 20rpx;
- .pd {
- padding: 15rpx 98rpx 68rpx;
- }
- input {
- height: 70rpx;
- line-height: 70rpx;
- border: 1rpx solid #cccccc;
- border-radius: 15rpx;
- padding-left: 8rpx;
- color: #999999;
- }
- .icon {
- margin-top: -65rpx;
- }
- .pl-pr {
- padding-left: 74rpx;
- }
- button {
- margin-top: 66rpx;
- background-color: #01331f;
- width: 345rpx;
- }
- }
- // 弹窗评价
- .popup {
- background-color: #f5f5f5;
- width: 100%;
- border-radius: 18rpx 18rpx 0px 0px;
- }
- .u-flex-sb {
- display: flex;
- justify-content: space-between;
- padding-top: 30rpx;
- padding-bottom: 30rpx;
- background-color: #ffffff;
- border-radius: 18rpx 18rpx 0px 0px;
- .pic {
- width: 155rpx;
- height: 155rpx;
- border-radius: 15rpx;
- }
- }
- textarea {
- width: 100%;
- height: 210rpx;
- opacity: 0.66;
- border: 1rpx solid #e6e6e6;
- border-radius: 8rpx;
- padding-left: 22rpx;
- padding-top: 14rpx;
- box-sizing: border-box;
- }
- .evaluate-submit {
- margin-top: 58rpx;
- padding-bottom: 25rpx;
- }
- .evaluate-submit button {
- background-color: #0B844A;
- color: #ffffff;
- }
- .w100 {
- width: 100%;
- }
- </style>
|