jufubao-takeorder 1.0.1 → 1.0.2-beta10

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 (46) hide show
  1. package/package.json +1 -1
  2. package/src/components/JfbTakeorderFilterOrderList/Api.js +43 -0
  3. package/src/components/JfbTakeorderFilterOrderList/Attr.js +16 -0
  4. package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderList.vue +353 -0
  5. package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListLess.less +80 -0
  6. package/src/components/JfbTakeorderFilterOrderList/JfbTakeorderFilterOrderListMixin.js +30 -0
  7. package/src/components/JfbTakeorderFilterOrderList/Mock.js +13 -0
  8. package/src/components/JfbTakeorderFilterOrderList/cusAttr/advanced.js +26 -0
  9. package/src/components/JfbTakeorderFilterOrderList/cusAttr/content.js +9 -0
  10. package/src/components/JfbTakeorderFilterOrderList/cusAttr/style.js +11 -0
  11. package/src/components/JfbTakeorderIndex/Api.js +72 -0
  12. package/src/components/JfbTakeorderIndex/Attr.js +16 -0
  13. package/src/components/JfbTakeorderIndex/JfbTakeorderIndex.vue +851 -0
  14. package/src/components/JfbTakeorderIndex/JfbTakeorderIndexLess.less +80 -0
  15. package/src/components/JfbTakeorderIndex/JfbTakeorderIndexMixin.js +30 -0
  16. package/src/components/JfbTakeorderIndex/Mock.js +13 -0
  17. package/src/components/JfbTakeorderIndex/components/cityPicker.vue +307 -0
  18. package/src/components/JfbTakeorderIndex/cusAttr/advanced.js +26 -0
  19. package/src/components/JfbTakeorderIndex/cusAttr/content.js +9 -0
  20. package/src/components/JfbTakeorderIndex/cusAttr/style.js +11 -0
  21. package/src/components/JfbTakeorderOrderDetail/Api.js +125 -0
  22. package/src/components/JfbTakeorderOrderDetail/Attr.js +16 -0
  23. package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetail.vue +1211 -0
  24. package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetailLess.less +80 -0
  25. package/src/components/JfbTakeorderOrderDetail/JfbTakeorderOrderDetailMixin.js +30 -0
  26. package/src/components/JfbTakeorderOrderDetail/Mock.js +13 -0
  27. package/src/components/JfbTakeorderOrderDetail/components/CusEditQuote.vue +150 -0
  28. package/src/components/JfbTakeorderOrderDetail/components/products.vue +141 -0
  29. package/src/components/JfbTakeorderOrderDetail/cusAttr/advanced.js +12 -0
  30. package/src/components/JfbTakeorderOrderDetail/cusAttr/content.js +233 -0
  31. package/src/components/JfbTakeorderOrderDetail/cusAttr/style.js +11 -0
  32. package/src/components/JfbTakeorderOrderList/Api.js +43 -0
  33. package/src/components/JfbTakeorderOrderList/Attr.js +16 -0
  34. package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderList.vue +320 -0
  35. package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderListLess.less +80 -0
  36. package/src/components/JfbTakeorderOrderList/JfbTakeorderOrderListMixin.js +30 -0
  37. package/src/components/JfbTakeorderOrderList/Mock.js +13 -0
  38. package/src/components/JfbTakeorderOrderList/cusAttr/advanced.js +26 -0
  39. package/src/components/JfbTakeorderOrderList/cusAttr/content.js +23 -0
  40. package/src/components/JfbTakeorderOrderList/cusAttr/style.js +11 -0
  41. package/src/components/JfbTakeorderVoiceSwitch/Api.js +39 -0
  42. package/src/components/JfbTakeorderVoiceSwitch/Attr.js +12 -0
  43. package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitch.vue +191 -0
  44. package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchLess.less +80 -0
  45. package/src/components/JfbTakeorderVoiceSwitch/JfbTakeorderVoiceSwitchMixin.js +30 -0
  46. package/src/components/JfbTakeorderVoiceSwitch/Mock.js +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-takeorder",
