123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323 |
- <template>
- <view class="container">
- <view class="order-status">
- {{info.order_status==0?'待支付': info.order_status==1?'待配送' :info.order_status==2?'配送中':
- info.order_status==3?'已完成':info.order_status==4?'已取消':info.order_status==5?'已退款':
- info.order_status==6?'部分退款':info.order_status==7?'待自提':''}}
- <!-- {{info.is_pay == 1?info.cancel_status==2?'已退款':'已支付':'待支付'}} -->
- </view>
- <view class="page-block" v-if="info.state == 2 && info.is_pay == 1 &&info.cancel_status!=2">
- <view class="page-title-block">
- <view class="title">配送信息</view>
- </view>
- <view class="content">
- <view class="cell flex" v-if="info.is_send==0&&info.is_pay == 1">
- <view class="title-block required">
- <text>配送状态:</text>
- </view>
- <view class="desc flex-y-center box-pack-between">
- <text></text>
- <view class="info text-r flex-y-center" @click="bindSend('center')">
- {{info.is_send==1?'已配送':'点击开始配送'}}
- <view :class="info.is_send==0?'arr-r':''"></view>
- </view>
- </view>
- </view>
- <block v-if="info.is_send==1 && info.is_dd==2">
- <view class="cell flex flex-y-center" @click="bindOpen('bottom')">
- <view class="title-block required">
- <text>配送状态:</text>
- </view>
- <view class="desc arr-r flex-y-center">
- <view class="info" style="color: red;">{{juheInfo.statusMsg}}</view>
- </view>
- </view>
- </block>
- <block v-if="info.is_send==1 && info.is_dd==1">
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>配送状态:</text>
- </view>
- <view class="desc">
- <view class="info" style="color: red;">{{obj.statusMsg}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="obj.transporterName">
- <view class="title-block required">
- <text>骑手名字:</text>
- </view>
- <view class="desc">
- <view class="info ">{{obj.transporterName}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="obj.transporterPhone">
- <view class="title-block required">
- <text>联系方式:</text>
- </view>
- <view class="desc flex-y-center" @click="makePhoneCall(obj.transporterPhone)">
- <view class="info flex-y-center">
- <image src="../static/images/tel.png"></image> <text>{{obj.transporterPhone}}</text>
- </view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="obj.transporterPhone">
- <view class="title-block required">
- <text>接单时间:</text>
- </view>
- <view class="desc">
- <view class="info">{{obj.acceptTime}}</view>
- </view>
- </view>
- </block>
- </view>
- </view>
- <view class="page-block">
- <view class="page-title-block">
- <view class="title">订单信息</view>
- </view>
- <view class="content">
- <view class="cell flex flex-y-center" v-if="info.state == 1">
- <view class="title-block required">
- <text>取单号:</text>
- </view>
- <view class="desc">
- <view class="flex flex-y-center">
- <view class="info">{{info.number||info.id}}</view>
- <view class="qc-btn" @click="onQucan" v-if="info.no_meal == 1">
- {{info.no_meal == 1?'请取餐':'再次通知取餐'}}
- </view>
- </view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>总金额:</text>
- </view>
- <view class="desc">
- <view class="info" style="color:#FEAF44">¥{{info.total_price}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="Number(info.member_discount)>0">
- <view class="title-block required">
- <text>会员折扣:</text>
- </view>
- <view class="desc">
- <view class="info" style="color:#FEAF44">{{info.discount}}折 | -¥{{info.member_discount}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.coupon_content">
- <view class="title-block required">
- <text>优惠劵:</text>
- </view>
- <view class="desc">
- <view class="coupon-name">支付宝官方券</view>
- <view class="info" style="color:#FEAF44">扫码点餐立减券 -¥{{info.coupon_price}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.coupon_id">
- <view class="title-block required">
- <text>优惠劵:</text>
- </view>
- <view class="desc">
- <view class="coupon-name">平台券</view>
- <view class="info" style="color:#FEAF44">-¥{{info.coupon_price}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>支付金额:</text>
- </view>
- <view class="desc">
- <view class="info" style="color:#FEAF44">¥{{info.pay_price}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="Number(info.delivery_price)>0">
- <view class="title-block required">
- <text>平台配送费:</text>
- </view>
- <view class="desc">
- <view class="info" style="color:#FEAF44">¥{{info.delivery_price}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="Number(info.refund_price)>0">
- <view class="title-block required">
- <text>退款金额:</text>
- </view>
- <view class="desc">
- <view class="info" style="color:#FEAF44">¥{{info.refund_price}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.remark">
- <view class="title-block required">
- <text>订单备注:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.remark}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.content&&info.is_pay == 2">
- <view class="title-block required">
- <text>金额备注:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.content}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.is_pay">
- <view class="title-block required">
- <text>支付方式:</text>
- </view>
- <view class="desc flex flex-y-center">
- <image
- :src="info.pay_type == 1?'../../static/images/wx.png':info.pay_type == 2?'../../static/images/ali.png':'../static/images/yu.png'"
- mode="aspectFit" class="pay-type-icon"></image>
- <view class="info">{{info.pay_type == 1?'微信支付': info.pay_type == 2?'支付宝支付':'余额支付'}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>订单编号:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.order_no}} <text @click="copy(info.order_no)"
- style="color:#00BFFF;margin-left: 20rpx;"> 复制</text></view>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.check">
- <view class="title-block required">
- <text>交易单号:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.check}}</view>
- <text @click="copy(info.check)" style="color:#00BFFF;margin-left: 20rpx;"> 复制</text>
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.is_pay">
- <view class="title-block required">
- <text>支付时间:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.pay_time}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>购买门店:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.store_name}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>下单方式:</text>
- </view>
- <view class="desc">
- <view class="info" v-if="info.state==1">堂食</view>
- <view class="info" v-else-if="info.state == 2">外卖</view>
- <view class="info" v-else-if="info.state == 3">自提</view>
- <view class="info" v-else>快速收款</view>
- </view>
- <view class="zt-btn" v-if="info.order_status == 7 && info.state ==3 " @click="confirmZiti">
- 确认自提
- </view>
- </view>
- <view class="cell flex flex-y-center" v-if="info.table_name">
- <view class="title-block required">
- <text>位置号:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.table_name}}</view>
- </view>
- </view>
- <block v-if="info.state == 3">
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>自提人:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.name}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>联系电话:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.mobile}}</view>
- </view>
- </view>
- </block>
- <block v-if="info.state == 2">
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>收货人:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.name||''}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>收货地址:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.address||''}}</view>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>联系电话:</text>
- </view>
- <view class="desc">
- <view class="info">{{info.mobile||''}}</view>
- </view>
- </view>
- </block>
- </view>
- <view class="content" v-if="is_stup_price&&info.is_pay == 0">
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>修改后的金额:</text>
- </view>
- <view class="desc" style="border: 1rpx solid #f1f1f1; padding: 20rpx 10rpx;">
- <input class="info" @input="getPrice" type="digit" placeholder="请输入修改金额"></input>
- </view>
- </view>
- <view class="cell flex flex-y-center">
- <view class="title-block required">
- <text>备注:</text>
- </view>
- <view class="desc" style="border: 1rpx solid #f1f1f1; padding: 20rpx 10rpx;">
- <input class="info" @input="getContent" placeholder="请输入备注"></input>
- </view>
- </view>
- </view>
- </view>
- <view class="page-block" v-if="info.type!= 3">
- <view class="page-title-block">
- <view class="title">商品信息</view>
- </view>
- <view class="content">
- <view class="goods flex box-pack-between" v-for="(item,index) in goods_list" :key="index">
- <view class="flex">
- <image class="goods_list-img" :src="URL+item.spec_image"></image>
- <view class="name">
- <text> {{item.name}}</text>
- <view class="">
- ×{{item.num}}
- </view>
- </view>
- </view>
- <view class="">
- <view class="price">
- ¥{{item.unit_price}}
- </view>
- <view class="ft26 text-r">
- {{item.is_refund==1?'已退款':''}}
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="btm-btn-block-content">
- <view class="box-pack-between btm-btn-block">
- <view class="btn btn12" v-if="info.is_pay == 1 &&info.cancel_status==3">
- 已驳回退款
- </view>
- <view class="btn btn12" :style="info.cancel_status==2?'width: 325rpx':''"
- v-if="info.is_pay == 1&&info.cancel_status==2">
- 已退款
- </view>
- <view class="btn btn11" @click="bindRefund"
- v-if="info.is_pay == 1 && info.cancel_status!=2&&info.cancel_status!=3">
- 退款
- </view>
- <view class="btn btn11" v-if="info.is_pay == 1&&info.cancel_status!=2"
- @click="bindPartRefund('center')">
- 部分退款
- </view>
- <view class="btn btn11" :style="info.cancel_status==2?'width: 325rpx':''" @click="bindPrinter"
- v-if="info.is_pay == 1">
- 打印小票
- </view>
- </view>
- <view class="box-pack-between btm-btn-block">
- <view class="btn btn11" :style="info.cancel_status==2?'width: 325rpx':''" @click="bindCancal"
- v-if="info.order_status==2">
- 取消配送
- </view>
- <view class="btn btn11" :style="info.cancel_status==2?'width: 325rpx':''" @click="bindShop"
- v-if="info.order_status==2">
- 改换商家配送
- </view>
- </view>
- <view class="btm-btn-block flex-center">
- <view class="btn btn11" style="width: 325rpx;" v-if="info.is_pay == 0" @click="bindStupPrice">
- {{is_stup_price?'确定修改金额':'修改订单金额'}}
- </view>
- <view class="btn btn11" style="width: 325rpx;margin-left:20rpx;"
- v-if="info.is_pay == 0 && info.state == 4" @click="getPayStatus">
- 查询支付结果
- </view>
- </view>
- </view>
- <!-- 纵向排列 -->
- <uni-popup ref="popup" :type="type">
- <view class="model-content" v-if="type=='bottom'">
- <view class="flex-y-center model-content-title box-pack-between">
- <text style="width: 50rpx;"></text>
- 订单跟踪
- <text @click="onClose" class="iconfont iconquchu"></text>
- </view>
- <scroll-view scroll-y="true" style="height: 700rpx;">
- <uni-steps :options="options" :active-color="setColor" direction="column"
- :active="Number(options.length)"></uni-steps>
- </scroll-view>
- </view>
- <view class="model-content-center" v-if="type=='center'">
- <block v-if="isRefund">
- <form @submit="onSubmit">
- <view class="model-refund-title">
- 部分退款
- </view>
- <view class="content">
- <view style="padding-left: 20rpx;">
- <view class="flex-y-center amount-text">
- 总金额:¥{{info.total_price}}
- </view>
- <view class="flex-y-center amount-text">
- 支付金额:¥{{info.pay_price}}
- </view>
- </view>
- <scroll-view scroll-y="true" style="height: 500rpx;">
- <view class="goods flex-y-center " v-for="(item,index) of refundGoods" :key="index">
- <view class="round" :data-i="item.checked" @click="bindRefundGoods(index)"
- v-if="is_refund">
- <view v-if="item.checked">
- <icon type="success_no_circle" size="16" />
- </view>
- </view>
- <view class="box-pack-between flex-grow-1">
- <view class="flex">
- <image class="goods_list-img" :src="URL+item.spec_image"></image>
- <view class="name">
- <text> {{item.name}}</text>
- <view>
- ×{{item.num}}
- </view>
- </view>
- </view>
- <view class="price">¥{{item.unit_price}}</view>
- </view>
- </view>
- </scroll-view>
- <view style="padding-left: 20rpx;">
- <view class="flex-y-center amount-text">
- 已退金额:¥{{info.refund_price}}
- </view>
- <view class="flex-y-center amount-refund amount-text">
- 退款金额: ¥
- <view class="amount-input">
- <input type="digit" name="refund_price" v-model="amountMoney"
- placeholder="请输入退款金额" />
- </view>
- </view>
- </view>
- </view>
- <view class="flex-y-center model-refund-btn">
- <view class="flex-grow-1 flex-center cancel" @click="cancel">
- 取消
- </view>
- <button hover-class="none" form-type="submit" class="flex-grow-1 flex-center submit">
- 确认退款
- </button>
- </view>
- </form>
- </block>
- <block v-if="isPeiSong">
- <view class="model-refund-title">
- 配送模式
- </view>
- <view class="flex" style="height: 250rpx;">
- <view class="flex-grow-1">
- <view class="model-content-peiSong" :class="peiType==item.type?'act':''"
- @click="bindPei(item.type)" v-for="(item,index) of peiArr" :key='index'>
- {{item.title}}
- </view>
- </view>
- <view v-if="peiType==3" class="flex-grow-1" style="border-left: 1px solid #F1F1F1;">
- <scroll-view scroll-y="true" style="height: 250rpx;">
- <view class="flex-center pd10 ft28" :class="logisticType==item.logistic?'act':''"
- v-for="(item,index) of peiDl" :key='index' @click="bindPeiTwp(item.logistic)">
- {{item.name}}
- </view>
- </scroll-view>
- </view>
- </view>
- <view class="flex-y-center model-refund-btn">
- <view class="flex-grow-1 flex-center cancel" @click="cancel">
- 取消
- </view>
- <button hover-class="none" @click="bindPeiCofig" class="flex-grow-1 flex-center submit">
- 立即配送
- </button>
- </view>
- </block>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- URL: getApp().globalData.URL,
- id: "",
- info: {},
- goods_list: [],
- obj: {},
- is_stup_price: false,
- juheInfo: {},
- options: [],
- setColor: '#007AFF',
- type: 'center',
- refundGoods: [],
- is_refund: true,
- amountMoney: 0,
- ids: [],
- isRefund: false,
- isPeiSong: false,
- peiArr: [{
- title: "省钱",
- type: 1,
- }, {
- title: "最快",
- type: 2,
- }, {
- title: "指派",
- type: 3,
- }, {
- title: "价格从低到高依次呼叫",
- type: 4,
- }, ],
- peiDl: [{
- name: "美团",
- logistic: "mtps",
- },
- {
- name: "蜂鸟",
- logistic: "fengniao",
- },
- {
- name: "达达",
- logistic: "dada",
- },
- {
- name: "顺丰",
- logistic: "shunfeng",
- },
- {
- name: "闪送",
- logistic: "bingex",
- },
- {
- name: "UU跑腿",
- logistic: "uupt",
- }, {
- name: "点我达",
- logistic: "dianwoda",
- },
- {
- name: "爱跑腿",
- logistic: "aipaotui",
- },
- {
- name: "曹操",
- logistic: "caocao",
- },
- {
- name: "帮啦",
- logistic: "bangla",
- },
- ],
- peiType: null,
- logisticType: null,
- ps_mode: null
- }
- },
- onLoad(options) {
- this.id = options.id;
- this.getData()
- this.peisongset_list();
- },
- methods: {
- //刷新支付结果(扫码收款订单)
- getPayStatus() {
- this.request({
- url: 'smdcshop/searchWxOrder',
- data: {
- order_id: this.info.id
- }
- }).then(res => {
- if (res.code == "200") {
- uni.showModal({
- content: res.message,
- showCancel: false,
- success: r => {
- this.getData();
- }
- })
- }
- })
- },
- confirmZiti() {
- uni.showModal({
- title: '提示',
- content: '确定是否自提?',
- showCancel: true,
- cancelText: '取消',
- confirmText: '确认',
- success: res => {
- if (res.confirm) {
- this.request({
- url: 'Smdcshop/complete_ziti',
- data: {
- order_id: this.info.id
- }
- }).then(res => {
- if (res.code == "200") {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- setTimeout(() => {
- this.getData();
- }, 2000)
- }
- })
- }
- }
- })
- },
- peisongset_list() {
- this.request({
- url: 'Smdcshop/peisongset_list',
- data: {
- store_id: uni.getStorageSync("store_id")
- }
- }).then(res => {
- if (res.code == "200") {
- this.ps_mode = res.data.ps_mode;
- }
- })
- },
- cancel() {
- this.$refs.popup.close();
- },
- bindPartRefund(type) {
- this.type = type;
- this.isRefund = true;
- this.isPeiSong = false;
- this.$refs.popup.open();
- },
- bindOpen(type) {
- this.type = type;
- this.$refs.popup.open();
- },
- onClose() {
- this.$refs.popup.close();
- },
- bindPei(e) {
- this.peiType = e;
- },
- bindPeiTwp(e) {
- this.logisticType = e;
- },
- onSubmit(e) {
- let ids = '';
- if (this.ids.length > 0) {
- ids = this.ids.join(",");
- }
- this.request({
- url: 'Smdcshop/partRefund',
- data: {
- id: this.info.id,
- ids: ids,
- refund_price: e.detail.value.refund_price,
- admin_id: uni.getStorageSync("admin_id"),
- }
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- setTimeout(() => {
- this.getData();
- this.$refs.popup.close();
- }, 1000)
- })
- },
- bindRefundGoods(index) {
- let num = 0,
- arr = [];
- this.is_refund = false;
- this.refundGoods[index].checked = !this.refundGoods[index].checked;
- for (let i of this.refundGoods) {
- if (i.checked) {
- num += Number(i.unit_price);
- arr.push(i.id)
- }
- }
- this.amountMoney = num;
- this.ids = arr;
- this.is_refund = true;
- },
- getData() {
- this.request({
- url: 'Smdcshop/orderinfo',
- data: {
- id: this.id
- }
- }).then(res => {
- let info = res.data.info
- if(info.coupon_content){
- info.coupon_content = JSON.parse(info.coupon_content)
- }
- this.info = info;
- if (res.data.goods_list) {
- this.goods_list = res.data.goods_list;
- for (let i of res.data.goods_list) {
- i.checked = false
- }
- this.refundGoods = res.data.goods_list;
- }
- if (res.data.info.is_dd == 1 && res.data.info.is_send == 1) {
- this.GetDadaInfo(res.data.info.id);
- }
- if (res.data.info.is_dd == 2 && res.data.info.is_send == 1) {
- this.juheInfo = res.data.juhe_list[0];
- // console.log(res.data.juhe_list,"res.data.juhe_list")
- let options = [];
- for (let i of res.data.juhe_list) {
- options.push({
- title: i.statusMsg,
- logistic: i.logistic,
- desc: i.ctime,
- content: i.content,
- })
- }
- this.options = options
- }
- })
- },
- // - 如果 is_send=1并且is_dd=1 就是达达配送 请求达达接口
- // 如果 is_send=1并且is_dd=2 就是商家配送 不需要请求达达接口
- // 如果 is_send=0 就是还没配送
- GetDadaInfo(id) {
- this.request({
- url: 'Smdcshop/GetDadaInfo',
- data: {
- id: id
- }
- }).then(res => {
- this.obj = res.data;
- })
- },
- bindRefund(e) {
- uni.showModal({
- title: '提示',
- content: '是否同意退款?',
- showCancel: true,
- cancelText: '拒绝',
- confirmText: '同意',
- success: res => {
- let is_cancel = res.confirm ? 1 : 2;
- this.request({
- url: 'Smdcshop/cancel',
- data: {
- admin_id: uni.getStorageSync("admin_id"),
- id: this.info.id,
- is_cancel: is_cancel
- }
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- setTimeout(() => {
- this.getData();
- }, 1000)
- })
- },
- fail: () => {},
- complete: () => {}
- });
- },
- bindPrinter(e) {
- this.request({
- url: 'Smdcshop/dyorder',
- data: {
- id: this.info.id
- }
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- })
- },
- bindCancal(e) {
- uni.showModal({
- title: '提示',
- content: '是否取消配送?',
- showCancel: true,
- cancelText: '取消',
- confirmText: '确定',
- success: res => {
- if(res.confirm){
- this.request({
- url: 'Smdcshop/cancel_peisong',
- data: {
- id: this.info.id
- }
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- setTimeout(() => {
- this.getData();
- }, 2000)
- })
- }
-
- }
- })
- },
- bindShop(e) {
- uni.showModal({
- title: '提示',
- content: '是否更换为商家配送?',
- showCancel: true,
- cancelText: '取消',
- confirmText: '确定',
- success: res => {
- if(res.confirm){
- this.request({
- url: 'Smdcshop/shangjiapeisong',
- data: {
- id: this.info.id
- }
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- setTimeout(() => {
- this.getData();
- }, 2000)
- })
- }
- }
- })
- },
- bindPeiCofig() {
- this.request({
- url: 'Smdcshop/peisong',
- data: {
- id: this.info.id,
- admin_id: uni.getStorageSync("admin_id"),
- dispatch_mode: this.peiType,
- logistic: this.peiType == 3 ? this.logisticType : '',
- },
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- setTimeout(() => {
- this.getData();
- this.$refs.popup.close();
- }, 2000)
- })
- },
- bindSend(type) {
- if (this.ps_mode == 3) {
- this.type = type;
- this.isRefund = false;
- this.isPeiSong = true;
- this.$refs.popup.open();
- return
- }
- uni.showModal({
- title: '提示',
- content: '确定进行配送吗?',
- showCancel: true,
- cancelText: '取消',
- confirmText: '配送',
- success: res => {
- if (res.confirm) {
- this.request({
- url: 'Smdcshop/peisong',
- data: {
- id: this.info.id,
- admin_id: uni.getStorageSync("admin_id"),
- },
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- setTimeout(() => {
- this.getData();
- }, 2000)
- })
- }
- },
- fail: () => {},
- complete: () => {}
- });
- },
- bindStupPrice(e) {
- if (this.is_stup_price) {
- if (!this.pay_price) {
- uni.showToast({
- title: "请输入修改价格",
- icon: 'none'
- })
- return
- }
- this.request({
- url: 'Smdcshop/editprice',
- data: {
- id: this.info.id,
- pay_price: this.pay_price,
- content: this.content,
- }
- }).then(res => {
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- this.is_stup_price = false;
- setTimeout(() => {
- this.getData();
- }, 2000)
- })
- }
- this.is_stup_price = true;
- },
- getPrice(e) {
- this.pay_price = e.detail.value;
- },
- getContent(e) {
- this.content = e.detail.value;
- },
- makePhoneCall(tel) {
- uni.makePhoneCall({
- phoneNumber: tel //仅为示例
- });
- },
- copy(text) {
- // #ifdef MP-WEIXIN
- uni.setClipboardData({
- data: text,
- success: function() {
- console.log('success');
- }
- });
- // #endif
- // #ifdef H5
- let content = text;
- if (!document.queryCommandSupported('copy')) {
- // 不支持
- return false
- }
- let textarea = document.createElement("input")
- textarea.value = content
- textarea.readOnly = "readOnly"
- document.body.appendChild(textarea)
- textarea.select() // 选择对象
- textarea.setSelectionRange(0, content.length) //核心
- let result = document.execCommand("copy") // 执行浏览器复制命令
- textarea.remove();
- uni.showToast({
- title: "复制成功",
- icon: 'none'
- })
- return result
- // #endif
- },
- //提醒取餐
- onQucan() {
- this.request({
- url: 'merchant/take_meal',
- is_agent: 'agent',
- data: {
- order_id: this.info.id
- }
- }).then(res => {
- if (res.code == 200) {
- uni.showModal({
- content: "已提醒取餐",
- showCancel: false,
- success: r => {
- this.info.no_meal = 2
- }
- })
- }
- })
- }
- }
- }
- </script>
- <style>
- page {
- background-color: #F4F5F7;
- }
- page .act {
- color: #007AFF;
- }
- .model-content-center {
- width: 650rpx;
- background-color: #FFFFFF;
- border-radius: 16rpx;
- }
- .model-content-center .content {
- padding: 20rpx;
- }
- .model-content-center .round {
- border: 1rpx solid #CCCCCC;
- width: 40rpx;
- height: 40rpx;
- margin-right: 10rpx;
- border-radius: 4rpx;
- }
- .amount-text {
- font-size: 26rpx;
- padding-bottom: 20rpx;
- }
- .amount-input {
- padding: 10rpx;
- border: 1rpx solid #F1F1F1;
- }
- .model-refund-title {
- font-size: 36rpx;
- text-align: center;
- padding: 20rpx 0;
- }
- .model-refund-btn {
- border-top-color: #f5f5f5;
- border-top-style: solid;
- border-top-width: 1px;
- }
- .model-refund-btn .cancel {
- height: 90rpx;
- }
- .model-refund-btn .submit {
- height: 90rpx;
- border-left-color: #f0f0f0;
- border-left-style: solid;
- border-left-width: 1px;
- }
- button {
- background-color: #fff;
- padding: 0;
- margin: 0;
- line-height: 1rpx;
- /* border: 1px solid #cccccc; */
- min-height: 0;
- font-size: 28rpx;
- background: #fff;
- border-radius: none;
- }
- button::after {
- border: none;
- }
- .model-content-peiSong {
- text-align: center;
- padding: 10rpx 0;
- border-bottom: 1rpx solid #F1F1F1;
- font-size: 28rpx;
- }
- .pd10 {
- padding: 10rpx 0;
- }
- .model {
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0;
- left: 0;
- background: rgba(0, 0, 0, .5);
- }
- .model-content {
- background: #FFFFFF;
- height: 800rpx;
- }
- .model-content-title {
- padding: 20rpx;
- }
- .text-r {
- text-align: right;
- color: red;
- }
- .info image {
- width: 40rpx;
- height: 50rpx;
- }
- .goods_list-img {
- width: 100rpx;
- height: 100rpx;
- margin-right: 20rpx;
- min-width: 100rpx;
- }
- .order-status {
- width: 100%;
- height: 130rpx;
- background: url(../static/images/order_detail_bg.png) no-repeat center;
- background-size: 100%;
- text-align: center;
- line-height: 130rpx;
- font-size: 36rpx;
- color: #fff;
- font-weight: bold;
- }
- .page-block {}
- .page-block .page-title-block {
- height: 90rpx;
- padding: 0 35rpx;
- }
- .page-block .page-title-block .title {
- font-size: 32rpx;
- line-height: 90rpx;
- color: #999;
- font-weight: bold;
- }
- .page-block .content {
- padding: 30rpx 35rpx 0;
- background-color: #fff;
- overflow: hidden;
- }
- .page-block .cell {
- min-height: 45rpx;
- margin-bottom: 30rpx;
- }
- .page-block .cell .title-block {
- width: 175rpx;
- flex: none;
- font-size: 30rpx;
- line-height: 45rpx;
- font-weight: 600;
- color: #333;
- }
- .page-block .cell .desc {
- flex: auto;
- min-height: 45rpx;
- line-height: 45rpx;
- font-size: 32rpx;
- color: #333;
- }
- .pay-type-icon {
- display: block;
- width: 30rpx;
- height: 30rpx;
- margin-right: 8rpx;
- }
- .goods {
- font-size: 32rpx;
- color: #333;
- line-height: 45rpx;
- margin-bottom: 30rpx;
- }
- .price {
- color: red;
- }
- .btm-btn-block-content {
- margin-top: 50rpx;
- }
- .btm-btn-block {
- padding: 0 20rpx;
- margin-bottom: 20rpx;
- }
- .btm-btn-block .btn {
- flex: none;
- /* width: 325rpx; */
- width: 217rpx;
- height: 98rpx;
- border-radius: 8rpx;
- text-align: center;
- line-height: 98rpx;
- font-size: 32rpx;
- font-weight: 500;
- }
- .btm-btn-block .btn11 {
- background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
- box-shadow: 0 0 8rpx 0 rgba(51, 135, 255, 0.2);
- color: #fff;
- }
- .btm-btn-block .btn12 {
- background: linear-gradient(315deg, #999 2%, #999 99%);
- box-shadow: 0 0 8rpx 0 rgba(51, 135, 255, 0.2);
- color: #fff;
- }
- .zt-btn {
- background: linear-gradient(315deg, #3387ff 2%, #569bff 99%);
- box-shadow: 0 0 8rpx 0 rgba(51, 135, 255, 0.2);
- color: #fff;
- font-size: 24rpx;
- padding: 10rpx 12rpx;
- border-radius: 6rpx;
- }
- /* */
- .qc-btn {
- background-color: #3387FF;
- color: #fff;
- border-radius: 6rpx;
- height: 48rpx;
- line-height: 48rpx;
- padding: 0 20rpx;
- margin-left: 10rpx;
- }
- .coupon-name{
- display: inline-block;
- background-color: #3387FF;
- color: #fff;
- border-radius: 6rpx;
- height: 48rpx;
- line-height: 48rpx;
- padding: 0 20rpx;
- font-size: 24rpx;
- }
- </style>
|