Merge branch 'feature/ufo-price' into 'master'
Feature/ufo price See merge request !5
Showing
5 changed files
with
38 additions
and
9 deletions
@@ -10,8 +10,8 @@ | @@ -10,8 +10,8 @@ | ||
10 | </div> | 10 | </div> |
11 | <div class="modal-footer"> | 11 | <div class="modal-footer"> |
12 | <slot name="footer"> | 12 | <slot name="footer"> |
13 | - <Button class="btn" type="button" @click="onCancel">{{cancelText}}</Button> | ||
14 | <Button class="btn" :class="{active: loading}" type="button" @click="onSure">{{sureText}}</Button> | 13 | <Button class="btn" :class="{active: loading}" type="button" @click="onSure">{{sureText}}</Button> |
14 | + <Button class="btn" type="button" @click="onCancel">{{cancelText}}</Button> | ||
15 | </slot> | 15 | </slot> |
16 | </div> | 16 | </div> |
17 | </div> | 17 | </div> |
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | sure-text="调整售价" | 4 | sure-text="调整售价" |
5 | cancel-text="取消" | 5 | cancel-text="取消" |
6 | :loading="postLoading" | 6 | :loading="postLoading" |
7 | + class="modal" | ||
7 | :transfer="true" | 8 | :transfer="true" |
8 | @on-sure="onSure"> | 9 | @on-sure="onSure"> |
9 | <div class="change-price-modal"> | 10 | <div class="change-price-modal"> |
@@ -109,7 +110,8 @@ export default { | @@ -109,7 +110,8 @@ export default { | ||
109 | storage_id: this.skc.storageId, | 110 | storage_id: this.skc.storageId, |
110 | new_price: price, | 111 | new_price: price, |
111 | old_price: this.skc.price, | 112 | old_price: this.skc.price, |
112 | - num: this.skc.storageNum | 113 | + num: this.skc.storageNum, |
114 | + skupType: this.skc.isAdvance === 'Y' ? 4 : 1 | ||
113 | }); | 115 | }); |
114 | 116 | ||
115 | if (result && result.code === 200) { | 117 | if (result && result.code === 200) { |
@@ -211,4 +213,10 @@ export default { | @@ -211,4 +213,10 @@ export default { | ||
211 | text-align: center; | 213 | text-align: center; |
212 | } | 214 | } |
213 | } | 215 | } |
216 | + | ||
217 | +.modal { | ||
218 | + /deep/ .modal-footer button:first-child { | ||
219 | + color: inherit; | ||
220 | + } | ||
221 | +} | ||
214 | </style> | 222 | </style> |
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | <div class="product-item"> | 2 | <div class="product-item"> |
3 | <div class="item-content" :style="itemStyle" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd"> | 3 | <div class="item-content" :style="itemStyle" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd"> |
4 | <div class="tip" v-if="showTip">超出建议售价将被限制展示,建议下调至合理价格区间</div> | 4 | <div class="tip" v-if="showTip">超出建议售价将被限制展示,建议下调至合理价格区间</div> |
5 | + <i class="pre-sale" v-if="isPreSale"></i> | ||
5 | <div class="info"> | 6 | <div class="info"> |
6 | <div class="left"> | 7 | <div class="left"> |
7 | <span class="size ufo-font">{{value.goodsInfo.sizeName}}</span> | 8 | <span class="size ufo-font">{{value.goodsInfo.sizeName}}</span> |
@@ -45,6 +46,9 @@ export default { | @@ -45,6 +46,9 @@ export default { | ||
45 | showTip() { | 46 | showTip() { |
46 | return this.value.goodsInfo.price > this.value.goodsInfo.suggestMaxPrice; | 47 | return this.value.goodsInfo.price > this.value.goodsInfo.suggestMaxPrice; |
47 | }, | 48 | }, |
49 | + isPreSale() { | ||
50 | + return this.value.isAdvance === 'Y'; | ||
51 | + }, | ||
48 | itemStyle() { | 52 | itemStyle() { |
49 | return { | 53 | return { |
50 | transition: this.transition ? void 0 : 'none 0s ease 0s', | 54 | transition: this.transition ? void 0 : 'none 0s ease 0s', |
@@ -67,10 +71,14 @@ export default { | @@ -67,10 +71,14 @@ export default { | ||
67 | }, | 71 | }, |
68 | methods: { | 72 | methods: { |
69 | onNoSale() { | 73 | onNoSale() { |
70 | - this.$emit('on-no-sale', this.value.goodsInfo); | 74 | + this.$emit('on-no-sale', Object.assign({ |
75 | + isAdvance: this.value.isAdvance | ||
76 | + }, this.value.goodsInfo)); | ||
71 | }, | 77 | }, |
72 | onChgPrice() { | 78 | onChgPrice() { |
73 | - this.$emit('on-change-price', this.value.goodsInfo); | 79 | + this.$emit('on-change-price', Object.assign({ |
80 | + isAdvance: this.value.isAdvance | ||
81 | + }, this.value.goodsInfo)); | ||
74 | }, | 82 | }, |
75 | onTouchStart(evt) { | 83 | onTouchStart(evt) { |
76 | const {clientX, clientY} = evt.touches[0]; | 84 | const {clientX, clientY} = evt.touches[0]; |
@@ -145,6 +153,16 @@ export default { | @@ -145,6 +153,16 @@ export default { | ||
145 | transition: transform 0.5s cubic-bezier(0.36, 0.66, 0.04, 1); | 153 | transition: transform 0.5s cubic-bezier(0.36, 0.66, 0.04, 1); |
146 | } | 154 | } |
147 | 155 | ||
156 | +.pre-sale { | ||
157 | + position: absolute; | ||
158 | + top: 16px; | ||
159 | + left: 10px; | ||
160 | + width: 52px; | ||
161 | + height: 24px; | ||
162 | + background-image: url(~statics/image/order/pre-sale@3x.png); | ||
163 | + background-size: cover; | ||
164 | +} | ||
165 | + | ||
148 | .item-options { | 166 | .item-options { |
149 | position: absolute; | 167 | position: absolute; |
150 | top: 0; | 168 | top: 0; |
@@ -180,6 +198,7 @@ export default { | @@ -180,6 +198,7 @@ export default { | ||
180 | width: 160px; | 198 | width: 160px; |
181 | display: flex; | 199 | display: flex; |
182 | height: 56px; | 200 | height: 56px; |
201 | + margin-top: 10px; | ||
183 | align-items: flex-end; | 202 | align-items: flex-end; |
184 | 203 | ||
185 | .size { | 204 | .size { |
@@ -124,16 +124,16 @@ export default { | @@ -124,16 +124,16 @@ export default { | ||
124 | type: 'confirm', | 124 | type: 'confirm', |
125 | content: '您确定不卖此商品吗?', | 125 | content: '您确定不卖此商品吗?', |
126 | confirmBtn: { | 126 | confirmBtn: { |
127 | - text: '确定', | 127 | + text: '取消', |
128 | active: true, | 128 | active: true, |
129 | disabled: false, | 129 | disabled: false, |
130 | }, | 130 | }, |
131 | cancelBtn: { | 131 | cancelBtn: { |
132 | - text: '取消', | 132 | + text: '确定', |
133 | active: false, | 133 | active: false, |
134 | disabled: false, | 134 | disabled: false, |
135 | }, | 135 | }, |
136 | - onConfirm: () => { | 136 | + onCancel: () => { |
137 | this.onNoSaleSure({skc, num: 1}); | 137 | this.onNoSaleSure({skc, num: 1}); |
138 | }, | 138 | }, |
139 | }).show(); | 139 | }).show(); |
@@ -159,7 +159,8 @@ export default { | @@ -159,7 +159,8 @@ export default { | ||
159 | storage_id: skc.storageId, | 159 | storage_id: skc.storageId, |
160 | new_price: price, | 160 | new_price: price, |
161 | old_price: skc.price, | 161 | old_price: skc.price, |
162 | - num: skc.storageNum | 162 | + num: skc.storageNum, |
163 | + skupType: skc.isAdvance === 'Y' ? 4 : 1 | ||
163 | }); | 164 | }); |
164 | 165 | ||
165 | if (result && result.code === 200) { | 166 | if (result && result.code === 200) { |
@@ -181,7 +182,8 @@ export default { | @@ -181,7 +182,8 @@ export default { | ||
181 | product_id: this.productInfo.productId, | 182 | product_id: this.productInfo.productId, |
182 | storage_id: skc.storageId, | 183 | storage_id: skc.storageId, |
183 | old_price: skc.price, | 184 | old_price: skc.price, |
184 | - num: num | 185 | + num: num, |
186 | + skupType: skc.isAdvance === 'Y' ? 4 : 1 | ||
185 | }); | 187 | }); |
186 | 188 | ||
187 | if (result.code === 200) { | 189 | if (result.code === 200) { |
apps/statics/image/order/pre-sale@3x.png
0 → 100644
1.9 KB
-
Please register or login to post a comment