|
|
|
@ -9,9 +9,10 @@ |
|
|
|
<TabPane label="饭团订单" name="1"></TabPane> |
|
|
|
<TabPane label="快递订单" name="2"></TabPane> |
|
|
|
<TabPane label="跑腿订单" name="3"></TabPane> |
|
|
|
<TabPane label="基础设置" name="4"></TabPane> |
|
|
|
<TabPane label="配送时长设置" name="4"></TabPane> |
|
|
|
<TabPane label="客服设置" name="5"></TabPane> |
|
|
|
</Tabs> |
|
|
|
<div v-if="tabName !== '4'"> |
|
|
|
<div v-if="tabName !== '4' && tabName !== '5'"> |
|
|
|
<Tabs v-model="tabName1" :animated="false" @on-click="changeTab"> |
|
|
|
<TabPane label="指派单" name="7"></TabPane> |
|
|
|
<TabPane label="待接单" name="0"></TabPane> |
|
|
|
@ -23,7 +24,7 @@ |
|
|
|
<TabPane label="预订单" name="6"></TabPane> |
|
|
|
</Tabs> |
|
|
|
</div> |
|
|
|
<div v-else style="padding: 20px 0;"> |
|
|
|
<div v-else-if="tabName === '4'" style="padding: 20px 0;"> |
|
|
|
<Form ref="settingForm" :model="settingForm" :label-width="130" style="width: 420px;"> |
|
|
|
<FormItem label="设置配送时长"> |
|
|
|
<InputNumber v-model="settingForm.deliveryTime" :min="0" :precision="0" style="width: 220px" /> |
|
|
|
@ -34,7 +35,17 @@ |
|
|
|
</FormItem> |
|
|
|
</Form> |
|
|
|
</div> |
|
|
|
<Row v-if="tabName !== '4'" v-show="openSearch" @keydown.enter.native="handleSearch"> |
|
|
|
<div v-else-if="tabName === '5'" style="padding: 20px 0;"> |
|
|
|
<Form ref="customerServiceForm" :model="customerServiceForm" :label-width="130" style="width: 420px;"> |
|
|
|
<FormItem label="客服电话"> |
|
|
|
<Input v-model="customerServiceForm.customerPhone" clearable placeholder="请输入客服电话" style="width: 220px" /> |
|
|
|
</FormItem> |
|
|
|
<FormItem> |
|
|
|
<Button type="primary" :loading="customerServiceLoading" @click="saveCustomerServiceSetting">保存</Button> |
|
|
|
</FormItem> |
|
|
|
</Form> |
|
|
|
</div> |
|
|
|
<Row v-if="tabName !== '4' && tabName !== '5'" v-show="openSearch" @keydown.enter.native="handleSearch"> |
|
|
|
<Form ref="searchForm" :model="searchForm" inline :label-width="90"> |
|
|
|
<FormItem label="配送员名称" prop="workerName"> |
|
|
|
<Input type="text" v-model="searchForm.workerName" clearable placeholder="请输入配送员名称" |
|
|
|
@ -50,7 +61,7 @@ |
|
|
|
</FormItem> |
|
|
|
</Form> |
|
|
|
</Row> |
|
|
|
<Row v-if="tabName !== '4'" align="middle" justify="space-between" class="operation"> |
|
|
|
<Row v-if="tabName !== '4' && tabName !== '5'" align="middle" justify="space-between" class="operation"> |
|
|
|
<div class="icons"> |
|
|
|
<Tooltip content="刷新" placement="top" transfer> |
|
|
|
<Icon type="md-refresh" size="18" class="item" @click="getLogisticsInfo" /> |
|
|
|
@ -73,14 +84,14 @@ |
|
|
|
</Tooltip> |
|
|
|
</div> |
|
|
|
</Row> |
|
|
|
<Alert show-icon v-if="tabName !== '4'" v-show="openTip"> |
|
|
|
<Alert show-icon v-if="tabName !== '4' && tabName !== '5'" v-show="openTip"> |
|
|
|
已选择 |
|
|
|
<span class="select-count">{{ selectList.length }}</span> 项 |
|
|
|
<a class="select-clear" @click="clearSelectAll">清空</a> |
|
|
|
</Alert> |
|
|
|
<Table v-if="tabName !== '4'" :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom" |
|
|
|
<Table v-if="tabName !== '4' && tabName !== '5'" :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom" |
|
|
|
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table> |
|
|
|
<Row v-if="tabName !== '4'" type="flex" justify="end" class="page"> |
|
|
|
<Row v-if="tabName !== '4' && tabName !== '5'" type="flex" justify="end" class="page"> |
|
|
|
<Page :current="searchForm.pageNum" :total="total" :page-size="searchForm.pageSize" |
|
|
|
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" |
|
|
|
size="small" show-total show-elevator show-sizer></Page> |
|
|
|
@ -118,6 +129,8 @@ |
|
|
|
deleteOrder, |
|
|
|
getDeliveryTimeSetting, |
|
|
|
saveDeliveryTimeSetting, |
|
|
|
getCustomerPhoneSetting, |
|
|
|
saveCustomerPhoneSetting, |
|
|
|
} from "@/api/index"; |
|
|
|
import excel from "@/libs/excel"; |
|
|
|
import addEdit from "./addEdit.vue"; |
|
|
|
@ -144,6 +157,7 @@ |
|
|
|
reading: false, |
|
|
|
importLoading: false, |
|
|
|
settingLoading: false, |
|
|
|
customerServiceLoading: false, |
|
|
|
loadingExport: true, |
|
|
|
exportModalVisible: false, |
|
|
|
transferOrder: false, |
|
|
|
@ -172,6 +186,10 @@ |
|
|
|
regionId: JSON.parse(this.getStore("user")).departmentId, |
|
|
|
deliveryTime: 30 |
|
|
|
}, |
|
|
|
customerServiceForm: { |
|
|
|
regionId: JSON.parse(this.getStore("user")).departmentId, |
|
|
|
customerPhone: "" |
|
|
|
}, |
|
|
|
selectDate: null, |
|
|
|
form: {}, |
|
|
|
tabName: "1", |
|
|
|
@ -429,6 +447,7 @@ |
|
|
|
init() { |
|
|
|
this.getLogisticsInfo(); |
|
|
|
this.getSetting(); |
|
|
|
this.getCustomerServiceSetting(); |
|
|
|
}, |
|
|
|
//点击页面转单-->点击弹窗转单 |
|
|
|
goTransferOrder(item) { |
|
|
|
@ -458,6 +477,10 @@ |
|
|
|
this.getSetting(); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (v === "5") { |
|
|
|
this.getCustomerServiceSetting(); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.searchForm.pageNum = 1; |
|
|
|
this.searchForm.deliveryType = v; |
|
|
|
this.getLogisticsInfo(); |
|
|
|
@ -488,6 +511,34 @@ |
|
|
|
this.settingLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
getCustomerServiceSetting() { |
|
|
|
getCustomerPhoneSetting({ |
|
|
|
regionId: this.customerServiceForm.regionId |
|
|
|
}).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.customerServiceForm.customerPhone = res.result || ""; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
saveCustomerServiceSetting() { |
|
|
|
const customerPhone = String(this.customerServiceForm.customerPhone || "").trim(); |
|
|
|
if (!customerPhone) { |
|
|
|
this.$Message.warning("请输入客服电话"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.customerServiceLoading = true; |
|
|
|
saveCustomerPhoneSetting({ |
|
|
|
regionId: this.customerServiceForm.regionId, |
|
|
|
customerPhone: customerPhone |
|
|
|
}).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.customerServiceForm.customerPhone = customerPhone; |
|
|
|
this.$Message.success("保存成功"); |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.customerServiceLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
changeTab(v) { |
|
|
|
this.searchForm.pageNum = 1; |
|
|
|
this.searchForm.status = v; |
|
|
|
|