jufubao-takeorder 1.0.2-beta3 → 1.0.2-beta4

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.
@@ -0,0 +1,161 @@
1
+ <template>
2
+ <view class="dialog">
3
+ <view class="dialog-body">
4
+ <view class="dialog-title">修改报价</view>
5
+ <view class="current-quote"> 当前报价:¥{{ info.currentQuote }} </view>
6
+ <!-- 报价输入框(带¥前缀) -->
7
+ <view class="quote-input">
8
+ <view class="quote-input-unit">¥</view>
9
+ <input v-model="quotePrice" placeholder="请输入单张报价金额" />
10
+ </view>
11
+ <!-- 建议报价 -->
12
+ <view class="suggest-wrap">
13
+ 建议报价:
14
+ <text :style="{ color: mainColor }" class="suggest-range"
15
+ >¥{{ info.suggestMin }} ~ ¥{{ info.suggestMax }}</text
16
+ >
17
+ </view>
18
+ <!-- 备注说明 -->
19
+ <view class="note-text">
20
+ 注:修改报价不能高于当前报价,修改成功后按照最新价格参与报价,中标后将按您修改过后的价格为您结算
21
+ </view>
22
+ <view class="btn-wrap">
23
+ <XdButton
24
+ width="180rpx"
25
+ size="small"
26
+ bgColor="#EEE"
27
+ color="#999"
28
+ type="primary"
29
+ @click="handleClose"
30
+ >再想想</XdButton
31
+ >
32
+ <XdButton
33
+ width="180rpx"
34
+ size="small"
35
+ type="primary"
36
+ @click="handleConfirm"
37
+ >确定</XdButton
38
+ >
39
+ </view>
40
+ </view>
41
+ </view>
42
+ </template>
43
+
44
+ <script>
45
+ import XdButton from "@/components/XdButton/XdButton";
46
+ export default {
47
+ name: "CusEditQuote",
48
+ components: { XdButton },
49
+ props: {
50
+ mainColor: {
51
+ type: String,
52
+ default: "",
53
+ },
54
+ info: {
55
+ type: Object,
56
+ default: () => {},
57
+ },
58
+ },
59
+ data() {
60
+ return {
61
+ quotePrice: "",
62
+ };
63
+ },
64
+ methods: {
65
+ // 过滤输入:只允许数字+小数点(最多两位小数)
66
+ filterInput(e) {
67
+ let val = e.detail.value;
68
+ // 只保留数字和小数点
69
+ val = val.replace(/[^\d.]/g, "");
70
+ // 去重小数点
71
+ val = val.replace(/\.{2,}/g, ".");
72
+ // 限制小数点后最多两位
73
+ val = val.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3");
74
+ this.inputQuote = val;
75
+ },
76
+ handleClose() {
77
+ this.$emit("close");
78
+ },
79
+ handleConfirm() {
80
+ this.$emit("confirm", this.quotePrice);
81
+ },
82
+ },
83
+ };
84
+ </script>
85
+
86
+ <style lang="less" scoped>
87
+ .dialog {
88
+ width: 100%;
89
+ height: 100%;
90
+ position: absolute;
91
+ top: 0;
92
+ left: 0;
93
+ z-index: 9999;
94
+ background: rgba(0, 0, 0, 0.5);
95
+ &-body {
96
+ background: #fff;
97
+ border-radius: 16rpx;
98
+ width: 80%;
99
+ margin: 0 auto;
100
+ position: absolute;
101
+ top: 50%;
102
+ left: 50%;
103
+ transform: translate(-50%, -50%);
104
+ }
105
+ &-title {
106
+ color: #666666;
107
+ font-size: 28rpx;
108
+ padding: 32rpx 0;
109
+ text-align: center;
110
+ border-bottom: 2rpx solid #f8f8f8;
111
+ }
112
+ }
113
+
114
+ /* 当前报价 */
115
+ .current-quote {
116
+ font-size: 28rpx;
117
+ color: #333;
118
+ padding: 32rpx 0 16rpx 64rpx;
119
+ }
120
+ .quote {
121
+ &-input {
122
+ position: relative;
123
+ padding: 0 64rpx 16rpx 64rpx;
124
+ &-unit {
125
+ position: absolute;
126
+ left: 80rpx;
127
+ top: 50%;
128
+ transform: translateY(-80%);
129
+ font-size: 28rpx;
130
+ color: #333;
131
+ font-weight: 700;
132
+ }
133
+ & > input {
134
+ background: #f8f8f8;
135
+ font-size: 28rpx;
136
+ padding: 20rpx 46rpx 20rpx 60rpx;
137
+ border-radius: 16rpx;
138
+ }
139
+ }
140
+ }
141
+
142
+ /* 建议报价 */
143
+ .suggest-wrap {
144
+ font-size: 26rpx;
145
+ padding: 0 64rpx 16rpx 64rpx;
146
+ color: #333;
147
+ }
148
+
149
+ /* 备注说明 */
150
+ .note-text {
151
+ font-size: 24rpx;
152
+ color: #999;
153
+ padding: 0 64rpx 24rpx 64rpx;
154
+ }
155
+
156
+ .btn-wrap {
157
+ display: flex;
158
+ justify-content: space-around;
159
+ padding: 32rpx 0 48rpx 0
160
+ }
161
+ </style>
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <view class="wrap order-info" :class="{'no-margin-top': status==='daishangbao'}">
3
+ <view class="order-info-title">
4
+ <view class="order-info-title-left">
5
+ <view>{{ info.shop_name }}</view>
6
+ <text>|</text>
7
+ <view>{{ info.brand_name }}</view>
8
+ </view>
9
+ <view class="order-info-title-right">{{ info.city }}</view>
10
+ </view>
11
+ <view
12
+ v-for="(Pitem, Pindex) in info.products"
13
+ :key="Pindex"
14
+ class="order-info-product"
15
+ >
16
+ <image :src="Pitem.product_thumb"></image>
17
+ <view class="order-info-product-info">
18
+ <view class="order-info-product-info-name">{{
19
+ Pitem.product_name
20
+ }}</view>
21
+ <view class="order-info-product-info-sku"
22
+ >规格:{{ Pitem.product_sku }}</view
23
+ >
24
+ <view class="order-info-product-info-price">
25
+ <view class="order-info-product-info-price-left"
26
+ ><text>¥ </text>{{ Pitem.minPrice }}<text class="range">~</text
27
+ ><text>¥ </text>{{ Pitem.maxPrice }}</view
28
+ >
29
+ <view class="order-info-product-info-price-right"
30
+ ><XdFontIcon
31
+ icon="icondanchuangguanbi_xian"
32
+ color="#999"
33
+ size="14"
34
+ ></XdFontIcon
35
+ ><view>{{ Pitem.num }}</view></view
36
+ >
37
+ </view>
38
+ </view>
39
+ </view>
40
+ </view>
41
+ </template>
42
+
43
+ <script>
44
+ export default {
45
+ props: {
46
+ info: {
47
+ type: Object,
48
+ default: () => ({}),
49
+ },
50
+ status: {
51
+ type: String,
52
+ default: '',
53
+ },
54
+ }
55
+ };
56
+ </script>
57
+
58
+ <style lang="less" scoped>
59
+ .wrap {
60
+ background: #fff;
61
+ margin: 16rpx;
62
+ border-radius: 16rpx;
63
+ &.no-margin-top {
64
+ margin-top: 0;
65
+ }
66
+ }
67
+ .order-info {
68
+ &-title {
69
+ display: flex;
70
+ justify-content: space-between;
71
+ padding: 24rpx 32rpx;
72
+ border-bottom: 1px solid #f4f4f4;
73
+ &-left {
74
+ display: flex;
75
+ align-items: center;
76
+ }
77
+ &-right {
78
+ font-weight: 500;
79
+ }
80
+ }
81
+ &-product {
82
+ display: flex;
83
+ padding: 16rpx 32rpx;
84
+ border-bottom: 1px solid #f4f4f4;
85
+ & > image {
86
+ width: 180rpx;
87
+ height: 180rpx;
88
+ flex-shrink: 0;
89
+ border: 10rpx;
90
+ }
91
+ &-info {
92
+ margin-left: 24rpx;
93
+ &-name {
94
+ .uni-max-cut(2,80);
95
+ margin-bottom: 10rpx;
96
+ }
97
+ &-sku {
98
+ font-size: 24rpx;
99
+ color: #999;
100
+ }
101
+ &-price {
102
+ margin-top: 10rpx;
103
+ display: flex;
104
+ justify-content: space-between;
105
+ align-items: center;
106
+ &-left {
107
+ color: #ff2c18;
108
+ font-size: 32rpx;
109
+ font-weight: 500;
110
+ & > text {
111
+ font-size: 24rpx;
112
+ margin-right: 10rpx;
113
+ }
114
+ .range {
115
+ margin: 0 10rpx;
116
+ }
117
+ }
118
+ &-right {
119
+ color: #999;
120
+ display: flex;
121
+ align-items: baseline;
122
+ & > view {
123
+ margin-left: 10rpx;
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
129
+ }
130
+ .other-info-item {
131
+ display: flex;
132
+ justify-content: space-between;
133
+ padding: 20rpx 32rpx;
134
+ color: #333;
135
+ font-size: 28rpx;
136
+ border-bottom: 2rpx solid #f8f8f8;
137
+ }
138
+ </style>
@@ -0,0 +1,12 @@
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
+ ].filter(i => i)
11
+ }
12
+
@@ -0,0 +1,233 @@
1
+ 'use strict';
2
+
3
+ import { customVal, dataVal } from "@/utils/AttrTools";
4
+
5
+ export default (data, gValue, gColor, oldData = {}) => {
6
+ return [
7
+ {
8
+ label: '公告内容:',
9
+ ele: 'xd-site-news',
10
+ valueKey: 'notice',
11
+ groupKey: 'content',
12
+ value: data.notice || null,
13
+ className: 'input70',
14
+ setting: {
15
+ config: {
16
+ sort: true,
17
+ maxlen: 100,
18
+ action: 'aliyun',
19
+ size: 5,
20
+ tipsformet: '上传文件格式:@imageType@,不超过@size@MB.',
21
+ uploadType: 'aliyun',
22
+ type: ['jpg', 'png', 'jpeg']
23
+ },
24
+ },
25
+ handleCustom({ action, data }) {
26
+ if (data && data.params) {
27
+ //当一个插件中出现使用内容分类时候需要设置code值,在页面引用时候容器id + code进行拼接
28
+ //data.params = Object.assign({}, data.params, {code: 'g_test_id'});
29
+ }
30
+
31
+ //获取返回参数(场景类型名称为必填)
32
+ //获取返回参数(场景类型名称为必填)
33
+ let loading = { close() { } }
34
+
35
+ //获取显示内容
36
+ if (action === 'screen') {
37
+ XdBus.getParentApi('getOptionsSettingList')({ setting_id: 'edtix_bucket_content_tip' })
38
+ .then(res => {
39
+ loading.close();
40
+ data.cb(res['list'])
41
+ })
42
+ .catch(error => {
43
+ console.error(error);
44
+ loading.close();
45
+ });
46
+
47
+ }
48
+
49
+ //获取返回参数(广告位高度必选项)
50
+ if (action === 'getNewsInfo') {
51
+ XdBus.getParentApi('cmsGetPublishEditxContent')(data.params)
52
+ .then(res => {
53
+ loading.close()
54
+ data.cb({ list: res.list, selectId: res.selected })
55
+ })
56
+ .catch(error => {
57
+ loading.close()
58
+ console.error(error);
59
+ });
60
+ }
61
+
62
+ //获取产品业务线列表
63
+ if (action === 'namespace') {
64
+ XdBus.getParentApi('getOptionsNamespaces')({})
65
+ .then(res => {
66
+ loading.close()
67
+ data.cb(res['list'])
68
+ })
69
+ .catch(error => {
70
+ loading.close()
71
+ console.error(error);
72
+ });
73
+ }
74
+
75
+ //使用内容分类
76
+ if (action === 'cmsPublishEditxContent') {
77
+ loading = XdBus.getParentApi('loading')({});
78
+ XdBus.getParentApi('cmsPublishEditxContent')(data.params)
79
+ .then(res => {
80
+ console.log('cmsPublishEditxContent', res)
81
+ loading.close();
82
+ data.cb(res)
83
+ })
84
+ .catch(error => {
85
+ loading.close();
86
+ console.error(error);
87
+ });
88
+ }
89
+
90
+ //位置列表
91
+ if (action === 'getListPostion') {
92
+ loading = XdBus.getParentApi('loading')({});
93
+ XdBus.getParentApi('getListNewsPosition')(data.params)
94
+ .then(res => {
95
+ loading.close();
96
+ data.cb(res)
97
+ })
98
+ .catch(error => {
99
+ loading.close();
100
+ console.error(error);
101
+ });
102
+ }
103
+
104
+ //位置创建
105
+ if (action === 'addPostion') {
106
+ loading = XdBus.getParentApi('loading')({});
107
+ XdBus.getParentApi('addNewsPosition')(data.params)
108
+ .then(res => {
109
+ loading.close();
110
+ data.cb(true)
111
+ })
112
+ .catch(error => {
113
+ console.error(error);
114
+ loading.close();
115
+ data.cb(false)
116
+ });
117
+ }
118
+
119
+ //位置编辑
120
+ if (action === 'editPostion') {
121
+ loading = XdBus.getParentApi('loading')({});
122
+ XdBus.getParentApi('updateNewsPosition')(data.params)
123
+ .then(res => {
124
+ loading.close();
125
+ data.cb(true)
126
+ })
127
+ .catch(error => {
128
+ console.error(error);
129
+ loading.close();
130
+ data.cb(false)
131
+ });
132
+ }
133
+
134
+ //位置删除
135
+ if (action === 'deleltePostion') {
136
+ loading = XdBus.getParentApi('loading')({});
137
+ XdBus.getParentApi('deleteNewsPosition')(data.params)
138
+ .then(res => {
139
+ loading.close();
140
+ data.cb(true)
141
+ })
142
+ .catch(error => {
143
+ console.error(error);
144
+ loading.close();
145
+ data.cb(false)
146
+ });
147
+ }
148
+
149
+ //获取广告位内容列表
150
+ if (action === 'getListContent') {
151
+ loading = XdBus.getParentApi('loading')({});
152
+ XdBus.getParentApi('getListNewsContent')(data.params)
153
+ .then(res => {
154
+ loading.close();
155
+ data.cb(res)
156
+ })
157
+ .catch(error => {
158
+ loading.close();
159
+ console.error(error);
160
+ });
161
+ }
162
+
163
+ //广告内容创建
164
+ if (action === 'addContent') {
165
+ loading = XdBus.getParentApi('loading')({});
166
+ XdBus.getParentApi('addNewsContent')(data.params)
167
+ .then(res => {
168
+ loading.close();
169
+ data.cb(true)
170
+ })
171
+ .catch(error => {
172
+ console.error(error);
173
+ loading.close();
174
+ data.cb(false)
175
+ });
176
+ }
177
+
178
+ //广告内容编辑
179
+ if (action === 'editContent') {
180
+ loading = XdBus.getParentApi('loading')({});
181
+ XdBus.getParentApi('updateNewsContent')(data.params)
182
+ .then(res => {
183
+ loading.close();
184
+ data.cb(true)
185
+ })
186
+ .catch(error => {
187
+ console.error(error);
188
+ loading.close();
189
+ data.cb(false)
190
+ });
191
+ }
192
+
193
+ //广告内容删除
194
+ if (action === 'deleteContent') {
195
+ loading = XdBus.getParentApi('loading')({});
196
+ XdBus.getParentApi('deleteNewsContent')(data.params)
197
+ .then(res => {
198
+ loading.close();
199
+ data.cb(true)
200
+ })
201
+ .catch(error => {
202
+ console.error(error);
203
+ loading.close();
204
+ data.cb(false)
205
+ });
206
+ }
207
+
208
+ //内容发布
209
+ if (action === 'publish') {
210
+ loading = XdBus.getParentApi('loading')({});
211
+ console.log('publish', data.params)
212
+ XdBus.getParentApi('cmsPublishContent')(data.params)
213
+ .then(res => {
214
+ loading.close();
215
+ data.cb(res)
216
+ })
217
+ .catch(error => {
218
+ loading.close();
219
+ console.error(error);
220
+ });
221
+ }
222
+
223
+ //通知页面进行刷新
224
+ if (action === 'update') {
225
+ loading = XdBus.getParentApi('loading')({});
226
+ XdBus.getParentApi('getXdBusUpdateView')('onUpdateView', {});
227
+ loading.close()
228
+ }
229
+ },
230
+ },
231
+ ].filter(i => i)
232
+ }
233
+
@@ -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
+
@@ -95,6 +95,7 @@ const Color = require("color");
95
95
  order_status: 1,
96
96
  },
97
97
  ],
98
+ orderType: ""
98
99
  }
