Merge branch 'main' of https://code.tiantongsl.com/bin/shop-many-admin-ui
This commit is contained in:
commit
67853ef7de
|
@ -3,12 +3,12 @@ ENV = 'development'
|
||||||
# http://192.168.1.43:8324/admin
|
# http://192.168.1.43:8324/admin
|
||||||
# http://mer.crmeb.net/admin
|
# http://mer.crmeb.net/admin
|
||||||
# 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://0.0.0.0:8324'
|
# VUE_APP_WS_URL = 'ws://0.0.0.0:8324'
|
||||||
VUE_APP_WS_URL = 'ws://many.shop.lo'
|
VUE_APP_WS_URL = 'ws://plus.hwms.shop'
|
||||||
|
|
||||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||||
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
|
||||||
|
|
|
@ -15,7 +15,12 @@ import request from './request'
|
||||||
export function orderListApi(data) {
|
export function orderListApi(data) {
|
||||||
return request.get('order/lst', data)
|
return request.get('order/lst', data)
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @description 开启退款
|
||||||
|
*/
|
||||||
|
export function openRefundApi(id) {
|
||||||
|
return request.get(`store/order/open_refund/${id}`)
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description 订单 -- 表头
|
* @description 订单 -- 表头
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +32,7 @@ export function chartApi() {
|
||||||
* @description 订单 -- 卡片
|
* @description 订单 -- 卡片
|
||||||
*/
|
*/
|
||||||
export function cardListApi(data) {
|
export function cardListApi(data) {
|
||||||
return request.get('order/title', data)
|
return request.get('order/title', data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 订单 -- 编辑
|
* @description 订单 -- 编辑
|
||||||
|
@ -52,7 +57,7 @@ export function orderDetailApi(id) {
|
||||||
/**
|
/**
|
||||||
* @description 订单 -- 记录
|
* @description 订单 -- 记录
|
||||||
*/
|
*/
|
||||||
export function orderLogApi(id, data) {
|
export function orderLogApi(id, data) {
|
||||||
return request.get(`order/status/${id}`, data)
|
return request.get(`order/status/${id}`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -83,13 +88,13 @@ export function getExpress(id) {
|
||||||
* @description 导出订单
|
* @description 导出订单
|
||||||
*/
|
*/
|
||||||
export function exportOrderApi(data) {
|
export function exportOrderApi(data) {
|
||||||
return request.get(`order/excel`, data )
|
return request.get(`order/excel`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 导出退款单
|
* @description 导出退款单
|
||||||
*/
|
*/
|
||||||
export function exportRefundOrderApi(data) {
|
export function exportRefundOrderApi(data) {
|
||||||
return request.get(`order/refund/excel`, data )
|
return request.get(`order/refund/excel`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 导出文件列表
|
* @description 导出文件列表
|
||||||
|
@ -118,48 +123,48 @@ export function takeOrderListApi(data) {
|
||||||
/**
|
/**
|
||||||
* @description 核销订单 -- 卡片
|
* @description 核销订单 -- 卡片
|
||||||
*/
|
*/
|
||||||
export function takeCardListApi(data) {
|
export function takeCardListApi(data) {
|
||||||
return request.get('order/take_title', data)
|
return request.get('order/take_title', data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 导出列表 -- 文件类型
|
* @description 导出列表 -- 文件类型
|
||||||
*/
|
*/
|
||||||
export function excelFileType() {
|
export function excelFileType() {
|
||||||
return request.get('excel/type')
|
return request.get('excel/type')
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 发送货 -- 门店列表
|
* @description 发送货 -- 门店列表
|
||||||
*/
|
*/
|
||||||
export function getStoreLst() {
|
export function getStoreLst() {
|
||||||
return request.get(`delivery/station/options`)
|
return request.get(`delivery/station/options`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 同城配送 -- 订单列表
|
* @description 同城配送 -- 订单列表
|
||||||
*/
|
*/
|
||||||
export function deliveryOrderLst(data) {
|
export function deliveryOrderLst(data) {
|
||||||
return request.get(`delivery/order/lst`, data)
|
return request.get(`delivery/order/lst`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 同城订单 -- 取消
|
* @description 同城订单 -- 取消
|
||||||
*/
|
*/
|
||||||
export function deliveryOrderCancle(id) {
|
export function deliveryOrderCancle(id) {
|
||||||
return request.get(`delivery/order/cancel/${id}/form`)
|
return request.get(`delivery/order/cancel/${id}/form`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 同城配送 -- 充值记录列表
|
* @description 同城配送 -- 充值记录列表
|
||||||
*/
|
*/
|
||||||
export function rechargeLst(data) {
|
export function rechargeLst(data) {
|
||||||
return request.get(`delivery/station/payLst`, data)
|
return request.get(`delivery/station/payLst`, data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 同城配送 -- 充值记录卡片数据
|
* @description 同城配送 -- 充值记录卡片数据
|
||||||
*/
|
*/
|
||||||
export function rechargeCardApi() {
|
export function rechargeCardApi() {
|
||||||
return request.get(`delivery/title`)
|
return request.get(`delivery/title`)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @description 同城配送 -- 充值余额
|
* @description 同城配送 -- 充值余额
|
||||||
*/
|
*/
|
||||||
export function rechargeBalancei() {
|
export function rechargeBalancei() {
|
||||||
return request.get(`delivery/belence`)
|
return request.get(`delivery/belence`)
|
||||||
}
|
}
|
|
@ -12,191 +12,193 @@ 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;
|
let long = header.length;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建工作薄
|
* 创建工作薄
|
||||||
* @param {*} sheets
|
* @param {*} sheets
|
||||||
*/
|
*/
|
||||||
function createSheets(sheets) {
|
function createSheets(sheets) {
|
||||||
let sheet = Array.isArray(sheets) ? sheets[0] : sheets;
|
let sheet = Array.isArray(sheets) ? sheets[0] : sheets;
|
||||||
let style = Array.isArray(sheets) ? sheets[1] : {};
|
let style = Array.isArray(sheets) ? sheets[1] : {};
|
||||||
worksheet = workBook.addWorksheet(sheet,style);
|
worksheet = workBook.addWorksheet(sheet, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置表名介绍等
|
* 设置表名介绍等
|
||||||
* @param {*} title
|
* @param {*} title
|
||||||
* @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);
|
let 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++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 设置表头行
|
||||||
|
* @param {*} header
|
||||||
|
*/
|
||||||
|
function setHeader(header) {
|
||||||
|
if (isEmpty(header)) return;
|
||||||
|
const headerRow = worksheet.getRow(lcomun);
|
||||||
|
for (let index = 1; index <= header.length; index++) {
|
||||||
|
headerRow.getCell(index).value = header[index - 1];
|
||||||
|
}
|
||||||
|
headerRow.height = 25;
|
||||||
|
headerRow.width = 50;
|
||||||
|
headerRow.font = { bold: true, size: 18, vertAlign: 'subscript', };
|
||||||
|
headerRow.alignment = { vertical: 'bottom', horizontal: 'center' };
|
||||||
|
headerRow.outlineLevel = 1;
|
||||||
|
headerRow.commit();
|
||||||
lcomun++;
|
lcomun++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 设置表头行
|
|
||||||
* @param {*} header
|
|
||||||
*/
|
|
||||||
function setHeader(header){
|
|
||||||
if (isEmpty(header)) return ;
|
|
||||||
const headerRow = worksheet.getRow(lcomun);
|
|
||||||
for (let index = 1; index <= header.length; index++) {
|
|
||||||
headerRow.getCell(index).value = header[index - 1];
|
|
||||||
}
|
|
||||||
headerRow.height = 25;
|
|
||||||
headerRow.width = 50;
|
|
||||||
headerRow.font = {bold: true, size: 18,vertAlign: 'subscript',};
|
|
||||||
headerRow.alignment = { vertical: 'bottom', horizontal: 'center' };
|
|
||||||
headerRow.outlineLevel = 1;
|
|
||||||
headerRow.commit();
|
|
||||||
lcomun++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出内容
|
|
||||||
* @param {*} data
|
|
||||||
*/
|
|
||||||
function setContent(data){
|
|
||||||
if (isEmpty(data)) return ;
|
|
||||||
for (let h = 0; h < data.length; h++) {
|
|
||||||
let satarLcomun = lcomun;
|
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
|
||||||
let hasMerge = false;
|
|
||||||
let starKey = 0;
|
|
||||||
let endKey = 0;
|
|
||||||
/** 循环列 */
|
|
||||||
//需要操作第几列
|
|
||||||
let sk = 0;
|
|
||||||
for (let l = 0; l < data[h].length; l++) {
|
|
||||||
if (Array.isArray(data[h][l])) {
|
|
||||||
//数组长度
|
|
||||||
starKey = sk;
|
|
||||||
hasMerge = true;
|
|
||||||
setArrayContent(data[h][l],sk);
|
|
||||||
sk = sk + data[h][l][0].length
|
|
||||||
endKey =sk;
|
|
||||||
} else {
|
|
||||||
//不是数组
|
|
||||||
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.alignment = { vertical: 'middle', horizontal: 'center' };
|
|
||||||
sk++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey);
|
|
||||||
lcomunNow.height = 25;
|
|
||||||
lcomunNow.commit();
|
|
||||||
lcomun++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 占多行的数组
|
|
||||||
* @param {*} arr
|
|
||||||
* @param {*} sk
|
|
||||||
*/
|
|
||||||
function setArrayContent(arr, sk) {
|
|
||||||
/**
|
/**
|
||||||
* 循环二维数组,在循环行
|
* 导出内容
|
||||||
|
* @param {*} data
|
||||||
*/
|
*/
|
||||||
let al = arr.length;
|
function setContent(data) {
|
||||||
let sl = al - 1 ;
|
if (isEmpty(data)) return;
|
||||||
for (let i = 0; i < arr.length; i++ ) {
|
for (let h = 0; h < data.length; h++) {
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
let satarLcomun = lcomun;
|
||||||
for(let v = 0; v < arr[i].length; 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.alignment = { vertical: 'middle', horizontal: 'center' };
|
|
||||||
}
|
|
||||||
lcomunNow.height = 25;
|
|
||||||
lcomunNow.commit()
|
|
||||||
if (i < sl) lcomun++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 合并操作
|
|
||||||
* @param {*} satarLcomun
|
|
||||||
* @param {*} endLcomun
|
|
||||||
* @param {*} starKey
|
|
||||||
* @param {*} endKey
|
|
||||||
*/
|
|
||||||
function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey){
|
|
||||||
for(let ml = 0 ; ml < long ; ml++ ){
|
|
||||||
if (ml < starKey || ml >= endKey) {
|
|
||||||
worksheet.mergeCells(getLetter(ml) + satarLcomun +':'+getLetter(ml) + endLcomun)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置表末尾统计备注等
|
|
||||||
* @param {*} footData
|
|
||||||
*/
|
|
||||||
function setFoot(footData){
|
|
||||||
if (isEmpty(footData)) return ;
|
|
||||||
if (Array.isArray(footData)) {
|
|
||||||
for (let f = 0; f < footData.length; f++) {
|
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
let lcomunNow = worksheet.getRow(lcomun);
|
||||||
lcomunNow.getCell(1).value = footData[f];
|
let hasMerge = false;
|
||||||
lcomunNow.getCell(1).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
|
let starKey = 0;
|
||||||
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' };
|
let endKey = 0;
|
||||||
worksheet.mergeCells('A' + lcomun +':'+getLetter(long-1) + lcomun)
|
/** 循环列 */
|
||||||
|
//需要操作第几列
|
||||||
|
let sk = 0;
|
||||||
|
for (let l = 0; l < data[h].length; l++) {
|
||||||
|
if (Array.isArray(data[h][l])) {
|
||||||
|
//数组长度
|
||||||
|
starKey = sk;
|
||||||
|
hasMerge = true;
|
||||||
|
setArrayContent(data[h][l], sk);
|
||||||
|
if (data[h][l][0]) {
|
||||||
|
sk = sk + data[h][l][0].length
|
||||||
|
}
|
||||||
|
endKey = sk;
|
||||||
|
} else {
|
||||||
|
//不是数组
|
||||||
|
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.alignment = { vertical: 'middle', horizontal: 'center' };
|
||||||
|
sk++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey);
|
||||||
|
lcomunNow.height = 25;
|
||||||
|
lcomunNow.commit();
|
||||||
lcomun++
|
lcomun++
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
let lcomunNow = worksheet.getRow(lcomun);
|
|
||||||
lcomunNow.getCell(1).value = footData[f];
|
|
||||||
lcomunNow.getCell(1).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
|
|
||||||
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' };
|
|
||||||
worksheet.mergeCells('A' + lcomun +':'+getLetter(long-1) + lcomun)
|
|
||||||
}
|
}
|
||||||
}
|
/**
|
||||||
|
* 占多行的数组
|
||||||
/**
|
* @param {*} arr
|
||||||
* 处理超过26个字母的列
|
* @param {*} sk
|
||||||
* @param {*} number
|
*/
|
||||||
* @returns
|
function setArrayContent(arr, sk) {
|
||||||
*/
|
/**
|
||||||
function getLetter(number){
|
* 循环二维数组,在循环行
|
||||||
if (number < 26) {
|
*/
|
||||||
return letter[number];
|
let al = arr.length;
|
||||||
} else {
|
let sl = al - 1;
|
||||||
let n = number % 26
|
for (let i = 0; i < arr.length; i++) {
|
||||||
let l = Math.floor(number % 26)
|
let lcomunNow = worksheet.getRow(lcomun);
|
||||||
return letter[l]+letter[n]
|
for (let v = 0; v < arr[i].length; 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.alignment = { vertical: 'middle', horizontal: 'center' };
|
||||||
|
}
|
||||||
|
lcomunNow.height = 25;
|
||||||
|
lcomunNow.commit()
|
||||||
|
if (i < sl) lcomun++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 合并操作
|
||||||
|
* @param {*} satarLcomun
|
||||||
|
* @param {*} endLcomun
|
||||||
|
* @param {*} starKey
|
||||||
|
* @param {*} endKey
|
||||||
|
*/
|
||||||
|
function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey) {
|
||||||
|
for (let ml = 0; ml < long; ml++) {
|
||||||
|
if (ml < starKey || ml >= endKey) {
|
||||||
|
worksheet.mergeCells(getLetter(ml) + satarLcomun + ':' + getLetter(ml) + endLcomun)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出下载
|
* 设置表末尾统计备注等
|
||||||
* @param {*} filename
|
* @param {*} footData
|
||||||
*/
|
*/
|
||||||
function saveAndDowloade(filename){
|
function setFoot(footData) {
|
||||||
if (!filename) filename = new Date().getTime();
|
if (isEmpty(footData)) return;
|
||||||
workBook.xlsx.writeBuffer().then(data => {
|
if (Array.isArray(footData)) {
|
||||||
const blob = new Blob([data], {type: 'application/octet-stream'})
|
for (let f = 0; f < footData.length; f++) {
|
||||||
FileSaver.saveAs(blob, filename + '.xlsx')
|
let lcomunNow = worksheet.getRow(lcomun);
|
||||||
})
|
lcomunNow.getCell(1).value = footData[f];
|
||||||
}
|
lcomunNow.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
|
||||||
|
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' };
|
||||||
|
worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun)
|
||||||
|
lcomun++
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let lcomunNow = worksheet.getRow(lcomun);
|
||||||
|
lcomunNow.getCell(1).value = footData[f];
|
||||||
|
lcomunNow.getCell(1).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } };
|
||||||
|
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' };
|
||||||
|
worksheet.mergeCells('A' + lcomun + ':' + getLetter(long - 1) + lcomun)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理超过26个字母的列
|
||||||
|
* @param {*} number
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
function getLetter(number) {
|
||||||
|
if (number < 26) {
|
||||||
|
return letter[number];
|
||||||
|
} else {
|
||||||
|
let n = number % 26
|
||||||
|
let l = Math.floor(number % 26)
|
||||||
|
return letter[l] + letter[n]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出下载
|
||||||
|
* @param {*} filename
|
||||||
|
*/
|
||||||
|
function saveAndDowloade(filename) {
|
||||||
|
if (!filename) filename = new Date().getTime();
|
||||||
|
workBook.xlsx.writeBuffer().then(data => {
|
||||||
|
const blob = new Blob([data], { type: 'application/octet-stream' })
|
||||||
|
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);
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<el-card class="mt14">
|
<el-card class="mt14">
|
||||||
<div class="mb20">
|
<div class="mb20">
|
||||||
<el-button size="small" type="primary" @click="onSync">同步物流公司</el-button>
|
<el-button size="small" type="primary" @click="onSync">同步物流公司</el-button>
|
||||||
|
<el-button size="small" type="primary" @click="onAdd">添加物流公司</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
|
|
@ -183,6 +183,7 @@
|
||||||
:data="tableData.data"
|
:data="tableData.data"
|
||||||
size="small"
|
size="small"
|
||||||
class="table"
|
class="table"
|
||||||
|
align="center"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
:cell-class-name="addTdClass"
|
:cell-class-name="addTdClass"
|
||||||
>
|
>
|
||||||
|
@ -300,6 +301,7 @@
|
||||||
>查看退款单</el-button>
|
>查看退款单</el-button>
|
||||||
</span>
|
</span>
|
||||||
<el-button type="text" size="small" @click="onOrderDetails(scope.row.order_id)">详情</el-button>
|
<el-button type="text" size="small" @click="onOrderDetails(scope.row.order_id)">详情</el-button>
|
||||||
|
<!-- <el-button type="text" size="small" @click="onOrderOpenRefund(scope.row.order_id)">开启退款</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -344,7 +346,7 @@
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: CRMEB Team <admin@crmeb.com>
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
import { orderListApi, chartApi, cardListApi, exportOrderApi } from "@/api/order";
|
import { orderListApi, chartApi, cardListApi, exportOrderApi,openRefundApi } from "@/api/order";
|
||||||
import { merSelectApi } from "@/api/product";
|
import { merSelectApi } from "@/api/product";
|
||||||
import userDetails from '../../user/list/userDetails';
|
import userDetails from '../../user/list/userDetails';
|
||||||
import orderDetail from './orderDetails.vue';
|
import orderDetail from './orderDetails.vue';
|
||||||
|
@ -563,6 +565,30 @@ export default {
|
||||||
// this.$refs.orderDetail.onOrderDetails(id);
|
// this.$refs.orderDetail.onOrderDetails(id);
|
||||||
// this.$refs.orderDetail.onOrderLog(id);
|
// this.$refs.orderDetail.onOrderLog(id);
|
||||||
},
|
},
|
||||||
|
// 开启退款
|
||||||
|
// onOrderOpenRefund(id) {
|
||||||
|
// this.$confirm('此操作将开启退款, 是否继续?', '提示', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
// type: 'warning'
|
||||||
|
// }).then(() => {
|
||||||
|
// openRefundApi(id).then((res)=>{
|
||||||
|
// if(res.status == '200'){
|
||||||
|
// this.$message({
|
||||||
|
// type: 'success',
|
||||||
|
// message: '开启退款!'
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// console.log(res, "res");
|
||||||
|
// })
|
||||||
|
// // this.$message({
|
||||||
|
// // type: 'success',
|
||||||
|
// // message: '开启退款!'
|
||||||
|
// // });
|
||||||
|
// }).catch(() => {
|
||||||
|
|
||||||
|
// });
|
||||||
|
// },
|
||||||
pageChangeLog(page) {
|
pageChangeLog(page) {
|
||||||
this.tableFromLog.page = page;
|
this.tableFromLog.page = page;
|
||||||
this.getList('');
|
this.getList('');
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<el-card class="mt14">
|
<el-card class="mt14">
|
||||||
<el-button size="small" type="primary" class="mb20" @click="add">添加自评</el-button>
|
<!-- <el-button size="small" type="primary" class="mb20" @click="add">添加自评</el-button> -->
|
||||||
<el-table v-loading="listLoading" :data="tableData.data" size="small" @rowclick.stop="closeEdit" :row-class-name="tableRowClassName">
|
<el-table v-loading="listLoading" :data="tableData.data" size="small" @rowclick.stop="closeEdit" :row-class-name="tableRowClassName">
|
||||||
<el-table-column prop="reply_id" label="ID" min-width="50" />
|
<el-table-column prop="reply_id" label="ID" min-width="50" />
|
||||||
<el-table-column label="商品图" min-width="80">
|
<el-table-column label="商品图" min-width="80">
|
||||||
|
|
|
@ -51,6 +51,22 @@
|
||||||
<el-form-item label="商品搜索:" prop="keyword">
|
<el-form-item label="商品搜索:" prop="keyword">
|
||||||
<el-input v-model="tableFrom.keyword" @keyup.enter.native="getList(1)" placeholder="请输入商品名称,关键字,产品编号" class="selWidth" />
|
<el-input v-model="tableFrom.keyword" @keyup.enter.native="getList(1)" placeholder="请输入商品名称,关键字,产品编号" class="selWidth" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="时间选择:" prop="create_time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="timeVal"
|
||||||
|
value-format="yyyy/MM/dd"
|
||||||
|
format="yyyy/MM/dd"
|
||||||
|
type="daterange"
|
||||||
|
placement="bottom-end"
|
||||||
|
placeholder="自定义时间"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
style="width: 280px;"
|
||||||
|
:picker-options="pickerOptions"
|
||||||
|
@change="onchangeTime"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
|
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
|
||||||
<el-button size="small" @click="searchReset()">重置</el-button>
|
<el-button size="small" @click="searchReset()">重置</el-button>
|
||||||
|
@ -109,12 +125,12 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="store_name" label="商品名称" min-width="200">
|
<el-table-column prop="store_name" label="商品名称" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div><span class="tags_name" :class="'name'+scope.row.spec_type">{{ scope.row.spec_type==0 ? '[单规格]' : '[多规格]' }}</span>{{ scope.row.store_name || '-' }}</div>
|
<div><span class="tags_name" :class="'name'+scope.row.spec_type">{{ scope.row.spec_type==0 ? '[单规格]' : '[多规格]' }}</span>{{ scope.row.store_name || '-' }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商户名称" min-width="150">
|
<el-table-column label="商户名称" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.merchant ? scope.row.merchant.mer_name : '' }}</span>
|
<span>{{ scope.row.merchant ? scope.row.merchant.mer_name : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -122,12 +138,14 @@
|
||||||
<el-table-column prop="price" label="商品售价" min-width="80" />
|
<el-table-column prop="price" label="商品售价" min-width="80" />
|
||||||
<el-table-column prop="sales" label="销量" min-width="70" />
|
<el-table-column prop="sales" label="销量" min-width="70" />
|
||||||
<el-table-column prop="stock" label="库存" min-width="70" />
|
<el-table-column prop="stock" label="库存" min-width="70" />
|
||||||
|
<el-table-column prop="is_audited" label="待审核类型" min-width="80" />
|
||||||
<el-table-column label="推荐级别" min-width="150">
|
<el-table-column label="推荐级别" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-rate disabled v-model="scope.row.star" :colors="colors">
|
<el-rate disabled v-model="scope.row.star" :colors="colors">
|
||||||
</el-rate>
|
</el-rate>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="storeCategory.cate_name" label="商品类型" min-width="70" />
|
||||||
<el-table-column prop="rank" label="排序" min-width="60" />
|
<el-table-column prop="rank" label="排序" min-width="60" />
|
||||||
<el-table-column prop="status" label="是否显示" min-width="80">
|
<el-table-column prop="status" label="是否显示" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -139,6 +157,7 @@
|
||||||
<span>{{ scope.row.us_status | productStatusFilter }}</span>
|
<span>{{ scope.row.us_status | productStatusFilter }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="create_time" label="创建时间" min-width="120" />
|
||||||
<el-table-column v-if="Number(tableFrom.type) < 7" key="8" label="操作" min-width="180" fixed="right">
|
<el-table-column v-if="Number(tableFrom.type) < 7" key="8" label="操作" min-width="180" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="onDetails(scope.row.product_id)">详情</el-button>
|
<el-button type="text" size="small" @click="onDetails(scope.row.product_id)">详情</el-button>
|
||||||
|
@ -286,6 +305,7 @@ import infoFrom from './info'
|
||||||
import ueditorFrom from '@/components/ueditorFrom'
|
import ueditorFrom from '@/components/ueditorFrom'
|
||||||
import previewBox from '@/components/previewBox/index'
|
import previewBox from '@/components/previewBox/index'
|
||||||
import proDetail from './proDetails.vue';
|
import proDetail from './proDetails.vue';
|
||||||
|
import timeOptions from '@/utils/timeOptions';
|
||||||
const proOptions = [{
|
const proOptions = [{
|
||||||
name: '热门榜单',
|
name: '热门榜单',
|
||||||
value: 'is_hot'
|
value: 'is_hot'
|
||||||
|
@ -312,6 +332,8 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
emitPath: false
|
emitPath: false
|
||||||
},
|
},
|
||||||
|
pickerOptions: timeOptions,
|
||||||
|
timeVal: [],
|
||||||
ruleValidate: {
|
ruleValidate: {
|
||||||
store_name: [{
|
store_name: [{
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -381,6 +403,7 @@ export default {
|
||||||
tableFrom: {
|
tableFrom: {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
|
date:'',
|
||||||
cate_id: '',
|
cate_id: '',
|
||||||
sys_labels: '',
|
sys_labels: '',
|
||||||
pid: '',
|
pid: '',
|
||||||
|
@ -422,8 +445,16 @@ export default {
|
||||||
this.getLabelLst()
|
this.getLabelLst()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 具体日期
|
||||||
|
onchangeTime(e) {
|
||||||
|
this.timeVal = e
|
||||||
|
this.tableFrom.date = e ? this.timeVal.join('-') : ''
|
||||||
|
this.getList(1)
|
||||||
|
},
|
||||||
/**重置 */
|
/**重置 */
|
||||||
searchReset(){
|
searchReset(){
|
||||||
|
this.timeVal = []
|
||||||
|
this.tableFrom.date = ""
|
||||||
this.$refs.searchForm.resetFields()
|
this.$refs.searchForm.resetFields()
|
||||||
this.getList(1)
|
this.getList(1)
|
||||||
},
|
},
|
||||||
|
|
|
@ -57,6 +57,200 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="资质信息" name="aptitude">
|
||||||
|
<span class="sp">商品名称:
|
||||||
|
<el-radio-group v-model="aptitude">
|
||||||
|
<el-radio :label="0" class="radio">国产</el-radio>
|
||||||
|
<el-radio :label="1">进口</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</span>
|
||||||
|
<div v-if="aptitude == 0">
|
||||||
|
<span class="sp">生产企业名称:{{ qualification.production_name }}</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">生产营业执照:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.businessList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.businessList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">商标注册证:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.trademarkList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.trademarkList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">销售授权及其他:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.authorizedList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.authorizedList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">商品检测报告:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.commodityList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.commodityList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">其他资质:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.otherList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.otherList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="aptitude == 1">
|
||||||
|
<span class="sp">进口/企业境内总代企业名称: {{ qualification.import_name }}</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">生产营业执照:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.importBusinessList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.importBusinessList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">销售授权及其他:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.importAuthorizedList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.importAuthorizedList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">海关检验检疫证书及报关单:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.customsList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.customsList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">产品外包装实物图:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.packingList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.packingList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="upload">
|
||||||
|
<div class="upload_left">其他资质:</div>
|
||||||
|
<div class="upload_right">
|
||||||
|
<div
|
||||||
|
v-for="(item,index) in qualification.importOtherList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<a class="txt" v-if="getType(item)" :href="item.url" target="downloadFile" download>{{ item.name }}</a>
|
||||||
|
<div class="pictrue" v-else>
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px;"
|
||||||
|
:src="item.url"
|
||||||
|
:preview-src-list="qualification.importOtherList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane label="商品详情" name="second">
|
<el-tab-pane label="商品详情" name="second">
|
||||||
<span class="sp100">商品详情:</span>
|
<span class="sp100">商品详情:</span>
|
||||||
<div class="contentPic" v-html="projectData.content"/>
|
<div class="contentPic" v-html="projectData.content"/>
|
||||||
|
@ -149,6 +343,22 @@
|
||||||
</template>
|
</template>
|
||||||
</span>
|
</span>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="店铺信息" name="shop">
|
||||||
|
<span class="sp">店铺名称:{{ projectData.merchant&&projectData.merchant.mer_name }}</span>
|
||||||
|
<span class="sp">入住企业名称:</span>
|
||||||
|
<span class="sp100">
|
||||||
|
营业执照:
|
||||||
|
<div class="demo-image__preview">
|
||||||
|
<el-image
|
||||||
|
style="width: 60px; height: 60px"
|
||||||
|
:src="projectData.image"
|
||||||
|
:preview-src-list="[projectData.image]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
<span class="sp">店铺联系人: {{ projectData.merchant&&projectData.merchant.service_phone }}</span>
|
||||||
|
<span class="sp">联系人电话:{{ projectData.unit_name }}</span>
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="80px" class="demo-ruleForm">
|
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="80px" class="demo-ruleForm">
|
||||||
<el-form-item label="审核状态" prop="status">
|
<el-form-item label="审核状态" prop="status">
|
||||||
|
@ -157,6 +367,20 @@
|
||||||
<el-radio :label="-1">拒绝</el-radio>
|
<el-radio :label="-1">拒绝</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="佐证图片:" prop="status_img" label-width="90px">
|
||||||
|
<div
|
||||||
|
class="upLoadPicBox"
|
||||||
|
title="750*750px"
|
||||||
|
@click="modalPicTap('1')"
|
||||||
|
>
|
||||||
|
<div v-if="ruleForm.status_img" class="pictrue">
|
||||||
|
<img :src="ruleForm.status_img">
|
||||||
|
</div>
|
||||||
|
<div v-else class="upLoad">
|
||||||
|
<i class="el-icon-camera cameraIconfont" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item v-if="ruleForm.status===-1" label="原因" prop="refusal">
|
<el-form-item v-if="ruleForm.status===-1" label="原因" prop="refusal">
|
||||||
<el-input v-model="ruleForm.refusal" type="textarea" placeholder="请输入原因" />
|
<el-input v-model="ruleForm.refusal" type="textarea" placeholder="请输入原因" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -259,14 +483,36 @@ export default {
|
||||||
],
|
],
|
||||||
refusal: [
|
refusal: [
|
||||||
{ required: true, message: '请填写拒绝原因', trigger: 'blur' }
|
{ required: true, message: '请填写拒绝原因', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
status_img: [
|
||||||
|
{ required: true, message: '请上传佐证图片', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
isAppend: true,
|
isAppend: true,
|
||||||
proId: 0,
|
proId: 0,
|
||||||
|
aptitude:0,
|
||||||
|
qualification:{
|
||||||
|
production_name: '',
|
||||||
|
businessList: [],
|
||||||
|
licenceList: [],
|
||||||
|
trademarkList: [],
|
||||||
|
authorizedList: [],
|
||||||
|
commodityList: [],
|
||||||
|
otherList: [],
|
||||||
|
importBusinessList: [],
|
||||||
|
importAuthorizedList: [],
|
||||||
|
customsList: [],
|
||||||
|
packingList: [],
|
||||||
|
importOtherList: [],
|
||||||
|
commodity_type: 0,
|
||||||
|
brands_name: '',
|
||||||
|
import_name: ''
|
||||||
|
},
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
refusal: '',
|
refusal: '',
|
||||||
status: 1,
|
status: 1,
|
||||||
id: ''
|
id: '',
|
||||||
|
status_img:''
|
||||||
},
|
},
|
||||||
formThead: Object.assign({}, objTitle),
|
formThead: Object.assign({}, objTitle),
|
||||||
manyTabDate: {},
|
manyTabDate: {},
|
||||||
|
@ -296,6 +542,21 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getType(val){
|
||||||
|
var regex = /(?:\.([^.]+))?$/;
|
||||||
|
let suffix = regex.exec(val.url)[1]
|
||||||
|
return suffix == 'pdf'
|
||||||
|
},
|
||||||
|
// 点击商品图
|
||||||
|
modalPicTap(tit, num, i) {
|
||||||
|
const _this = this;
|
||||||
|
const attr = [];
|
||||||
|
this.$modalUpload(function(img) {
|
||||||
|
if (tit === "1" && !num) {
|
||||||
|
_this.ruleForm.status_img = img[0];
|
||||||
|
}
|
||||||
|
}, tit);
|
||||||
|
},
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.isShow ? this.ruleForm.id = this.proId : this.ruleForm.id = this.ids
|
this.isShow ? this.ruleForm.id = this.proId : this.ruleForm.id = this.ids
|
||||||
productStatusApi(this.ruleForm).then(res => {
|
productStatusApi(this.ruleForm).then(res => {
|
||||||
|
@ -317,6 +578,7 @@ export default {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
productDetailApi(id).then(res => {
|
productDetailApi(id).then(res => {
|
||||||
this.projectData = res.data
|
this.projectData = res.data
|
||||||
|
this.qualification = res.data.qualification
|
||||||
this.svip_type = res.data.svip_price_type
|
this.svip_type = res.data.svip_price_type
|
||||||
|
|
||||||
if (this.projectData.spec_type === 0) {
|
if (this.projectData.spec_type === 0) {
|
||||||
|
@ -353,6 +615,34 @@ export default {
|
||||||
.projectInfo ::v-deep .el-dialog__body{
|
.projectInfo ::v-deep .el-dialog__body{
|
||||||
padding-top: 0 !important;
|
padding-top: 0 !important;
|
||||||
}
|
}
|
||||||
|
.upload{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-content: center;
|
||||||
|
height: 60px;
|
||||||
|
// line-height: 60px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
&_right{
|
||||||
|
display: flex;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
&_left{
|
||||||
|
width: 115px;
|
||||||
|
}
|
||||||
|
.txt{
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
line-height: 60px;
|
||||||
|
overflow: hidden;
|
||||||
|
display: inline-block;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
border: 1px solid #DCDFE6;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 10px;
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
.projectInfo ::v-deep .el-tabs__content{
|
.projectInfo ::v-deep .el-tabs__content{
|
||||||
padding-left: 10px !important;
|
padding-left: 10px !important;
|
||||||
}
|
}
|
||||||
|
@ -393,5 +683,6 @@ export default {
|
||||||
}
|
}
|
||||||
.demo-image__preview{
|
.demo-image__preview{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-if="name != 'sign_day_config' && name != 'integral_shop_banner' && guide != 2" class="iframe">
|
<el-col v-if="name != 'sign_day_config' && name != 'integral_shop_banner' && guide != 2 && guide != 1" class="iframe">
|
||||||
<iframe :src="url" id="iframe" scrolling="no" class="iframe-box" frameborder="0" ref="iframe"></iframe>
|
<iframe :src="url" id="iframe" scrolling="no" class="iframe-box" frameborder="0" ref="iframe"></iframe>
|
||||||
<div class="moddile"></div>
|
<div class="moddile"></div>
|
||||||
<div v-if="name == 'new_home_banner' || name == 'hot_home_banner' || name == 'best_home_banner' || name == 'good_home_banner' || name == 'points_mall_banner'" class="moddile_box">
|
<div v-if="name == 'new_home_banner' || name == 'hot_home_banner' || name == 'best_home_banner' || name == 'good_home_banner' || name == 'points_mall_banner'" class="moddile_box">
|
||||||
|
@ -69,6 +69,16 @@
|
||||||
</swiper-slide>
|
</swiper-slide>
|
||||||
</swiper>
|
</swiper>
|
||||||
</div>
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-if="guide == 1">
|
||||||
|
<div v-if="guide == 1" class="iframe" :bordered="false">
|
||||||
|
<div class="nofonts" v-if="tabList.list == ''">暂无照片,请添加~</div>
|
||||||
|
<swiper :options="swiperOption" class="swiperimg on">
|
||||||
|
<swiper-slide class="swiperimg on" v-for="(item,indexa) in tabList.list" :key="indexa + 'a'">
|
||||||
|
<img :src="item.pic" mode="aspectFill">
|
||||||
|
</swiper-slide>
|
||||||
|
</swiper>
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-if="name == 'sign_day_config'" :xs="24" :sm="24" :md="14" :lg="11" class="ml20 right-wrapper">
|
<el-col v-if="name == 'sign_day_config'" :xs="24" :sm="24" :md="14" :lg="11" class="ml20 right-wrapper">
|
||||||
<div class="table_box">
|
<div class="table_box">
|
||||||
|
@ -221,6 +231,52 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col v-if="guide == 1" :xs="14" :sm="14" :md="14" :lg="11" class="right-wrapper">
|
||||||
|
<div class="content">
|
||||||
|
<div class="ml20">
|
||||||
|
<div class="hot_imgs">
|
||||||
|
<div class="list-box">
|
||||||
|
<draggable class="dragArea list-group" :list="tabList.list" group="peoples"
|
||||||
|
handle=".move-icon">
|
||||||
|
<div class="item" v-for="(item,index) in tabList.list" :key="index+ 'd'">
|
||||||
|
<div class="move-icon">
|
||||||
|
<span class="iconfont icondrag2"></span>
|
||||||
|
</div>
|
||||||
|
<div class="img-box" @click="modalPicTap('单选',index)">
|
||||||
|
<img :src="item.pic" alt="" v-if="item.pic">
|
||||||
|
<div class="upload-box" v-else>
|
||||||
|
<i class="el-icon-camera-solid"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info">
|
||||||
|
<div class="info-item">
|
||||||
|
<span>图片名称:</span>
|
||||||
|
<div class="input-box">
|
||||||
|
<el-input v-model="item.name" size="small" placeholder="请填写名称"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="info-item">
|
||||||
|
<span>链接地址:</span>
|
||||||
|
<div class="input-box" @click="link(index)">
|
||||||
|
<el-input v-model="item.url" size="small" suffix-icon="el-icon-arrow-right" readonly placeholder="选择链接"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="delect-btn" @click.stop="bindDelete(item,index)">
|
||||||
|
<i class="el-icon-error"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</draggable>
|
||||||
|
</div>
|
||||||
|
<template>
|
||||||
|
<div class="add-btn" v-show="tabList.list.length ==0">
|
||||||
|
<el-button class="btn-add" size="small" @click="addBox">添加图片</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
<el-col v-if="guide == 2" :xs="14" :sm="14" :md="14" :lg="11" class="right-wrapper">
|
<el-col v-if="guide == 2" :xs="14" :sm="14" :md="14" :lg="11" class="right-wrapper">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="ml20">
|
<div class="ml20">
|
||||||
|
@ -306,7 +362,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-else>
|
<el-col v-else>
|
||||||
<!-- 右侧轮播图以及其他设置 -->
|
<!-- 右侧轮播图以及其他设置 -->
|
||||||
<div v-if="name != 'sign_day_config' && name != 'points_mall_scope'" class="content">
|
<div v-if="name != 'sign_day_config' && name != 'points_mall_scope' && name != 'home_pop_frame'" class="content">
|
||||||
<div class="ml20">
|
<div class="ml20">
|
||||||
<div class="hot_imgs">
|
<div class="hot_imgs">
|
||||||
<div class="title">{{name != 'points_mall_district' ? '轮播图设置' : '积分金刚区设置'}}</div>
|
<div class="title">{{name != 'points_mall_district' ? '轮播图设置' : '积分金刚区设置'}}</div>
|
||||||
|
@ -592,6 +648,11 @@ export default {
|
||||||
let row = JSON.parse(el.$el.dataset.item);
|
let row = JSON.parse(el.$el.dataset.item);
|
||||||
this.pageId = row.group_id;
|
this.pageId = row.group_id;
|
||||||
let time = new Date().getTime() * 1000
|
let time = new Date().getTime() * 1000
|
||||||
|
console.log(this.name);
|
||||||
|
if(this.name == "home_pop_frame"){
|
||||||
|
this.guide = 1;
|
||||||
|
return this.info(this.name);
|
||||||
|
}
|
||||||
if (this.name == "open_screen_advertising") {
|
if (this.name == "open_screen_advertising") {
|
||||||
this.guide = 2;
|
this.guide = 2;
|
||||||
this.info(this.name);
|
this.info(this.name);
|
||||||
|
@ -679,6 +740,8 @@ export default {
|
||||||
this.loadingExist = true;
|
this.loadingExist = true;
|
||||||
let data = {data: this.tabList.list}
|
let data = {data: this.tabList.list}
|
||||||
if(this.guide == 2){data.config={open_screen_switch: this.formItem.open_screen_switch,open_screen_time: this.formItem.open_screen_time,open_screen_space: this.formItem.open_screen_space}}
|
if(this.guide == 2){data.config={open_screen_switch: this.formItem.open_screen_switch,open_screen_time: this.formItem.open_screen_time,open_screen_space: this.formItem.open_screen_space}}
|
||||||
|
// if(this.guide == 1){data.config={open_screen_switch: this.formItem.open_screen_switch,open_screen_time: this.formItem.open_screen_time,open_screen_space: this.formItem.open_screen_space}}
|
||||||
|
// groupSaveApi(this.name,data)
|
||||||
groupSaveApi(this.name,data)
|
groupSaveApi(this.name,data)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loadingExist = false;
|
this.loadingExist = false;
|
||||||
|
|
Loading…
Reference in New Issue