|
|
@@ -0,0 +1,129 @@
|
|
|
+<template>
|
|
|
+ <el-card shadow="never">
|
|
|
+ <yun-table
|
|
|
+ :columns="columns"
|
|
|
+ ref="yuntable"
|
|
|
+ @render="onTableRender"
|
|
|
+ toolbar="refresh,del"
|
|
|
+ :auth="{
|
|
|
+ add:{:$auth->check('app\\admin\\controller\\goods\\FengsuShip','add')},
|
|
|
+ edit:{:$auth->check('app\\admin\\controller\\goods\\FengsuShip','edit')},
|
|
|
+ del:{:$auth->check('app\\admin\\controller\\goods\\FengsuShip','del')},
|
|
|
+ multi:{:$auth->check('app\\admin\\controller\\goods\\FengsuShip','multi')},
|
|
|
+ }"
|
|
|
+ :extend="extend">
|
|
|
+ </yun-table>
|
|
|
+ </el-card>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import table from "@components/Table.js";
|
|
|
+export default{
|
|
|
+ components:{
|
|
|
+ 'YunTable':table
|
|
|
+ },
|
|
|
+ data:{
|
|
|
+ extend:{
|
|
|
+ index_url: 'goods/fengsu_ship/index',
|
|
|
+ del_url: 'goods/fengsu_ship/del',
|
|
|
+ multi_url: 'goods/fengsu_ship/multi',
|
|
|
+ },
|
|
|
+ columns:[
|
|
|
+ {checkbox: true,selectable:function (row,index){
|
|
|
+ //可以根据业务需求返回false让某些行不可选中
|
|
|
+ return true;
|
|
|
+ }},
|
|
|
+ {field:"id",title:"ID",operate:false},
|
|
|
+ {field:"shop_id",title:"店铺ID"},
|
|
|
+ {field:"trade_from",title:"平台"},
|
|
|
+ {field:"province",title:"省份",operate: false},
|
|
|
+ {field:"city",title:"城市",operate: false},
|
|
|
+ {field:"company_name",title:"快递名称"},
|
|
|
+ {field:"waybill_no",title:"快递单号"},
|
|
|
+ {field:"goods_title",title:"产品名称"},
|
|
|
+ {field:"sku_id",title:"规格id"},
|
|
|
+ {field:"num",title:"件数",operate: false},
|
|
|
+ {field:"price",title:"实付价格",operate: false},
|
|
|
+ {field:"consign_time",title:"发货时间",operate:"daterange",formatter:Yunqi.formatter.datetime},
|
|
|
+ {field:"status",title:"状态",operate:"select",searchList:{1:"无店铺", 2:"无Sku", 3:"正常"},formatter:Yunqi.formatter.tags},
|
|
|
+ {field:"user_id",title:"录入人",operate: false},
|
|
|
+ {field:"createtime",title:"创建时间",operate: false,formatter:Yunqi.formatter.datetime},
|
|
|
+ {field:"updatetime",title:"修改时间",visible:false,operate: false,formatter:Yunqi.formatter.datetime},
|
|
|
+ {
|
|
|
+ field: 'operate',
|
|
|
+ title: __('操作'),
|
|
|
+ width:150,
|
|
|
+ action:{
|
|
|
+ shops:{
|
|
|
+ tooltip:true,
|
|
|
+ icon:'fa fa-certificate',
|
|
|
+ type:'success',
|
|
|
+ text:__('关联店铺'),
|
|
|
+ method:'shops',
|
|
|
+ visible:function(row,index){
|
|
|
+ return row.status == 1;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ specs:{
|
|
|
+ tooltip:true,
|
|
|
+ icon:'fa fa-list',
|
|
|
+ type:'info',
|
|
|
+ text:__('关联规格'),
|
|
|
+ method:'specs',
|
|
|
+ // visible:function(row,index){
|
|
|
+ // return row.status == 2;
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ del:true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //页面加载完成时执行
|
|
|
+ onLoad:function(query){
|
|
|
+ console.log(query);
|
|
|
+ },
|
|
|
+ //页面初始显示或在框架内显示时执行
|
|
|
+ onShow:function(){
|
|
|
+
|
|
|
+ },
|
|
|
+ //页面在框架内隐藏时执行
|
|
|
+ onHide:function(){
|
|
|
+
|
|
|
+ },
|
|
|
+ //页面在框架内关闭时执行
|
|
|
+ onUnload:function(){
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ shops:function (row){
|
|
|
+ Yunqi.api.open({
|
|
|
+ url:'goods/fengsu_ship/shops?ids='+row.id,
|
|
|
+ width:1000,
|
|
|
+ title:__('关联店铺'),
|
|
|
+ icon:'fa fa-list'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ specs:function (row){
|
|
|
+ Yunqi.api.open({
|
|
|
+ url:'goods/fengsu_ship/specs?ids='+row.id,
|
|
|
+ width:1000,
|
|
|
+ title:__('关联规格'),
|
|
|
+ icon:'fa fa-list'
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onTableRender:function(list){
|
|
|
+ //表格渲染完成后执行
|
|
|
+ /**
|
|
|
+ * table常用方法
|
|
|
+ * this.$refs.yuntable.reset();//重新渲染整个组件,当columns修改时,需要重新渲染表格才能生效,可以执行该方法。
|
|
|
+ * this.$refs.yuntable.reload();//保持当前的page,重新获取数据
|
|
|
+ * this.$refs.yuntable.submit();//返回第一页,重新获取数据
|
|
|
+ * this.$refs.yuntable.expandAllTree();//树形表格展开所有节点
|
|
|
+ * this.$refs.yuntable.expandTree(topid);//树形表格展开指定节点
|
|
|
+ */
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+</style>
|