99
100
  },
100
101
  watch: {
@@ -127,7 +128,7 @@ const Color = require("color");
127
128
  */
128
129
  init(container) {
129
130
  this.newBackgroundColor = Color(this.warningColor).alpha(0.15).toString();
130
- //this.bgcolor = getContainerPropsValue(container, 'content.bgcolor', '#fff');
131
+ this.orderType = getContainerPropsValue(container, 'content.orderType', '');
131
132
 
132
133
  //this.height = getContainerPropsValue(container, 'content.height', 10);
133
134
  },
@@ -4,6 +4,20 @@ import { customVal, dataVal } from "@/utils/AttrTools";
4
4
 
5
5
  export default (data, gValue, gColor, oldData = {}) => {
6
6
  return [
7
+ {
8
+ label: '订单类型:',
9
+ ele: 'xd-select-list',
10
+ valueKey: 'orderType',
11
+ value: data['orderType'] || '',
12
+ groupKey: 'content',
13
+ multiple: false,
14
+ className: 'input80',
15
+ list: [
16
+ { label: '报价中', value: 'quoted' },
17
+ { label: '待上报', value: 'unquoted' },
18
+ ],
19
+ inline: false,
20
+ },
7
21
  ].filter(i => i)
8
22
  }
9
23
 
@@ -6,43 +6,7 @@
6
6
  export default {
7
7
  style: [],
8
8
  content: (data) => {
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)
9
+ return [].filter(i=>i)
46
10
  },
47
11
  advanced: [],
48
12
  };
