Commit f2c4d24e38bdebc319564b2364febc78e9f1a38a

Authored by 郭伟龙
1 parent 403c430b
Exists in dev

fix:订单新增取消中退款中状态、报修未及时更新个人信息、代客下单提取方式文案

frontend/app-employee/pages/home/appList/helpPlaceAnOrder/helpPlaceAnOrder.vue
@@ -166,7 +166,7 @@ import {dd_zflx, dd_fkfs, dd_psfs, dd_zffs, dd_ddly, sys_sf, dd_ddzt} from "@/ut @@ -166,7 +166,7 @@ import {dd_zflx, dd_fkfs, dd_psfs, dd_zffs, dd_ddly, sys_sf, dd_ddzt} from "@/ut
166 hasShop: false, 166 hasShop: false,
167 khxx: {}, 167 khxx: {},
168 columns: [ 168 columns: [
169 - ['1', '2'] 169 + ['配送', '自提']
170 ], 170 ],
171 psfs: '1', 171 psfs: '1',
172 extractShow: false, 172 extractShow: false,
@@ -243,7 +243,9 @@ import {dd_zflx, dd_fkfs, dd_psfs, dd_zffs, dd_ddly, sys_sf, dd_ddzt} from "@/ut @@ -243,7 +243,9 @@ import {dd_zflx, dd_fkfs, dd_psfs, dd_zffs, dd_ddly, sys_sf, dd_ddzt} from "@/ut
243 handleExtract(e) { 243 handleExtract(e) {
244 console.log(e); 244 console.log(e);
245 let value = e.value[0]; 245 let value = e.value[0];
246 - this.psfs = value; 246 + console.log(this.ddPsfs);
  247 + this.psfs = value === '配送'?'1':'2'
  248 + console.log("this.psfs",this.psfs);
247 this.extractShow = false; 249 this.extractShow = false;
248 }, 250 },
249 getShopdata(data) { 251 getShopdata(data) {
frontend/app-user/pages/home/home.vue
@@ -142,10 +142,11 @@ @@ -142,10 +142,11 @@
142 onLoad() { 142 onLoad() {
143 console.log("home"); 143 console.log("home");
144 if (this.hasLogin) { 144 if (this.hasLogin) {
145 - this.getdqsj() 145 + this.getdqsj();
146 } 146 }
147 }, 147 },
148 onShow() { 148 onShow() {
  149 + this.$store.dispatch('GetInfo');
149 this.$store.dispatch('GetDefaultAds').then(res => { 150 this.$store.dispatch('GetDefaultAds').then(res => {
150 console.log("有默认地址", res); 151 console.log("有默认地址", res);
151 }).catch(e => { 152 }).catch(e => {
frontend/app-user/pages/home/repairReport.vue
@@ -146,7 +146,7 @@ @@ -146,7 +146,7 @@
146 onLoad() { 146 onLoad() {
147 this.formData = { 147 this.formData = {
148 fLxr: this.user.fullname, 148 fLxr: this.user.fullname,
149 - fLxrdh: this.user.account, 149 + fLxrdh: this.user.account,
150 } 150 }
151 console.log('打印this.user', this.user, this.$store); 151 console.log('打印this.user', this.user, this.$store);
152 }, 152 },
frontend/app-user/pages/order/order.vue
1 <template> 1 <template>
2 - <view class="container">  
3 - <Navbar title="订单"/>  
4 - <u-sticky bgColor="#fff">  
5 - <u-tabs :current="current" :list="statusList" :is-scroll="false" lineColor="#EA5707"  
6 - :activeStyle="activeStyle" :itemStyle="itemStyle" @change="tabChange"></u-tabs>  
7 - </u-sticky>  
8 - <view v-for="(item,index) in orderCardList" :key="item.id">  
9 - <view class="orderCard" @click="goOrderDetaPage(item)">  
10 - <view class="flex justify-between align-center">  
11 - <view class="flex align-center w80" @click.stop="goStorePage(item)">  
12 - <!-- <u-icon name="/static/images/home/shopTitle.png" size="20"></u-icon>-->  
13 - <view  
14 - :style="{ backgroundImage: 'url(/static/images/home/shopTitle.png)', backgroundSize:'100% 100%',width:'20px',height:'20px', backgroundRepeat: 'no-repeat'}">  
15 - </view>  
16 - <view class="margin-left-xs overflow-one-lines">  
17 - {{ item.fCzmc }}  
18 - </view>  
19 - </view>  
20 - <view class="themeColor">  
21 - {{ ddDdzt.get(item.fDdzt) }}  
22 - </view>  
23 - </view>  
24 - <u-divider></u-divider>  
25 - <!-- ${$assignKeys(index)}-->  
26 - <view v-for="(ddxpItem,index) of item.ddxqList" :key="`${$assignKeys(ddxpItem.id)}`"  
27 - class="flex justify-between margin-top">  
28 - <view class="" style="min-width: 80px;min-height: 80px">  
29 - <u-image width="80px" height="80px"  
30 - :src="ddxpItem.fTp?ddxpItem.fTp:'/static/images/gas-icon/gasicon.png'"></u-image>  
31 - </view>  
32 - <view class="w60 flex flex-direction justify-between margin-left-sm">  
33 - <view class="overflow-one-lines">  
34 - {{ ddxpItem.fSpmc }}  
35 - </view>  
36 - <view class="text-sm text-gray overflow-one-lines">  
37 - 规格8:{{ ddxpItem.fMs }}  
38 - </view>  
39 - <view class="text-lg text-bold overflow-one-lines">  
40 - ¥{{ ddxpItem.fDj }}  
41 - </view>  
42 - </view>  
43 - <view class="flex flex-wrap justify-end">  
44 - <view v-if="item.fPsfs" :class="[item.fPsfs=='1'?'ztSty':'psSty','psfsSty']">  
45 - {{ ddPsfs.get(item.fPsfs) }}  
46 - </view>  
47 - <view class="flex align-end">X{{ ddxpItem.fSl }}</view>  
48 - </view>  
49 - </view>  
50 - <u-divider></u-divider>  
51 - <view class="flex margin-top-lg">  
52 - <view class="text-gray overflow-one-lines">  
53 - 订单编号:{{ item.fDddh }}  
54 - </view>  
55 - </view>  
56 - <view class="flex margin-top-sm">  
57 - <view class="text-gray">  
58 - 备注信息:{{ item.fMjly }}  
59 - </view>  
60 - </view>  
61 - <view class="flex margin-top-lg margin-bottom-lg justify-end ">  
62 - <view class="text-gray">  
63 - <!-- 共{{pageForm.ddxqList.length}}件商品 -->  
64 - 合计:  
65 - </view>  
66 - <view class="themeColor overflow-one-lines">  
67 - ¥{{ item.fDdje }}  
68 - </view>  
69 - </view>  
70 - <view class="flex justify-end">  
71 - <view class="margin-left-sm" v-if="item.fDdzt =='201' || item.fDdzt =='202' || item.fDdzt =='203' "  
72 - @click.stop="goGasCancel(item)">  
73 - <u-button shape="circle" color="">取消订单</u-button>  
74 - </view>  
75 - </view>  
76 - </view>  
77 - <!-- <orderCard :orderitem="item" @orderCancel="cancelOrderLoad"></orderCard>-->  
78 - </view>  
79 - <u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"  
80 - v-if="!orderCardList.length &&!loading "></u-empty>  
81 - <u-loadmore :status="status" marginTop="20" height="10" marginBottom="10"  
82 - v-if="orderCardList.length>0 && !loading"/>  
83 - <u-loading-icon text="加载中" style="display: flex;align-items: center; margin-top: 100px;"  
84 - :show="loading"></u-loading-icon> 2 + <view class="container">
  3 + <Navbar title="订单" />
  4 + <u-sticky bgColor="#fff">
  5 + <u-tabs :current="current" :list="statusList" :is-scroll="false" lineColor="#EA5707"
  6 + :activeStyle="activeStyle" :itemStyle="itemStyle" @change="tabChange"></u-tabs>
  7 + </u-sticky>
  8 + <view v-for="(item,index) in orderCardList" :key="item.id">
  9 + <view class="orderCard" @click="goOrderDetaPage(item)">
  10 + <view class="flex justify-between align-center">
  11 + <view class="flex align-center w80" @click.stop="goStorePage(item)">
  12 + <!-- <u-icon name="/static/images/home/shopTitle.png" size="20"></u-icon>-->
  13 + <view
  14 + :style="{ backgroundImage: 'url(/static/images/home/shopTitle.png)', backgroundSize:'100% 100%',width:'20px',height:'20px', backgroundRepeat: 'no-repeat'}">
  15 + </view>
  16 + <view class="margin-left-xs overflow-one-lines">
  17 + {{ item.fCzmc }}
  18 + </view>
  19 + </view>
  20 + <view class="themeColor">
  21 + {{ ddDdzt.get(item.fDdzt) }}
  22 + </view>
  23 + </view>
  24 + <u-divider></u-divider>
  25 + <!-- ${$assignKeys(index)}-->
  26 + <view v-for="(ddxpItem,index) of item.ddxqList" :key="`${$assignKeys(ddxpItem.id)}`"
  27 + class="flex justify-between margin-top">
  28 + <view class="" style="min-width: 80px;min-height: 80px">
  29 + <u-image width="80px" height="80px"
  30 + :src="ddxpItem.fTp?ddxpItem.fTp:'/static/images/gas-icon/gasicon.png'"></u-image>
  31 + </view>
  32 + <view class="w60 flex flex-direction justify-between margin-left-sm">
  33 + <view class="overflow-one-lines">
  34 + {{ ddxpItem.fSpmc }}
  35 + </view>
  36 + <view class="text-sm text-gray overflow-one-lines">
  37 + 规格8:{{ ddxpItem.fMs }}
  38 + </view>
  39 + <view class="text-lg text-bold overflow-one-lines">
  40 + ¥{{ ddxpItem.fDj }}
  41 + </view>
  42 + </view>
  43 + <view class="flex flex-wrap justify-end">
  44 + <view v-if="item.fPsfs" :class="[item.fPsfs=='1'?'ztSty':'psSty','psfsSty']">
  45 + {{ ddPsfs.get(item.fPsfs) }}
  46 + </view>
  47 + <view class="flex align-end">X{{ ddxpItem.fSl }}</view>
  48 + </view>
  49 + </view>
  50 + <u-divider></u-divider>
  51 + <view class="flex margin-top-lg">
  52 + <view class="text-gray overflow-one-lines">
  53 + 订单编号:{{ item.fDddh }}
  54 + </view>
  55 + </view>
  56 + <view class="flex margin-top-sm">
  57 + <view class="text-gray">
  58 + 备注信息:{{ item.fMjly }}
  59 + </view>
  60 + </view>
  61 + <view class="flex margin-top-lg margin-bottom-lg justify-end ">
  62 + <view class="text-gray">
  63 + <!-- 共{{pageForm.ddxqList.length}}件商品 -->
  64 + 合计:
  65 + </view>
  66 + <view class="themeColor overflow-one-lines">
  67 + ¥{{ item.fDdje }}
  68 + </view>
  69 + </view>
  70 + <view class="flex justify-end">
  71 + <view class="margin-left-sm" v-if="item.fDdzt =='201' || item.fDdzt =='202' || item.fDdzt =='203' "
  72 + @click.stop="goGasCancel(item)">
  73 + <u-button shape="circle" color="">取消订单</u-button>
  74 + </view>
  75 + </view>
  76 + </view>
  77 + <!-- <orderCard :orderitem="item" @orderCancel="cancelOrderLoad"></orderCard>-->
  78 + </view>
  79 + <u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"
  80 + v-if="!orderCardList.length &&!loading "></u-empty>
  81 + <u-loadmore :status="status" marginTop="20" height="10" marginBottom="10"
  82 + v-if="orderCardList.length>0 && !loading" />
  83 + <u-loading-icon text="加载中" style="display: flex;align-items: center; margin-top: 100px;"
  84 + :show="loading"></u-loading-icon>
85 85
86 - <!-- app不支持$route -->  
87 - <!-- <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> -->  
88 - <TabBar :currentPagePath="'pages/order/order'"></TabBar>  
89 - </view> 86 + <!-- app不支持$route -->
  87 + <!-- <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar> -->
  88 + <TabBar :currentPagePath="'pages/order/order'"></TabBar>
  89 + </view>
90 </template> 90 </template>
91 91
92 <script> 92 <script>
93 -import login from '../../api/login';  
94 -import orderCard from './components/orderCard.vue'  
95 -import {dd_zflx, dd_fkfs, dd_psfs, dd_zffs, dd_ddly, sys_sf, dd_ddzt} from "@/utils/enums"; 93 + import login from '../../api/login';
  94 + import orderCard from './components/orderCard.vue'
  95 + import {
  96 + dd_zflx,
  97 + dd_fkfs,
  98 + dd_psfs,
  99 + dd_zffs,
  100 + dd_ddly,
  101 + sys_sf,
  102 + dd_ddzt
  103 + } from "@/utils/enums";
96 104
97 -export default {  
98 - components: {  
99 - orderCard  
100 - },  
101 - props: {},  
102 - data() {  
103 - return {  
104 - ddDdzt: new Map(Object.values(dd_ddzt).map(item => [item.code, item.info])),  
105 - ddPsfs: new Map(Object.values(dd_psfs).map(item => [item.code, item.info])),  
106 - loading: false,  
107 - activeStyle: {  
108 - 'color': '#EA5707',  
109 - 'fontSize': '16px',  
110 - 'fontWeight': 'bold'  
111 - },  
112 - itemStyle: {  
113 - 'width': '75px',  
114 - 'height': '60px',  
115 - },  
116 - orderCardList: [],  
117 - pageParams: {  
118 - currentPage: 1,  
119 - size: 10,  
120 - currentZt: ''  
121 - },  
122 - status: "loadmore",  
123 - current: 0,  
124 - // current:'全部',  
125 - statusList: [{  
126 - name: '全部',  
127 - id: '全部'  
128 - }, {  
129 - name: '待付款',  
130 - id: 1  
131 - }, {  
132 - name: '待配送',  
133 - id: 2  
134 - }, {  
135 - name: '配送中',  
136 - id: 3  
137 - }, {  
138 - name: '已完成',  
139 - id: 4  
140 - },],  
141 - total: null,  
142 - }  
143 - },  
144 - computed: {},  
145 - onPullDownRefresh() {  
146 - this.orderCardList = [];  
147 - this.pageParams.currentPage = 1;  
148 - //调用获取数据方法  
149 - this.getOrderList()  
150 - setTimeout(() => {  
151 - //结束下拉刷新  
152 - uni.stopPullDownRefresh();  
153 - }, 500);  
154 - },  
155 - onReachBottom() {  
156 - let allTotal = this.pageParams.currentPage * this.pageParams.size  
157 - if (allTotal < this.total) {  
158 - //当前条数小于总条数 则增加请求页数  
159 - this.pageParams.currentPage++;  
160 - this.status = 'loading';  
161 - setTimeout(() => {  
162 - this.getOrderList()  
163 - }, 500)  
164 - } else {  
165 - this.status = 'nomore'  
166 - // console.log('已加载全部数据')  
167 - }  
168 - },  
169 - mounted() {  
170 - this.getDictOrder();  
171 - // this.getOrderList();  
172 - },  
173 - async onLoad(options) {  
174 - console.log('options=====', options)  
175 - await this.getOrderList(); 105 + export default {
  106 + components: {
  107 + orderCard
  108 + },
  109 + props: {},
  110 + data() {
  111 + return {
  112 + ddDdzt: new Map(Object.values(dd_ddzt).map(item => [item.code, item.info])),
  113 + ddPsfs: new Map(Object.values(dd_psfs).map(item => [item.code, item.info])),
  114 + loading: false,
  115 + activeStyle: {
  116 + 'color': '#EA5707',
  117 + 'fontSize': '16px',
  118 + 'fontWeight': 'bold'
  119 + },
  120 + itemStyle: {
  121 + 'width': '75px',
  122 + 'height': '60px',
  123 + },
  124 + orderCardList: [],
  125 + pageParams: {
  126 + currentPage: 1,
  127 + size: 10,
  128 + currentZt: ''
  129 + },
  130 + status: "loadmore",
  131 + current: 0,
  132 + // current:'全部',
  133 + statusList: [{
  134 + name: '全部',
  135 + id: '全部'
  136 + }, {
  137 + name: '待付款',
  138 + id: 1
  139 + }, {
  140 + name: '待配送',
  141 + id: 2
  142 + }, {
  143 + name: '配送中',
  144 + id: 3
  145 + }, {
  146 + name: '已完成',
  147 + id: 4
  148 + }, ],
  149 + total: null,
  150 + }
  151 + },
  152 + computed: {},
  153 + onPullDownRefresh() {
  154 + this.orderCardList = [];
  155 + this.pageParams.currentPage = 1;
  156 + //调用获取数据方法
  157 + this.getOrderList()
  158 + setTimeout(() => {
  159 + //结束下拉刷新
  160 + uni.stopPullDownRefresh();
  161 + }, 500);
  162 + },
  163 + onReachBottom() {
  164 + let allTotal = this.pageParams.currentPage * this.pageParams.size
  165 + if (allTotal < this.total) {
  166 + //当前条数小于总条数 则增加请求页数
  167 + this.pageParams.currentPage++;
  168 + this.status = 'loading';
  169 + setTimeout(() => {
  170 + this.getOrderList()
  171 + }, 500)
  172 + } else {
  173 + this.status = 'nomore'
  174 + // console.log('已加载全部数据')
  175 + }
  176 + },
  177 + mounted() {
  178 + this.getDictOrder();
  179 + // this.getOrderList();
  180 + },
  181 + async onLoad(options) {
  182 + console.log('options=====', options)
  183 + await this.getOrderList();
176 184
177 - uni.$on('onload', status => {  
178 - console.log("onload刷新", status);  
179 - if (status) {  
180 - this.getOrderList()  
181 - }  
182 - }); 185 + uni.$on('onload', status => {
  186 + console.log("onload刷新", status);
  187 + if (status) {
  188 + this.getOrderList()
  189 + }
  190 + });
183 191
184 - },  
185 - async onShow() {  
186 - const orderCardType = uni.getStorageSync('orderCardType');  
187 - console.log("当前", this.pageParams.currentZt);  
188 - let isChange = this.pageParams.currentZt === orderCardType; //记录状态是否发生改变  
189 - if (orderCardType) {  
190 - // this.pageParams.currentZt = orderCardType;  
191 - switch (orderCardType) {  
192 - case '全部':  
193 - this.current = 0;  
194 - this.pageParams.currentZt=null;  
195 - break;  
196 - case '待配送':  
197 - this.current = 1;  
198 - this.pageParams.currentZt='202';  
199 - break;  
200 - case '配送中':  
201 - this.current = 2;  
202 - this.pageParams.currentZt='203';  
203 - break;  
204 - case '已完成':  
205 - this.pageParams.currentZt='204';  
206 - break;  
207 - case '已取消':  
208 - this.pageParams.currentZt='207';  
209 - break;  
210 - }  
211 - console.log('打印orderCardType', orderCardType);  
212 - } else {  
213 - this.current = 0;  
214 - this.pageParams.currentZt = '';  
215 - }  
216 - this.pageParams.currentPage = 1;  
217 - if (!isChange) { //如果状态发生改变后刷新  
218 - await this.getOrderList();  
219 - }  
220 - },  
221 - methods: {  
222 - //用户取消订单  
223 - async goGasCancel(val) {  
224 - let paramsData = {  
225 - ddid: val.id  
226 - };  
227 - this.$modal.confirm('确认取消订单?', '提示').then(async () => {  
228 - let cancelOrderResult = await this.$api.orderApi.cancelOrder(paramsData);  
229 - if (cancelOrderResult.code == 200) {  
230 - this.$modal.msgSuccess('订单取消成功!');  
231 - this.getOrderList();  
232 - } else {  
233 - this.$modal.msgError('会员信息修改失败!');  
234 - }  
235 - }).catch(() => {  
236 - console.log("取消");  
237 - }); 192 + },
  193 + async onShow() {
  194 + const orderCardType = uni.getStorageSync('orderCardType');
  195 + console.log("当前", this.pageParams.currentZt);
  196 + let isChange = this.pageParams.currentZt === orderCardType; //记录状态是否发生改变
  197 + if (orderCardType) {
  198 + // this.pageParams.currentZt = orderCardType;
  199 + switch (orderCardType) {
  200 + case '全部':
  201 + this.current = 0;
  202 + this.pageParams.currentZt = null;
  203 + break;
  204 + case '待配送':
  205 + this.current = 1;
  206 + this.pageParams.currentZt = '202';
  207 + break;
  208 + case '配送中':
  209 + this.current = 2;
  210 + this.pageParams.currentZt = '203';
  211 + break;
  212 + case '已完成':
  213 + this.pageParams.currentZt = '204';
  214 + break;
  215 + case '已取消':
  216 + this.pageParams.currentZt = '207';
  217 + break;
  218 + }
  219 + console.log('打印orderCardType', orderCardType);
  220 + } else {
  221 + this.current = 0;
  222 + this.pageParams.currentZt = '';
  223 + }
  224 + this.pageParams.currentPage = 1;
  225 + if (!isChange) { //如果状态发生改变后刷新
  226 + await this.getOrderList();
  227 + }
  228 + },
  229 + methods: {
  230 + //用户取消订单
  231 + async goGasCancel(val) {
  232 + let paramsData = {
  233 + ddid: val.id
  234 + };
  235 + this.$modal.confirm('确认取消订单?', '提示').then(async () => {
  236 + let cancelOrderResult = await this.$api.orderApi.cancelOrder(paramsData);
  237 + if (cancelOrderResult.code == 200) {
  238 + this.$modal.msgSuccess('订单取消成功!');
  239 + this.getOrderList();
  240 + } else {
  241 + this.$modal.msgError('会员信息修改失败!');
  242 + }
  243 + }).catch(() => {
  244 + console.log("取消");
  245 + });
238 246
239 - },  
240 - goStorePage(val) {  
241 - let czid = val.fCzid;  
242 - console.log('打印czid', czid)  
243 - uni.navigateTo({  
244 - url: "/pages/home/storeDetails?czid=" + czid  
245 - })  
246 - },  
247 - goGasDetailPage() {  
248 - uni.navigateTo({  
249 - url: "/pages/home/gasDetail"  
250 - })  
251 - },  
252 - goOrderDetaPage(val) {  
253 - // console.log('打印this.pageForm.id', this.pageForm);  
254 - uni.navigateTo({  
255 - url: `/pages/order/orderDetail?id=${val.id}`  
256 - })  
257 - },  
258 - cancelOrderLoad() {  
259 - this.getOrderList();  
260 - },  
261 - async getDictOrder() {  
262 - let query = [{  
263 - key: 'NAME_',  
264 - value: '订单状态'  
265 - }]  
266 - console.log(query);  
267 - let queryJson = JSON.stringify(query);  
268 - console.log(queryJson);  
269 - const result = await this.$api.dictApi.getDict(queryJson, 'ztyd');  
270 - let {  
271 - rows  
272 - } = result;  
273 - let statusArray = [];  
274 - statusArray = rows.length > 0 ? rows.map((item) => {  
275 - return {  
276 - name: item.NAME_,  
277 - id: item.NAME_  
278 - }  
279 - }) : [];  
280 - statusArray.unshift({  
281 - name: '全部',  
282 - id: '全部'  
283 - });  
284 - this.statusList = statusArray;  
285 - console.log('大于this.statusList', this.statusList); 247 + },
  248 + goStorePage(val) {
  249 + let czid = val.fCzid;
  250 + console.log('打印czid', czid)
  251 + uni.navigateTo({
  252 + url: "/pages/home/storeDetails?czid=" + czid
  253 + })
  254 + },
  255 + goGasDetailPage() {
  256 + uni.navigateTo({
  257 + url: "/pages/home/gasDetail"
  258 + })
  259 + },
  260 + goOrderDetaPage(val) {
  261 + // console.log('打印this.pageForm.id', this.pageForm);
  262 + uni.navigateTo({
  263 + url: `/pages/order/orderDetail?id=${val.id}`
  264 + })
  265 + },
  266 + cancelOrderLoad() {
  267 + this.getOrderList();
  268 + },
  269 + async getDictOrder() {
  270 + let query = [{
  271 + key: 'NAME_',
  272 + value: '订单状态'
  273 + }]
  274 + console.log(query);
  275 + let queryJson = JSON.stringify(query);
  276 + console.log(queryJson);
  277 + const result = await this.$api.dictApi.getDict(queryJson, 'ztyd');
  278 + let {
  279 + rows
  280 + } = result;
  281 + let statusArray = [];
  282 + statusArray = rows.length > 0 ? rows.map((item) => {
  283 + return {
  284 + name: item.NAME_,
  285 + id: item.NAME_
  286 + }
  287 + }) : [];
  288 + statusArray.unshift({
  289 + name: '全部',
  290 + id: '全部'
  291 + });
  292 + this.statusList = statusArray;
  293 + console.log('大于this.statusList', this.statusList);
286 294
287 - },  
288 - async getOrderList() {  
289 - this.loading = true;  
290 - let params = {  
291 - current: this.pageParams.currentPage,  
292 - size: 10,  
293 - } 295 + },
  296 + async getOrderList() {
  297 + this.loading = true;
  298 + let params = {
  299 + current: this.pageParams.currentPage,
  300 + size: 10,
  301 + }
  302 + switch (this.pageParams.currentZt) {
  303 + case '全部':
  304 + params.zt = null;
  305 + break;
  306 + case '待支付':
  307 + params.zt = '201';
  308 + break;
  309 + case '待配送':
  310 + params.zt = '202';
  311 + break;
  312 + case '配送中':
  313 + params.zt = '203';
  314 + break;
  315 + case '已完成':
  316 + params.zt = '204';
  317 + break;
  318 + case '取消中':
  319 + params.zt = '205';
  320 + break;
  321 + case '退款中':
  322 + params.zt = '206';
  323 + break;
  324 + case '已取消':
  325 + params.zt = '207';
  326 + break;
  327 + }
  328 + // setTimeout(async()=>{
  329 + let result = await this.$api.orderApi.getOrderList(params);
  330 + let {
  331 + code,
  332 + value
  333 + } = result;
  334 + // let { current, records,size,total} = value;
  335 + // this.orderCardList = records;
  336 + if (code == 200) {
  337 + let {
  338 + current,
  339 + records,
  340 + size,
  341 + total
  342 + } = value;
  343 + let allTotal = this.pageParams.currentPage * this.pageParams.size
  344 + this.total = total;
  345 + const newlist = records;
  346 + if (this.pageParams.currentPage === 1) {
  347 + this.orderCardList = newlist;
  348 + } else {
  349 + this.orderCardList.push(...newlist)
  350 + }
  351 + if (this.orderCardList.length < allTotal) {
  352 + this.status = 'nomore'
  353 + }
  354 + this.orderCardList.map(async (item) => {
  355 + item.ddxqList.map(async (vitem) => {
  356 + let JsonParse = JSON.parse(vitem.fTp);
  357 + let images = await this.$getPhotoUrl(JsonParse[0].response.fileId);
  358 + vitem.fTp = images;
  359 + this.$forceUpdate();
  360 + });
  361 + this.$forceUpdate();
  362 + });
  363 + this.loading = false;
  364 + // this.orderCardList =JSON.parse(JSON.stringify(this.orderCardList));
  365 + console.log('打印this.orderCardList', this.orderCardList)
  366 + }
294 367
  368 + // },2000)
  369 + // let queryJson = JSON.stringify(params);
295 370
296 - switch (this.pageParams.currentZt) {  
297 - case '全部':  
298 - params.zt=null;  
299 - break;  
300 - case '待配送':  
301 - params.zt='202';  
302 - break;  
303 - case '配送中':  
304 - params.zt='203';  
305 - break;  
306 - case '已完成':  
307 - params.zt='204';  
308 - break;  
309 - case '已取消':  
310 - params.zt='207';  
311 - break;  
312 - }  
313 - // setTimeout(async()=>{  
314 - let result = await this.$api.orderApi.getOrderList(params);  
315 - let {  
316 - code,  
317 - value  
318 - } = result;  
319 - // let { current, records,size,total} = value;  
320 - // this.orderCardList = records;  
321 - if (code == 200) {  
322 - let {  
323 - current,  
324 - records,  
325 - size,  
326 - total  
327 - } = value;  
328 - let allTotal = this.pageParams.currentPage * this.pageParams.size  
329 - this.total = total;  
330 - const newlist = records;  
331 - if (this.pageParams.currentPage === 1) {  
332 - this.orderCardList = newlist;  
333 - } else {  
334 - this.orderCardList.push(...newlist)  
335 - }  
336 - if (this.orderCardList.length < allTotal) {  
337 - this.status = 'nomore'  
338 - }  
339 - this.orderCardList.map(async (item) => {  
340 - item.ddxqList.map(async (vitem) => {  
341 - let JsonParse = JSON.parse(vitem.fTp);  
342 - let images = await this.$getPhotoUrl(JsonParse[0].response.fileId);  
343 - vitem.fTp = images;  
344 - this.$forceUpdate();  
345 - });  
346 - this.$forceUpdate();  
347 - });  
348 - this.loading = false;  
349 - // this.orderCardList =JSON.parse(JSON.stringify(this.orderCardList));  
350 - console.log('打印this.orderCardList', this.orderCardList)  
351 - }  
352 -  
353 - // },2000)  
354 - // let queryJson = JSON.stringify(params);  
355 -  
356 - },  
357 - tabChange(e) {  
358 - this.current = e.index;  
359 - this.pageParams.currentZt = e.name;  
360 - this.pageParams.currentPage = 1;  
361 - this.orderCardList = [];  
362 - this.getOrderList();  
363 - },  
364 - openScan() {  
365 - this.$refs.scanCode.open();  
366 - },  
367 - close() {  
368 - this.$refs.scanCode.close();  
369 - }  
370 - }  
371 -} 371 + },
  372 + tabChange(e) {
  373 + console.log("tabChange e", e);
  374 + this.current = e.index;
  375 + this.pageParams.currentZt = e.name;
  376 + this.pageParams.currentPage = 1;
  377 + this.orderCardList = [];
  378 + this.getOrderList();
  379 + },
  380 + openScan() {
  381 + this.$refs.scanCode.open();
  382 + },
  383 + close() {
  384 + this.$refs.scanCode.close();
  385 + }
  386 + }
  387 + }
372 </script> 388 </script>
373 389
374 <style lang="scss" scoped> 390 <style lang="scss" scoped>
375 -.container {  
376 - padding-bottom: 60px; 391 + .container {
  392 + padding-bottom: 60px;
377 393
378 - // background-color: #f1f1f1 !important;  
379 - ::v-deep.u-tabbar__placeholder {  
380 - display: none; 394 + // background-color: #f1f1f1 !important;
  395 + ::v-deep.u-tabbar__placeholder {
  396 + display: none;
381 397
382 - }  
383 -} 398 + }
  399 + }
384 400
385 -.tabCss {  
386 - // font-weight: ;  
387 -} 401 + .tabCss {
  402 + // font-weight: ;
  403 + }
388 </style> 404 </style>
389 <style lang="scss" scoped> 405 <style lang="scss" scoped>
390 -.orderCard {  
391 - margin: 10px;  
392 - padding: 10px;  
393 - background: #fff;  
394 - border-radius: 15px; 406 + .orderCard {
  407 + margin: 10px;
  408 + padding: 10px;
  409 + background: #fff;
  410 + border-radius: 15px;
395 411
396 - .psfsSty {  
397 - width: 70px;  
398 - height: 23px;  
399 - border-radius: 5px;  
400 - text-align: center;  
401 - line-height: 23px;  
402 - font-size: 12px;  
403 - } 412 + .psfsSty {
  413 + width: 70px;
  414 + height: 23px;
  415 + border-radius: 5px;
  416 + text-align: center;
  417 + line-height: 23px;
  418 + font-size: 12px;
  419 + }
404 420
405 - .ztSty {  
406 - font-family: "苹方 中等", 苹方, sans-serif;  
407 - font-weight: 400;  
408 - font-style: normal;  
409 - color: rgb(0, 174, 170);  
410 - background-color: #e6f7f7;  
411 - } 421 + .ztSty {
  422 + font-family: "苹方 中等", 苹方, sans-serif;
  423 + font-weight: 400;
  424 + font-style: normal;
  425 + color: rgb(0, 174, 170);
  426 + background-color: #e6f7f7;
  427 + }
412 428
413 - .psSty {  
414 - font-family: "苹方 中等", 苹方, sans-serif;  
415 - font-weight: 400;  
416 - font-style: normal;  
417 - color: rgb(255, 165, 0);  
418 - background-color: #fff6e6;  
419 - }  
420 -}  
421 -</style> 429 + .psSty {
  430 + font-family: "苹方 中等", 苹方, sans-serif;
  431 + font-weight: 400;
  432 + font-style: normal;
  433 + color: rgb(255, 165, 0);
  434 + background-color: #fff6e6;
  435 + }
  436 + }
  437 +</style>
422 \ No newline at end of file 438 \ No newline at end of file