|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="shop">
|
|
|
- <module-view :propConfig="config" ref="view" v-loading="load" style="height:100%" @pagination="pagination" />
|
|
|
-
|
|
|
+ <module-view :propConfig="config" ref="view" v-loading="load" style="height:100%" @pagination="pagination" @modalHandle="modalHandle" @onRefresh="getList"
|
|
|
+ @resert="queryList" @search="queryList" @clickHandle="clickHandle" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -14,6 +14,7 @@ export default class Shop extends Vue {
|
|
|
load=false;
|
|
|
time:any;
|
|
|
timeNum = 0;
|
|
|
+ isSearch=false;
|
|
|
config:any={
|
|
|
attr:{
|
|
|
calculateH:true
|
|
@@ -274,19 +275,48 @@ export default class Shop extends Vue {
|
|
|
title:'创建时间',
|
|
|
field:'createTime',
|
|
|
width:150
|
|
|
+ },{
|
|
|
+ title:'操作',
|
|
|
+ action:true,
|
|
|
+ width:100,
|
|
|
+ plugins:[{
|
|
|
+ name:'删除',
|
|
|
+ event:{
|
|
|
+ click:(item:any) => {
|
|
|
+ // this.del(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }]
|
|
|
}]
|
|
|
},
|
|
|
modal:{
|
|
|
tool:{
|
|
|
tools:{
|
|
|
return:true,
|
|
|
- save:true
|
|
|
+ add:true
|
|
|
}
|
|
|
},
|
|
|
form:{
|
|
|
attr:{
|
|
|
size:'small',
|
|
|
- labelWidth:'130px'
|
|
|
+ labelWidth:'130px',
|
|
|
+ rules:{
|
|
|
+ shopName:[
|
|
|
+ { required: true, message: '请输入店铺名称', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ shopId:[
|
|
|
+ { required: true, message: '请输入店铺编号', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ channelName:[
|
|
|
+ {required: true, message: '请输入所属平台', trigger: 'blur'}
|
|
|
+ ],
|
|
|
+ channel:[
|
|
|
+ { required: true, message: '请输入平台类型', trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ authStatus:[
|
|
|
+ { required: true, message: '请选择授权状态', trigger: 'change' }
|
|
|
+ ]
|
|
|
+ }
|
|
|
},
|
|
|
columns:[
|
|
|
[{
|
|
@@ -338,7 +368,22 @@ export default class Shop extends Vue {
|
|
|
},{
|
|
|
label:'授权状态',
|
|
|
prop:'authStatus',
|
|
|
- component:shopTag
|
|
|
+ component:'by-select',
|
|
|
+ compConfig:{
|
|
|
+ clearable:true,
|
|
|
+ attr:{
|
|
|
+ data:[{
|
|
|
+ value:'Authorized',
|
|
|
+ label:'已授权'
|
|
|
+ },{
|
|
|
+ value:'Unauthorized',
|
|
|
+ label:'未授权'
|
|
|
+ },{
|
|
|
+ value:'Expired',
|
|
|
+ label:'已过期'
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
}],
|
|
|
[{
|
|
|
label:'APP KEY',
|
|
@@ -375,12 +420,12 @@ export default class Shop extends Vue {
|
|
|
component:'by-date-picker'
|
|
|
}],
|
|
|
[{
|
|
|
- label:'店铺状态',
|
|
|
- prop:'shopStatus',
|
|
|
+ label:'京东授权状态',
|
|
|
+ prop:'jdAuthStatus',
|
|
|
component:'by-input'
|
|
|
},{
|
|
|
- label:'退款状态',
|
|
|
- prop:'refundStatus',
|
|
|
+ label:'京东拒绝申请原因',
|
|
|
+ prop:'jdRejectReason',
|
|
|
component:'by-input'
|
|
|
},{
|
|
|
label:'身份证号',
|
|
@@ -423,12 +468,12 @@ export default class Shop extends Vue {
|
|
|
component:'by-input'
|
|
|
}],
|
|
|
[{
|
|
|
- label:'同步发货',
|
|
|
- prop:'enableSyncSend',
|
|
|
+ label:'支付宝授权状态',
|
|
|
+ prop:'alipayAuthStatus',
|
|
|
component:'by-input'
|
|
|
},{
|
|
|
- label:'揽收轨迹同步发货',
|
|
|
- prop:'enableTrackSyncSend',
|
|
|
+ label:'菜鸟电子面单',
|
|
|
+ prop:'enableCainiaoElectronicBill',
|
|
|
component:'by-input'
|
|
|
},{
|
|
|
span:12,
|
|
@@ -436,23 +481,6 @@ export default class Shop extends Vue {
|
|
|
prop:'returnAdress',
|
|
|
component:'by-input'
|
|
|
}],
|
|
|
- [{
|
|
|
- label:'拆分订单整单发货',
|
|
|
- prop:'enableSplitOrderFullSend',
|
|
|
- component:'by-input'
|
|
|
- },{
|
|
|
- label:'同步库存',
|
|
|
- prop:'enableSynvStore',
|
|
|
- component:'by-input'
|
|
|
- },{
|
|
|
- label:'订单下载',
|
|
|
- prop:'enableSyncOrder',
|
|
|
- component:'by-input'
|
|
|
- },{
|
|
|
- label:'天猫物流升级',
|
|
|
- prop:'enableTmallLogistics',
|
|
|
- component:'by-input'
|
|
|
- }],
|
|
|
[{
|
|
|
label:'下载截止时间',
|
|
|
prop:'endPullTime',
|
|
@@ -470,56 +498,138 @@ export default class Shop extends Vue {
|
|
|
prop:'enableTaobaoMessageNotice',
|
|
|
component:'by-input'
|
|
|
}],
|
|
|
+ [{
|
|
|
+ label:'拆分订单整单发货',
|
|
|
+ prop:'enableSplitOrderFullSend',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ label:'同步库存',
|
|
|
+ prop:'enableSynvStore',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ label:'订单下载',
|
|
|
+ prop:'enableSyncOrder',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
+ },{
|
|
|
+ label:'天猫物流升级',
|
|
|
+ prop:'enableTmallLogistics',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
+ }],
|
|
|
+
|
|
|
[{
|
|
|
label:'商品下载',
|
|
|
prop:'enableSkuDownload',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
label:'开启链接库存同步',
|
|
|
prop:'enableLinkSync',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
label:'是否虾皮SIP',
|
|
|
prop:'shopeeSip',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
- label:'支付宝授权状态',
|
|
|
- prop:'alipayAuthStatus',
|
|
|
- component:'by-input'
|
|
|
+ label:'同步发货',
|
|
|
+ prop:'enableSyncSend',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}],
|
|
|
[{
|
|
|
- label:'京东授权状态',
|
|
|
- prop:'jdAuthStatus',
|
|
|
- component:'by-input'
|
|
|
+ label:'店铺状态',
|
|
|
+ prop:'shopStatus',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
- label:'京东拒绝申请原因',
|
|
|
- prop:'jdRejectReason',
|
|
|
- component:'by-input'
|
|
|
+ label:'退款状态',
|
|
|
+ prop:'refundStatus',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:'1',
|
|
|
+ inactiveValue:'0'
|
|
|
+ }
|
|
|
},{
|
|
|
label:'启用分销',
|
|
|
prop:'enableDistribution',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
- label:'菜鸟电子面单',
|
|
|
- prop:'enableCainiaoElectronicBill',
|
|
|
- component:'by-input'
|
|
|
+ label:'揽收轨迹同步发货',
|
|
|
+ prop:'enableTrackSyncSend',
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}],
|
|
|
[{
|
|
|
label:'售后单下载',
|
|
|
prop:'enableSyncAfterSale',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
label:'开通AG',
|
|
|
prop:'enableAg',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
label:'确认收货自动退款',
|
|
|
prop:'enableAutoRefund',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
},{
|
|
|
label:'开启跨境操作',
|
|
|
prop:'enableCbec',
|
|
|
- component:'by-input'
|
|
|
+ component:'by-switch',
|
|
|
+ compConfig:{
|
|
|
+ activeValue:1,
|
|
|
+ inactiveValue:0
|
|
|
+ }
|
|
|
}]
|
|
|
]
|
|
|
}
|
|
@@ -533,8 +643,41 @@ 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('此操作将永久删除该店铺, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.load = true;
|
|
|
+ del({ids:ids}).then(()=>{
|
|
|
+ this.load = false;
|
|
|
+ this.$message({
|
|
|
+ message:'删除成功!',
|
|
|
+ type:'success'
|
|
|
+ })
|
|
|
+ }).catch(()=>{
|
|
|
+ this.load = false;
|
|
|
+ })
|
|
|
+ }).catch(() => {});
|
|
|
+
|
|
|
+ }
|
|
|
pagination(){
|
|
|
- this.getList();
|
|
|
+ if(this.isSearch){
|
|
|
+ this.queryList();
|
|
|
+ }else{
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
}
|
|
|
getList(){
|
|
|
if(!this.$refs.view){
|
|
@@ -547,7 +690,17 @@ export default class Shop extends Vue {
|
|
|
this.timeNum ++;
|
|
|
return
|
|
|
}
|
|
|
+ this.isSearch = false;
|
|
|
+ let data = (this.$refs.view as any).getPage();
|
|
|
+ this.requestList(data);
|
|
|
+ }
|
|
|
+
|
|
|
+ queryList(){
|
|
|
+ this.isSearch = true;
|
|
|
let data = (this.$refs.view as any).getQuery();
|
|
|
+ this.requestList(data);
|
|
|
+ }
|
|
|
+ requestList(data:any){
|
|
|
this.load = true;
|
|
|
query(data).then((res:any) => {
|
|
|
this.load = false;
|
|
@@ -562,7 +715,34 @@ export default class Shop extends Vue {
|
|
|
}).catch(()=>{
|
|
|
this.load = false;
|
|
|
})
|
|
|
-
|
|
|
+ }
|
|
|
+ modalHandle(n:string){
|
|
|
+ if(n == 'onAdd'){
|
|
|
+ (this.$refs.view as any).getFormValidate(this.addShop)
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ clickHandle(n:string){
|
|
|
+ if(n == 'onDelete'){
|
|
|
+ this.del();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ addShop(){
|
|
|
+ let value = (this.$refs.view as any).getFormValue();
|
|
|
+ if(value){
|
|
|
+ this.load = true;
|
|
|
+ save(value).then((res:any)=>{
|
|
|
+ this.load = false;
|
|
|
+ this.$message({
|
|
|
+ message:res.msg,
|
|
|
+ type:'success'
|
|
|
+ });
|
|
|
+ (this.$refs.view as any).closeModal();
|
|
|
+ this.getList();
|
|
|
+ }).catch(()=>{
|
|
|
+ this.load = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|