@@ -16,7 +16,15 @@
16
16
  </view>
17
17
  <!-- #endif -->
18
18
  <view class="jfb-takeorder-voice-switch__body">
19
- <view>测试插件( {{containerId}} )</view>
19
+ <view class="jfb-takeorder-voice-switch__body-item">
20
+ <view>新订单提示音</view>
21
+ <switch @change="switchNewChange" :checked="newOrder" :color="mainColor" style="transform:scale(0.5)"/>
22
+ </view>
23
+ <view class="jfb-takeorder-voice-switch__body-item">
24
+ <view>中标提示音</view>
25
+ <switch @change="switchBingoChange" :checked="bingo" :color="mainColor" style="transform:scale(0.5)"/>
26
+ </view>
27
+ <view class="jfb-takeorder-voice-switch__body-notice">没有声音?尝试<text :style="{color:mainColor}">点击触发</text></view>
20
28
  </view>
21
29
  </view>
22
30
  </template>
@@ -38,8 +46,8 @@
38
46
  ],
39
47
  data() {
40
48
  return {
41
-
42
- //todo
49
+ bingo: false,
50
+ newOrder: false,
43
51
  }
44
52
  },
45
53
  watch: {
@@ -76,6 +84,12 @@
76
84
 
77
85
  //this.height = getContainerPropsValue(container, 'content.height', 10);
78
86
  },
87
+ switchNewChange(e) {
88
+ this.newOrder = e.detail.value
89
+ },
90
+ switchBingoChange(e) {
91
+ this.bingo = e.detail.value
92
+ },
79
93
  onJfbScroll(options) {
80
94
  console.log('event.onJfbScroll', options)
81
95
  },
@@ -107,7 +121,22 @@
107
121
 
108
122
  .jfb-takeorder-voice-switch {
109
123
  &__body{
110
-
124
+ &-item {
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: space-between;
128
+ padding: 26rpx 32rpx;
129
+ background: #fff;
130
+ margin: 16rpx;
131
+ border-radius: 20rpx;
132
+ color: #666666;
133
+ font-size: 28rpx;
134
+ }
135
+ &-notice {
136
+ font-size: 24rpx;
137
+ margin-left: 32rpx;
138
+ color: #666;
139
+ }
111
140
  }
112
141
  }
113
142
  </style>