3
- "version": "1.0.1",
3
+ "version": "1.0.2-beta10",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Filter
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ mapFnName: 'getOrderList',
10
+ title: '订单列表',
11
+ path: '/takeorder/v1/order',
12
+ isRule: false,
13
+ params: {
14
+ tab: ['tab', 'String', '必选'],
15
+ order_type: ['订单类型', 'Number', '必选'],
16
+ page_token: ['page_token', 'Number', ''],
17
+ page_size: ['page_size', 'Number', ''],
18
+ },
19
+ isConsole: true,
20
+ disabled: true,
21
+ },
22
+ {
23
+ mapFnName: 'getNewOrderNotify',
24
+ title: '新订单通知-轮询(5s轮询一次)',
25
+ path: '/takeorder/v1/new-order/notify',
26
+ isRule: false,
27
+ params: {
28
+ order_type: ['订单类型', 'Number', '必选'],
29
+ max_id: ['订单列表的最大ID,如果不存在,直接传递 0', 'Number', ''],
30
+ },
31
+ isConsole: true,
32
+ disabled: true,
33
+ },
34
+ {
35
+ mapFnName: 'getUserConfig',
36
+ title: '获取用户配置',
37
+ path: '/takeorder/v1/user-config',
38
+ isRule: false,
39
+ params: {},
40
+ isConsole: true,
41
+ disabled: true,
42
+ },
43
+ ];
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+ import Style from './cusAttr/style'
3
+ import Advanced from './cusAttr/advanced'
4
+ import Content from './cusAttr/content'
5
+
6
+ export default {
7
+ style: [],
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)
14
+ },
15
+ advanced: [],
16
+ }
@@ -0,0 +1,353 @@
1
+ <template>
2
+ <view
3
+ class="jfb-takeorder-filter-order-list"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx: isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-takeorder-filter-order-list__edit"
10
+ :class="{ editx: isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
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>
22
+ </view>
23
+ </view>
24
+ <!-- #endif -->
25
+ <view class="jfb-takeorder-filter-order-list__body">
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
+ >
53
+ </view>
54
+ </view>
55
+ </template>
56
+
57
+ <script>
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";
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,
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
+ }
155
+ },
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
+ });
188
+ },
189
+ // 语音提示方法
190
+ voiceAlert(type) {
191
+ // #ifdef H5
192
+ this.playWebSpeech(type);
193
+ // #endif
194
+
195
+ // #ifdef APP-PLUS || MP-WEIXIN
196
+ this.playAudioFile(type);
197
+ // #endif
198
+ },
199
+
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
+ },
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
+ };
336
+ </script>
337
+
338
+ <style scoped lang="less">
339
+ @import "./JfbTakeorderFilterOrderListLess.less";
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;
350
+ }
351
+ }
352
+ }
353
+ </style>
@@ -0,0 +1,80 @@
1
+ /**
2
+ * @desc 获取绝对路径完整地址
3
+ * @param @path
4
+ **/
5
+ //例如:https://image.jufubao.cn/20220501010108/image/bg/default_gonghui_bg.png
6
+ @basePath: 'business/';
7
+ @doMain: '//sandbox-img.jufubao.cn/';
8
+
9
+ .getBusinessImageUrl(@path, @size: 'size8') {
10
+ @url: "@{doMain}@{basePath}@{path}?x-oss-process=style/@{size}";
11
+ background-image: url(@url);
12
+ }
13
+
14
+ //start
15
+ .jfb-takeorder-filter-order-list {
16
+ box-sizing: border-box;
17
+
18
+ &__body{
19
+ position: relative;
20
+ overflow: hidden;
21
+ z-index: 2
22
+ }
23
+
24
+ &.editx,&.editx:hover {
25
+ position: relative;
26
+ min-height: unit(100, rpx);
27
+ z-index: 3;
28
+ &::after {
29
+ border: 2rpx dashed blue;
30
+ content: " ";
31
+ position: absolute;
32
+ top:0;
33
+ left:0;
34
+ bottom:0;
35
+ right:0;
36
+ z-index: var(--preview-z-index);
37
+ cursor: pointer;
38
+ }
39
+
40
+ }
41
+
42
+
43
+ &__edit {
44
+ cursor: pointer;
45
+ position: absolute;
46
+ right: unit(0, rpx);
47
+ top: unit(0, rpx);
48
+ height: unit(50, rpx);
49
+ z-index: 100;
50
+ display: flex;
51
+ justify-content: center;
52
+ align-items: center;
53
+ background: rgba(0, 0, 0, .4);
54
+ border-radius: 0 0 0 20rpx;
55
+ box-shadow: 0 0 10px rbga(0, 0, 0, 0.3);
56
+ color: #fff;
57
+ font-size: unit(22, rpx);
58
+ padding: 0 6rpx 0 6px;
59
+
60
+ &-icon{
61
+ padding: 0 unit(20, rpx);
62
+ }
63
+
64
+ &.editx {
65
+ box-sizing: border-box;
66
+
67
+ }
68
+ }
69
+ }
70
+ //end
71
+
72
+
73
+ /**notPreview**/
74
+ .jfb-takeorder-filter-order-list {
75
+ //&:before {
76
+ //content: " ";
77
+ //display: table;
78
+ //}
79
+ }
80
+ /**endNotPreview**/
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+
4
+ //@AttrImport
5
+ import Attr from "./Attr";
6
+ //@EndAttrImport
7
+
8
+
9
+ export default {
10
+ data() {
11
+ return {
12
+ //#ifdef H5
13
+
14
+ //@AttrData
15
+ Attr:{}, //对外开发编辑属性
16
+ //@EndAttrData
17
+
18
+ // #endif
19
+ cssRoot: 'jfb-takeorder-filter-order-list'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+
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
+
7
+ updateFilterFilmPaiqiDate:{},
8
+
9
+ removeFilterFilmAddress:{},
10
+
11
+ addFilterFilmcart:{},
12
+
13
+ }
@@ -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
+
@@ -0,0 +1,72 @@
1
+ 'use strict';
2
+ /**
3
+ * @description 接口配置,
4
+ * 在设置方法名字当时候,别忘记加上【模块名字】:Index
5
+ * @type {*[]}
6
+ */
7
+ module.exports = [
8
+ {
9
+ mapFnName: 'getIndexAllMapCity',
10
+ title: '获取城市列表',
11
+ path: '/common/v1/region/city/all-map-city',
12
+ isRule: false,
13
+ params: {},
14
+ isConsole: true,
15
+ disabled: true,
16
+ },
17
+ {
18
+ mapFnName: 'getIndexProvince',
19
+ title: '获取省份列表',
20
+ path: '/common/v1/region/city/tree',
21
+ isRule: false,
22
+ params: {},
23
+ isConsole: true,
24
+ disabled: true,
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
+ },
72
+ ];
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+ import Style from './cusAttr/style'
3
+ import Advanced from './cusAttr/advanced'
4
+ import Content from './cusAttr/content'
5
+
6
+ export default {
7
+ style: [],
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)
14
+ },
15
+ advanced: [],
16
+ }