jufubao-takeorder 1.0.2-beta4 → 1.0.2-beta6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/JfbTakeorderFilterOrderList/Api.js +16 -31
- package/src/components/JfbTakeorderFilterOrderList/Attr.js +10 -6
- package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderList.vue +304 -161
- package/src/components/JfbTakeorderFilterOrderList/Mock.js +1 -1
- package/src/components/JfbTakeorderFilterOrderList/cusAttr/advanced.js +26 -0
- package/src/components/JfbTakeorderFilterOrderList/cusAttr/content.js +9 -0
- package/src/components/JfbTakeorderFilterOrderList/cusAttr/style.js +11 -0
- package/src/components/JfbTakeorderIndex/Api.js +47 -1
- package/src/components/JfbTakeorderIndex/JfbTakeorderIndex.vue +221 -129
- package/src/components/JfbTakeorderIndex/Mock.js +4 -4
- package/src/components/JfbTakeorderIndex/components/cityPicker.vue +29 -21
- package/src/components/JfbTakeorderOrderDetail/Api.js +102 -0
- package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetail.vue +1031 -665
- package/src/components/JfbTakeorderOrderDetail/Mock.js +9 -9
- package/src/components/JfbTakeorderOrderDetail/components/CusEditQuote.vue +2 -13
- package/src/components/JfbTakeorderOrderDetail/components/products.vue +16 -13
- package/src/components/JfbTakeorderOrderList/Api.js +16 -31
- package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderList.vue +259 -123
- package/src/components/JfbTakeorderOrderList/Mock.js +1 -1
- package/src/components/JfbTakeorderOrderList/cusAttr/content.js +5 -5
- package/src/components/JfbTakeorderVoiceSwitch/Api.js +14 -33
- package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitch.vue +154 -105
- package/src/components/JfbTakeorderVoiceSwitch/Mock.js +2 -10
- package/src/components/JfbTakeorderFilterOrderList/components/order.vue +0 -277
- package/src/components/JfbTakeorderIndex/components/order.vue +0 -273
- package/src/components/JfbTakeorderOrderList/components/order.vue +0 -273
package/package.json
CHANGED
|
@@ -6,52 +6,37 @@
|
|
|
6
6
|
*/
|
|
7
7
|
module.exports = [
|
|
8
8
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
path: '/api/account/film/list-film-square',
|
|
9
|
+
mapFnName: 'getOrderList',
|
|
10
|
+
title: '订单列表',
|
|
11
|
+
path: '/takeorder/v1/order',
|
|
13
12
|
isRule: false,
|
|
14
13
|
params: {
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
tab: ['tab', 'String', '必选'],
|
|
15
|
+
order_type: ['订单类型', 'Number', '必选'],
|
|
16
|
+
page_token: ['page_token', 'Number', ''],
|
|
17
|
+
page_size: ['page_size', 'Number', ''],
|
|
17
18
|
},
|
|
18
19
|
isConsole: true,
|
|
19
20
|
disabled: true,
|
|
20
21
|
},
|
|
21
22
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
path: '/api/account/film/paiqi-date',
|
|
23
|
+
mapFnName: 'getNewOrderNotify',
|
|
24
|
+
title: '新订单通知-轮询(5s轮询一次)',
|
|
25
|
+
path: '/takeorder/v1/new-order/notify',
|
|
26
26
|
isRule: false,
|
|
27
27
|
params: {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
order_type: ['订单类型', 'Number', '必选'],
|
|
29
|
+
max_id: ['订单列表的最大ID,如果不存在,直接传递 0', 'Number', ''],
|
|
30
30
|
},
|
|
31
31
|
isConsole: true,
|
|
32
32
|
disabled: true,
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
path: '/api/account/film/paiqi-date',
|
|
35
|
+
mapFnName: 'getUserConfig',
|
|
36
|
+
title: '获取用户配置',
|
|
37
|
+
path: '/takeorder/v1/user-config',
|
|
39
38
|
isRule: false,
|
|
40
|
-
params: {
|
|
41
|
-
film_id: ['电影id', 'Number', '必选'],
|
|
42
|
-
},
|
|
43
|
-
isConsole: true,
|
|
44
|
-
disabled: true,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
//设置方法名字当别忘记加上【模块名字】:Filter
|
|
48
|
-
mapFnName: 'addFilterFilmcart',
|
|
49
|
-
title: '添加购物车',
|
|
50
|
-
path: '/api/account/film/paiqi-date',
|
|
51
|
-
isRule: false,
|
|
52
|
-
params: {
|
|
53
|
-
film_id: ['电影id', 'Number', '必选'],
|
|
54
|
-
},
|
|
39
|
+
params: {},
|
|
55
40
|
isConsole: true,
|
|
56
41
|
disabled: true,
|
|
57
42
|
},
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
import Style from './cusAttr/style'
|
|
3
|
+
import Advanced from './cusAttr/advanced'
|
|
4
|
+
import Content from './cusAttr/content'
|
|
2
5
|
|
|
3
|
-
/**
|
|
4
|
-
* @description 当表单组件中有联动操作时候,使用方法进行返回
|
|
5
|
-
*/
|
|
6
6
|
export default {
|
|
7
7
|
style: [],
|
|
8
|
-
content: (data) => {
|
|
9
|
-
return [
|
|
8
|
+
content: (data, gValue, gColor, oldData) => {
|
|
9
|
+
return [
|
|
10
|
+
...Content(data, gValue, gColor, oldData),
|
|
11
|
+
...Style(data, gValue, gColor, oldData),
|
|
12
|
+
...Advanced(data, gValue, gColor, oldData),
|
|
13
|
+
].filter(i => i)
|
|
10
14
|
},
|
|
11
15
|
advanced: [],
|
|
12
|
-
}
|
|
16
|
+
}
|
|
@@ -2,21 +2,28 @@
|
|
|
2
2
|
<view
|
|
3
3
|
class="jfb-takeorder-filter-order-list"
|
|
4
4
|
@click="handleEditxSelect"
|
|
5
|
-
:class="{ editx
|
|
5
|
+
:class="{ editx: isEditx && active }"
|
|
6
6
|
>
|
|
7
7
|
<!--#ifdef H5-->
|
|
8
8
|
<view
|
|
9
9
|
class="jfb-takeorder-filter-order-list__edit"
|
|
10
|
-
:class="{ editx
|
|
10
|
+
:class="{ editx: isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view
|
|
14
|
-
|
|
13
|
+
<view
|
|
14
|
+
class="jfb-takeorder-filter-order-list__edit-icon"
|
|
15
|
+
@click.stop="delEdit"
|
|
16
|
+
>
|
|
17
|
+
<xd-font-icon
|
|
18
|
+
icon="iconshanchu-01"
|
|
19
|
+
color="#fff"
|
|
20
|
+
size="30"
|
|
21
|
+
></xd-font-icon>
|
|
15
22
|
</view>
|
|
16
23
|
</view>
|
|
17
24
|
<!-- #endif -->
|
|
18
25
|
<view class="jfb-takeorder-filter-order-list__body">
|
|
19
|
-
<view class="fixed_top" :style="{top:
|
|
26
|
+
<view class="fixed_top" :style="{ top: layoutInfo.top - 2 + 'rpx' }">
|
|
20
27
|
<xd-tab
|
|
21
28
|
v-if="initStatus"
|
|
22
29
|
:tabIndex="tabIndex"
|
|
@@ -27,184 +34,320 @@
|
|
|
27
34
|
@onTab="handleChange"
|
|
28
35
|
></xd-tab>
|
|
29
36
|
</view>
|
|
30
|
-
<view style="height: 100rpx
|
|
37
|
+
<view style="height: 100rpx"></view>
|
|
31
38
|
<view v-for="(item, index) in orderList" :key="index">
|
|
32
|
-
<
|
|
39
|
+
<CusTakeorder
|
|
40
|
+
:isNeedCutDown="false"
|
|
33
41
|
:item="item"
|
|
34
42
|
:mainColor="mainColor"
|
|
35
|
-
:isNeedCutDown="false"
|
|
36
43
|
@expire="handleOrderExpire"
|
|
37
44
|
@btnEvent="handleBtnEvent"
|
|
38
|
-
></
|
|
45
|
+
></CusTakeorder>
|
|
39
46
|
</view>
|
|
47
|
+
<xd-no-data
|
|
48
|
+
icon-type="order"
|
|
49
|
+
:scale-size="2"
|
|
50
|
+
v-if="orderList && orderList.length === 0"
|
|
51
|
+
>暂无订单</xd-no-data
|
|
52
|
+
>
|
|
40
53
|
</view>
|
|
41
54
|
</view>
|
|
42
55
|
</template>
|
|
43
56
|
|
|
44
57
|
<script>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
components: {
|
|
56
|
-
XdFontIcon,
|
|
57
|
-
XdTab,
|
|
58
|
-
Order
|
|
59
|
-
},
|
|
60
|
-
mixins: [
|
|
61
|
-
componentsMixins, extsMixins, JfbTakeorderFilterOrderListMixin
|
|
62
|
-
],
|
|
63
|
-
data() {
|
|
64
|
-
return {
|
|
65
|
-
initStatus: false,
|
|
66
|
-
tabIndex: 0,
|
|
67
|
-
tabList: [
|
|
68
|
-
{"name": "全部", "value": 'all'},
|
|
69
|
-
{ "name": "待上报", "value": 'wait_report' },
|
|
70
|
-
{ "name": "待结算", "value": 'wait_settle' },
|
|
71
|
-
{"name": "已完成", "value": 'com'},
|
|
72
|
-
{ "name": "纠纷中", "value": 'dispute' },
|
|
73
|
-
],
|
|
74
|
-
page_size: 10,
|
|
75
|
-
page_token: 1,
|
|
76
|
-
hasNext: true,
|
|
77
|
-
orderList: [
|
|
78
|
-
{
|
|
79
|
-
id: 1,
|
|
80
|
-
num: 15,
|
|
81
|
-
people: 30,
|
|
82
|
-
remainingTime: 10,
|
|
83
|
-
shop_name: "味多美(北京西单大悦城店)",
|
|
84
|
-
brand_name: "味多美",
|
|
85
|
-
city: "北京市",
|
|
86
|
-
products: [
|
|
87
|
-
{
|
|
88
|
-
product_thumb:
|
|
89
|
-
"https://img.js.design/assets/img/68b554c9c3a1ea02642d7d2f.png#afa2b9b9d50bcd2f1394619ecc488a99",
|
|
90
|
-
product_name:
|
|
91
|
-
"贝欧宝 BIOBOR贝欧宝维生素C+叶黄素酯软糖118g多重营养3D小熊造型糖果Q弹维生素C+叶黄素酯软糖",
|
|
92
|
-
product_sku: "118g",
|
|
93
|
-
minPrice: 132,
|
|
94
|
-
maxPrice: 1232,
|
|
95
|
-
num: 15,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
product_thumb:
|
|
99
|
-
"https://img.js.design/assets/img/68b554c9c3a1ea02642d7d2f.png#afa2b9b9d50bcd2f1394619ecc488a99",
|
|
100
|
-
product_name:
|
|
101
|
-
"贝欧宝 BIOBOR贝欧宝维生素C+叶黄素酯软糖118g多重营养3D小熊造型糖果Q弹维生素C+叶黄素酯软糖",
|
|
102
|
-
product_sku: "450g",
|
|
103
|
-
minPrice: 456,
|
|
104
|
-
maxPrice: 1546,
|
|
105
|
-
num: 16,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
market_price: 4000,
|
|
109
|
-
minPrice: 456,
|
|
110
|
-
maxPrice: 1546,
|
|
111
|
-
order_status: 1,
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
//todo
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
watch: {
|
|
118
|
-
container(value, oldValue) {
|
|
119
|
-
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
120
|
-
if (this.$configProject['isPreview']) this.init(value)
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
created() {
|
|
124
|
-
this.init(this.container);
|
|
58
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
59
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
60
|
+
import JfbTakeorderFilterOrderListMixin from "./JfbTakeorderFilterOrderListMixin";
|
|
61
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
62
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
63
|
+
import XdTab from "@/components/XdTab/XdTab";
|
|
64
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
65
|
+
import CusTakeorder from "@/components/CusTakeorder/CusTakeorder";
|
|
66
|
+
import XdNoData from "@/components/XdNoData/XdNoData";
|
|
67
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
125
68
|
|
|
69
|
+
export default {
|
|
70
|
+
name: "JfbTakeorderFilterOrderList",
|
|
71
|
+
components: {
|
|
72
|
+
XdFontIcon,
|
|
73
|
+
XdTab,
|
|
74
|
+
CusTakeorder,
|
|
75
|
+
XdNoData,
|
|
76
|
+
},
|
|
77
|
+
mixins: [componentsMixins, extsMixins, JfbTakeorderFilterOrderListMixin],
|
|
78
|
+
data() {
|
|
79
|
+
return {
|
|
80
|
+
initStatus: false,
|
|
81
|
+
tabIndex: 0,
|
|
82
|
+
tabList: [
|
|
83
|
+
{ name: "全部", value: "all" },
|
|
84
|
+
{ name: "待上报", value: "wait_report" },
|
|
85
|
+
{ name: "待结算", value: "wait_settle" },
|
|
86
|
+
{ name: "已完成", value: "com" },
|
|
87
|
+
{ name: "纠纷中", value: "dispute" },
|
|
88
|
+
],
|
|
89
|
+
page_size: 10,
|
|
90
|
+
page_token: 1,
|
|
91
|
+
hasNext: true,
|
|
92
|
+
next_page_token: "",
|
|
93
|
+
orderList: [],
|
|
94
|
+
order_type: "hourdash",
|
|
95
|
+
orderTab: "",
|
|
96
|
+
order_detail_path: "",
|
|
97
|
+
isPreview: false,
|
|
98
|
+
isOpenNew: "N",
|
|
99
|
+
isOpenWin: "N",
|
|
100
|
+
max_id: null,
|
|
126
101
|
//todo
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
watch: {
|
|
105
|
+
container(value, oldValue) {
|
|
106
|
+
if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
|
|
107
|
+
if (this.$configProject["isPreview"]) this.init(value);
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
created() {
|
|
111
|
+
this.init(this.container);
|
|
112
|
+
},
|
|
113
|
+
destroyed() {
|
|
114
|
+
// 清除定时器
|
|
115
|
+
this.stopPolling();
|
|
116
|
+
},
|
|
117
|
+
methods: {
|
|
118
|
+
onJfbLoad(options) {
|
|
119
|
+
let status = options.status || options.type;
|
|
120
|
+
//地址栏设置值
|
|
121
|
+
if (status) {
|
|
122
|
+
this.tabIndex = this.tabList.findIndex((item) => {
|
|
123
|
+
return item.value === status;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
this.initStatus = true;
|
|
127
|
+
this.getList(status);
|
|
128
|
+
if (!this.isPreview) {
|
|
129
|
+
jfbRootExec("getUserConfig", {
|
|
130
|
+
vm: this,
|
|
131
|
+
data: {},
|
|
132
|
+
}).then((configRes) => {
|
|
133
|
+
this.isOpenNew = configRes.is_open_new_order_notify_audio;
|
|
134
|
+
this.isOpenWin = configRes.is_open_win_order_audio;
|
|
135
|
+
// 立即调用一次
|
|
136
|
+
this.handleGetNew();
|
|
137
|
+
// 启动定时器,每5秒调用一次
|
|
138
|
+
this.startPolling();
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
/**
|
|
143
|
+
* @description 监听事件变化
|
|
144
|
+
* @param container {object} 业务组件对象自己
|
|
145
|
+
*/
|
|
146
|
+
init(container) {
|
|
147
|
+
this.order_detail_path = getContainerPropsValue(
|
|
148
|
+
container,
|
|
149
|
+
"content.order_detail_path",
|
|
150
|
+
{ value: "" }
|
|
151
|
+
).value;
|
|
152
|
+
if (this.$configProject["isPreview"]) {
|
|
153
|
+
this.isPreview = true;
|
|
154
|
+
}
|
|
127
155
|
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
156
|
+
getList(status) {
|
|
157
|
+
jfbRootExec("getOrderList", {
|
|
158
|
+
vm: this,
|
|
159
|
+
data: {
|
|
160
|
+
tab: status,
|
|
161
|
+
order_type: this.order_type,
|
|
162
|
+
page_token: this.page_token,
|
|
163
|
+
page_size: this.page_size,
|
|
164
|
+
},
|
|
165
|
+
})
|
|
166
|
+
.then((res) => {
|
|
167
|
+
// 设置订单列表数据
|
|
168
|
+
let list = res.list.map((item) => {
|
|
169
|
+
item.product_list = item.product_list.map((prod, i) => {
|
|
170
|
+
prod["product_thumb"] = prod.product_thumb
|
|
171
|
+
? getServiceUrl(prod.product_thumb, "size3")
|
|
172
|
+
: "";
|
|
173
|
+
return prod;
|
|
174
|
+
});
|
|
175
|
+
return item;
|
|
135
176
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
177
|
+
if (this.page_token === 1) {
|
|
178
|
+
this.orderList = list;
|
|
179
|
+
} else {
|
|
180
|
+
this.orderList = this.orderList.concat(list);
|
|
181
|
+
}
|
|
182
|
+
this.hasNext = res.next_page_token !== "";
|
|
183
|
+
this.next_page_token = res.next_page_token;
|
|
184
|
+
})
|
|
185
|
+
.catch((err) => {
|
|
186
|
+
console.error("获取订单列表失败:", err);
|
|
187
|
+
});
|
|
188
|
+
},
|
|
189
|
+
// 语音提示方法
|
|
190
|
+
voiceAlert(type) {
|
|
191
|
+
// #ifdef H5
|
|
192
|
+
this.playWebSpeech(type);
|
|
193
|
+
// #endif
|
|
145
194
|
|
|
146
|
-
|
|
195
|
+
// #ifdef APP-PLUS || MP-WEIXIN
|
|
196
|
+
this.playAudioFile(type);
|
|
197
|
+
// #endif
|
|
198
|
+
},
|
|
147
199
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
params["type"] = item.status;
|
|
162
|
-
history.replaceState(
|
|
163
|
-
null,
|
|
164
|
-
null,
|
|
165
|
-
`?${this.$xdUniHelper.jsonToParams(params)}`
|
|
166
|
-
);
|
|
167
|
-
// #endif
|
|
168
|
-
},
|
|
169
|
-
onJfbScroll(options) {
|
|
170
|
-
console.log('event.onJfbScroll', options)
|
|
171
|
-
},
|
|
172
|
-
onJfbReachBottom(options) {
|
|
173
|
-
console.log('event.onJfbReachBottom', options)
|
|
174
|
-
},
|
|
175
|
-
onJfbShow(options) {
|
|
176
|
-
console.log('event.onJfbShow', options)
|
|
177
|
-
},
|
|
178
|
-
onJfbHide(options) {
|
|
179
|
-
console.log('event.onJfbHide', options)
|
|
180
|
-
},
|
|
181
|
-
onJfbBack(options) {
|
|
182
|
-
console.log('event.onJfbBack', options)
|
|
183
|
-
},
|
|
184
|
-
onJfbUpdate(...data) {
|
|
185
|
-
console.log('event.onJfbUpdate', data)
|
|
186
|
-
},
|
|
187
|
-
onJfbCustomEvent(options) {
|
|
188
|
-
console.log('event.onJfbReachBottom', options)
|
|
189
|
-
},
|
|
190
|
-
}
|
|
191
|
-
}
|
|
200
|
+
// H5端使用Web Speech API
|
|
201
|
+
playWebSpeech(type) {
|
|
202
|
+
if ("speechSynthesis" in window) {
|
|
203
|
+
const msg = new SpeechSynthesisUtterance();
|
|
204
|
+
msg.text =
|
|
205
|
+
type === "new"
|
|
206
|
+
? "您有新的订单请及时处理"
|
|
207
|
+
: "您有新的中标订单请及时处理";
|
|
208
|
+
msg.lang = "zh-CN";
|
|
209
|
+
msg.volume = 1;
|
|
210
|
+
speechSynthesis.speak(msg);
|
|
211
|
+
}
|
|
212
|
+
},
|
|
192
213
|
|
|
214
|
+
// App和小程序端使用音频文件
|
|
215
|
+
playAudioFile() {
|
|
216
|
+
const innerAudioContext = uni.createInnerAudioContext();
|
|
217
|
+
innerAudioContext.autoplay = true;
|
|
218
|
+
innerAudioContext.src = "/static/order-alert.mp3";
|
|
219
|
+
innerAudioContext.onPlay(() => {
|
|
220
|
+
console.log("开始播放");
|
|
221
|
+
});
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* 处理按钮事件,跳转到订单详情
|
|
225
|
+
* @param {Object} item - 订单对象
|
|
226
|
+
*/
|
|
227
|
+
handleBtnEvent({ item, btn }) {
|
|
228
|
+
// 跳转到订单详情页
|
|
229
|
+
this.$xdUniHelper.navigateTo({
|
|
230
|
+
url: `${this.order_detail_path}?order_id=${item.order_id}`,
|
|
231
|
+
});
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* 获取新订单通知
|
|
235
|
+
*/
|
|
236
|
+
handleGetNew() {
|
|
237
|
+
jfbRootExec("getNewOrderNotify", {
|
|
238
|
+
vm: this,
|
|
239
|
+
data: {
|
|
240
|
+
order_type: this.order_type,
|
|
241
|
+
max_id: this.max_id || 0,
|
|
242
|
+
},
|
|
243
|
+
}).then((res) => {
|
|
244
|
+
if (res.is_exist_new_order && res.is_exist_win_order) {
|
|
245
|
+
if (this.isOpenNew === "Y") {
|
|
246
|
+
this.voiceAlert({ type: "new",filePath: 'https://img.jufubao.cn/takeorder/new_order.mp3' });
|
|
247
|
+
}
|
|
248
|
+
if (this.isOpenWin === "Y") {
|
|
249
|
+
setTimeout(() => {
|
|
250
|
+
this.voiceAlert({ type: "win",filePath: 'https://img.jufubao.cn/takeorder/wait_order.mp3' });
|
|
251
|
+
}, 1000);
|
|
252
|
+
}
|
|
253
|
+
} else if (res.is_exist_new_order) {
|
|
254
|
+
if (this.isOpenNew === "Y") {
|
|
255
|
+
this.voiceAlert({ type: "new",filePath: 'https://img.jufubao.cn/takeorder/new_order.mp3' });
|
|
256
|
+
}
|
|
257
|
+
} else if (res.is_exist_win_order) {
|
|
258
|
+
if (this.isOpenWin === "Y") {
|
|
259
|
+
this.voiceAlert({ type: "win",filePath: 'https://img.jufubao.cn/takeorder/wait_order.mp3' });
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
this.max_id = res.new_order_max_id;
|
|
263
|
+
this.showNew = res.is_exist_new_order;
|
|
264
|
+
});
|
|
265
|
+
},
|
|
266
|
+
handleChange(item, index) {
|
|
267
|
+
if (index === this.tabIndex) return;
|
|
268
|
+
this.tabIndex = index;
|
|
269
|
+
this.orderTab = item.value;
|
|
270
|
+
this.page_token = 1;
|
|
271
|
+
this.hasNext = true;
|
|
272
|
+
this.getList(item.value);
|
|
273
|
+
// #ifdef H5
|
|
274
|
+
let params = this.$xdUniHelper.parseURL().params;
|
|
275
|
+
params["type"] = item.value;
|
|
276
|
+
history.replaceState(
|
|
277
|
+
null,
|
|
278
|
+
null,
|
|
279
|
+
`?${this.$xdUniHelper.jsonToParams(params)}`
|
|
280
|
+
);
|
|
281
|
+
// #endif
|
|
282
|
+
},
|
|
283
|
+
/**
|
|
284
|
+
* 启动轮询定时器
|
|
285
|
+
*/
|
|
286
|
+
startPolling() {
|
|
287
|
+
// 如果已经存在定时器,先清除
|
|
288
|
+
if (this.pollTimer) {
|
|
289
|
+
clearInterval(this.pollTimer);
|
|
290
|
+
}
|
|
291
|
+
// 每5秒调用一次接口
|
|
292
|
+
this.pollTimer = setInterval(() => {
|
|
293
|
+
this.handleGetNew();
|
|
294
|
+
}, 5000);
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* 停止轮询定时器
|
|
298
|
+
*/
|
|
299
|
+
stopPolling() {
|
|
300
|
+
if (this.pollTimer) {
|
|
301
|
+
clearInterval(this.pollTimer);
|
|
302
|
+
this.pollTimer = null;
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
onJfbScroll(options) {
|
|
306
|
+
console.log("event.onJfbScroll", options);
|
|
307
|
+
},
|
|
308
|
+
onJfbReachBottom(options) {
|
|
309
|
+
if (this.hasNext) {
|
|
310
|
+
this.page_token = this.next_page_token;
|
|
311
|
+
this.getList(this.orderTab);
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
onJfbShow(options) {
|
|
315
|
+
// 页面显示时恢复轮询
|
|
316
|
+
if (!this.pollTimer) {
|
|
317
|
+
this.startPolling();
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
onJfbHide(options) {
|
|
321
|
+
// 页面隐藏时暂停轮询
|
|
322
|
+
this.stopPolling();
|
|
323
|
+
console.log("event.onJfbHide", options);
|
|
324
|
+
},
|
|
325
|
+
onJfbBack(options) {
|
|
326
|
+
console.log("event.onJfbBack", options);
|
|
327
|
+
},
|
|
328
|
+
onJfbUpdate(...data) {
|
|
329
|
+
console.log("event.onJfbUpdate", data);
|
|
330
|
+
},
|
|
331
|
+
onJfbCustomEvent(options) {
|
|
332
|
+
console.log("event.onJfbReachBottom", options);
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
};
|
|
193
336
|
</script>
|
|
194
337
|
|
|
195
338
|
<style scoped lang="less">
|
|
196
|
-
|
|
339
|
+
@import "./JfbTakeorderFilterOrderListLess.less";
|
|
197
340
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
341
|
+
.jfb-takeorder-filter-order-list {
|
|
342
|
+
&__body {
|
|
343
|
+
.fixed_top {
|
|
344
|
+
position: fixed;
|
|
345
|
+
top: 0;
|
|
346
|
+
left: 0;
|
|
347
|
+
width: 100%;
|
|
348
|
+
background: #ffffff;
|
|
349
|
+
z-index: 999;
|
|
208
350
|
}
|
|
209
351
|
}
|
|
352
|
+
}
|
|
210
353
|
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
getOrderList: { "list": [{ "order_id": "h867336984252252161", "order_status": "quoting", "shop_name": "星巴克(平谷国泰店)", "brand_name": "星巴克", "province_name": "平谷区", "market_amount": 525, "suggest_min_quotation": 116, "suggest_max_quotation": 171, "rest_quotation_time": 12, "rest_receive_time": 0, "rest_report_time": 0, "quotation_person_count": 0, "user_quotation": 0, "user_quotation_status": "wait_quote", "product_list": [{ "product_name": "星巴克经典咖啡", "product_sku_name": "大杯\/特别热\/经典糖\/标准\/全脂牛奶", "product_thumb": "https:\/\/www.shuomingshu.cn\/wp-content\/uploads\/images\/2023\/01\/07\/dc0bdf6bfedb4038911ec6550fd31d62_5t1vcuagbok.jpg", "product_num": 5, "market_price": 382, "suggest_min_quotation": 23, "suggest_max_quotation": 34, "user_quotation": 0 }], "button_list": [] }], "next_page_token": "", "request_id": "c1dfb0423e9c83df" },
|
|
6
6
|
|
|
7
7
|
updateFilterFilmPaiqiDate:{},
|
|
8
8
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
import {
|
|
3
|
+
dataVal,
|
|
4
|
+
statusDataVal,
|
|
5
|
+
statusShow
|
|
6
|
+
} from "@/utils/AttrTools";
|
|
7
|
+
export default (data, gValue, gColor, oldData = {}) => {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
label: '订单详情',
|
|
11
|
+
ele: 'xd-select-pages-path',
|
|
12
|
+
labelInline: true,
|
|
13
|
+
valueKey: 'order_detail_path',
|
|
14
|
+
placeholder: '请选择订单详情页面',
|
|
15
|
+
className: 'input100',
|
|
16
|
+
value: dataVal({ data, key: 'order_detail_path', dValue: null, gValue }),
|
|
17
|
+
groupKey: 'advanced',
|
|
18
|
+
inline: false,
|
|
19
|
+
setting: {
|
|
20
|
+
mode: 'new',
|
|
21
|
+
router: XdBus.getParentApi('getPagesTree'),
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
].filter(i => i)
|
|
25
|
+
}
|
|
26
|
+
|