|
@@ -12,7 +12,7 @@
|
|
|
<div class="top-set">
|
|
|
<div class="t-left">
|
|
|
自动配送(暂不支持预约单)
|
|
|
- <span @click="centerDialogVisible = true">[时长设置]</span>
|
|
|
+ <span @click="centerDialogVisible = true">[时长/运力设置]</span>
|
|
|
</div>
|
|
|
<div class="t-right">
|
|
|
<span>默认下单{{autodeliveryOrderTime}}分钟后</span>
|
|
@@ -56,7 +56,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- // 选择自动配送运力 -->
|
|
|
- <el-dialog title="自动配送设置" @close="cancel" :visible.sync="centerDialogVisible" width="800px" center>
|
|
|
+ <el-dialog title="自动配送设置" @close="getConfig" :visible.sync="centerDialogVisible" width="800px" center>
|
|
|
<el-form label-width="120px">
|
|
|
<el-form-item label="自动接单时间">
|
|
|
<el-input size="small" class="auto-time" v-model="autodeliveryOrderTime">
|
|
@@ -64,8 +64,7 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="自动配送运力">
|
|
|
- <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
|
|
- <el-checkbox-group v-model="autodeliveryIds" @change="handleCheckedCitiesChange">
|
|
|
+ <el-checkbox-group v-model="autodeliveryIds">
|
|
|
<el-checkbox :label="String(v.deliveryId)" name="type" v-for="(v,i) in deliveryList" :key="i">{{v.name}}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
@@ -100,8 +99,6 @@ export default {
|
|
|
deliveryList: [], // 运力列表
|
|
|
deliveryIdList: [],
|
|
|
memberType: this.$store.state.userInfo.memberType,
|
|
|
- checkAll: false,
|
|
|
- isIndeterminate: true,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -110,16 +107,6 @@ export default {
|
|
|
this.floorListDelivery();
|
|
|
},
|
|
|
methods: {
|
|
|
- handleCheckAllChange(val) {
|
|
|
- this.autodeliveryIds = val ? this.deliveryIdList : [];
|
|
|
- this.isIndeterminate = false;
|
|
|
- },
|
|
|
- handleCheckedCitiesChange(value) {
|
|
|
- let checkedCount = value.length;
|
|
|
- this.checkAll = checkedCount === this.deliveryList.length;
|
|
|
- this.isIndeterminate =
|
|
|
- checkedCount > 0 && checkedCount < this.deliveryList.length;
|
|
|
- },
|
|
|
play(index) {
|
|
|
let src = "../../../static/audio/alone.mp3";
|
|
|
switch (index) {
|
|
@@ -157,10 +144,6 @@ export default {
|
|
|
let mp3 = new Audio(src);
|
|
|
mp3.play(); //播放 mp3这个音频对象
|
|
|
},
|
|
|
- cancel() {
|
|
|
- this.centerDialogVisible = false;
|
|
|
- this.openAutodelivery = 0;
|
|
|
- },
|
|
|
confirm() {
|
|
|
if (!this.autodeliveryIds.length) {
|
|
|
return this.$message({
|
|
@@ -245,6 +228,7 @@ export default {
|
|
|
autodelivery() {
|
|
|
if (this.openAutodelivery === 1) {
|
|
|
this.centerDialogVisible = true;
|
|
|
+ this.autodeliveryIds = this.deliveryIdList
|
|
|
} else {
|
|
|
this.autodeliveryIds = "";
|
|
|
this.autodeliveryOrderTime = 5;
|