Commit e6e51434 authored by 徐一鸣's avatar 徐一鸣

服务管理

parent 10a908b0
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
label: "操作", label: "操作",
type: "buttons", type: "buttons",
align: "center", align: "center",
width: 240, width: 300,
actionList: [ actionList: [
{ {
label: "编辑", label: "编辑",
...@@ -148,12 +148,16 @@ export default { ...@@ -148,12 +148,16 @@ export default {
}, },
{ {
getLabel(item) { getLabel(item) {
return item.state == 0 ? "申请上架" : "申请下架"; return (
["申请上架", "申请下架", "申请上架中"][item.state] || "-"
);
}, },
callback(item) { callback(item) {
item.state == 0 if (item.state == 0) {
? _self.applyForSoldUpItem(item) _self.applyForSoldUpItem(item);
: _self.applyForSoldOutItem(item); } else if (item.state == 1) {
_self.applyForSoldOutItem(item);
}
}, },
disabledRule(item) { disabledRule(item) {
return item.state == 2; return item.state == 2;
...@@ -530,6 +534,9 @@ export default { ...@@ -530,6 +534,9 @@ export default {
{ {
label: "审批", label: "审批",
callback: this.approvalItem, callback: this.approvalItem,
disabledRule(item) {
return item.service_apply_info.approval_status === 1;
},
}, },
{ {
label: "删除", label: "删除",
...@@ -679,7 +686,7 @@ export default { ...@@ -679,7 +686,7 @@ export default {
label: "操作", label: "操作",
type: "buttons", type: "buttons",
align: "center", align: "center",
width: 240, width: 300,
actionList: [ actionList: [
{ {
label: "编辑", label: "编辑",
...@@ -687,21 +694,21 @@ export default { ...@@ -687,21 +694,21 @@ export default {
}, },
{ {
getLabel(item) { getLabel(item) {
return item.state == 0 ? "上架" : ""; return item.state == 1 ? "下架" : "";
}, },
callback(item) { callback(item) {
item.state == 0 item.state == 1
? _self.soldUpItem(item) ? _self.soldOutItem(item)
: _self.soldOutItem(item); : _self.soldUpItem(item);
},
disabledRule(item) {
return item.state === 0;
}, },
}, },
{ {
label: "删除", label: "删除",
class: "warn", class: "warn",
callback: this.deleteItem, callback: this.deleteItem,
disabledRule(item) {
return item.state === 1;
},
}, },
], ],
}, },
...@@ -796,6 +803,9 @@ export default { ...@@ -796,6 +803,9 @@ export default {
{ {
label: "审批", label: "审批",
callback: this.approvalItem, callback: this.approvalItem,
disabledRule(item) {
return item.service_apply_info.approval_status === 1;
},
}, },
{ {
label: "删除", label: "删除",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment