This commit is contained in:
parent
ba65f5e957
commit
c1d92e8ac6
|
@ -2,11 +2,11 @@
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# base api
|
# base api
|
||||||
# VUE_APP_BASE_API = 'http://192.168.31.106:8324'
|
VUE_APP_BASE_API = 'http://192.168.1.32:8080'
|
||||||
VUE_APP_BASE_API = 'http://many.shop.lo'
|
# VUE_APP_BASE_API = 'https://plus.hwms.shop'
|
||||||
|
|
||||||
# socket 连接地址
|
# socket 连接地址
|
||||||
VUE_APP_WS_URL = 'ws://many.shop.lo'
|
VUE_APP_WS_URL = 'ws://plus.hwms.shop'
|
||||||
# VUE_APP_WS_URL = 'ws://mer1.crmeb.net'
|
# VUE_APP_WS_URL = 'ws://mer1.crmeb.net'
|
||||||
|
|
||||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||||
|
|
|
@ -57,6 +57,12 @@ export function attrCreatApi(data) {
|
||||||
export function attrEdittApi(id, data) {
|
export function attrEdittApi(id, data) {
|
||||||
return request.post(`store/attr/template/${id}`, data)
|
return request.post(`store/attr/template/${id}`, data)
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description 上传 -- 编辑
|
||||||
|
*/
|
||||||
|
export function httpRequest(data) {
|
||||||
|
return request.post(`upload/pdf`, data)
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description 属性规则 -- 删除
|
* @description 属性规则 -- 删除
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="16">
|
||||||
<el-form-item label="指定区域不配送:" prop="undelivery">
|
<el-form-item label="指定区域不配送:" prop="undelivery">
|
||||||
<el-radio-group v-model="ruleForm.undelivery">
|
<el-radio-group v-model="ruleForm.undelivery">
|
||||||
<el-radio :label="1">自定义</el-radio>
|
<el-radio :label="1">自定义</el-radio>
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
<el-radio :label="0">关闭</el-radio>
|
<el-radio :label="0">关闭</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<br>
|
<br>
|
||||||
(说明: 选择"开启"时, 仅支持上表添加的配送区域)
|
(说明: 选择"开启"时,仅支持上表添加的可配送区域下单,除此之外的全部区域无法下单)
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
|
@ -8,26 +8,26 @@
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
import { isEmpty } from 'element-ui/lib/utils/util';
|
import { isEmpty } from 'element-ui/lib/utils/util'
|
||||||
import ExcelJS from 'exceljs'
|
import ExcelJS from 'exceljs'
|
||||||
import * as FileSaver from 'file-saver'
|
import * as FileSaver from 'file-saver'
|
||||||
|
|
||||||
export default function createWorkBook(header, title, data, foot, filename, sheets) {
|
export default function createWorkBook(header, title, data, foot, filename, sheets) {
|
||||||
const letter = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
|
const letter = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
|
||||||
let lcomun = 1;
|
let lcomun = 1
|
||||||
let worksheet ;
|
let worksheet
|
||||||
|
|
||||||
const workBook = new ExcelJS.Workbook();
|
const workBook = new ExcelJS.Workbook()
|
||||||
let long = header.length;
|
const long = header.length
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建工作薄
|
* 创建工作薄
|
||||||
* @param {*} sheets
|
* @param {*} sheets
|
||||||
*/
|
*/
|
||||||
function createSheets(sheets) {
|
function createSheets(sheets) {
|
||||||
let sheet = Array.isArray(sheets) ? sheets[0] : sheets;
|
const sheet = Array.isArray(sheets) ? sheets[0] : sheets
|
||||||
let style = Array.isArray(sheets) ? sheets[1] : {};
|
const style = Array.isArray(sheets) ? sheets[1] : {}
|
||||||
worksheet = workBook.addWorksheet(sheet,style);
|
worksheet = workBook.addWorksheet(sheet, style)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,18 +36,18 @@ function createSheets(sheets) {
|
||||||
* @param {*} long
|
* @param {*} long
|
||||||
*/
|
*/
|
||||||
function setTitle(title, long) {
|
function setTitle(title, long) {
|
||||||
if (isEmpty(title)) return ;
|
if (isEmpty(title)) return
|
||||||
title = Array.isArray(title) ? title : title.split(',');
|
title = Array.isArray(title) ? title : title.split(',')
|
||||||
for (let i = 0; i < title.length; i++) {
|
for (let i = 0; i < title.length; i++) {
|
||||||
let ti = worksheet.getRow(i + 1);
|
const ti = worksheet.getRow(i + 1)
|
||||||
ti.getCell(1).value = title[i];
|
ti.getCell(1).value = title[i]
|
||||||
ti.height = 30;
|
ti.height = 30
|
||||||
ti.font = {bold: true,size: 20,vertAlign: 'subscript',};
|
ti.font = { bold: true, size: 20, vertAlign: 'subscript' }
|
||||||
ti.alignment = { vertical: 'bottom', horizontal: 'center' };
|
ti.alignment = { vertical: 'bottom', horizontal: 'center' }
|
||||||
ti.outlineLevel = 1;
|
ti.outlineLevel = 1
|
||||||
worksheet.mergeCells(i + 1, 1, i + 1, long)
|
worksheet.mergeCells(i + 1, 1, i + 1, long)
|
||||||
ti.commit();
|
ti.commit()
|
||||||
lcomun++;
|
lcomun++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -55,18 +55,18 @@ function setTitle(title,long){
|
||||||
* @param {*} header
|
* @param {*} header
|
||||||
*/
|
*/
|
||||||
function setHeader(header) {
|
function setHeader(header) {
|
||||||
if (isEmpty(header)) return ;
|
if (isEmpty(header)) return
|
||||||
const headerRow = worksheet.getRow(lcomun);
|
const headerRow = worksheet.getRow(lcomun)
|
||||||
for (let index = 1; index <= header.length; index++) {
|
for (let index = 1; index <= header.length; index++) {
|
||||||
headerRow.getCell(index).value = header[index - 1];
|
headerRow.getCell(index).value = header[index - 1]
|
||||||
}
|
}
|
||||||
headerRow.height = 25;
|
headerRow.height = 25
|
||||||
headerRow.width = 50;
|
headerRow.width = 50
|
||||||
headerRow.font = {bold: true, size: 18,vertAlign: 'subscript',};
|
headerRow.font = { bold: true, size: 18, vertAlign: 'subscript' }
|
||||||
headerRow.alignment = { vertical: 'bottom', horizontal: 'center' };
|
headerRow.alignment = { vertical: 'bottom', horizontal: 'center' }
|
||||||
headerRow.outlineLevel = 1;
|
headerRow.outlineLevel = 1
|
||||||
headerRow.commit();
|
headerRow.commit()
|
||||||
lcomun++;
|
lcomun++
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,35 +74,38 @@ function setHeader(header){
|
||||||
* @param {*} data
|
* @param {*} data
|
||||||
*/
|
*/
|
||||||
function setContent(data) {
|
function setContent(data) {
|
||||||
if (isEmpty(data)) return ;
|
if (isEmpty(data)) return
|
||||||
for (let h = 0; h < data.length; h++) {
|
for (let h = 0; h < data.length; h++) {
|
||||||
let satarLcomun = lcomun;
|
const satarLcomun = lcomun
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
const lcomunNow = worksheet.getRow(lcomun)
|
||||||
let hasMerge = false;
|
let hasMerge = false
|
||||||
let starKey = 0;
|
let starKey = 0
|
||||||
let endKey = 0;
|
let endKey = 0
|
||||||
/** 循环列 */
|
/** 循环列 */
|
||||||
// 需要操作第几列
|
// 需要操作第几列
|
||||||
let sk = 0;
|
let sk = 0
|
||||||
for (let l = 0; l < data[h].length; l++) {
|
for (let l = 0; l < data[h].length; l++) {
|
||||||
if (Array.isArray(data[h][l])) {
|
if (Array.isArray(data[h][l])) {
|
||||||
// 数组长度
|
// 数组长度
|
||||||
starKey = sk;
|
starKey = sk
|
||||||
hasMerge = true;
|
hasMerge = true
|
||||||
setArrayContent(data[h][l],sk);
|
setArrayContent(data[h][l], sk)
|
||||||
|
// console.log(data[h][l][0].length)
|
||||||
|
if (data[h][l][0]) {
|
||||||
sk = sk + data[h][l][0].length
|
sk = sk + data[h][l][0].length
|
||||||
endKey =sk;
|
}
|
||||||
|
endKey = sk
|
||||||
} else {
|
} else {
|
||||||
// 不是数组
|
// 不是数组
|
||||||
lcomunNow.getCell(getLetter(sk)).value = data[h][l];
|
lcomunNow.getCell(getLetter(sk)).value = data[h][l]
|
||||||
lcomunNow.getCell(getLetter(sk)).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
|
lcomunNow.getCell(getLetter(sk)).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } }
|
||||||
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' };
|
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' }
|
||||||
sk++
|
sk++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey);
|
if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey)
|
||||||
lcomunNow.height = 25;
|
lcomunNow.height = 25
|
||||||
lcomunNow.commit();
|
lcomunNow.commit()
|
||||||
lcomun++
|
lcomun++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,16 +118,16 @@ function setArrayContent(arr, sk) {
|
||||||
/**
|
/**
|
||||||
* 循环二维数组,在循环行
|
* 循环二维数组,在循环行
|
||||||
*/
|
*/
|
||||||
let al = arr.length;
|
const al = arr.length
|
||||||
let sl = al - 1 ;
|
const sl = al - 1
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
const lcomunNow = worksheet.getRow(lcomun)
|
||||||
for (let v = 0; v < arr[i].length; v++) {
|
for (let v = 0; v < arr[i].length; v++) {
|
||||||
lcomunNow.getCell(getLetter(sk+v)).value = arr[i][v];
|
lcomunNow.getCell(getLetter(sk + v)).value = arr[i][v]
|
||||||
lcomunNow.getCell(getLetter(sk+v)).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
|
lcomunNow.getCell(getLetter(sk + v)).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } }
|
||||||
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' };
|
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' }
|
||||||
}
|
}
|
||||||
lcomunNow.height = 25;
|
lcomunNow.height = 25
|
||||||
lcomunNow.commit()
|
lcomunNow.commit()
|
||||||
if (i < sl) lcomun++
|
if (i < sl) lcomun++
|
||||||
}
|
}
|
||||||
|
@ -149,21 +152,21 @@ function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey){
|
||||||
* @param {*} footData
|
* @param {*} footData
|
||||||
*/
|
*/
|
||||||
function setFoot(footData) {
|
function setFoot(footData) {
|
||||||
if (isEmpty(footData)) return ;
|
if (isEmpty(footData)) return
|
||||||
if (Array.isArray(footData)) {
|
if (Array.isArray(footData)) {
|
||||||
for (let f = 0; f < footData.length; f++) {
|
for (let f = 0; f < footData.length; f++) {
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
const lcomunNow = worksheet.getRow(lcomun)
|
||||||
lcomunNow.getCell(1).value = footData[f];
|
lcomunNow.getCell(1).value = footData[f]
|
||||||
lcomunNow.getCell(1).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
|
lcomunNow.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } }
|
||||||
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' };
|
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' }
|
||||||
worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun)
|
worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun)
|
||||||
lcomun++
|
lcomun++
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
const lcomunNow = worksheet.getRow(lcomun)
|
||||||
lcomunNow.getCell(1).value = footData[f];
|
lcomunNow.getCell(1).value = footData[f]
|
||||||
lcomunNow.getCell(1).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
|
lcomunNow.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } }
|
||||||
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' };
|
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' }
|
||||||
worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun)
|
worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -175,10 +178,10 @@ function setFoot(footData){
|
||||||
*/
|
*/
|
||||||
function getLetter(number) {
|
function getLetter(number) {
|
||||||
if (number < 26) {
|
if (number < 26) {
|
||||||
return letter[number];
|
return letter[number]
|
||||||
} else {
|
} else {
|
||||||
let n = number % 26
|
const n = number % 26
|
||||||
let l = Math.floor(number % 26)
|
const l = Math.floor(number % 26)
|
||||||
return letter[l] + letter[n]
|
return letter[l] + letter[n]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -188,18 +191,17 @@ function getLetter(number){
|
||||||
* @param {*} filename
|
* @param {*} filename
|
||||||
*/
|
*/
|
||||||
function saveAndDowloade(filename) {
|
function saveAndDowloade(filename) {
|
||||||
if (!filename) filename = new Date().getTime();
|
if (!filename) filename = new Date().getTime()
|
||||||
workBook.xlsx.writeBuffer().then(data => {
|
workBook.xlsx.writeBuffer().then(data => {
|
||||||
const blob = new Blob([data], { type: 'application/octet-stream' })
|
const blob = new Blob([data], { type: 'application/octet-stream' })
|
||||||
FileSaver.saveAs(blob, filename + '.xlsx')
|
FileSaver.saveAs(blob, filename + '.xlsx')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
createSheets(sheets);
|
createSheets(sheets)
|
||||||
setTitle(title,long);
|
setTitle(title, long)
|
||||||
setHeader(header);
|
setHeader(header)
|
||||||
setContent(data);
|
setContent(data)
|
||||||
setFoot(foot);
|
setFoot(foot)
|
||||||
saveAndDowloade(filename);
|
saveAndDowloade(filename)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<div class="selCard mb14">
|
<div class="selCard mb14">
|
||||||
<el-form :model="tableFrom" ref="searchForm" size="small" label-width="85px" inline>
|
<el-form ref="searchForm" :model="tableFrom" size="small" label-width="85px" inline>
|
||||||
<el-form-item label="订单状态:" style="display: block;" prop="status">
|
<el-form-item label="订单状态:" style="display: block;" prop="status">
|
||||||
<el-radio-group v-model="tableFrom.status" type="button" @change="getList(1),getCardList()">
|
<el-radio-group v-model="tableFrom.status" type="button" @change="getList(1),getCardList()">
|
||||||
<el-radio-button label>全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button>
|
<el-radio-button label>全部 {{ '(' +orderChartType.all?orderChartType.all:0 + ')' }}</el-radio-button>
|
||||||
|
@ -300,8 +300,8 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="(shipment.delivery_type == 1 || shipment.delivery_type == 4) && tableFrom.order_type != 2 && orderType !=1" label="快递公司:" prop="delivery_name">
|
<el-form-item v-if="(shipment.delivery_type == 1 || shipment.delivery_type == 4) && tableFrom.order_type != 2 && orderType !=1" label="快递公司:" prop="delivery_name">
|
||||||
<el-select
|
<el-select
|
||||||
filterable
|
|
||||||
v-model="shipment.delivery_name"
|
v-model="shipment.delivery_name"
|
||||||
|
filterable
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请选择快递公司"
|
placeholder="请选择快递公司"
|
||||||
class="pageWidth"
|
class="pageWidth"
|
||||||
|
@ -319,7 +319,7 @@
|
||||||
<el-input-number v-model="shipment.cargo_weight" style="width: 200px;" size="small" placeholder="请输入包裹重量" />
|
<el-input-number v-model="shipment.cargo_weight" style="width: 200px;" size="small" placeholder="请输入包裹重量" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="shipment.delivery_type == 5 && tableFrom.order_type != 2 && orderType !=1" label="配送备注:">
|
<el-form-item v-if="shipment.delivery_type == 5 && tableFrom.order_type != 2 && orderType !=1" label="配送备注:">
|
||||||
<el-input type="textarea" v-model="shipment.mark" size="small" class="pageWidth" placeholder="请输入配送单备注" />
|
<el-input v-model="shipment.mark" type="textarea" size="small" class="pageWidth" placeholder="请输入配送单备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="shipment.delivery_type == 1 && tableFrom.order_type != 2 && orderType !=1" label="快递单号:" prop="delivery_id">
|
<el-form-item v-if="shipment.delivery_type == 1 && tableFrom.order_type != 2 && orderType !=1" label="快递单号:" prop="delivery_id">
|
||||||
<el-input v-model="shipment.delivery_id" size="small" class="pageWidth" placeholder="请输入快递单号" />
|
<el-input v-model="shipment.delivery_id" size="small" class="pageWidth" placeholder="请输入快递单号" />
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="handleClose" size="small">取 消</el-button>
|
<el-button size="small" @click="handleClose">取 消</el-button>
|
||||||
<el-button type="primary" size="small" @click="submitForm('shipment')">提交</el-button>
|
<el-button type="primary" size="small" @click="submitForm('shipment')">提交</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -433,15 +433,15 @@
|
||||||
<!--详情-->
|
<!--详情-->
|
||||||
<order-detail
|
<order-detail
|
||||||
ref="orderDetail"
|
ref="orderDetail"
|
||||||
:orderId="orderId"
|
:order-id="orderId"
|
||||||
|
:drawer="drawer"
|
||||||
@closeDrawer="closeDrawer"
|
@closeDrawer="closeDrawer"
|
||||||
@changeDrawer="changeDrawer"
|
@changeDrawer="changeDrawer"
|
||||||
@reSend="reSend"
|
@reSend="reSend"
|
||||||
@onOrderRefund="onOrderRefund"
|
@onOrderRefund="onOrderRefund"
|
||||||
@send="send"
|
@send="send"
|
||||||
@getList="getList"
|
@getList="getList"
|
||||||
:drawer="drawer"
|
/>
|
||||||
></order-detail>
|
|
||||||
<!--导出订单列表-->
|
<!--导出订单列表-->
|
||||||
<file-list ref="exportList" />
|
<file-list ref="exportList" />
|
||||||
<!--导出订单列表-->
|
<!--导出订单列表-->
|
||||||
|
@ -482,11 +482,11 @@ import {
|
||||||
expressLst,
|
expressLst,
|
||||||
exprTempsLst,
|
exprTempsLst,
|
||||||
getEleTempData,
|
getEleTempData,
|
||||||
getDeliveryStoreLst,
|
getDeliveryStoreLst
|
||||||
} from '@/api/order'
|
} from '@/api/order'
|
||||||
import createWorkBook from '@/utils/newToExcel.js'
|
import createWorkBook from '@/utils/newToExcel.js'
|
||||||
import { serveInfoApi } from '@/api/setting'
|
import { serveInfoApi } from '@/api/setting'
|
||||||
import orderDetail from './orderDetails.vue';
|
import orderDetail from './orderDetails.vue'
|
||||||
import fileList from '@/components/exportFile/fileList'
|
import fileList from '@/components/exportFile/fileList'
|
||||||
import deliveryRecord from '@/components/deliveryRecord/index'
|
import deliveryRecord from '@/components/deliveryRecord/index'
|
||||||
import orderCancellate from './orderCancellate'
|
import orderCancellate from './orderCancellate'
|
||||||
|
@ -495,9 +495,9 @@ import cardsData from '@/components/cards/index'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import SettingMer from '@/libs/settingMer'
|
import SettingMer from '@/libs/settingMer'
|
||||||
import { roterPre } from '@/settings'
|
import { roterPre } from '@/settings'
|
||||||
import timeOptions from '@/utils/timeOptions';
|
import timeOptions from '@/utils/timeOptions'
|
||||||
// 修改引入打印扩展
|
// 修改引入打印扩展
|
||||||
import printJS from 'print-js';
|
import printJS from 'print-js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
orderDetail,
|
orderDetail,
|
||||||
|
@ -628,7 +628,7 @@ export default {
|
||||||
shipment: {
|
shipment: {
|
||||||
delivery_type: 1,
|
delivery_type: 1,
|
||||||
station_id: '',
|
station_id: '',
|
||||||
is_split:"0",
|
is_split: '0',
|
||||||
split: []
|
split: []
|
||||||
},
|
},
|
||||||
original: {
|
original: {
|
||||||
|
@ -704,7 +704,7 @@ export default {
|
||||||
/** 重置 */
|
/** 重置 */
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.timeVal = []
|
this.timeVal = []
|
||||||
this.tableFrom.date = ""
|
this.tableFrom.date = ''
|
||||||
this.$refs.searchForm.resetFields()
|
this.$refs.searchForm.resetFields()
|
||||||
this.getList(1)
|
this.getList(1)
|
||||||
},
|
},
|
||||||
|
@ -713,10 +713,10 @@ export default {
|
||||||
if (row.stock > row.product_num)row.stock = row.product_num
|
if (row.stock > row.product_num)row.stock = row.product_num
|
||||||
},
|
},
|
||||||
changeDrawer(v) {
|
changeDrawer(v) {
|
||||||
this.drawer = v;
|
this.drawer = v
|
||||||
},
|
},
|
||||||
closeDrawer() {
|
closeDrawer() {
|
||||||
this.drawer = false;
|
this.drawer = false
|
||||||
},
|
},
|
||||||
// 分单发货选择商品
|
// 分单发货选择商品
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
|
@ -761,7 +761,7 @@ export default {
|
||||||
from_tel: data.mer_from_tel,
|
from_tel: data.mer_from_tel,
|
||||||
delivery_type: delivery_type,
|
delivery_type: delivery_type,
|
||||||
delivery_name: data.mer_from_com,
|
delivery_name: data.mer_from_com,
|
||||||
temp_id: ""
|
temp_id: ''
|
||||||
// temp_id: data.mer_config_temp_id
|
// temp_id: data.mer_config_temp_id
|
||||||
}
|
}
|
||||||
if (data.mer_from_com != '') {
|
if (data.mer_from_com != '') {
|
||||||
|
@ -781,11 +781,11 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeSend(e) {
|
changeSend(e) {
|
||||||
this.$refs['shipment'].clearValidate();
|
this.$refs['shipment'].clearValidate()
|
||||||
if (e == 3) {
|
if (e == 3) {
|
||||||
// 如果是无需配送,就重置拆单信息
|
// 如果是无需配送,就重置拆单信息
|
||||||
this.shipment.is_split = '0';
|
this.shipment.is_split = '0'
|
||||||
delete this.shipment.split;
|
delete this.shipment.split
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getPicture(name) {
|
getPicture(name) {
|
||||||
|
@ -919,8 +919,8 @@ export default {
|
||||||
// 退款回调
|
// 退款回调
|
||||||
refundSuccess() {
|
refundSuccess() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.drawer = false;
|
this.drawer = false
|
||||||
this.getList();
|
this.getList()
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
// 表格某一行添加特定的样式
|
// 表格某一行添加特定的样式
|
||||||
|
@ -938,15 +938,15 @@ export default {
|
||||||
// 详情
|
// 详情
|
||||||
onOrderDetails(id) {
|
onOrderDetails(id) {
|
||||||
this.orderId = id
|
this.orderId = id
|
||||||
this.$refs.orderDetail.getInfo(id);
|
this.$refs.orderDetail.getInfo(id)
|
||||||
this.drawer = true;
|
this.drawer = true
|
||||||
},
|
},
|
||||||
async exports(value) {
|
async exports(value) {
|
||||||
let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = []
|
const excelData = JSON.parse(JSON.stringify(this.tableFrom)); let data = []
|
||||||
excelData.page = 1
|
excelData.page = 1
|
||||||
excelData.ids = this.checkedIds.toString()
|
excelData.ids = this.checkedIds.toString()
|
||||||
let pageCount = 1
|
let pageCount = 1
|
||||||
let lebData = {};
|
let lebData = {}
|
||||||
for (let i = 0; i < pageCount; i++) {
|
for (let i = 0; i < pageCount; i++) {
|
||||||
lebData = value == 1 ? await this.downOrderData(excelData) : await this.downInvoiceData(excelData)
|
lebData = value == 1 ? await this.downOrderData(excelData) : await this.downInvoiceData(excelData)
|
||||||
pageCount = Math.ceil(lebData.count / excelData.limit)
|
pageCount = Math.ceil(lebData.count / excelData.limit)
|
||||||
|
@ -955,7 +955,7 @@ export default {
|
||||||
excelData.page++
|
excelData.page++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
|
createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename)
|
||||||
return
|
return
|
||||||
},
|
},
|
||||||
/** 订单 */
|
/** 订单 */
|
||||||
|
@ -993,12 +993,12 @@ export default {
|
||||||
// 订单核销
|
// 订单核销
|
||||||
orderCancellation(code) {
|
orderCancellation(code) {
|
||||||
const that = this
|
const that = this
|
||||||
that.$refs.orderCancellate.dialogVisible = true;
|
that.$refs.orderCancellate.dialogVisible = true
|
||||||
if (code) {
|
if (code) {
|
||||||
that.$refs.orderCancellate.productDetails(code)
|
that.$refs.orderCancellate.productDetails(code)
|
||||||
that.$refs.orderCancellate.isColum = true;
|
that.$refs.orderCancellate.isColum = true
|
||||||
} else {
|
} else {
|
||||||
that.$refs.orderCancellate.isColum = false;
|
that.$refs.orderCancellate.isColum = false
|
||||||
that.$refs.orderCancellate.resetData()
|
that.$refs.orderCancellate.resetData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1205,13 +1205,13 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
delete this.shipment.to_name
|
delete this.shipment.to_name
|
||||||
delete this.shipment.to_phone
|
delete this.shipment.to_phone
|
||||||
console.log(this.shipment);
|
console.log(this.shipment)
|
||||||
// return
|
// return
|
||||||
this.isBatch ? batchDeliveryApi(this.shipment).then(res => {
|
this.isBatch ? batchDeliveryApi(this.shipment).then(res => {
|
||||||
this.sendVisible = false
|
this.sendVisible = false
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
this.getList('')
|
this.getList('')
|
||||||
if(this.drawer)this.$refs.orderDetail.getInfo(id);
|
if (this.drawer) this.$refs.orderDetail.getInfo(id)
|
||||||
// this.$refs[name].resetFields()
|
// this.$refs[name].resetFields()
|
||||||
this.sendReset()
|
this.sendReset()
|
||||||
}).catch(({ message }) => {
|
}).catch(({ message }) => {
|
||||||
|
@ -1222,10 +1222,10 @@ export default {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
this.getList('')
|
this.getList('')
|
||||||
// this.$refs[name].resetFields()
|
// this.$refs[name].resetFields()
|
||||||
if(this.drawer)this.$refs.orderDetail.getInfo(id);
|
if (this.drawer) this.$refs.orderDetail.getInfo(id)
|
||||||
this.sendReset()
|
this.sendReset()
|
||||||
// 修改增加打印机打印
|
// 修改增加打印机打印
|
||||||
if (res.data.label) this.printImg(res.data.label);
|
if (res.data.label) this.printImg(res.data.label)
|
||||||
}).catch(({ message }) => {
|
}).catch(({ message }) => {
|
||||||
this.$message.error(message)
|
this.$message.error(message)
|
||||||
})
|
})
|
||||||
|
@ -1244,8 +1244,8 @@ export default {
|
||||||
style: `img{
|
style: `img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 476px;
|
height: 476px;
|
||||||
}`,
|
}`
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 列表
|
// 列表
|
||||||
getList(num) {
|
getList(num) {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<div class="selCard">
|
<div class="selCard">
|
||||||
<el-form :model="tableFrom" ref="searchForm" size="small" label-width="95px" :inline="true">
|
<el-form ref="searchForm" :model="tableFrom" size="small" label-width="95px" :inline="true">
|
||||||
<el-form-item label="平台分类:" prop="cate_id">
|
<el-form-item label="平台分类:" prop="cate_id">
|
||||||
<el-cascader v-model="tableFrom.cate_id" class="selWidth" :options="categoryList" :props="props" clearable @change="getList(1)" />
|
<el-cascader v-model="tableFrom.cate_id" class="selWidth" :options="categoryList" :props="props" clearable @change="getList(1)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
<router-link :to="{ path:`${roterPre}` + '/product/list/addProduct' }" class="mr10">
|
<router-link :to="{ path:`${roterPre}` + '/product/list/addProduct' }" class="mr10">
|
||||||
<el-button size="small" type="primary">添加商品</el-button>
|
<el-button size="small" type="primary">添加商品</el-button>
|
||||||
</router-link>
|
</router-link>
|
||||||
<el-button size="small" type="success" @click="onCopy">商品采集</el-button>
|
<!-- <el-button size="small" type="success" @click="onCopy">商品采集</el-button> -->
|
||||||
<el-button size="small" :disabled="checkedIds.length == 0 && !allCheck" type="default" @click="openBatch">批量设置</el-button>
|
<el-button size="small" :disabled="checkedIds.length == 0 && !allCheck" type="default" @click="openBatch">批量设置</el-button>
|
||||||
<el-button size="small" :disabled="tableFrom.type != 1 || checkedIds.length == 0 && !allCheck" @click="batchOff">批量下架</el-button>
|
<el-button size="small" :disabled="tableFrom.type != 1 || checkedIds.length == 0 && !allCheck" @click="batchOff">批量下架</el-button>
|
||||||
<el-button size="small" :disabled="tableFrom.type != 2 || checkedIds.length == 0 && !allCheck" @click="batchShelf">批量上架</el-button>
|
<el-button size="small" :disabled="tableFrom.type != 2 || checkedIds.length == 0 && !allCheck" @click="batchShelf">批量上架</el-button>
|
||||||
|
@ -114,7 +114,8 @@
|
||||||
:row-class-name="tableRowClassName"
|
:row-class-name="tableRowClassName"
|
||||||
:row-key="(row) => { return row.product_id }"
|
:row-key="(row) => { return row.product_id }"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
@rowclick.stop="closeEdit">
|
@rowclick.stop="closeEdit"
|
||||||
|
>
|
||||||
<el-table-column width="50">
|
<el-table-column width="50">
|
||||||
<template slot="header" slot-scope="scope">
|
<template slot="header" slot-scope="scope">
|
||||||
<el-popover placement="top-start" width="100" trigger="hover" class="tabPop">
|
<el-popover placement="top-start" width="100" trigger="hover" class="tabPop">
|
||||||
|
@ -229,7 +230,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 生成淘宝京东表单-->
|
<!-- 生成淘宝京东表单-->
|
||||||
<tao-bao ref="taoBao" @getSuccess="getSuccess" :deliveryType="deliveryType" :deliveryList="deliveryList"/>
|
<tao-bao ref="taoBao" :delivery-type="deliveryType" :delivery-list="deliveryList" @getSuccess="getSuccess" />
|
||||||
<!--预览商品-->
|
<!--预览商品-->
|
||||||
<div v-if="previewVisible">
|
<div v-if="previewVisible">
|
||||||
<div class="bg" @click.stop="previewVisible = false" />
|
<div class="bg" @click.stop="previewVisible = false" />
|
||||||
|
@ -243,7 +244,7 @@
|
||||||
width="470px"
|
width="470px"
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
>
|
>
|
||||||
<el-form ref="labelForm" :model="labelForm" @submit.native.prevent size="small">
|
<el-form ref="labelForm" :model="labelForm" size="small" @submit.native.prevent>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="labelForm.mer_labels" clearable multiple placeholder="请选择" class="width100">
|
<el-select v-model="labelForm.mer_labels" clearable multiple placeholder="请选择" class="width100">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -315,7 +316,7 @@
|
||||||
:visible.sync="dialogSvip"
|
:visible.sync="dialogSvip"
|
||||||
width="700px"
|
width="700px"
|
||||||
>
|
>
|
||||||
<el-form ref="svipForm" :model="svipForm" @submit.native.prevent label-width="80px">
|
<el-form ref="svipForm" :model="svipForm" label-width="80px" @submit.native.prevent>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="参与方式:"
|
label="参与方式:"
|
||||||
>
|
>
|
||||||
|
@ -342,10 +343,11 @@
|
||||||
<div>
|
<div>
|
||||||
<el-alert
|
<el-alert
|
||||||
title="每次只能修改一项,如需修改多项,请多次操作。"
|
title="每次只能修改一项,如需修改多项,请多次操作。"
|
||||||
type="warning" :closable="false">
|
type="warning"
|
||||||
</el-alert>
|
:closable="false"
|
||||||
|
/>
|
||||||
<div class="batch-tab mt20">
|
<div class="batch-tab mt20">
|
||||||
<el-tabs :tab-position="tabPosition" v-model="batchName">
|
<el-tabs v-model="batchName" :tab-position="tabPosition">
|
||||||
<el-tab-pane label="商品分类" name="cate">
|
<el-tab-pane label="商品分类" name="cate">
|
||||||
<el-form size="small" label-width="120px" :inline="true">
|
<el-form size="small" label-width="120px" :inline="true">
|
||||||
<el-form-item label="平台商品分类:">
|
<el-form-item label="平台商品分类:">
|
||||||
|
@ -435,11 +437,11 @@
|
||||||
<el-form label-width="120px">
|
<el-form label-width="120px">
|
||||||
<el-form-item label="系统表单:">
|
<el-form-item label="系统表单:">
|
||||||
<el-select
|
<el-select
|
||||||
|
v-model="batchData.mer_form_id"
|
||||||
size="small"
|
size="small"
|
||||||
clearable
|
clearable
|
||||||
v-model="batchData.mer_form_id"
|
|
||||||
@change="getFormInfo"
|
|
||||||
class="width100"
|
class="width100"
|
||||||
|
@change="getFormInfo"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="items in formList"
|
v-for="items in formList"
|
||||||
|
@ -500,12 +502,12 @@
|
||||||
<!--商品详情-->
|
<!--商品详情-->
|
||||||
<pro-detail
|
<pro-detail
|
||||||
ref="proDetail"
|
ref="proDetail"
|
||||||
:productId="product_id"
|
:product-id="product_id"
|
||||||
:configData="configData"
|
:config-data="configData"
|
||||||
|
:drawer="drawer"
|
||||||
@closeDrawer="closeDrawer"
|
@closeDrawer="closeDrawer"
|
||||||
@changeDrawer="changeDrawer"
|
@changeDrawer="changeDrawer"
|
||||||
:drawer="drawer"
|
/>
|
||||||
></pro-detail>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -544,7 +546,7 @@ import {
|
||||||
import { roterPre } from '@/settings'
|
import { roterPre } from '@/settings'
|
||||||
import taoBao from './taoBao'
|
import taoBao from './taoBao'
|
||||||
import editAttr from './editAttr'
|
import editAttr from './editAttr'
|
||||||
import proDetail from './proDetails.vue';
|
import proDetail from './proDetails.vue'
|
||||||
import previewBox from '@/components/previewBox/index'
|
import previewBox from '@/components/previewBox/index'
|
||||||
export default {
|
export default {
|
||||||
name: 'ProductList',
|
name: 'ProductList',
|
||||||
|
@ -573,7 +575,7 @@ export default {
|
||||||
temp_id: '',
|
temp_id: '',
|
||||||
form_id: '',
|
form_id: '',
|
||||||
type: this.$route.query.type ? this.$route.query.type : '1',
|
type: this.$route.query.type ? this.$route.query.type : '1',
|
||||||
is_ficti: "",
|
is_ficti: '',
|
||||||
is_gift_bag: '',
|
is_gift_bag: '',
|
||||||
us_status: '',
|
us_status: '',
|
||||||
mer_labels: '',
|
mer_labels: '',
|
||||||
|
@ -631,13 +633,13 @@ export default {
|
||||||
delivery_free: 1,
|
delivery_free: 1,
|
||||||
extension_one: 0,
|
extension_one: 0,
|
||||||
extension_two: 0,
|
extension_two: 0,
|
||||||
price_number: 0,
|
price_number: 0
|
||||||
},
|
},
|
||||||
chkName: '',
|
chkName: '',
|
||||||
checkedIds: [], // 订单当前页选中的数据
|
checkedIds: [], // 订单当前页选中的数据
|
||||||
noChecked: [], // 订单全选状态下当前页不选中的数据
|
noChecked: [], // 订单全选状态下当前页不选中的数据
|
||||||
checkedPage: [],
|
checkedPage: [],
|
||||||
allCheck: false,
|
allCheck: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -689,7 +691,7 @@ export default {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.chkName = ''
|
this.chkName = ''
|
||||||
this.allCheck = false;
|
this.allCheck = false
|
||||||
}
|
}
|
||||||
const index = this.checkedPage.indexOf(this.tableFrom.page)
|
const index = this.checkedPage.indexOf(this.tableFrom.page)
|
||||||
if (this.chkName === 'dan') {
|
if (this.chkName === 'dan') {
|
||||||
|
@ -706,9 +708,9 @@ export default {
|
||||||
})
|
})
|
||||||
if (this.chkName === 'duo') {
|
if (this.chkName === 'duo') {
|
||||||
this.checkedIds = []
|
this.checkedIds = []
|
||||||
this.allCheck = true;
|
this.allCheck = true
|
||||||
} else if (this.chkName === 'dan') {
|
} else if (this.chkName === 'dan') {
|
||||||
this.allCheck = false;
|
this.allCheck = false
|
||||||
ids.forEach(id => {
|
ids.forEach(id => {
|
||||||
const index = this.checkedIds.indexOf(id)
|
const index = this.checkedIds.indexOf(id)
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
|
@ -756,7 +758,7 @@ export default {
|
||||||
// 批量设置--提交数据
|
// 批量设置--提交数据
|
||||||
submitBatchForm() {
|
submitBatchForm() {
|
||||||
console.log(this.batchName)
|
console.log(this.batchName)
|
||||||
let name = this.batchName
|
const name = this.batchName
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case 'cate':
|
case 'cate':
|
||||||
if (!this.batchData.cate_id) {
|
if (!this.batchData.cate_id) {
|
||||||
|
@ -786,7 +788,7 @@ export default {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
let parmas = this.batchData
|
const parmas = this.batchData
|
||||||
parmas.batch_type = this.batchName
|
parmas.batch_type = this.batchName
|
||||||
if (this.allCheck) {
|
if (this.allCheck) {
|
||||||
parmas.batch_select_type = 'all'
|
parmas.batch_select_type = 'all'
|
||||||
|
@ -881,12 +883,12 @@ export default {
|
||||||
onCopy() {
|
onCopy() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: this.roterPre + '/product/list/addProduct',
|
path: this.roterPre + '/product/list/addProduct',
|
||||||
query: { type: 1 },
|
query: { type: 1 }
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 打开批量设置弹窗
|
// 打开批量设置弹窗
|
||||||
openBatch() {
|
openBatch() {
|
||||||
this.batchModal = true;
|
this.batchModal = true
|
||||||
},
|
},
|
||||||
// 获取标签项
|
// 获取标签项
|
||||||
getLabelLst() {
|
getLabelLst() {
|
||||||
|
@ -913,12 +915,12 @@ export default {
|
||||||
// 批量设置佣金
|
// 批量设置佣金
|
||||||
batchCommision() {
|
batchCommision() {
|
||||||
// if(this.multipleSelection.length === 0) return this.$message.warning('请先选择商品')
|
// if(this.multipleSelection.length === 0) return this.$message.warning('请先选择商品')
|
||||||
this.dialogCommision = true;
|
this.dialogCommision = true
|
||||||
},
|
},
|
||||||
// 批量设置会员价
|
// 批量设置会员价
|
||||||
batchSvip() {
|
batchSvip() {
|
||||||
if (this.multipleSelection.length === 0) return this.$message.warning('请先选择商品')
|
if (this.multipleSelection.length === 0) return this.$message.warning('请先选择商品')
|
||||||
this.dialogSvip = true;
|
this.dialogSvip = true
|
||||||
},
|
},
|
||||||
submitCommisionForm(name) {
|
submitCommisionForm(name) {
|
||||||
this.$refs[name].validate(valid => {
|
this.$refs[name].validate(valid => {
|
||||||
|
@ -954,7 +956,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
ids = this.checkedIds
|
ids = this.checkedIds
|
||||||
}
|
}
|
||||||
let data = {status: 1,ids: ids}
|
const data = { status: 1, ids: ids }
|
||||||
batchesOnOffApi(data).then(res => {
|
batchesOnOffApi(data).then(res => {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
this.getLstFilterApi()
|
this.getLstFilterApi()
|
||||||
|
@ -975,7 +977,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
ids = this.checkedIds
|
ids = this.checkedIds
|
||||||
}
|
}
|
||||||
let data = {status: 0,ids: ids}
|
const data = { status: 0, ids: ids }
|
||||||
batchesOnOffApi(data).then(res => {
|
batchesOnOffApi(data).then(res => {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
this.getLstFilterApi()
|
this.getLstFilterApi()
|
||||||
|
@ -996,7 +998,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 批量设置运费模板
|
// 批量设置运费模板
|
||||||
batchFreight() {
|
batchFreight() {
|
||||||
this.dialogFreight = true;
|
this.dialogFreight = true
|
||||||
},
|
},
|
||||||
submitTempForm(name) {
|
submitTempForm(name) {
|
||||||
this.$refs[name].validate(valid => {
|
this.$refs[name].validate(valid => {
|
||||||
|
@ -1033,15 +1035,15 @@ export default {
|
||||||
},
|
},
|
||||||
// 查看详情
|
// 查看详情
|
||||||
onDetails(id) {
|
onDetails(id) {
|
||||||
this.product_id = id;
|
this.product_id = id
|
||||||
this.drawer = true;
|
this.drawer = true
|
||||||
this.$refs.proDetail.getInfo(id)
|
this.$refs.proDetail.getInfo(id)
|
||||||
},
|
},
|
||||||
changeDrawer(v) {
|
changeDrawer(v) {
|
||||||
this.drawer = v;
|
this.drawer = v
|
||||||
},
|
},
|
||||||
closeDrawer() {
|
closeDrawer() {
|
||||||
this.drawer = false;
|
this.drawer = false
|
||||||
},
|
},
|
||||||
// 商户分类;
|
// 商户分类;
|
||||||
getCategorySelect() {
|
getCategorySelect() {
|
||||||
|
@ -1144,8 +1146,8 @@ export default {
|
||||||
this.getList('')
|
this.getList('')
|
||||||
this.dialogLabel = false
|
this.dialogLabel = false
|
||||||
this.isBatch = false
|
this.isBatch = false
|
||||||
}) :
|
})
|
||||||
updatetProductLabel(this.product_id, this.labelForm).then(({ message }) => {
|
: updatetProductLabel(this.product_id, this.labelForm).then(({ message }) => {
|
||||||
this.$message.success(message)
|
this.$message.success(message)
|
||||||
this.getList('')
|
this.getList('')
|
||||||
this.dialogLabel = false
|
this.dialogLabel = false
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<div>
|
<div>
|
||||||
<span class="basic-label">是否开启商户:</span>
|
<span class="basic-label">是否开启商户:</span>
|
||||||
<el-tooltip v-if="merData.is_margin == 1 && merData.mer_state == 0" class="item" effect="dark" content="请先支付店铺保证金!" placement="top-start">
|
<el-tooltip v-if="merData.is_margin == 1 && merData.mer_state == 0" class="item" effect="dark" content="请先支付店铺保证金!" placement="top-start">
|
||||||
<el-switch disabled v-model="merData.mer_state" :width="55" active-text="开启" inactive-text="关闭" :active-value="1" :inactive-value="0" />
|
<el-switch v-model="merData.mer_state" disabled :width="55" active-text="开启" inactive-text="关闭" :active-value="1" :inactive-value="0" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-switch v-else v-model="merData.mer_state" active-text="开启" inactive-text="关闭" :active-value="1" :inactive-value="0" :width="55" />
|
<el-switch v-else v-model="merData.mer_state" active-text="开启" inactive-text="关闭" :active-value="1" :inactive-value="0" :width="55" />
|
||||||
<span class="trip">开启,店铺即可展示在移动端</span>
|
<span class="trip">开启,店铺即可展示在移动端</span>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--已支付-->
|
<!--已支付-->
|
||||||
<div class="margin_main" v-if="merData.is_margin == 10 ">
|
<div v-if="merData.is_margin == 10 " class="margin_main">
|
||||||
<span class="basic-label">店铺保证金:</span>
|
<span class="basic-label">店铺保证金:</span>
|
||||||
<span class="margin_price">{{ merData.margin }}元</span>
|
<span class="margin_price">{{ merData.margin }}元</span>
|
||||||
<div class="margin_count">
|
<div class="margin_count">
|
||||||
|
@ -80,7 +80,7 @@
|
||||||
<!--保证金弹窗-->
|
<!--保证金弹窗-->
|
||||||
<div class="margin_modal" @mouseleave="supplyPay=false">
|
<div class="margin_modal" @mouseleave="supplyPay=false">
|
||||||
<div>
|
<div>
|
||||||
<img src="@/assets/images/margin03.png"/>
|
<img src="@/assets/images/margin03.png">
|
||||||
<div class="alic">
|
<div class="alic">
|
||||||
<span class="text_g">剩余保证金¥{{ merData.margin }}元</span>
|
<span class="text_g">剩余保证金¥{{ merData.margin }}元</span>
|
||||||
<el-button v-if="merData.margin>0" type="primary" size="small" @click="applyReturn">申请退回保证金</el-button>
|
<el-button v-if="merData.margin>0" type="primary" size="small" @click="applyReturn">申请退回保证金</el-button>
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="margin_main" v-if="merData.is_margin == -10 || merData.is_margin == -1">
|
<div v-if="merData.is_margin == -10 || merData.is_margin == -1" class="margin_main">
|
||||||
<span class="basic-label">店铺保证金:</span>
|
<span class="basic-label">店铺保证金:</span>
|
||||||
<span class="margin_price">{{ merData.margin }}元</span>
|
<span class="margin_price">{{ merData.margin }}元</span>
|
||||||
<div class="margin_count">
|
<div class="margin_count">
|
||||||
|
@ -112,18 +112,18 @@
|
||||||
<!--保证金弹窗-->
|
<!--保证金弹窗-->
|
||||||
<div class="margin_modal" @mouseleave="goPay=false">
|
<div class="margin_modal" @mouseleave="goPay=false">
|
||||||
<div>
|
<div>
|
||||||
<img v-if="merData.is_margin == -10" src="@/assets/images/margin01.png"/>
|
<img v-if="merData.is_margin == -10" src="@/assets/images/margin01.png">
|
||||||
<img v-if="merData.is_margin == -1" src="@/assets/images/margin02.png"/>
|
<img v-if="merData.is_margin == -1" src="@/assets/images/margin02.png">
|
||||||
<img v-if="merData.is_margin == 10" src="@/assets/images/margin03.png"/>
|
<img v-if="merData.is_margin == 10" src="@/assets/images/margin03.png">
|
||||||
<div class="alic" v-if="merData.is_margin == 10">
|
<div v-if="merData.is_margin == 10" class="alic">
|
||||||
<span class="text_g">剩余保证金¥{{ merData.margin }}元</span>
|
<span class="text_g">剩余保证金¥{{ merData.margin }}元</span>
|
||||||
<el-button v-if="merData.margin>0" type="primary" size="small" @click="applyReturn">申请退回保证金</el-button>
|
<el-button v-if="merData.margin>0" type="primary" size="small" @click="applyReturn">申请退回保证金</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="alic" v-if="merData.is_margin == -1">
|
<div v-if="merData.is_margin == -1" class="alic">
|
||||||
<span class="text_b b01"> 审核中</span>
|
<span class="text_b b01"> 审核中</span>
|
||||||
<div class="margin_refused">您申请退回保证金,正在审核中…</div>
|
<div class="margin_refused">您申请退回保证金,正在审核中…</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alic" v-if="merData.is_margin == -10">
|
<div v-if="merData.is_margin == -10" class="alic">
|
||||||
<span class="text_b b02">审核未通过</span>
|
<span class="text_b b02">审核未通过</span>
|
||||||
<div class="margin_refused">未通过原因:<span>{{ merData.refundMarginOrder.refusal }}</span></div>
|
<div class="margin_refused">未通过原因:<span>{{ merData.refundMarginOrder.refusal }}</span></div>
|
||||||
<el-button type="primary" size="small" @click="applyReturn">再次申请</el-button>
|
<el-button type="primary" size="small" @click="applyReturn">再次申请</el-button>
|
||||||
|
@ -299,14 +299,14 @@
|
||||||
v-model="value1"
|
v-model="value1"
|
||||||
placeholder="开始时间"
|
placeholder="开始时间"
|
||||||
value-format="HH:mm"
|
value-format="HH:mm"
|
||||||
@change="onchangeTime1">
|
@change="onchangeTime1"
|
||||||
</el-time-picker>
|
/>
|
||||||
<el-time-picker
|
<el-time-picker
|
||||||
v-model="value2"
|
v-model="value2"
|
||||||
placeholder="结束时间"
|
placeholder="结束时间"
|
||||||
value-format="HH:mm"
|
value-format="HH:mm"
|
||||||
@change="onchangeTime2">
|
@change="onchangeTime2"
|
||||||
</el-time-picker>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -537,8 +537,8 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
value1: "",
|
value1: '',
|
||||||
value2: "",
|
value2: '',
|
||||||
marginPrice: 0,
|
marginPrice: 0,
|
||||||
merData: {
|
merData: {
|
||||||
delivery_way: [],
|
delivery_way: [],
|
||||||
|
@ -566,7 +566,7 @@ export default {
|
||||||
],
|
],
|
||||||
submitLoading: false, // 提交loading
|
submitLoading: false, // 提交loading
|
||||||
deliveryList: [
|
deliveryList: [
|
||||||
{ value: '1', name: '到店自提' },
|
// { value: '1', name: '到店自提' },
|
||||||
{ value: '2', name: '快递配送' }
|
{ value: '2', name: '快递配送' }
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
@ -587,10 +587,10 @@ export default {
|
||||||
mer_take_location: [{ required: true, message: '请选择经纬度', trigger: 'blur' }]
|
mer_take_location: [{ required: true, message: '请选择经纬度', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
bankValidate: {
|
bankValidate: {
|
||||||
code: "",
|
code: '',
|
||||||
name: "",
|
name: '',
|
||||||
type: 1,
|
type: 1,
|
||||||
pic: ""
|
pic: ''
|
||||||
},
|
},
|
||||||
bankRules: {
|
bankRules: {
|
||||||
code: [{ required: true, message: '请输入开户银行', trigger: 'blur' }],
|
code: [{ required: true, message: '请输入开户银行', trigger: 'blur' }],
|
||||||
|
@ -598,10 +598,10 @@ export default {
|
||||||
{ required: true, message: '请输入银行卡号', trigger: 'blur' },
|
{ required: true, message: '请输入银行卡号', trigger: 'blur' },
|
||||||
{ pattern: /\d{10,19}/, message: '请输入正确的银行账号', trigger: 'blur' }
|
{ pattern: /\d{10,19}/, message: '请输入正确的银行账号', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
name: [{ required: true, message: '请输入真实姓名', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入真实姓名', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
offline: "",
|
offline: '',
|
||||||
online: "",
|
online: '',
|
||||||
keyUrl: '',
|
keyUrl: '',
|
||||||
infoType: '1',
|
infoType: '1',
|
||||||
tabList: [
|
tabList: [
|
||||||
|
@ -628,8 +628,6 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getMapInfo()
|
this.getMapInfo()
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
|
@ -650,11 +648,11 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 营业时间
|
// 营业时间
|
||||||
onchangeTime1(e) {
|
onchangeTime1(e) {
|
||||||
this.value1 = e;
|
this.value1 = e
|
||||||
this.merData.mer_take_time[0] = e
|
this.merData.mer_take_time[0] = e
|
||||||
},
|
},
|
||||||
onchangeTime2(e) {
|
onchangeTime2(e) {
|
||||||
this.value2 = e;
|
this.value2 = e
|
||||||
this.merData.mer_take_time[1] = e
|
this.merData.mer_take_time[1] = e
|
||||||
},
|
},
|
||||||
// 选择经纬度
|
// 选择经纬度
|
||||||
|
@ -718,7 +716,7 @@ export default {
|
||||||
marginRefundApply(this.bankValidate)
|
marginRefundApply(this.bankValidate)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
this.modalBank = false;
|
this.modalBank = false
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
|
@ -766,7 +764,7 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
let data = {
|
const data = {
|
||||||
mer_state: this.merData.mer_state,
|
mer_state: this.merData.mer_state,
|
||||||
type: this.infoType
|
type: this.infoType
|
||||||
}
|
}
|
||||||
|
@ -784,7 +782,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 获取支付二维码
|
// 获取支付二维码
|
||||||
getCode() {
|
getCode() {
|
||||||
let that = this
|
const that = this
|
||||||
if (this.merData.marginStatus) {
|
if (this.merData.marginStatus) {
|
||||||
marginMakeCode()
|
marginMakeCode()
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
@ -809,22 +807,22 @@ export default {
|
||||||
},
|
},
|
||||||
// 查看保证金记录
|
// 查看保证金记录
|
||||||
viewRecords() {
|
viewRecords() {
|
||||||
this.tableFrom.page = 1;
|
this.tableFrom.page = 1
|
||||||
this.modalRecord = true;
|
this.modalRecord = true
|
||||||
this.getRecordList()
|
this.getRecordList()
|
||||||
},
|
},
|
||||||
// 保证金记录列表
|
// 保证金记录列表
|
||||||
getRecordList() {
|
getRecordList() {
|
||||||
let that = this
|
const that = this
|
||||||
that.loading = true;
|
that.loading = true
|
||||||
marginRecordLst(that.tableFrom).then(async(res) => {
|
marginRecordLst(that.tableFrom).then(async(res) => {
|
||||||
that.tableData.data = res.data.list;
|
that.tableData.data = res.data.list
|
||||||
that.tableData.total = res.data.count;
|
that.tableData.total = res.data.count
|
||||||
that.loading = false;
|
that.loading = false
|
||||||
}).catch((res) => {
|
}).catch((res) => {
|
||||||
that.loading = false;
|
that.loading = false
|
||||||
that.$message.error(res.message);
|
that.$message.error(res.message)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
pageChange(page) {
|
pageChange(page) {
|
||||||
this.tableFrom.page = page
|
this.tableFrom.page = page
|
||||||
|
@ -836,7 +834,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 申请退回保证金
|
// 申请退回保证金
|
||||||
applyReturn() {
|
applyReturn() {
|
||||||
let that = this;
|
const that = this
|
||||||
that.$confirm('申请退回保证金则视为关闭店铺,请谨慎操作!您是否确定继续操作?', '提示', {
|
that.$confirm('申请退回保证金则视为关闭店铺,请谨慎操作!您是否确定继续操作?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|
Loading…
Reference in New Issue