|
|
@@ -1,229 +1,340 @@
|
|
|
<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>
|
|
|
+ <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>
|
|
|
+ </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: "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 },
|
|
|
+ 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:"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: [
|
|
|
+ {
|
|
|
+ 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
|
|
|
+ },
|
|
|
|
|
|
- ],
|
|
|
- },
|
|
|
- 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();
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ // {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: [
|
|
|
|
|
|
- },
|
|
|
- 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();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ 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();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- },
|
|
|
- onLoad: function (query) {
|
|
|
+ },
|
|
|
+ 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>
|
|
|
|