jufubao-takeorder 1.0.2-beta3 → 1.0.2-beta5

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.
Files changed (31) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbTakeorderFilterOrderList/Api.js +16 -31
  3. package/src/components/JfbTakeorderFilterOrderList/Attr.js +9 -41
  4. package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderList.vue +319 -79
  5. package/src/components/JfbTakeorderFilterOrderList/Mock.js +1 -1
  6. package/src/components/JfbTakeorderFilterOrderList/cusAttr/advanced.js +26 -0
  7. package/src/components/JfbTakeorderFilterOrderList/cusAttr/content.js +9 -0
  8. package/src/components/JfbTakeorderFilterOrderList/cusAttr/style.js +11 -0
  9. package/src/components/JfbTakeorderIndex/Api.js +47 -1
  10. package/src/components/JfbTakeorderIndex/JfbTakeorderIndex.vue +218 -129
  11. package/src/components/JfbTakeorderIndex/Mock.js +4 -4
  12. package/src/components/JfbTakeorderIndex/components/cityPicker.vue +29 -21
  13. package/src/components/JfbTakeorderOrderDetail/Api.js +91 -24
  14. package/src/components/JfbTakeorderOrderDetail/Attr.js +9 -41
  15. package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetail.vue +1174 -77
  16. package/src/components/JfbTakeorderOrderDetail/Mock.js +9 -9
  17. package/src/components/JfbTakeorderOrderDetail/components/CusEditQuote.vue +150 -0
  18. package/src/components/JfbTakeorderOrderDetail/components/products.vue +141 -0
  19. package/src/components/JfbTakeorderOrderDetail/cusAttr/advanced.js +12 -0
  20. package/src/components/JfbTakeorderOrderDetail/cusAttr/content.js +233 -0
  21. package/src/components/JfbTakeorderOrderDetail/cusAttr/style.js +11 -0
  22. package/src/components/JfbTakeorderOrderList/Api.js +16 -31
  23. package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderList.vue +259 -122
  24. package/src/components/JfbTakeorderOrderList/Mock.js +1 -1
  25. package/src/components/JfbTakeorderOrderList/cusAttr/content.js +14 -0
  26. package/src/components/JfbTakeorderVoiceSwitch/Api.js +14 -33
  27. package/src/components/JfbTakeorderVoiceSwitch/Attr.js +1 -37
  28. package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitch.vue +159 -81
  29. package/src/components/JfbTakeorderVoiceSwitch/Mock.js +2 -10
  30. package/src/components/JfbTakeorderIndex/components/order.vue +0 -273
  31. package/src/components/JfbTakeorderOrderList/components/order.vue +0 -273
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-takeorder",
3
- "version": "1.0.2-beta3",
3
+ "version": "1.0.2-beta5",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -6,52 +6,37 @@
6
6
  */
7
7
  module.exports = [
8
8
  {
9
- //设置方法名字当别忘记加上【模块名字】:Filter
10
- mapFnName: 'getFilterByIdFilmSquate',
11
- title: '获取电影广场列表',
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
- last_key: ['当前页', 'Number', '必选'],
16
- page_size: ['每页数量', 'Number', '必选'],
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
- //设置方法名字当别忘记加上【模块名字】:Filter
23
- mapFnName: 'updateFilterFilmPaiqiDate',
24
- title: '更新排期',
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
- film_id: ['电影id', 'Number', '必选'],
29
- cinema_id: ['影院id', 'Number', '必选'],
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
- //设置方法名字当别忘记加上【模块名字】:Filter
36
- mapFnName: 'removeFilterFilmAddress',
37
- title: '删除我的配送地址',
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,48 +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) => {
8
+ content: (data, gValue, gColor, oldData) => {
9
9
  return [
10
- {
11
- label: '背景颜色:',
12
- ele: 'xd-color',
13
- valueKey: 'bgColor',
14
- value: data.bgColor || '',
15
- placeholder: '请输入占位框背景颜色',
16
- groupKey:'content',
17
- },
18
- {
19
- label: '选中路径:',
20
- groupKey:'advanced',
21
- className: 'input100',
22
- ele: 'xd-select-pages-path',
23
- valueKey: 'select-pages-path',
24
- value: data['select-pages-path'] || null,
25
- setting: {
26
- router: XdBus.getParentApi('getPagesTree')
27
- },
28
- },
29
- data.bgColor && {
30
- label: '高度:',
31
- ele: 'el-input',
32
- groupKey:'style',
33
- type: 'number',
34
- valueKey: 'height',
35
- value: data.height || 100,
36
- placeholder: '请输入占位框高度,单位像素,默认:10px',
37
- className: 'input60',
38
- },
39
- {
40
- label: '', //label
41
- groupKey:'advanced',
42
- ele: 'slot', //package 名称
43
- slot: 'is_reference',
44
- },
45
- ].filter(i=>i)
10
+ ...Content(data, gValue, gColor, oldData),
11
+ ...Style(data, gValue, gColor, oldData),
12
+ ...Advanced(data, gValue, gColor, oldData),
13
+ ].filter(i => i)
46
14
  },
47
15
  advanced: [],
48
- };
16
+ }
@@ -2,112 +2,352 @@
2
2
  <view
