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
@@ -0,0 +1,191 @@
1
+ <template>
2
+ <view
3
+ class="jfb-takeorder-voice-switch"
4
+ @click="handleEditxSelect"
5
+ :class="{ editx: isEditx && active }"
6
+ >
7
+ <!--#ifdef H5-->
8
+ <view
9
+ class="jfb-takeorder-voice-switch__edit"
10
+ :class="{ editx: isEditx && active }"
11
+ v-if="isEditx && active"
12
+ >
13
+ <view class="jfb-takeorder-voice-switch__edit-icon" @click.stop="delEdit">
14
+ <xd-font-icon
15
+ icon="iconshanchu-01"
16
+ color="#fff"
17
+ size="30"
18
+ ></xd-font-icon>
19
+ </view>
20
+ </view>
21
+ <!-- #endif -->
22
+ <view class="jfb-takeorder-voice-switch__body">
23
+ <view class="jfb-takeorder-voice-switch__body-item">
24
+ <view>新订单提示音</view>
25
+ <switch
26
+ @change="switchNewChange"
27
+ :checked="newOrder"
28
+ :color="mainColor"
29
+ style="transform: scale(0.5)"
30
+ />
31
+ </view>
32
+ <view class="jfb-takeorder-voice-switch__body-item">
33
+ <view>中标提示音</view>
34
+ <switch
35
+ @change="switchBingoChange"
36
+ :checked="bingo"
37
+ :color="mainColor"
38
+ style="transform: scale(0.5)"
39
+ />
40
+ </view>
41
+ <view class="jfb-takeorder-voice-switch__body-notice"
42
+ >没有声音?尝试<text :style="{ color: mainColor }">点击触发</text></view
43
+ >
44
+ </view>
45
+ </view>
46
+ </template>
47
+
48
+ <script>
49
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
50
+ import { jfbRootExec } from "@/utils/xd.event";
51
+ import JfbTakeorderVoiceSwitchMixin from "./JfbTakeorderVoiceSwitchMixin";
52
+ import { getContainerPropsValue } from "@/utils/xd.base";
53
+ import componentsMixins from "@/mixins/componentsMixins";
54
+ import extsMixins from "@/mixins/extsMixins";
55
+ export default {
56
+ name: "JfbTakeorderVoiceSwitch",
57
+ components: {
58
+ XdFontIcon,
59
+ },
60
+ mixins: [componentsMixins, extsMixins, JfbTakeorderVoiceSwitchMixin],
61
+ data() {
62
+ return {
63
+ bingo: false,
64
+ newOrder: false,
65
+ };
66
+ },
67
+ watch: {
68
+ container(value, oldValue) {
69
+ if (JSON.stringify(value) === JSON.stringify(oldValue)) return;
70
+ if (this.$configProject["isPreview"]) this.init(value);
71
+ },
72
+ },
73
+ created() {
74
+ this.init(this.container);
75
+
76
+ //todo
77
+ },
78
+ methods: {
79
+ onJfbLoad(options) {
80
+ // 获取用户配置
81
+ this.getUserConfig();
82
+ },
83
+ /**
84
+ * 获取用户配置
85
+ */
86
+ getUserConfig() {
87
+ jfbRootExec("getUserConfig", {
88
+ vm: this,
89
+ data: {},
90
+ })
91
+ .then((res) => {
92
+ // 回显配置
93
+ this.newOrder = res.is_open_new_order_notify_audio === "Y";
94
+ this.bingo = res.is_open_win_order_audio === "Y";
95
+ })
96
+ .catch((error) => {
97
+ this.$xdLog.catch(error);
98
+ });
99
+ },
100
+ /**
101
+ * @description 监听事件变化
102
+ * @param container {object} 业务组件对象自己
103
+ */
104
+ init(container) {},
105
+ switchNewChange(e) {
106
+ const isOpen = e.detail.value;
107
+ this.newOrder = isOpen;
108
+ // 调用接口更新新订单提示音配置
109
+ jfbRootExec("openNewNotify", {
110
+ vm: this,
111
+ data: {
112
+ is_open: isOpen ? "Y" : "N",
113
+ },
114
+ })
115
+ .then((res) => {
116
+ // 接口调用成功
117
+ })
118
+ .catch((error) => {
119
+ // 接口调用失败,回滚状态
120
+ this.newOrder = !isOpen;
121
+ this.$xdLog.catch(error);
122
+ });
123
+ },
124
+ switchBingoChange(e) {
125
+ const isOpen = e.detail.value;
126
+ this.bingo = isOpen;
127
+ // 调用接口更新中标提示音配置
128
+ jfbRootExec("openWinNotify", {
129
+ vm: this,
130
+ data: {
131
+ is_open: isOpen ? "Y" : "N",
132
+ },
133
+ })
134
+ .then((res) => {
135
+ // 接口调用成功
136
+ })
137
+ .catch((error) => {
138
+ // 接口调用失败,回滚状态
139
+ this.bingo = !isOpen;
140
+ this.$xdLog.catch(error);
141
+ });
142
+ },
143
+ onJfbScroll(options) {
144
+ console.log("event.onJfbScroll", options);
145
+ },
146
+ onJfbReachBottom(options) {
147
+ console.log("event.onJfbReachBottom", options);
148
+ },
149
+ onJfbShow(options) {
150
+ console.log("event.onJfbShow", options);
151
+ },
152
+ onJfbHide(options) {
153
+ console.log("event.onJfbHide", options);
154
+ },
155
+ onJfbBack(options) {
156
+ console.log("event.onJfbBack", options);
157
+ },
158
+ onJfbUpdate(...data) {
159
+ console.log("event.onJfbUpdate", data);
160
+ },
161
+ onJfbCustomEvent(options) {
162
+ console.log("event.onJfbReachBottom", options);
163
+ },
164
+ },
165
+ };
166
+ </script>
167
+
168
+ <style scoped lang="less">
169
+ @import "./JfbTakeorderVoiceSwitchLess.less";
170
+
171
+ .jfb-takeorder-voice-switch {
172
+ &__body {
173
+ &-item {
174
+ display: flex;
175
+ align-items: center;
176
+ justify-content: space-between;
177
+ padding: 26rpx 32rpx;
178
+ background: #fff;
179
+ margin: 16rpx;
180
+ border-radius: 20rpx;
181
+ color: #666666;
182
+ font-size: 28rpx;
183
+ }
184
+ &-notice {
185
+ font-size: 24rpx;
186
+ margin-left: 32rpx;
187
+ color: #666;
188
+ }
189
+ }
190
+ }
191
+ </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-voice-switch {
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-voice-switch {
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-voice-switch'
20
+ }
21
+ },
22
+ created() {
23
+
24
+ //@AttrDataCreated
25
+ this.Attr = this.$xdUniHelper.customClone(Attr);
26
+ //@EndAttrDataCreated
27
+
28
+
29
+ },
30
+ }
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ getUserConfig: { "is_open_new_order_notify_audio": "N", "is_open_win_order_audio": "N", "request_id": "b5d506434c8ef2d0" },
5
+ }