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