3
3
  class="jfb-takeorder-filter-order-list"
4
4
  @click="handleEditxSelect"
5
- :class="{ editx : isEditx && active }"
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 : isEditx && active }"
10
+ :class="{ editx: isEditx && active }"
11
11
  v-if="isEditx && active"
12
12
  >
13
- <view class="jfb-takeorder-filter-order-list__edit-icon" @click.stop="delEdit">
14
- <xd-font-icon icon="iconshanchu-01" color="#fff" size="30"></xd-font-icon>
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>测试插件( {{containerId}} )</view>
26
+ <view class="fixed_top" :style="{ top: layoutInfo.top - 2 + 'rpx' }">
27
+ <xd-tab
28
+ v-if="initStatus"
29
+ :tabIndex="tabIndex"
30
+ :list="tabList"
31
+ show-footer-line
32
+ fontSize="28"
33
+ actFontSize="28"
34
+ @onTab="handleChange"
35
+ ></xd-tab>
36
+ </view>
37
+ <view style="height: 100rpx"></view>
38
+ <view v-for="(item, index) in orderList" :key="index">
39
+ <CusTakeorder
40
+ :isNeedCutDown="false"
41
+ :item="item"
42
+ :mainColor="mainColor"
43
+ @expire="handleOrderExpire"
44
+ @btnEvent="handleBtnEvent"
45
+ ></CusTakeorder>
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
+ >
20
53
  </view>
21
54
  </view>
22
55
  </template>
23
56
 
24
57
  <script>
25
- import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
26
- import { jfbRootExec } from "@/utils/xd.event";
27
- import JfbTakeorderFilterOrderListMixin from "./JfbTakeorderFilterOrderListMixin";
28
- import { getContainerPropsValue } from "@/utils/xd.base";
29
- import componentsMixins from "@/mixins/componentsMixins";
30
- import extsMixins from "@/mixins/extsMixins";
31
- export default {
32
- name: "JfbTakeorderFilterOrderList",
33
- components: {
34
- XdFontIcon
35
- },
36
- mixins: [
37
- componentsMixins, extsMixins, JfbTakeorderFilterOrderListMixin
38
- ],
39
- data() {
40
- return {
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";
41
68
 
42
- //todo
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,
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
+ });
43
140
  }
44
141
  },
45
- watch: {
46
- container(value, oldValue) {
47
- if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
48
- if (this.$configProject['isPreview']) this.init(value)
49
- },
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
+ }
50
155
  },
51
- created() {
52
- this.init(this.container);
53
-
54
- //todo
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;
176
+ });
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
+ });
55
188
  },
