|
@@ -2,10 +2,12 @@
|
|
|
<div id="beer_box_order_split" class="app-container">
|
|
|
|
|
|
<div class="filter-container">
|
|
|
- <el-input v-model="listQuery.orderNo" placeholder="订单号" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
|
|
|
- <el-input v-model="listQuery.beerBoxName" placeholder="盲盒名" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
|
|
|
- <el-input v-model="listQuery.month" placeholder="盲盒所属月份" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
|
|
|
- <el-input v-model="listQuery.phone" placeholder="收货人手机号" style="width: 200px;" class="filter-item" type="text" @keyup.enter.native="handleFilter" />
|
|
|
+ <el-input v-model="listQuery.orderNo" placeholder="订单号" style="width: 200px;" type="text" @keyup.enter.native="handleFilter" />
|
|
|
+ <el-select v-model="beerBoxIds_list" multiple filterable placeholder="盲盒选择" @change="beerBoxIds_filter">
|
|
|
+ <el-option v-for="item in beerBoxList" :key="item.beerBoxId" :label="item.boxName" :value="item.beerBoxId" />
|
|
|
+ </el-select>
|
|
|
+ <el-input v-model="listQuery.month" placeholder="盲盒所属月份" style="width: 200px;" type="text" @keyup.enter.native="handleFilter" />
|
|
|
+ <el-input v-model="listQuery.phone" placeholder="收货人手机号" style="width: 200px;" type="text" @keyup.enter.native="handleFilter" />
|
|
|
<el-button size="medium" @click="handleFilter" type="primary">搜索</el-button>
|
|
|
</div>
|
|
|
|
|
@@ -48,7 +50,8 @@
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="待发货" name="待发货">
|
|
|
- <el-button size="medium" type="primary" @click="exportData_wait_send_order" style="margin-bottom: 10px;">导出待发货数据</el-button>
|
|
|
+ <el-button size="medium" type="danger" @click="offMdiAd" style="margin-bottom: 10px;">关闭客户端修改地址</el-button>
|
|
|
+ <el-button size="medium" type="primary" @click="exportData" style="margin-bottom: 10px;">导出待发货数据</el-button>
|
|
|
<el-upload
|
|
|
ref="upload"
|
|
|
action=""
|
|
@@ -70,6 +73,12 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="userName" label="用户名" width="100" />
|
|
|
+ <el-table-column label="地址可修改状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.updateAddressFlag==0">开启</span>
|
|
|
+ <span v-else-if="scope.row.updateAddressFlag==1" style="color:red">关闭</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="consignee" label="收件人" width="100" />
|
|
|
<el-table-column prop="phone" label="收件人电话" width="100" />
|
|
|
<el-table-column prop="address" label="收件地址" width="100" />
|
|
@@ -198,7 +207,8 @@
|
|
|
<script>
|
|
|
import { beer_box_order_split_list, beer_box_order_split_import_order_courierno,
|
|
|
beer_box_order_split_list_bindable_sku, beer_box_order_split_update_bindable_sku,
|
|
|
- beer_box_order_split_update_confirm_order } from '@/api/projection'
|
|
|
+ beer_box_order_split_update_confirm_order, beer_box_order_split_update_modify_address_flag,
|
|
|
+ beer_box_order_split_list_box } from '@/api/projection'
|
|
|
import { deepClone, parseTime } from '@/utils'
|
|
|
import { scrollTo } from '@/utils/scrollTo'
|
|
|
import { getToken } from '@/utils/auth'
|
|
@@ -212,6 +222,8 @@ export default {
|
|
|
currentPage: 1,
|
|
|
pageSize: 20
|
|
|
},
|
|
|
+ beerBoxList: [],
|
|
|
+ beerBoxIds_list: [],
|
|
|
pageInfo: {},
|
|
|
dialogVisible_sku: false,
|
|
|
parmas_sku: {
|
|
@@ -223,9 +235,17 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.loadDatas();
|
|
|
-
|
|
|
+ this.getBeerBoxList();
|
|
|
},
|
|
|
methods: {
|
|
|
+ beerBoxIds_filter(e) {
|
|
|
+ this.listQuery.beerBoxIds = e.join(';')
|
|
|
+ },
|
|
|
+ offMdiAd() {
|
|
|
+ beer_box_order_split_update_modify_address_flag(this.listQuery).then(res => {
|
|
|
+ this.$notify.success({ title: '关闭成功' });
|
|
|
+ })
|
|
|
+ },
|
|
|
confirmOrder() {
|
|
|
beer_box_order_split_update_confirm_order().then(res => {
|
|
|
this.$notify.success({ title: '更新成功' });
|
|
@@ -257,22 +277,6 @@ export default {
|
|
|
this.$notify.success({ title: '上传成功' });
|
|
|
})
|
|
|
},
|
|
|
- exportData_wait_send_order() {
|
|
|
- var request = new XMLHttpRequest();
|
|
|
- request.responseType = "blob";
|
|
|
- request.open("POST", process.env.BASE_API+'/beer_box_order_split/export/wait_send_order');
|
|
|
- request.setRequestHeader('Authorization', 'stores' + getToken());
|
|
|
- request.setRequestHeader("Content-type", "application/x-www-form-urlencoded ; charset=utf-8");
|
|
|
- request.onload = function () {
|
|
|
- var _url = window.URL.createObjectURL(this.response);
|
|
|
- var a = document.createElement("a");
|
|
|
- document.body.appendChild(a);
|
|
|
- a.href = _url;
|
|
|
- a.download = '订单.xlsx';
|
|
|
- a.click();
|
|
|
- }
|
|
|
- request.send()
|
|
|
- },
|
|
|
exportData() {
|
|
|
const params = new URLSearchParams();
|
|
|
for (const key in this.listQuery) {
|
|
@@ -288,14 +292,22 @@ export default {
|
|
|
request.setRequestHeader("Content-type", "application/x-www-form-urlencoded ; charset=utf-8");
|
|
|
request.send(urlParams)
|
|
|
request.onload = function () {
|
|
|
+ let disposition_obj = request.getResponseHeader("content-disposition")
|
|
|
+ let matchArray = disposition_obj.match(/filename="(.*)"/)
|
|
|
+ const filename = matchArray[1];
|
|
|
var _url = window.URL.createObjectURL(this.response);
|
|
|
var a = document.createElement("a");
|
|
|
document.body.appendChild(a);
|
|
|
a.href = _url;
|
|
|
- a.download = '订单.xlsx';
|
|
|
+ a.download = decodeURI(filename);
|
|
|
a.click();
|
|
|
}
|
|
|
},
|
|
|
+ getBeerBoxList() {
|
|
|
+ beer_box_order_split_list_box(this.listQuery).then((res) => {
|
|
|
+ this.beerBoxList = res.data.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取数据
|
|
|
loadDatas() {
|
|
|
beer_box_order_split_list(this.listQuery).then((res) => {
|