| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094 |
- <template>
- <view class="">
- <customNav :shownav="true" :title="i18n('index.orderxq')" titledetl=""></customNav>
- <!-- <weizhimap v-if="showMap==1" class="mapview" :style="'height:'+mapHeight+'rpx;'" :height="mapHeight" :covers="pcovers"></weizhimap> -->
-
- <label class="linesp"></label>
- <view class="topActVB">
- <view class="actBTV">
- <view v-if="state==5" class="actbt" @click="choosebt(4)">
- <view class="ddbticon">
- <image class="bticon" src="/static/images/xiugai@3x.png" mode="scaleToFill" ></image>
- </view>
- <view class="ddtext">
- <text style="font-size: 32rpx;">{{i18n('order.fabiaopinglun')}}</text>
- </view>
- </view>
- <view class="actbt" >
- <view class="ddbticon" @click="choosebt(5)">
- <uni-icons custom-prefix="custom-icon" color="#386EF5" type="chat-filled" size="30"></uni-icons>
- </view>
- <view class="ddtext" @click="choosebt(5)">
- <text style="font-size: 32rpx;">{{i18n('order.lianxikef')}}</text>
- </view>
- </view>
-
- <view class="actbt" @click="choosebt(7)">
- <view class="ddbticon">
- <uni-icons custom-prefix="custom-icon" color="#E02F73" type="closeempty" size="30"></uni-icons>
- </view>
- <view class="ddtext">
- <text style="font-size: 32rpx;">{{i18n('order.candianyw')}}</text>
- </view>
- </view>
- <view v-if="state!=5" class="actbt" @click="choosebt(6)">
- <view class="ddbticon" >
- <uni-icons custom-prefix="custom-icon" color="#386EF5" type="checkmarkempty" size="30"></uni-icons>
- </view>
- <view class="ddtext">
- <text style="font-size: 32rpx;">{{i18n('order.wancheng')}}</text>
- </view>
- </view>
- <view class="actbt" >
- <view class="ddbticon" @click="callPhone">
- <image class="bticon" src="/static/images/kefufuwu.png" mode="scaleToFill" ></image>
- </view>
- <view class="ddtext" @click="callPhone">
- <text style="font-size: 30rpx;">{{i18n('order.lianxishj')}}</text>
- </view>
- </view>
-
- </view>
- </view>
- <label class="linesp"></label>
- <scroll-view :style="'height:'+scrollHeight+'rpx;'" scroll-y="true">
- <view class="contentColumn" style="background-color: white;">
- <view class="contentInRowS spaceCtv">
- <view class="contentInRowL">
- <image style="width: 40rpx;height: 40rpx;" src="/static/images/shouye.png" mode="scaleToFill"></image>
- <text class="textfontB3">{{posName}}</text>
- </view>
-
- </view>
- <view class="contentInRowS spaceCtv">
- <view class="contentInRowL">
- <text class="textfontB4">{{ordertypename}}</text>
- </view>
- <text class="textfontB4">{{stateName}}</text>
- </view>
- <label class="linesp"></label>
- <view class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('order.danhao')}}</text>
- <text class="textfontB5">{{ddid}}</text>
- </view>
- <view class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('order.xiadanshijian')}}</text>
- <text class="textfontB5">{{cretim}}</text>
- </view>
-
- <view v-if="orderxq.type==0" class="contentColumn spaceCtvauto" >
- <text class="textfontB4">{{i18n('index.peisongdizhi')}}</text>
- <text class="textfontS1 adrrTextV">{{address}}</text>
- </view>
- <view v-if="orderxq.type==0" class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('order.shoujianren')}}</text>
- <text class="textfontB5">{{name}}</text>
- </view>
- <view v-if="orderxq.type==0" class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('order.lianxidianhua')}}</text>
- <text class="textfontB5">{{phone}}</text>
- </view>
- <view class="contentInRowS spaceCtvN">
- <text class="textfontB4">{{i18n('order.yuyueshijian')}}</text>
- <text class="textfontB5">{{orderxq.delryTime}}</text>
- </view>
- <label class="linesp"></label>
- <label class="linesp"></label>
- <view class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('index.youhuiq')}}</text>
- <text v-if="orderxq.activity" class="textfontB5">{{orderxq.activity.salesName}}</text>
- <text v-if="!orderxq.activity" class="textfontB5">{{i18n('index.wkyyouhuiq')}}</text>
- </view>
- <view class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('order.shangpinxj')}}</text>
- <text class="textfontB5">{{formPr(spxji)}}{{i18n('locale.huobidw')}}</text>
- </view>
- <view v-if="orderxq.type==0" class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('order.peisongfei')}}</text>
- <text class="textfontB5">{{formPr(peisongfei)}}{{i18n('locale.huobidw')}}</text>
- </view>
- <view v-if="orderxq.activity" class="contentInRowS spaceCtv">
- <text class="textfontB4">{{i18n('order.youhuijine')}}</text>
- <text class="textfontB5">-{{formPr(yhjinr)}}{{i18n('locale.huobidw')}}</text>
- </view>
- <view class="contentInRowS spaceCtvN">
- <text class="textfontB4">{{i18n('order.dingdanjin')}}</text>
- <text v-if="orderxq.type==0" class="textfontB5">{{formPr(amount)}}{{i18n('locale.huobidw')}}</text>
- <text v-if="orderxq.type!=0" class="textfontB5">{{formPr(spxji)}}{{i18n('locale.huobidw')}}</text>
- </view>
-
- <view v-if="orderxq.remarks!=''" class="contentInRowL contentV">
- <view class="contentColumn">
- <text class="textfontB4">{{i18n('order.beizhu')}}:</text>
- <text class="pinglun textfontB5">{{orderxq.remarks}}</text>
- </view>
- </view>
-
- <label class="linesp"></label>
- <label class="linesp"></label>
- <view v-for="item in food">
- <view class="spnodetail">
- <view class="">
- <netImage class="spIcon" width="90" height="90" :mysrc="item.image" mymode="scaleToFill"></netImage>
- </view>
- <view style="width: 600upx">
- <view class="contentInRowS">
- <text class="foodNameV">{{item.name}}</text>
- <text style="font-size: 28rpx;color: brown;margin-right: 30rpx;">X {{item.number}}</text>
- </view>
- <view class="contentInRowS">
- <text style="font-size: 26rpx;color: blueviolet;">{{i18n('shangpin.shoujia')}}: {{formPr(item.price+item.otherPrice)}}{{i18n('locale.huobidw')}}</text>
- <text class="xiaoji" style="font-size: 28rpx;color: brown;">{{i18n('shangpin.xiaoji')}}: {{formPr((item.price+item.otherPrice)*item.number)}}{{i18n('locale.huobidw')}}</text>
- </view>
- <view class="viewinrow" >
- <text class="kouweisku">{{arraytoStr(item.ask)}}</text>
- </view>
- <view v-if="item.beizhu" class="">
- <text style="font-size: 30rpx;color:#00A6FF;">{{item.beizhu}}</text>
- </view>
- </view>
- </view>
- <label class="linesp"></label>
- </view>
- <view style="height: 150rpx;"></view>
- </view>
- </scroll-view>
- <uni-popup style="z-index: 999;" ref="popzhif" type="center" :isMaskClick="true" :safeArea="true">
- <view class="contentColumnC" style="width: 100%;background-color: whitesmoke;">
- <view style="height: 40rpx;"></view>
- <text>{{i18n('order.zhifufangshi')}}</text>
- <text class="zhifbut" style="background-color: deeppink;" @click="huodaofukuan">{{i18n('index.huodaofukan')}}</text>
- <text class="zhifbut" style="background-color:#00A6FF;" @click="getVNPay">VNPAY</text>
- <view style="height: 40rpx;"></view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import api from "@/pages/api/api.js"
- export default {
- data() {
- return {
- cid:'',
- qsCid:'',
- ddid:'',
- orderxq:[],
- state:0,
- stateName:'',
- posName:'',
- telphone:'',
- food:[],
- amount:0,
- address:'',
- name:'',
- phone:'',
- annexes:'',
- Id:'',
- cretim:'',
- spxji:0,
- peisongfei:0,
- yhjinr:0,
- isshangjia:0,
- mendid:'',
- ordertype:0,
- mapHeight:0,
- scrollHeight:0,
- pcovers:'',
- ordertypename:'',
- timer:'',
- timerloc:'',
- startFl:0,
- showMap:0,
- statusBarHeight:0,
- isAndroid:false,
- upImage:false,
- jinduA:0,
- jinduB:0,
- }
- },
- onLoad(option) {
- this.cid=uni.getStorageSync('cid');
- this.ddid = option.ddid;
- this.isshangjia = option.isShangjia;
- var info = uni.getSystemInfoSync();
-
- this.isAndroid = info.platform.toLowerCase() === 'android';
-
- if(this.isAndroid){
- this.scrollHeight=info.windowHeight*(750/info.windowWidth)-280-info.statusBarHeight*(750/info.windowWidth);
- }
- else{
- this.scrollHeight=info.windowHeight*(750/info.windowWidth)-280-info.statusBarHeight*(750/info.windowWidth);
- }
- var that = this;
- uni.onPushMessage((res) => {
- console.log('onPushMessage',res);
- var content=res.data.content;
- // plus.runtime.setBadgeNumber(0);
- if(content.indexOf("骑手定位")!=-1){
- that.setpcovers(JSON.parse(res.data.payload));
- }
- });
- var that = this;
- this.timerloc = setInterval(() => {
- if(that.showMap==1){
- that.getstoreorderxq();
- }
- }, 10000);
-
- },
- onShow() {
- if(!this.upImage){
- this.getstoreorderxq();
- }
- },
- onUnload() {
- clearInterval(this.timer);
- clearInterval(this.timerloc);
- },
- methods: {
- isshouh(state){
- if(state==6||state==7||state==8||state==9){
- return true;
- }
- return false
- },
- isdaish(state){
- if(this.orderxq.type==0){
- if(state==12){
- return true;
- }
- }
- else{
- if(this.orderxq.diningStatus==1){
- return true;
- }
- }
-
- return false
- },
- formPr(price){
- var number = '0';
- var type = typeof(price);
- if(type=='string'){
- number = price
- }
- if(type=='number'){
- number = price.toString(); // 确保输入是字符串
- }
-
- const pattern = /(-?\d+)(\d{3})/;
- while (pattern.test(number)) {
- number = number.replace(pattern, "$1,$2");
- }
- return number;
- },
- arraytoStr(arry){
- var str='';
- if(arry.length>0){
- for(var i=0;i<arry.length;i++){
- str=str+arry[i]+'; ';
- }
-
- }
- return str;
- },
- i18n(str){
- var rstr = getApp().globalData.$t(str);
- return rstr;
- },
- getstoreorderxq(){
- console.log(this.ddid)
- api('getorderxq',{
- ddid:this.ddid
- },res=>{
- this.orderxq=res.data.data;
- this.qsCid=''
- console.log('1---------1:',res);
- this.dowithddxq();
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
- dowithddxq(){
- this.state=this.orderxq.state;
- this.posName=this.orderxq.store.posName;
- this.telphone = this.orderxq.store.telephone;
- this.food=this.orderxq.food;
- this.amount=this.orderxq.amount;
- this.peisongfei=this.orderxq.freight;
- if(this.orderxq.shaddress){
- this.address=this.orderxq.shaddress.address;
- this.name=this.orderxq.shaddress.name;
- this.phone=this.orderxq.shaddress.phone;
- this.annexes=this.orderxq.shaddress.annexes;
- }
- this.Id=this.orderxq.id;
- this.cretim=this.orderxq.cretim;
- this.spxji = 0;
- this.mendid = this.orderxq.store.id;
- for (var i=0;i<this.food.length;i++) {
- var item = this.food[i];
- this.spxji=this.spxji+(item.price+item.otherPrice)*item.number;
- }
- this.getyhjinr();
- if(''==this.orderxq.delryTime||undefined==this.orderxq.delryTime||null==this.orderxq.delryTime){
- this.orderxq.delryTime=this.i18n('order.jinkuaichuc');
- }
- this.dowithOrderstate();
- this.dowithMap();
- },
- getyhjinr(){
- if(this.orderxq.discountAmount){
- this.yhjinr=this.orderxq.discountAmount;
- }
- else{
- this.yhjinr=0;
- }
-
- return;
- if(this.orderxq.activity){
- var jinr=0;
- if(this.orderxq.activity.salesType=="0"){
- jinr =this.orderxq.freight;
- }
- else{
- console.log('obj',this.orderxq)
- for(var i=0;i<this.orderxq.food.length;i++){
- var temp =this.orderxq.food[i];
- jinr=jinr+temp.number*(temp.otherPrice+temp.price);
- }
- console.log('jinr1',jinr)
- jinr =jinr-(this.orderxq.amount-this.orderxq.freight);
- console.log('jinr2',jinr)
- }
- this.yhjinr=parseInt(jinr);
- }
- else{
- this.yhjinr=0;
- }
- },
- dowithOrderstate(){
- switch(this.state){
- case 0:
- this.stateName = this.i18n('order.daifukshij');
- break;
- case 1:
- this.stateName = this.i18n('order.daishouli');
- break;
- case 2:
- this.stateName = this.i18n('order.yishouli');
- break;
- case 3:
- this.stateName = this.i18n('order.peisongzhong');
- break;
- case 4:
- this.stateName = this.i18n('order.peisongzhong');
- break;
- case 5:
- this.stateName = this.i18n('order.yiwancheng');
- break;
- case 6:
- this.stateName = this.i18n('order.shenqingtuikuan');
- break;
- case 7:
- this.stateName = this.i18n('order.tongyituik');
- break;
- case 8:
- this.stateName = this.i18n('order.jujuetuiK');
- break;
- case 9:{
- if(this.orderxq.kefuState==0){
- this.stateName = this.i18n('order.kefujs');
- break;
- }
- else{
- if(this.orderxq.kefuRepeat==0){
- //2未受理、1已受理、0已完成
- if(this.orderxq.kefuState==2){
- this.stateName = this.i18n('order.daishouli');
- break;
- }
- if(this.orderxq.kefuState==1){
- this.stateName = this.i18n('order.yishouli');
- break;
- }
- if(this.orderxq.kefuState==0){
- this.stateName = this.i18n('order.shouhwc');
- break;
- }
- }
- else{
- if(this.orderxq.repeatDdId){
- this.stateName = this.i18n('order.chongpaidd')+':'+this.orderxq.repeatDdId;
- break;
- }
- else{
- this.stateName = this.i18n('order.chongpaidd');
- break;
- }
- }
- }
- }
- case 10:
- this.stateName = this.i18n('order.zuofei');
- break;
- case 11:
- this.stateName = this.i18n('order.shouhwc');
- break;
- case 12:
- this.stateName=this.i18n('order.songda');
- break;
- }
-
- if(this.orderxq.type==0){
- this.ordertype = 0;
- this.ordertypename=this.i18n('order.peisong');
- }
- else if(this.orderxq.type==1){
- this.ordertype = 1;
- this.ordertypename=this.i18n('order.ziqu');
- if(this.state==3||this.state==4){
- this.stateName = this.i18n('order.daiqucan');
- }
- }
- else{
- this.ordertype = 2;
- this.ordertypename=this.i18n('shouye.tangshi');
- if(this.state==3||this.state==4){
- this.stateName = this.i18n('order.daiqucan');
- }
- }
- },
-
- dowithMap(){
- this.showMap=0;
- if(this.orderxq.type==0){
- if(this.orderxq.state==3||this.orderxq.state==4||this.orderxq.state==12){
- if(this.orderxq.RiderPosition.cid!=null){
- this.qsCid=this.orderxq.RiderPosition.cid;
- }
- if(this.orderxq.RiderPosition.latitude==0||this.orderxq.RiderPosition.longitude==0){
- return;
- }
- this.showMap=1;
- if(this.mapHeight==0){
- this.mapHeight=500;
- this.scrollHeight=this.scrollHeight-this.mapHeight;
- }
- var that = this;
- setTimeout(function() {
- // 这里写要延时执行的代码
- that.dongtaiJindu();
- that.setpcovers('');
- }, 500);
-
- }
- }
- },
-
- dongtaiJindu(){
- this.timer = setInterval(() => {
- if(this.orderxq.state==3){
- if(this.jinduA>=100){
- this.jinduA=0
- }
- this.jinduA=this.jinduA+3;
- this.jinduB=0;
- }
- if(this.orderxq.state==4){
- if(this.jinduB>=100){
- this.jinduB=0
- }
- this.jinduB=this.jinduB+3;
- this.jinduA=100;
- }
- }, 100);
- },
-
- setpcovers(obj){
- // this.pcovers=[{//门店
- // latitude: this.orderxq.store.latitude,
- // longitude: this.orderxq.store.longitude,
- // iconPath: '/static/images/Bdizhil@3x.png'
- // }];
- if(obj==''){
- this.pcovers=[{//骑手
- latitude: this.orderxq.RiderPosition.latitude,
- longitude: this.orderxq.RiderPosition.longitude,
- iconPath: '/static/images/qishoutb@3x.png'
- }];
- }
- else{
- this.pcovers=[{//骑手
- latitude:obj.latitude,
- longitude:obj.longitude,
- iconPath: '/static/images/qishoutb@3x.png'
- }];
- }
- if(this.orderxq.shaddress){
- var mudi={
- latitude:this.orderxq.shaddress.latitude,
- longitude:this.orderxq.shaddress.longitude,
- iconPath: '/static/images/Bdizhil@3x.png'
- }
- this.pcovers.push(mudi);
- }
- },
-
- callPhone(){
- var that = this;
- uni.showModal({
- cancelText:that.i18n('order.quxiao'),
- confirmText:that.i18n('comp.queren'),
- title: that.i18n('api.message'),
- content:that.i18n('api.nqdbddh'),
- success: function (res) {
- if (res.confirm) { //这里是点击了确定以后
- console.log(that.mendianMs.telphone)
- plus.device.dial(that.mendianMs.telphone, false );
- } else { //这里是点击了取消以后
- console.log('点击取消')
- }
- }
- })
- },
- phoneCall(){
- var that = this;
- uni.showModal({
- cancelText:that.i18n('order.quxiao'),
- confirmText:that.i18n('comp.queren'),
- title: that.i18n('api.message'),
- content:that.i18n('api.nqdbddh'),
- success: function (res) {
- if (res.confirm) { //这里是点击了确定以后
- console.log(that.orderxq.qsuser.phone)
- plus.device.dial(that.orderxq.qsuser.phone, false );
- } else { //这里是点击了取消以后
- console.log('点击取消')
- }
- }
- })
- },
- audioCall(){
- var data = {
- ddId:this.orderxq.ddId,
- userId:this.orderxq.qsId,
- nickName:'',
- avatar:'',
- cid:this.qsCid
- }
- uni.setStorageSync('imUser',data)
- uni.navigateTo({
- url:'/pages/imcall/audioCall?caller=1'
- })
- },
- exchange(){
- var data = {
- ddId:this.orderxq.ddId,
- userId:this.orderxq.qsId,
- nickName:'',
- avatar:'',
- cid:this.qsCid
- }
- uni.setStorageSync('imUser',data)
- uni.navigateTo({
- url:'/pages/imcall/GoeasyExchange?caller=1'
- })
- },
-
- reloadLocate(){
- console.log(this.qsCid)
- if(this.qsCid!=''){
- this.pushMsg(this.qsCid)
- }
- },
- choosebt(index){
- switch(index){
- case 1://去支付
- {
- this.$refs.popzhif.open('bottom');
- //this.zffsS=true;
- }
- break;
- case 2://修改订单
- break;
- case 3://取消订单
- var that = this;
- uni.showModal({
- cancelText:that.i18n('order.quxiao'),
- confirmText:that.i18n('comp.queren'),
- title: that.i18n('api.message'),
- content: that.i18n('order.shifouqx')+that.ddid+'?',
- success: function (res) {
- if (res.confirm) { //这里是点击了确定以后
- that.setorderuzt(10,that.Id);
- } else { //这里是点击了取消以后
- console.log('用户点击取消')
- }
-
- }
- })
- break;
- case 4://发表评论
- //this.setorderuzt(3,this.Id);
- uni.navigateTo({
- url:'/pages/OrderList/pinglun?mendid='+this.mendid+'&ddId='+this.ddid
- })
- break;
- return
- case 5://售后列表
- uni.navigateTo({
- url:'/pages/kehufuwu/kefuMsgList?ddId='+this.orderxq.ddId
- })
- break;
- case 6://完成订单
- this.dingdanwancheng();
- break;
- case 7://餐点有误
- this.chandianyouwu();
- break;
- }
- },
-
- dingdanwancheng(){
-
- if(this.state==6||this.state==7||this.state==8||this.state==9||this.state==10||this.state==11){
- uni.showToast({
- title:this.i18n('index.zhuangtwfwc'),
- icon: 'none',
- duration: 2500
- })
-
- return;
- }
-
-
- var that = this;
- uni.showModal({
- cancelText:that.i18n('order.quxiao'),
- confirmText:that.i18n('comp.queren'),
- title: that.i18n('api.message'),
- content: that.i18n('mend.shifwanch')+that.ddid+that.i18n('index.order')+'?',
- success: function (res) {
- if (res.confirm) { //这里是点击了确定以后
- that.setorderuzt(5,that.Id);
- } else { //这里是点击了取消以后
- console.log('用户点击取消')
- }
-
- }
- })
- },
-
- chandianyouwu(){
- if(this.state==6||this.state==7||this.state==8||this.state==9||this.state==10||this.state==11){
- uni.showToast({
- title:this.i18n('index.lianxkfsj'),
- icon: 'none',
- duration: 2500
- })
-
- return;
- }
- var that = this;
- uni.showModal({
- cancelText:that.i18n('order.quxiao'),
- confirmText:that.i18n('comp.queren'),
- title: that.i18n('api.message'),
- content: that.i18n('order.shifoushenq')+that.ddid+that.i18n('order.kefujs')+'?',
- success: function (res) {
- if (res.confirm) { //这里是点击了确定以后
- if(that.orderxq.collectPayment==1){
- that.setorderuzt(9,that.Id);
- }
- else{
- that.setorderuzt(6,that.Id);
- }
-
- } else { //这里是点击了取消以后
- console.log('用户点击取消')
- }
-
- }
- })
- },
-
- setorderuzt(state,id){
- api('setorderuzt',{
- id:id,
- state:state
- },res=>{
- console.log('setorderuzt',res)
- this.getstoreorderxq();
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
-
- //直接全额退款
- quanertuikuan(state){
- console.log('quanertuikuan');
- api('VNtuikuan',{
- "order_id": this.ddid, //需要退款的订单号
- "amount": parseInt(this.amount), //退款金额
- "trantype": '02', //退款类型:02全额退款,03部份退款
- 'illustrate':'全额退款',
- "transaction":'' //交易号,不存在可为空
- },res=>{
- console.log('VNtuikuan',res);
- if(res.data.code==200){
- if(res.data.data.vnp_ResponseCode=='00'){
- uni.showToast({
- title:this.i18n('order.tuikuanchg'),
- icon: 'none',
- duration: 2500
- })
- this.setorderuzt(state,this.Id);
- }else if(res.data.data.vnp_ResponseCode=='94'){
- uni.showToast({
- title:this.i18n('order.tuikuanchg'),
- icon: 'none',
- duration: 2500
- })
- this.setorderuzt(state,this.Id);
- }
- else{
- uni.showToast({
- title: res.data.data.vnp_Message,
- icon: 'none',
- duration: 2500
- })
- }
- }
- else{
- uni.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 2500
- })
- }
- },failc=>{
- console.log('VNtuikuan',failc)
- })
- },
-
- huodaofukuan(){
- this.$refs.popzhif.close();
- uni.showLoading({
- title:'Loading...',
- mask:true
- })
- api('setorderuzt',{
- id:this.Id,
- "collectPayment":1
- },res=>{
- console.log('setorderuzt:',res)
- uni.hideLoading();
- if(res.data.code==200){
- this.getstoreorderxq();
- }
- else{
- uni.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 2000
- })
- }
- },failc=>{
- uni.hideLoading();
- //console.log('getadvertis----',failc)
- })
- },
- getVNPay(){
- this.$refs.popzhif.close();
-
- },
- //请求位置
- pushMsg(cid){//消息推送
- var payloadData={
- cid:this.cid,
- latitude:'',
- longitude:''
- }
- api('pushMsgQS',{
- cid:cid,
- title:'Request',
- content:'Request location',
- payload:payloadData
- },res=>{
- console.log(res)
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- },
- selectImage(){
- console.log('selectImage');
- this.upImage=true;
- var that = this;
- uni.chooseImage({
- count: 1, // 图片数量
- sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], //从相册选择或者拍照
- success: (res) => {
- const tempFilePaths = res.tempFilePaths;
- console.log('-----',tempFilePaths)
- uni.uploadFile({
- url:this.$baseUrl.getUploadUrl(), //上传图片api
- filePath: tempFilePaths[0],
- name: 'file',
- header:{
- //"Authorization": userinfo.token
- },
- success: (res) => {
- this.upImage=false;
- let group = JSON.parse(res.data);
- that.annexes=group.data;
- console.log('aaaa',group)
- api('ADDaddress',{
- id:that.orderxq.shaddress.id,
- annexes:group.data
- },
- res=>{
- if(res.data.code==200){
-
- }
- console.log('getGoodsDetail:',res);
- },failc=>{
- //console.log('getadvertis----',failc)
- })
- uni.showToast({
- title:'success',
- icon:"success"
- })
- },
- fail: (res) =>{
- console.log('uni.uploadFile',res)
- this.upImage=false;
- }
- });
- }
- });
- },
- }
- }
- </script>
- <style lang="scss">
- .spaceCtv{
- width:690upx;
- margin-left: 30upx;
- align-items: center;
- height: 80rpx;
- border-bottom-width: 2rpx;
- border-bottom-color:lightgray;
- }
- .spaceCtvh{
- width:690upx;
- margin-left: 30upx;
- align-items: center;
- height: 150rpx;
- border-bottom-width: 2rpx;
- border-bottom-color:lightgray;
- }
- .spaceCtvauto{
- width:690upx;
- margin-left: 30upx;
- justify-content: flex-start;
- border-bottom-width: 2rpx;
- border-bottom-color:lightgray;
- }
- .spaceCtvN{
- width:690upx;
- margin-left: 30upx;
- align-items: center;
- height: 80rpx;
- }
- .mapcontent{
- position: fixed;
- height: 400rpx;
- left: 0;
- right: 0;
- z-index: 999;
- }
- .mapview{
- display: flex;
- width: 750upx;
- }
- .contentV{
- width:690upx;
- margin-left: 30upx;
- margin-top: 20rpx;
- }
- .viewinrow{
- display: flex;
- flex-direction: row;
- align-items: center;
- }
-
- .topActV{
- width: 750upx;
- height: 180rpx;
- background-color: white;
- }
- .topActVB{
- width: 750upx;
- height: 180rpx;
- background-color: white;
- }
- .notext{
- padding-top: 10rpx;
- padding-left: 20rpx;
- font-size: 40rpx;
- color: #000;
- font-weight:bold;
- }
- .nodetail{
- height: 88rpx;
- margin-left: 10rpx;
- margin-right: 10rpx;
- margin-top: 10rpx;
- padding-left: 2rpx;
- flex-direction: row;
- align-items: center;
- justify-content: flex-start;
- background-color: #F1F1F1;
- font-size: 30rpx;
- }
- .xingimage{
- width: 36rpx;
- height: 36rpx;
- }
- .actBTVS{
- display: flex;
- flex-direction: row;
- justify-content:space-between;
- align-items: center;
- width: 650upx;
- margin-left: 15rpx;
- }
- .actBTV{
- width: 720upx;
- margin-left: 15upx;
- display: flex;
- flex-direction: row;
- justify-content:space-between;
- align-items: center;
- }
- .actbt{
- width: 160upx;
- margin-top: 10rpx;
- margin-bottom: 10rpx;
- align-items: center;
- justify-content: center;
- }
- .ddbticon{
- margin-top: 6rpx;
- width: 160upx;
- height: 80rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .ddtext{
- margin-top: 6rpx;
- text-align: center;
- color: black;
- }
-
- .bticon{
- width: 50rpx;
- height: 50rpx;
- }
- .spnodetail{
- display: flex;
- flex-direction: row;
- align-items: center;
- background-color: white;
- margin-top: 20rpx;
- margin-bottom: 20rpx;
- }
- .spIcon{
- margin: 20rpx;
- width: 90rpx;
- height: 90rpx;
- }
- .xiaoji{
- margin-right: 30rpx;
- }
- .kouweisku{
- padding-right: 10rpx;
- color: chocolate;
- font-size: 26rpx;
- width: 600upx;
- }
- .linesp{
- width: 750upx;
- height: 8rpx;
- background-color: aliceblue;
- }
- .buyGoodsv{
- width: 750upx;
- text-align: left;
- height: 60rpx;
- line-height: 60rpx;
- padding-left: 10rpx;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- }
- .stattypeD{
- color: black;
- font-weight: bold;
- font-size: 26rpx;
- margin-left: 10rpx;
- }
- .stattypeA{
- color: darkgray;
- font-size: 26rpx;
- margin-left: 10rpx;
- }
- .stattype{
- font-size: 26rpx;
- margin-right: 40rpx;
- }
- .pinglun{
- margin: 16rpx;
- padding: 10rpx;
- width:660upx;
- border-radius: 15rpx;
- border: 2rpx solid lightgray;
- }
- .zhifbut{
- text-align:center;
- margin-top: 12rpx;
- margin-bottom: 12rpx;
- width:660upx;
- border-radius: 10rpx;
- color: white;
- line-height: 70rpx;
- }
- .adrrTextV{
- padding-top: 6rpx;
- padding-bottom: 6rpx;
- width:680upx;
- }
- .foodNameV{
- font-size: 30rpx;
- width:500upx;
- }
- </style>
|