56
- methods: {
57
- onJfbLoad(options) {
58
-
59
- // jfbRootExec('baiduUserLogin', {
189
+ // 语音提示方法
190
+ voiceAlert(type) {
191
+ // #ifdef H5
192
+ this.playWebSpeech(type);
193
+ // #endif
60
194
 
61
- // vm: this,// data: {
62
-
63
- // account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
64
-
65
- // }
66
-
67
- // }).then().catch()
68
- },
69
- /**
70
- * @description 监听事件变化
71
- * @param container {object} 业务组件对象自己
72
- */
73
- init(container) {
74
-
75
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
195
+ // #ifdef APP-PLUS || MP-WEIXIN
196
+ this.playAudioFile(type);
197
+ // #endif
198
+ },
76
199
 
77
- //this.height = getContainerPropsValue(container, 'content.height', 10);
78
- },
79
- onJfbScroll(options) {
80
- console.log('event.onJfbScroll', options)
81
- },
82
- onJfbReachBottom(options) {
83
- console.log('event.onJfbReachBottom', options)
84
- },
85
- onJfbShow(options) {
86
- console.log('event.onJfbShow', options)
87
- },
88
- onJfbHide(options) {
89
- console.log('event.onJfbHide', options)
90
- },
91
- onJfbBack(options) {
92
- console.log('event.onJfbBack', options)
93
- },
94
- onJfbUpdate(...data) {
95
- console.log('event.onJfbUpdate', data)
96
- },
97
- onJfbCustomEvent(options) {
98
- console.log('event.onJfbReachBottom', options)
99
- },
100
- }
101
- }
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
+ },
102
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
+ };
103
336
  </script>
104
337
 
105
338
  <style scoped lang="less">
106
- @import "./JfbTakeorderFilterOrderListLess.less";
107
-
108
- .jfb-takeorder-filter-order-list {
109
- &__body{
339
+ @import "./JfbTakeorderFilterOrderListLess.less";
110
340
 
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;
111
350
  }
112
351
  }
352
+ }
113
353
  </style>
@@ -2,7 +2,7 @@
2
2
 
3
3
  module.exports = {
4
4
 
5
- getFilterByIdFilmSquate:{},
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
+
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ import { customVal, dataVal } from "@/utils/AttrTools";
4
+
5
+ export default (data, gValue, gColor, oldData = {}) => {
6
+ return [
7
+ ].filter(i => i)
8
+ }
9
+
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+ import {
3
+ dataVal,
4
+ statusShow,
5
+ statusDataVal,
6
+ } from "@/utils/AttrTools";
7
+
8
+ export default function (data, gValue, gColor, oldData) {
9
+ return [].filter(i => i)
10
+ }
11
+
@@ -22,5 +22,51 @@ module.exports = [
22
22
  params: {},
23
23
  isConsole: true,
24
24
  disabled: true,
25
- }
25
+ },
26
+ {
27
+ mapFnName: 'getOrderList',
28
+ title: '订单列表',
29
+ path: '/takeorder/v1/order',
30
+ isRule: false,
31
+ params: {
32
+ tab: ['tab', 'String', '必选'],
33
+ order_type: ['订单类型', 'Number', '必选'],
34
+ page_token: ['page_token', 'Number', ''],
35
+ page_size: ['page_size', 'Number', ''],
36
+ },
37
+ isConsole: true,
38
+ disabled: true,
39
+ },
40
+ {
41
+ mapFnName: 'getNewOrderNotify',
42
+ title: '新订单通知-轮询(5s轮询一次)',
43
+ path: '/takeorder/v1/new-order/notify',
44
+ isRule: false,
45
+ params: {
46
+ order_type: ['订单类型', 'Number', '必选'],
47
+ max_id: ['订单列表的最大ID,如果不存在,直接传递 0', 'Number', ''],
48
+ },
49
+ isConsole: true,
50
+ disabled: true,
51
+ },
52
+ {
53
+ mapFnName: 'getBrandOptions',
54
+ title: '品牌列表',
55
+ path: '/takeorder/v1/brand/options',
56
+ isRule: false,
57
+ params: {
58
+ order_type: ['订单类型', 'Number', '必选'],
59
+ },
60
+ isConsole: true,
61
+ disabled: true,
62
+ },
63
+ {
64
+ mapFnName: 'getUserConfig',
65
+ title: '获取用户配置',
66
+ path: '/takeorder/v1/user-config',
67
+ isRule: false,
68
+ params: {},
69
+ isConsole: true,
70
+ disabled: true,
71
+ },
26
72
  ];