| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <template>
- <el-card shadow="never">
- <yun-table :columns="columns" ref="yuntable" @render="onTableRender" toolbar="refresh,del" :auth="{
-
- del:{:$auth->check('app\\admin\\controller\\goods\\ImportList','del')},
-
- }" :extend="extend">
- </yun-table>
- </el-card>
- </template>
- <script>
- import table from "@components/Table.js";
- export default {
- components: {
- 'YunTable': table
- },
- data: {
- extend: {
- index_url: 'goods/import_list/index',
- del_url: 'goods/import_list/del',
- multi_url: 'goods/import_list/multi',
- },
- columns: [
- {
- checkbox: true, selectable: function (row, index) {
- //可以根据业务需求返回false让某些行不可选中
- return true;
- }
- },
- { field: "id", title: "ID", operate: false },
- { field: "shop_id", title: "店铺ID" },
- {
- field: 'type_id', title: ('打单平台'), operate: "select", searchList: { 1: '风速', 2: '聚水潭', 0: '无' }, formatter: function (data, row) {
- let tag = Yunqi.formatter.tag;
- if (row.type_id == 1) {
- tag.value = '风速';
- tag.type = 'success';
- } else if (row.type_id == 2) {
- tag.value = '聚水潭';
- tag.type = 'primary';
- } else {
- tag.value = '无';
- tag.type = 'info';
- }
- return tag;
- }
- },
- { field: "trade_from", title: "平台" },
- { field: "province", title: "省份", operate: false },
- { field: "city", title: "城市", operate: false },
- { field: "company_name", title: "快递名称", operate: false },
- { field: "waybill_no", title: "快递单号" },
- { field: "goods_title", title: "产品名称", width: 300, align: 'left' },
- { field: "goods_info", title: "商品信息", width: 300, align: 'left' },
- { field: "sku_id", title: "规格id" },
- { field: "num", title: "件数", operate: false },
- { field: "price", title: "实付价格", operate: false },
- { field: "pack_specs_id", title: "打包规格id", operate: false },
- { field: "labor_cost_money", title: "工价", operate: false },
- { field: "one_surcharge_money", title: "单层保温金额", operate: false },
- { field: "two_surcharge_money", title: "双层保温金额", operate: false },
- // {field:"weight",title:"重量(斤)",operate: false},
- { field: "consign_time", title: "发货时间", operate: "daterange", formatter: Yunqi.formatter.datetime },
-
- // {field:"user_id",title:"录入人",operate: false},
- { field: "createtime", title: "创建时间", operate: false, formatter: Yunqi.formatter.datetime },
- { field: "updatetime", title: "修改时间", operate: false, formatter: Yunqi.formatter.datetime },
- { field: "status",fixed: 'right', title: "状态", operate: "select", searchList: { 1: "无店铺", 2: "无Sku", 3: "正常" }, formatter: Yunqi.formatter.tags },
- {
- field: 'operate',
- fixed: 'right',
- 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
- }
- }
- ]
- },
- methods: {
- shops: function (row) {
- let that = this;
- Yunqi.api.open({
- url: 'goods/import_list/shops?ids=' + row.shop_id,
- width: 1000,
- title: __('关联店铺'),
- icon: 'fa fa-list',
- close: function (r) {
- that.$refs.yuntable.reload();
- }
- });
- },
- specs: function (row) {
- let that = this;
- Yunqi.api.open({
- url: 'goods/import_list/specs?ids=' + row.id,
- width: 1000,
- title: __('关联规格'),
- icon: 'fa fa-list',
- close: function (r) {
- if (r) {
- that.$refs.yuntable.reload();
- }
- }
- })
- },
- }
- }
- </script>
- <style>
-
- </style>
|