|
@@ -269,15 +269,18 @@ export default {
|
|
|
return hours * 60 + minutes
|
|
return hours * 60 + minutes
|
|
|
},
|
|
},
|
|
|
sumbit() {
|
|
sumbit() {
|
|
|
- let data = {
|
|
|
|
|
- merchantId: this.merchantId,
|
|
|
|
|
- timeType: this.timeType.length > 0 ? 1 : 2,
|
|
|
|
|
- period: this.selectedIndices.length > 0 ? this.selectedIndices.join('、') : null,
|
|
|
|
|
- middleTime: this.timeArr.length >= 1 ? this.timeArr[0].value : null,
|
|
|
|
|
- beginTime: this.timeArr.length >= 2 ? this.timeArr[1].value : null,
|
|
|
|
|
- endTime: this.timeArr.length >= 3 ? this.timeArr[2].value : null,
|
|
|
|
|
- id:this.arrData.index==1 || this.arrData.index==0?this.arrData.arr[this.arrData.index].id:null
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 按照周一至周日的顺序排序选中的营业日
|
|
|
|
|
+ const weekOrder = ['周一', '周二', '周三', '周四', '周五', '周六', '周日' ,'整周'];
|
|
|
|
|
+ const sortedPeriod = this.selectedIndices.sort((a, b) => weekOrder.indexOf(a) - weekOrder.indexOf(b));
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ merchantId: this.merchantId,
|
|
|
|
|
+ timeType: this.timeType.length > 0 ? 1 : 2,
|
|
|
|
|
+ period: this.selectedIndices.length > 0 ? sortedPeriod.join('、') : null,
|
|
|
|
|
+ middleTime: this.timeArr.length >= 1 ? this.timeArr[0].value : null,
|
|
|
|
|
+ beginTime: this.timeArr.length >= 2 ? this.timeArr[1].value : null,
|
|
|
|
|
+ endTime: this.timeArr.length >= 3 ? this.timeArr[2].value : null,
|
|
|
|
|
+ id:this.arrData.index==1 || this.arrData.index==0?this.arrData.arr[this.arrData.index].id:null
|
|
|
|
|
+ }
|
|
|
if(this.selectedIndices.length==0){
|
|
if(this.selectedIndices.length==0){
|
|
|
this.$tip.toast('请选择营业日');
|
|
this.$tip.toast('请选择营业日');
|
|
|
return
|
|
return
|