|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="shop">
|
|
|
<module-view :propConfig="config" ref="view" v-loading="load" style="height:100%" @pagination="pagination" @modalHandle="modalHandle" @onRefresh="getList"
|
|
|
- @resert="queryList" @search="queryList" @clickHandle="clickHandle" />
|
|
|
+ @resert="queryList" @search="queryList" @clickHandle="clickHandle" @detail="detail" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -35,15 +35,29 @@ export default class Shop extends Vue {
|
|
|
component:'by-input',
|
|
|
compConfig:{}
|
|
|
},{
|
|
|
- label:'店铺简称',
|
|
|
- prop:'shortName',
|
|
|
+ label:'店铺状态',
|
|
|
+ prop:'shopStatus',
|
|
|
component:'by-input',
|
|
|
compConfig:{}
|
|
|
},{
|
|
|
label:'授权状态',
|
|
|
prop:'authStatus',
|
|
|
- component:'by-input',
|
|
|
- compConfig:{}
|
|
|
+ component:'by-select',
|
|
|
+ compConfig:{
|
|
|
+ attr:{
|
|
|
+ clearable:true,
|
|
|
+ data:[{
|
|
|
+ value:'Authorized',
|
|
|
+ label:'已授权'
|
|
|
+ },{
|
|
|
+ value:'Unauthorized',
|
|
|
+ label:'未授权'
|
|
|
+ },{
|
|
|
+ value:'Expired',
|
|
|
+ label:'已过期'
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
}],
|
|
|
[{
|
|
|
label:'授权账号',
|
|
@@ -63,15 +77,21 @@ export default class Shop extends Vue {
|
|
|
},{
|
|
|
label:'创建时间',
|
|
|
prop:'createTime',
|
|
|
- component:'by-input',
|
|
|
- compConfig:{}
|
|
|
+ component:'by-date-picker',
|
|
|
+ compConfig:{
|
|
|
+ attr:{
|
|
|
+ editable:false,
|
|
|
+ type:'datetimerange',
|
|
|
+ format:'yyyy-MM-dd HH:mm:ss'
|
|
|
+ }
|
|
|
+ }
|
|
|
}]
|
|
|
]
|
|
|
},
|
|
|
tool:{
|
|
|
tools:{
|
|
|
add:true,
|
|
|
- delete:true,
|
|
|
+ // delete:true,
|
|
|
search:true,
|
|
|
refresh:true
|
|
|
}
|
|
@@ -81,11 +101,12 @@ export default class Shop extends Vue {
|
|
|
size:'mini',
|
|
|
seq:true,
|
|
|
align:'center',
|
|
|
- checkbox:true
|
|
|
+ // checkbox:true
|
|
|
},
|
|
|
columns:[{
|
|
|
title:'店铺名称',
|
|
|
field:'shopName',
|
|
|
+ isDetail:true,
|
|
|
width:150
|
|
|
},{
|
|
|
title:'店铺简称',
|
|
@@ -122,7 +143,8 @@ export default class Shop extends Vue {
|
|
|
},{
|
|
|
title:'授权状态',
|
|
|
field:'authStatus',
|
|
|
- width:150
|
|
|
+ width:150,
|
|
|
+ component:shopTag
|
|
|
},{
|
|
|
title:'授权开始时间',
|
|
|
field:'authBegin',
|
|
@@ -283,7 +305,7 @@ export default class Shop extends Vue {
|
|
|
name:'删除',
|
|
|
event:{
|
|
|
click:(item:any) => {
|
|
|
- // this.del(item);
|
|
|
+ this.del(item);
|
|
|
}
|
|
|
}
|
|
|
}]
|
|
@@ -370,8 +392,8 @@ export default class Shop extends Vue {
|
|
|
prop:'authStatus',
|
|
|
component:'by-select',
|
|
|
compConfig:{
|
|
|
- clearable:true,
|
|
|
attr:{
|
|
|
+ clearable:true,
|
|
|
data:[{
|
|
|
value:'Authorized',
|
|
|
label:'已授权'
|
|
@@ -503,66 +525,81 @@ export default class Shop extends Vue {
|
|
|
prop:'enableSplitOrderFullSend',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'同步库存',
|
|
|
prop:'enableSynvStore',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'订单下载',
|
|
|
prop:'enableSyncOrder',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'天猫物流升级',
|
|
|
prop:'enableTmallLogistics',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
}],
|
|
|
-
|
|
|
[{
|
|
|
label:'商品下载',
|
|
|
prop:'enableSkuDownload',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'开启链接库存同步',
|
|
|
prop:'enableLinkSync',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'是否虾皮SIP',
|
|
|
prop:'shopeeSip',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'同步发货',
|
|
|
prop:'enableSyncSend',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
}],
|
|
|
[{
|
|
@@ -570,32 +607,40 @@ export default class Shop extends Vue {
|
|
|
prop:'shopStatus',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'退款状态',
|
|
|
prop:'refundStatus',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:'1',
|
|
|
- inactiveValue:'0'
|
|
|
+ attr:{
|
|
|
+ activeValue:'1',
|
|
|
+ inactiveValue:'0'
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'启用分销',
|
|
|
prop:'enableDistribution',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'揽收轨迹同步发货',
|
|
|
prop:'enableTrackSyncSend',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
}],
|
|
|
[{
|
|
@@ -603,39 +648,44 @@ export default class Shop extends Vue {
|
|
|
prop:'enableSyncAfterSale',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'开通AG',
|
|
|
prop:'enableAg',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'确认收货自动退款',
|
|
|
prop:'enableAutoRefund',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
},{
|
|
|
label:'开启跨境操作',
|
|
|
prop:'enableCbec',
|
|
|
component:'by-switch',
|
|
|
compConfig:{
|
|
|
- activeValue:1,
|
|
|
- inactiveValue:0
|
|
|
+ attr:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}
|
|
|
}]
|
|
|
]
|
|
|
}
|
|
|
- },
|
|
|
- request:{
|
|
|
- url:'/omsOrder/omsShop/save'
|
|
|
}
|
|
|
}
|
|
|
mounted(){
|
|
@@ -643,29 +693,20 @@ export default class Shop extends Vue {
|
|
|
this.getList()
|
|
|
})
|
|
|
}
|
|
|
- del(){
|
|
|
- let data = (this.$refs.view as any).getSelectData()
|
|
|
- if(data.length == 0){
|
|
|
- this.$message('请选择店铺!')
|
|
|
- return
|
|
|
- }
|
|
|
- let ids:Array<any>=[];
|
|
|
- for(const item of data){
|
|
|
- ids.push(item.id);
|
|
|
- }
|
|
|
-
|
|
|
- this.$confirm('此操作将永久删除该店铺, 是否继续?', '提示', {
|
|
|
+ del(item:any){
|
|
|
+ this.$confirm('此操作将永久删除 “'+item.shopName+'” 店铺, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.load = true;
|
|
|
- del({ids:ids}).then(()=>{
|
|
|
+ del({id:item.id}).then(()=>{
|
|
|
this.load = false;
|
|
|
this.$message({
|
|
|
message:'删除成功!',
|
|
|
type:'success'
|
|
|
})
|
|
|
+ this.pagination();
|
|
|
}).catch(()=>{
|
|
|
this.load = false;
|
|
|
})
|
|
@@ -716,15 +757,35 @@ export default class Shop extends Vue {
|
|
|
this.load = false;
|
|
|
})
|
|
|
}
|
|
|
+ onSave(){
|
|
|
+ let data = (this.$refs.view as any).getFormValue();
|
|
|
+ this.load = true;
|
|
|
+ update(data).then((res:any) => {
|
|
|
+ this.$message({
|
|
|
+ message:res.msg,
|
|
|
+ type:'success'
|
|
|
+ });
|
|
|
+ this.load = false;
|
|
|
+ (this.$refs.view as any).closeModal();
|
|
|
+ this.pagination();
|
|
|
+ }).catch(()=>{
|
|
|
+ this.load = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
modalHandle(n:string){
|
|
|
if(n == 'onAdd'){
|
|
|
(this.$refs.view as any).getFormValidate(this.addShop)
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
+ if(n == 'onSave'){
|
|
|
+ this.onSave();
|
|
|
}
|
|
|
}
|
|
|
- clickHandle(n:string){
|
|
|
- if(n == 'onDelete'){
|
|
|
- this.del();
|
|
|
+ clickHandle(n:string){
|
|
|
+ if(n == 'onAdd'){
|
|
|
+ this.config.modal.tool.tools.add = true;
|
|
|
+ delete this.config.modal.tool.tools.save;
|
|
|
+ (this.$refs.view as any).initFormTool();
|
|
|
}
|
|
|
}
|
|
|
addShop(){
|
|
@@ -744,6 +805,11 @@ export default class Shop extends Vue {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+ detail(){
|
|
|
+ this.config.modal.tool.tools.save = true;
|
|
|
+ delete this.config.modal.tool.tools.add;
|
|
|
+ (this.$refs.view as any).initFormTool();
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|