Authored by lea guo

订单确认收货

  1 +/* eslint-disable operator-linebreak */
1 /* eslint-disable space-before-function-paren */ 2 /* eslint-disable space-before-function-paren */
2 import { createNamespacedHelpers } from 'vuex'; 3 import { createNamespacedHelpers } from 'vuex';
3 const { mapActions } = createNamespacedHelpers('order/orderList'); 4 const { mapActions } = createNamespacedHelpers('order/orderList');
@@ -28,10 +29,14 @@ export default { @@ -28,10 +29,14 @@ export default {
28 owner, 29 owner,
29 }); 30 });
30 31
  32 + const confirmBtnText = confirmInfo.needPenalty
  33 + ? '赔付并取消订单'
  34 + : '不卖了';
  35 +
31 this.$createConfirmDialog( 36 this.$createConfirmDialog(
32 { 37 {
33 confirmBtn: { 38 confirmBtn: {
34 - text: '不卖了', 39 + text: confirmBtnText,
35 style: { color: '#D0021B' }, 40 style: { color: '#D0021B' },
36 }, 41 },
37 cancelBtn: { text: '继续出售', active: true }, 42 cancelBtn: { text: '继续出售', active: true },
@@ -163,6 +168,9 @@ export default { @@ -163,6 +168,9 @@ export default {
163 168
164 case orderActionsMap.CONFIRM_DELIVERY.name: { 169 case orderActionsMap.CONFIRM_DELIVERY.name: {
165 this.$createConfirmDialog({ 170 this.$createConfirmDialog({
  171 + content: '确认收货?',
  172 + confirmBtn: { style: { color: '#D0021B' } },
  173 + cancelBtn: { active: true },
166 onConfirm: async () => { 174 onConfirm: async () => {
167 const isOk = await this.confirmReceipt({ 175 const isOk = await this.confirmReceipt({
168 orderCode, 176 orderCode,
@@ -176,7 +184,7 @@ export default { @@ -176,7 +184,7 @@ export default {
176 // const txt = isOk ? "收货成功" : "收货失败"; 184 // const txt = isOk ? "收货成功" : "收货失败";
177 // this.$createToast({ txt, type: "txt" }).show(); 185 // this.$createToast({ txt, type: "txt" }).show();
178 }, 186 },
179 - }); 187 + }).show();
180 break; 188 break;
181 } 189 }
182 default: 190 default:
  1 +/* eslint-disable operator-linebreak */
1 /* eslint-disable space-before-function-paren */ 2 /* eslint-disable space-before-function-paren */
2 import { orderActionsMap, ownType } from 'constants/order-constants'; 3 import { orderActionsMap, ownType } from 'constants/order-constants';
3 import { createNamespacedHelpers } from 'vuex'; 4 import { createNamespacedHelpers } from 'vuex';
@@ -114,6 +115,9 @@ export default { @@ -114,6 +115,9 @@ export default {
114 115
115 case orderActionsMap.CONFIRM_DELIVERY.name: { 116 case orderActionsMap.CONFIRM_DELIVERY.name: {
116 this.$createConfirmDialog({ 117 this.$createConfirmDialog({
  118 + content: '确认收货?',
  119 + confirmBtn: { style: { color: '#D0021B' } },
  120 + cancelBtn: { active: true },
117 onConfirm: async () => { 121 onConfirm: async () => {
118 const isOk = await this.confirmReceipt({ 122 const isOk = await this.confirmReceipt({
119 orderCode, 123 orderCode,
@@ -128,7 +132,7 @@ export default { @@ -128,7 +132,7 @@ export default {
128 // const txt = isOk ? "收货成功" : "收货失败"; 132 // const txt = isOk ? "收货成功" : "收货失败";
129 // this.$createToast({ txt, type: "txt" }).show(); 133 // this.$createToast({ txt, type: "txt" }).show();
130 }, 134 },
131 - }); 135 + }).show();
132 break; 136 break;
133 } 137 }
134 case orderActionsMap.NOT_SOLD.name: { 138 case orderActionsMap.NOT_SOLD.name: {
@@ -137,9 +141,13 @@ export default { @@ -137,9 +141,13 @@ export default {
137 owner, 141 owner,
138 }); 142 });
139 143
  144 + const confirmBtnText = confirmInfo.needPenalty
  145 + ? '赔付并取消订单'
  146 + : '不卖了';
  147 +
140 this.$createConfirmDialog( 148 this.$createConfirmDialog(
141 { 149 {
142 - confirmBtn: { text: '不卖了', style: { color: '#D0021B' } }, 150 + confirmBtn: { text: confirmBtnText, style: { color: '#D0021B' } },
143 cancelBtn: { text: '继续出售', active: true }, 151 cancelBtn: { text: '继续出售', active: true },
144 onConfirm: async () => { 152 onConfirm: async () => {
145 const isOk = await this.cancelTrade({ 153 const isOk = await this.cancelTrade({
@@ -184,9 +192,13 @@ export default { @@ -184,9 +192,13 @@ export default {
184 owner, 192 owner,
185 }); 193 });
186 194
  195 + const confirmBtnText = confirmInfo.needPenalty
  196 + ? '赔付并取消订单'
  197 + : '不卖了';
  198 +
187 this.$createConfirmDialog( 199 this.$createConfirmDialog(
188 { 200 {
189 - confirmBtn: { text: '不卖了', style: { color: '#D0021B' } }, 201 + confirmBtn: { text: confirmBtnText, style: { color: '#D0021B' } },
190 cancelBtn: { text: '继续出售', active: true }, 202 cancelBtn: { text: '继续出售', active: true },
191 onConfirm: async () => { 203 onConfirm: async () => {
192 const isOk = await this.cancelTrade({ 204 const isOk = await this.cancelTrade({
1 { 1 {
2 "name": "xianyu-ufo-app-web", 2 "name": "xianyu-ufo-app-web",
3 - "version": "0.0.2-beta-11", 3 + "version": "0.0.2-beta-12",
4 "private": true, 4 "private": true,
5 "description": "Xianyu Project With Express", 5 "description": "Xianyu Project With Express",
6 "repository": { 6 "repository": {