Merge branch 'master' into ma

This commit is contained in:
mabo
2021-07-02 10:33:34 +08:00
31 changed files with 373 additions and 227 deletions

View File

@@ -1 +1 @@
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-1.0.1:0.0.4 .
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2 .

View File

@@ -12,6 +12,10 @@ export const verificationCode = verificationCode => {
export const downLoadDeliverExcel = params => {
return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob');
};
// 导出待发货订单
export const queryExportOrder = params => {
return getRequest(`/orders/queryExportOrder`, params);
};
// 上传待发货的订单列表

View File

@@ -18,10 +18,14 @@ export default {
* @description api请求基础路径
*/
api_dev: {
common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn',
manager: 'https://admin-api.pickmall.cn',
// common: 'https://common-api.pickmall.cn',
// buyer: 'https://buyer-api.pickmall.cn',
// seller: 'https://store-api.pickmall.cn',
// manager: 'https://admin-api.pickmall.cn',
common: 'http://192.168.0.109:8890',
buyer: 'http://192.168.0.109:8888',
seller: 'http://192.168.0.109:8889',
manager: 'http://192.168.0.109:8887'
},
api_prod: {

View File

@@ -22,6 +22,11 @@ export default {
this.init();
},
methods: {
clear() {
this.data = [];
this.selectedWay = [];
this.init();
},
/**
* 关闭
*/
@@ -50,30 +55,66 @@ export default {
// console.warn(this.$store.state.shipTemplate);
// 禁止选中的地址
let checkData = [];
let disabledData = checkedData.filter((item, i) => {
return i != index;
if (i != index) {
return i != index;
} else {
checkData.push(item);
}
});
// 选中
checkData.forEach((check) => {
// 循环出已经选中的地址id
check.areaId.split(",").forEach((ids) => {
this.data.forEach((item) => {
// 如果当前省份下市区全部选中则选中该省份
if (check.selectedAll) {
check.area.split(",").forEach((area) => {
if (area == item.name) {
this.$set(item, "checked", true);
}
});
}
// 将市区继续循环
item.children.forEach((child, childIndex) => {
// 判断当前市区是否是已选中状态
if (item.checked) {
this.$set(child, "checked", true);
}
if (child.id == ids) {
this.$set(child, "checked", true);
}
});
});
});
});
// 禁用
disabledData.forEach((dis) => {
console.log(dis)
// 循环出已经选中的地址id
dis.areaId.split(",").forEach((ids) => {
// 循环出省份
this.data.forEach((item) => {
// 如果当前省份下市区全部选中则选中该省份
// 如果当前省份下市区全部选中则禁用该省份
if (dis.selectedAll) {
dis.area.split(",").forEach((area) => {
if (area == item.name) {
console.log(item.name +"选中")
this.$set(item, "disabled", true);
}
});
}
// 将市区继续循环
item.children.forEach((child, childIndex) => {
// 判断当前市区是否是已选中状态
if (child.id == ids) {
// 判断当前市区是否是已禁用状态
if (item.disabled) {
this.$set(child, "disabled", true);
} else {
if (child.id == ids) {
this.$set(child, "disabled", true);
}
}
});
});

View File

@@ -63,7 +63,7 @@
<div class="div-item" v-if="orderInfo.order.needReceipt == true">
<div class="div-item-left">发票金额</div>
<div class="div-item-right">{{ orderInfo.receipt.receiptPrice ? orderInfo.receipt.receiptPrice : '暂无' | unitPrice('¥')}}</div>
<div class="div-item-right"><span v-if="orderInfo.receipt.receiptPrice"></span>{{ orderInfo.receipt.receiptPrice ? orderInfo.receipt.receiptPrice : '暂无' | unitPrice}}</div>
</div>
<div class="div-item" v-if="orderInfo.order.needReceipt == true">

View File

@@ -30,8 +30,19 @@
<Button type="primary" class="export" @click="expressOrderDeliver">
批量发货
</Button>
<download-excel
style="display:inline-block;"
:data="data"
:fields="excelColumns"
:fetch="exportOrder"
name="待发货订单.xls"
>
<Button type="success">
导出待发货订单
</Button>
</download-excel>
</div>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :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>
@@ -43,11 +54,16 @@
<script>
import * as API_Order from "@/api/order";
import { verificationCode } from "@/api/order";
import JsonExcel from "vue-json-excel";
import Cookies from "js-cookie";
export default {
name: "orderList",
components: {
"download-excel": JsonExcel,
},
data() {
return {
orderCode: "",
orderCode: "", // 虚拟订单核验码
loading: true, // 表单加载状态
searchForm: {
// 搜索框初始化对象
@@ -71,11 +87,7 @@ export default {
endTime: "",
billPrice: "",
},
// 表单验证规则
formValidate: {},
submitLoading: false, // 添加或编辑提交状态
selectList: [], // 多选数据
selectCount: 0, // 多选计数
columns: [
{
title: "订单号",
@@ -178,6 +190,13 @@ export default {
],
data: [], // 表单数据
total: 0, // 表单数据总数
excelColumns: { // 导出excel的参数
'编号': 'index',
'订单号': 'sn',
'收货人': 'consigneeName',
'收货人联系电话': 'consigneeMobile',
'收货地址': 'consigneeAddress',
}
};
},
methods: {
@@ -202,22 +221,27 @@ export default {
path: "/export-order-deliver",
});
},
// 初始化数据
init() {
this.getDataList();
},
// 改变页码
changePage(v) {
this.searchForm.pageNumber = v;
this.getDataList();
},
// 改变页数
changePageSize(v) {
this.searchForm.pageSize = v;
this.getDataList();
},
// 搜索订单
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
// 重置
handleReset() {
this.searchForm = {};
this.searchForm.pageNumber = 1;
@@ -228,25 +252,14 @@ export default {
// 重新加载数据
this.getDataList();
},
changeSort(e) {
this.searchForm.sort = e.key;
this.searchForm.order = e.order;
if (e.order === "normal") {
this.searchForm.order = "";
}
this.getDataList();
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
// 起始时间处理
selectDateRange(v) {
if (v) {
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
// 获取表格数据
getDataList() {
this.loading = true;
API_Order.getOrderList(this.searchForm).then((res) => {
@@ -257,7 +270,40 @@ export default {
}
});
},
// 导出的待发货订单数据
async exportOrder () {
let userInfo = JSON.parse(Cookies.get("userInfo"));
console.log(userInfo);
const params = {
// 搜索框初始化对象
pageNumber: 1, // 当前页数
pageSize: 100, // 页面大小
sort: "startDate", // 默认排序字段
order: "desc", // 默认排序方式
startDate: "", // 起始时间
endDate: "", // 终止时间
orderSn: "",
buyerName: "",
tag: "WAIT_SHIP",
orderType: "NORMAL",
storeId: userInfo.id
}
const res = await API_Order.queryExportOrder(params)
if (res.success) {
if (res.result.length === 0) {
this.$Message.warning('暂无待发货订单')
return []
}
for (let i=0; i<res.result.length; i++) {
res.result[i].index = i+1;
res.result[i].consigneeAddress =
res.result[i].consigneeAddressPath.replace(/,/g, "") + res.result[i].consigneeDetail
}
return res.result
}
},
// 查看订单详情
detail(v) {
let sn = v.sn;
this.$router.push({

View File

@@ -213,6 +213,7 @@ export default {
},
//添加运费模板
add() {
this.$refs.region.clear()
this.title = "添加运费模板";
this.csTab = true;
this.operation = "ADD";