| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- <template>
- <el-card shadow="never">
- <yun-table :columns="columns" ref="yuntable" @render="onTableRender" toolbar="refresh,settlement" :auth="{}"
- :extend="extend" :total-arr="totalArr" :is-showtotal="true" @data-loaded="handleData">
- <template #toolbar="{tool}">
- <template v-if="tool=='settlement'">
- <el-button type="primary" @click="set_jushuitan" title="设置">
- <i class="fa fa-cog"></i>
- <span class="title">聚水潭</span>
- </el-button>
- <el-button type="success" @click="set_fengsu" title="设置">
- <i class="fa fa-cog"></i>
- <span class="title">风速</span>
- </el-button>
- </template>
- </template>
- </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: '聚水潭'
- },
- 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';
- }
- return tag;
- }
- },
- // { field: "trade_from", title: "平台" },
- {
- field: 'trade_from',
- title: __('平台'),
- operate: "select",
- searchList:Yunqi.data.trade_from_item_list
- },
- {
- field: "province",
- title: "省份",
- operate: false
- },
- {
- field: "city",
- title: "城市",
- operate: false
- },
- {
- field: "company_name",
- title: "快递名称",
- operate: false
- },
- {
- field: "waybill_no",
- title: "快递单号"
- },
- {
- field: "order_status",
- fixed: 'right',
- title: "订单状态",
- operate: "select",
- searchList: {
- 'Sent': "正常",
- 'OuterSent': "外部已发货",
- 'SentCancelled': "已退款(聚水潭)",
- 'TRADE_CLOSED': "已退款(风速)"
- },
- formatter: function(data, row) {
- let tag = Yunqi.formatter.tag;
- if (row.order_status == 'OuterSent') {
- tag.value = '外部已发货';
- tag.type = 'warning';
- } else if (row.order_status == 'SentCancelled') {
- tag.value = '已退款';
- tag.type = 'danger';
- } else if (row.order_status == 'TRADE_CLOSED') {
- tag.value = '已退款';
- tag.type = 'danger';
- } else {
- tag.value = '正常';
- tag.type = 'success';
- }
- return tag;
- }
- },
- {
- 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: "specs_name",
- 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,
- sortable: true
- },
- // {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: function(data, row) {
- let tag = Yunqi.formatter.tag;
- if (row.status == 1) {
- tag.value = '无店铺';
- tag.type = 'danger';
- } else if (row.status == 2) {
- tag.value = '无Sku';
- tag.type = 'warning';
- } else if (row.status == 3) {
- tag.value = '正常';
- tag.type = 'success';
- }
- return tag;
- }
- },
- {
- 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;
- }
- },
- edit: {
- tooltip: true,
- icon: 'fa fa-pencil',
- type: 'primary',
- text: __('修改关联规格,且只能修改当天发货订单'),
- method: 'specs',
- visible: function(row, index) {
- return row.status == 3;
- }
- },
- // del: true
- }
- }
- ],
- totalArr: [
- ],
- },
- mounted() {
-
- },
- methods: {
- handleData(data) {
- console.log(data)
- this.totalArr = [{
- name: "无店铺",
- value: data.shops_num
- }, {
- name: "无Sku",
- value: data.specs_num
- }]
- },
- 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();
- }
- }
- })
- },
- set_jushuitan: function(row) {
- let that = this;
- Yunqi.api.open({
- url: 'goods/import_list/set_jushuitan',
- width: 1000,
- title: __('聚水潭同步数据设置'),
- icon: 'fa fa-cog',
- close: function(r) {
- that.$refs.yuntable.reload();
- }
- });
- },
- set_fengsu: function(row) {
- let that = this;
- Yunqi.api.open({
- url: 'goods/import_list/set_fengsu',
- width: 1000,
- title: __('风速同步数据设置'),
- icon: 'fa fa-cog',
- close: function(r) {
- that.$refs.yuntable.reload();
- }
- });
- },
- },
- onLoad: function(query) {
- }
- }
- </script>
- <style>
- </style>
|