@@ -81,14 +85,18 @@
searchForm: {
shopId:'',
headUserId:'',
- status:'',
+ status:null,
productName:'',
- isFace:'',
+ shopName:'',
+ isFace:null,
pageNumber: 1,
pageSize: 10,
regionId:JSON.parse(this.getStore("user")).departmentId
},
dictData: [{
+ title: "团长未支付",
+ value: -1
+ }, {
title: "待成团",
value: 0
}, {
@@ -100,9 +108,6 @@
}, {
title: "面对面",
value: 3
- }, {
- title: "团长未支付",
- value: "-1"
}],
columns: [{
type: "index",
@@ -112,71 +117,123 @@
{
title: "拼团编号",
key: "id",
+ minWidth: 180,
+ align: "center",
+ },
+ {
+ title: "店铺名称",
+ key: "shopName",
+ minWidth: 140,
align: "center",
+ render: (h, params) => {
+ return h("span", params.row.shopName || (params.row.shopItem && params.row.shopItem.shopName) || "-");
+ }
},
{
title: "商品名",
key: "productName",
+ minWidth: 160,
align: "center",
},
{
- title: "成团时间",
- key: "successTime",
+ title: "拼团价",
+ key: "groupPrice",
+ width: 100,
align: "center",
render: (h, params) => {
- return h(
- "div",
- this.formatDateTime(params.row.successTime)
- );
+ return h("span", this.formatAmount(params.row.groupPrice));
}
},
{
title: "几人团/已拼成",
key: "targetMembers",
+ width: 130,
align: "center",
render: (h, params) => {
- let re = params.row.targetMembers + '/' + params.row.currentMembers
+ let re = (params.row.targetMembers || 0) + '/' + (params.row.currentMembers || 0)
return h(
"div",
re
);
}
},
+ {
+ title: "面对面",
+ key: "isFace",
+ width: 90,
+ align: "center",
+ render: (h, params) => {
+ return h("Tag", {
+ props: {
+ color: params.row.isFace == 1 ? "orange" : "default"
+ }
+ }, params.row.isFace == 1 ? "是" : "否");
+ }
+ },
{
title: "状态",
key: "status", //0 待成团 1成功 2失败 3面对面
+ width: 140,
align: "center",
render: (h, params) => {
- let re = "",
- color = "";
- if (params.row.status == "3") {
- re = "面对面";
- color = "yellow";
- } else if (params.row.status == "0") {
- re = "待成团";
- color = "yellow";
- } else if (params.row.status == "1") {
- re = "成功";
- color = "green";
- } else if (params.row.status == "2") {
- re = "失败";
- color = "red";
- } else if (params.row.status == "-1"){
- re = '团长发起拼团但未支付';
- color = "red";
- }
+ let status = this.getGroupStatus(params.row.status);
return h("div", [
h(
"Tag", {
props: {
- color: color,
+ color: status.color,
},
},
- re
+ status.title
),
]);
},
},
+ {
+ title: "配送员佣金",
+ key: "workerCommission",
+ width: 110,
+ align: "center",
+ render: (h, params) => {
+ return h("span", this.formatAmount(params.row.workerCommission));
+ }
+ },
+ {
+ title: "总配送费",
+ key: "totalDeliveryFee",
+ width: 110,
+ align: "center",
+ render: (h, params) => {
+ return h("span", this.formatAmount(params.row.totalDeliveryFee));
+ }
+ },
+ {
+ title: "创建时间",
+ key: "createTime",
+ minWidth: 160,
+ align: "center",
+ render: (h, params) => {
+ return h("span", this.formatDateTime(params.row.createTime));
+ }
+ },
+ {
+ title: "过期时间",
+ key: "expireTime",
+ minWidth: 160,
+ align: "center",
+ render: (h, params) => {
+ return h("span", this.formatDateTime(params.row.expireTime));
+ }
+ },
+ {
+ title: "成团时间",
+ key: "successTime",
+ minWidth: 160,
+ align: "center",
+ render: (h, params) => {
+ return h("span", this.formatDateTime(params.row.successTime));
+ }
+ },
{
title: "操作",
key: "action",
@@ -194,7 +251,7 @@
},
},
},
- "查看订单"
+ "查看详情"
)
]);
},
@@ -227,9 +284,6 @@
this.searchForm.pageSize = v;
this.getDataList();
},
- checkStatus(v){
- this.searchForm.status = v
- },
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
@@ -237,6 +291,10 @@
},
handleReset() {
this.$refs.searchForm.resetFields();
+ this.searchForm.status = null;
+ this.searchForm.isFace = null;
+ this.searchForm.productName = "";
+ this.searchForm.shopName = "";
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
// 重新加载数据
@@ -252,10 +310,34 @@
changeTableSize(v) {
this.tableSize = v;
},
+ getGroupStatus(status) {
+ const statusMap = {
+ "-1": { title: "团长未支付", color: "red" },
+ "0": { title: "待成团", color: "yellow" },
+ "1": { title: "成功", color: "green" },
+ "2": { title: "失败", color: "red" },
+ "3": { title: "面对面", color: "orange" },
+ };
+ return statusMap[String(status)] || { title: "未知", color: "default" };
+ },
+ formatAmount(value) {
+ if (value === null || value === undefined || value === "") return "-";
+ return `¥${Number(value).toFixed(2)}`;
+ },
+ buildSearchParams() {
+ const params = Object.assign({}, this.searchForm);
+ if (params.status === "" || params.status === undefined) {
+ params.status = null;
+ }
+ if (params.isFace === "" || params.isFace === undefined) {
+ params.isFace = null;
+ }
+ return params;
+ },
getDataList() {
this.loading = true;
// 带多条件搜索参数获取表单数据 请自行修改接口
- getGroupList(this.searchForm).then((res) => {
+ getGroupList(this.buildSearchParams()).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
@@ -265,6 +347,8 @@
this.getDataList();
}
}
+ }).catch(() => {
+ this.loading = false;
});
},
},
diff --git a/src/views/app/shopArea/shopArea.vue b/src/views/app/shopArea/shopArea.vue
index 8b1872d..fd8df68 100644
--- a/src/views/app/shopArea/shopArea.vue
+++ b/src/views/app/shopArea/shopArea.vue
@@ -1,6 +1,12 @@
@@ -14,7 +20,9 @@
v-show="showType == 'tree'"
>添加子圈层
-
+
-
-
-
-
-
+
+
+
+
+ 1 食堂,送餐中转点也设置为食堂;2 快递驿站;0 其他地址
+
+
+
- {{ form.title }}
+ {{ addParentTitle }}
@@ -219,19 +230,22 @@
>
-
-
-
-
-
+
+
+
+
+ 1 食堂,送餐中转点也设置为食堂;2 快递驿站;0 其他地址
+
+
+
{
+ const request = this.isDepartmentAgent
+ ? loadShopArea(this.userDepartmentId)
+ : initShopArea();
+ request.then((res) => {
this.loading = false;
if (res.success) {
res.result.forEach(function (e) {
@@ -401,7 +446,10 @@ export default {
},
getParentListEdit() {
this.loadingEdit = true;
- initShopArea().then((res) => {
+ const request = this.isDepartmentAgent
+ ? loadShopArea(this.userDepartmentId)
+ : initShopArea();
+ request.then((res) => {
this.loadingEdit = false;
if (res.success) {
res.result.forEach(function (e) {
@@ -410,13 +458,24 @@ export default {
e.children = [];
}
});
- // 头部加入一级
- let first = {
- id: "0",
- title: "一级圈层",
- };
- res.result.unshift(first);
- this.dataEdit = res.result;
+ if (this.isDepartmentAgent) {
+ this.dataEdit = [
+ {
+ id: this.userDepartmentId,
+ title: this.userDepartmentTitle,
+ expand: true,
+ children: res.result,
+ },
+ ];
+ } else {
+ // 头部加入一级
+ let first = {
+ id: "0",
+ title: "一级圈层",
+ };
+ res.result.unshift(first);
+ this.dataEdit = res.result;
+ }
}
});
},
@@ -437,7 +496,14 @@ export default {
search() {
if (this.searchKey) {
this.loading = true;
- searchShopArea({ title: this.searchKey }).then((res) => {
+ const params = {
+ title: this.searchKey,
+ };
+ if (this.isDepartmentAgent) {
+ params.parentId = this.userDepartmentId;
+ params.departmentId = this.userDepartmentId;
+ }
+ searchShopArea(params).then((res) => {
this.loading = false;
if (res.success) {
res.result.forEach(function (e) {
@@ -506,6 +572,7 @@ export default {
},
cancelAdd() {
this.modalVisible = false;
+ this.addParentTitle = "";
},
handleReset() {
this.$refs.form.resetFields();
@@ -550,27 +617,47 @@ export default {
},
add() {
if (this.form.id == "" || this.form.id == null) {
+ if (this.isDepartmentAgent) {
+ this.modalTitle = "添加子圈层";
+ this.showParent = true;
+ this.addParentTitle = this.userDepartmentTitle;
+ this.formAdd = {
+ parentId: this.userDepartmentId,
+ sortOrder: this.data.length + 1,
+ isCanteen: null,
+ status: 0,
+ };
+ this.modalVisible = true;
+ return;
+ }
this.$Message.warning("请先点击选择一个圈层");
return;
}
this.modalTitle = "添加子圈层";
this.showParent = true;
+ this.addParentTitle = this.form.title;
if (!this.form.children) {
this.form.children = [];
}
this.formAdd = {
parentId: this.form.id,
sortOrder: this.form.children.length + 1,
+ isCanteen: null,
status: 0,
};
this.modalVisible = true;
},
addRoot() {
+ if (this.isDepartmentAgent) {
+ return;
+ }
this.modalTitle = "添加一级圈层";
this.showParent = false;
+ this.addParentTitle = "";
this.formAdd = {
parentId: 0,
sortOrder: this.data.length + 1,
+ isCanteen: null,
status: 0,
};
this.modalVisible = true;
diff --git a/src/views/my-components/hiver/shopArea-tree-choose.vue b/src/views/my-components/hiver/shopArea-tree-choose.vue
index 1f67e21..72549df 100644
--- a/src/views/my-components/hiver/shopArea-tree-choose.vue
+++ b/src/views/my-components/hiver/shopArea-tree-choose.vue
@@ -74,6 +74,10 @@
type: String,
default: "500px",
},
+ rootId: {
+ type: [String, Number],
+ default: "",
+ },
},
data() {
return {
@@ -87,7 +91,8 @@
},
methods: {
initShopAreaData() {
- initShopArea().then((res) => {
+ const request = this.rootId ? loadShopArea(this.rootId) : initShopArea();
+ request.then((res) => {
if (res.success) {
res.result.forEach(function(e) {
if (e.isParent) {
@@ -124,9 +129,14 @@
// 搜索圈层
if (this.searchKey) {
this.depLoading = true;
- searchShopArea({
+ const params = {
title: this.searchKey
- }).then((res) => {
+ };
+ if (this.rootId) {
+ params.parentId = this.rootId;
+ params.departmentId = this.rootId;
+ }
+ searchShopArea(params).then((res) => {
this.depLoading = false;
if (res.success) {
res.result.forEach(function(e) {
diff --git a/src/views/sys/order-manage/orderManage.less b/src/views/sys/order-manage/orderManage.less
index e69de29..acb7a30 100644
--- a/src/views/sys/order-manage/orderManage.less
+++ b/src/views/sys/order-manage/orderManage.less
@@ -0,0 +1,9 @@
+.order-manage-table {
+ .ivu-table-cell {
+ white-space: nowrap;
+ }
+
+ .ivu-table-cell-tooltip-content {
+ white-space: nowrap;
+ }
+}
diff --git a/src/views/sys/order-manage/orderManage.vue b/src/views/sys/order-manage/orderManage.vue
index 3320a43..981ae4d 100644
--- a/src/views/sys/order-manage/orderManage.vue
+++ b/src/views/sys/order-manage/orderManage.vue
@@ -1,29 +1,77 @@
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ item.productName }}
+
X{{ item.quantity }}
+
¥{{ item.price }}
+
+
+ 暂无商品详情
+
+
+
+
+
+
+
+
+
订单-{{ item.numberCode || item.id }}
+
{{ getOrderStatusText(item) }}
+
+
+ 订单号
+ {{ item.id }}
+
+
+ 订单时间
+ {{ formatDateTime(item.createTime) }}
+
+
+
{{ goods.productName }}
+
X{{ goods.quantity }}
+
¥{{ goods.price }}
+
+
配送费:¥{{ item.deliveryFee || 0 }}
+
+
+ 暂无拼团订单
+
+
+
+