This commit is contained in:
faiz 2024-03-30 18:52:24 +08:00
parent ba65f5e957
commit c1d92e8ac6
8 changed files with 1434 additions and 918 deletions

View File

@ -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,

View File

@ -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 属性规则 -- 删除
*/ */
@ -528,11 +534,11 @@ export function batchesTempApi(data) {
} }
/** 参数模板 -- 添加 */ /** 参数模板 -- 添加 */
export function productSpecs(data) { export function productSpecs(data) {
return request.post(`store/params/temp/create`,data) return request.post(`store/params/temp/create`, data)
} }
/** 参数模板 -- 编辑 */ /** 参数模板 -- 编辑 */
export function specsUpdate(id, data) { export function specsUpdate(id, data) {
return request.post(`store/params/temp/update/${id}`,data) return request.post(`store/params/temp/update/${id}`, data)
} }
/** 参数模板 -- 详情 */ /** 参数模板 -- 详情 */
export function productSpecsInfo(id) { export function productSpecsInfo(id) {
@ -552,7 +558,7 @@ export function specsDetailApi(id) {
} }
/** 添加商品 -- 参数筛选 */ /** 添加商品 -- 参数筛选 */
export function specsSelectedApi(data) { export function specsSelectedApi(data) {
return request.get(`store/params/temp/select`,data) return request.get(`store/params/temp/select`, data)
} }
/** 添加商品 -- 参数筛选详情 */ /** 添加商品 -- 参数筛选详情 */
export function productSpecsDetailApi(data) { export function productSpecsDetailApi(data) {
@ -567,7 +573,7 @@ export function productBathSvipApi(data) {
return request.post(`store/product/batch_svip`, data) return request.post(`store/product/batch_svip`, data)
} }
/** 商品列表 -- 立即生成规格 */ /** 商品列表 -- 立即生成规格 */
export function generateAttrApi(id,data) { export function generateAttrApi(id, data) {
return request.post(`store/product/get_attr_value/${id}`, data) return request.post(`store/product/get_attr_value/${id}`, data)
} }
/** 商品列表 -- 系统表单下拉 */ /** 商品列表 -- 系统表单下拉 */
@ -580,11 +586,11 @@ export function associatedFormInfo(id) {
} }
/** 商品列表 -- 批量设置 */ /** 商品列表 -- 批量设置 */
export function batchSetProduct(data) { export function batchSetProduct(data) {
return request.post(`store/product/batch_process`,data) return request.post(`store/product/batch_process`, data)
} }
/** 商品列表 -- 商品操作记录 */ /** 商品列表 -- 商品操作记录 */
export function operateRecordList(id,data) { export function operateRecordList(id, data) {
return request.get(`store/product/get_operate_list/${id}`,data) return request.get(`store/product/get_operate_list/${id}`, data)
} }
/** /**

View File

@ -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">

View File

@ -8,198 +8,200 @@
// | 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)
} }
/** /**
* 设置表名介绍等 * 设置表名介绍等
* @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); 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++
}
} }
} /**
/**
* 设置表头行 * 设置表头行
* @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.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++;
}
/** /**
* 导出内容 * 导出内容
* @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)
sk = sk + data[h][l][0].length // console.log(data[h][l][0].length)
endKey =sk; if (data[h][l][0]) {
} else { sk = sk + data[h][l][0].length
//不是数组 }
lcomunNow.getCell(getLetter(sk)).value = data[h][l]; endKey = sk
lcomunNow.getCell(getLetter(sk)).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}}; } else {
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' }; // 不是数组
sk++ 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++
} }
if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey);
lcomunNow.height = 25;
lcomunNow.commit();
lcomun++
} }
} /**
/**
* 占多行的数组 * 占多行的数组
* @param {*} arr * @param {*} arr
* @param {*} sk * @param {*} sk
*/ */
function setArrayContent(arr, sk) { 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.commit()
if (i < sl) lcomun++
} }
lcomunNow.height = 25;
lcomunNow.commit()
if (i < sl) lcomun++
} }
} /**
/**
* 合并操作 * 合并操作
* @param {*} satarLcomun * @param {*} satarLcomun
* @param {*} endLcomun * @param {*} endLcomun
* @param {*} starKey * @param {*} starKey
* @param {*} endKey * @param {*} endKey
*/ */
function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey){ function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey) {
for(let ml = 0 ; ml < long ; ml++ ){ for (let ml = 0; ml < long; ml++) {
if (ml < starKey || ml >= endKey) { if (ml < starKey || ml >= endKey) {
worksheet.mergeCells(getLetter(ml) + satarLcomun +':'+getLetter(ml) + endLcomun) worksheet.mergeCells(getLetter(ml) + satarLcomun + ':' + getLetter(ml) + endLcomun)
}
} }
} }
}
/** /**
* 设置表末尾统计备注等 * 设置表末尾统计备注等
* @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 {
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)
} }
} 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个字母的列 * 处理超过26个字母的列
* @param {*} number * @param {*} number
* @returns * @returns
*/ */
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]
}
} }
}
/** /**
* 导出下载 * 导出下载
* @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);
setTitle(title,long);
setHeader(header);
setContent(data);
setFoot(foot);
saveAndDowloade(filename);
createSheets(sheets)
setTitle(title, long)
setHeader(header)
setContent(data)
setFoot(foot)
saveAndDowloade(filename)
} }

View File

@ -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>
@ -277,7 +277,7 @@
<el-form-item label="选择类型:" prop="delivery_type"> <el-form-item label="选择类型:" prop="delivery_type">
<el-radio-group v-model="shipment.delivery_type" @change="changeSend"> <el-radio-group v-model="shipment.delivery_type" @change="changeSend">
<el-radio v-if="!isBatch && tableFrom.order_type != 2 && orderType != 1" :label="1">手动发货</el-radio> <el-radio v-if="!isBatch && tableFrom.order_type != 2 && orderType != 1" :label="1">手动发货</el-radio>
<el-radio :label="3" class="radio"> {{orderType == 1 ? '虚拟发货' : '无需物流'}}</el-radio> <el-radio :label="3" class="radio"> {{ orderType == 1 ? '虚拟发货' : '无需物流' }}</el-radio>
<el-radio v-if="isDump==1 && tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="4" class="radio">电子面单打印</el-radio> <el-radio v-if="isDump==1 && tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="4" class="radio">电子面单打印</el-radio>
<el-radio v-if="tableFrom.order_type != 2 && orderType !=1" :label="2">自己配送</el-radio> <el-radio v-if="tableFrom.order_type != 2 && orderType !=1" :label="2">自己配送</el-radio>
<el-radio v-if="tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="5">同城配送</el-radio> <el-radio v-if="tableFrom.order_type != 2 && orderType !=1 && !isBatch" :label="5">同城配送</el-radio>
@ -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"
@ -318,8 +318,8 @@
<el-form-item v-if="shipment.delivery_type == 5 && tableFrom.order_type != 2 && orderType !=1" label="包裹重量(kg)" prop="cargo_weight"> <el-form-item v-if="shipment.delivery_type == 5 && tableFrom.order_type != 2 && orderType !=1" label="包裹重量(kg)" prop="cargo_weight">
<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="请输入快递单号" />
@ -376,30 +376,30 @@
:row-key="(row) => { return row.product_id }" :row-key="(row) => { return row.product_id }"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column align="center" type="selection" :reserve-selection="true" min-width="50"/> <el-table-column align="center" type="selection" :reserve-selection="true" min-width="50" />
<el-table-column align="center" label="商品信息" min-width="200"> <el-table-column align="center" label="商品信息" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="acea-row" style="align-items: center;"> <div class="acea-row" style="align-items: center;">
<div class="demo-image__preview"> <div class="demo-image__preview">
<el-image :src="scope.row.cart_info.product.image" :preview-src-list="[scope.row.cart_info.product.image]" /> <el-image :src="scope.row.cart_info.product.image" :preview-src-list="[scope.row.cart_info.product.image]" />
</div> </div>
<span class="priceBox" style="width: 150px;">{{scope.row.cart_info.product.store_name}}</span> <span class="priceBox" style="width: 150px;">{{ scope.row.cart_info.product.store_name }}</span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="规格" min-width="80"> <el-table-column align="center" label="规格" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="priceBox">{{scope.row.cart_info.productAttr.sku}}</span> <span class="priceBox">{{ scope.row.cart_info.productAttr.sku }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="商品售价" min-width="80"> <el-table-column align="center" label="商品售价" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="priceBox">{{scope.row.cart_info.productAttr.price}}</span> <span class="priceBox">{{ scope.row.cart_info.productAttr.price }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="总数" min-width="80"> <el-table-column align="center" label="总数" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="priceBox">{{scope.row.stock_num}}</span> <span class="priceBox">{{ scope.row.stock_num }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="待发数量" align="center" min-width="120"> <el-table-column label="待发数量" align="center" min-width="120">
@ -417,12 +417,12 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-form-item> </el-form-item>
<el-form-item label="备注:" prop="remark"> <el-form-item label="备注:" prop="remark">
<el-input v-model="shipment.remark" type="textarea" class="pageWidth" placeholder="请输入备注" /> <el-input v-model="shipment.remark" type="textarea" class="pageWidth" placeholder="请输入备注" />
</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,
@ -533,7 +533,7 @@ export default {
type: this.$route.query.order_type || '1', type: this.$route.query.order_type || '1',
username: '', username: '',
filter_delivery: '', filter_delivery: '',
filter_product : '', filter_product: '',
pay_type: '', pay_type: '',
order_id: this.$route.query.id ? this.$route.query.id : '', order_id: this.$route.query.id ? this.$route.query.id : '',
activity_type: '' activity_type: ''
@ -551,12 +551,12 @@ export default {
{ value: 4, label: '核销订单' }, { value: 4, label: '核销订单' },
{ value: 3, label: '虚拟发货' }, { value: 3, label: '虚拟发货' },
{ value: 6, label: '自动发货' } { value: 6, label: '自动发货' }
], // ], //
productTypeList: [ productTypeList: [
{ value: 1, label: '实物商品' }, { value: 1, label: '实物商品' },
{ value: 2, label: '虚拟商品' }, { value: 2, label: '虚拟商品' },
{ value: 3, label: '卡密商品' } { value: 3, label: '卡密商品' }
], // ], //
orderChartType: {}, orderChartType: {},
timeVal: [], timeVal: [],
fromList: { fromList: {
@ -621,15 +621,15 @@ export default {
}, },
deliveryList: [], deliveryList: [],
eleTempsLst: [], eleTempsLst: [],
productList: [], // productList: [], //
productNum: 0, productNum: 0,
storeList: [], // storeList: [], //
multipleSelection: [], multipleSelection: [],
shipment: { shipment: {
delivery_type: 1, delivery_type: 1,
station_id: '', station_id: '',
is_split:"0", is_split: '0',
split:[] split: []
}, },
original: { original: {
delivery_name: '', delivery_name: '',
@ -701,10 +701,10 @@ export default {
this.getStoreList() this.getStoreList()
}, },
methods: { methods: {
/**重置 */ /** 重置 */
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,17 +713,17 @@ 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) {
this.multipleSelection = val this.multipleSelection = val
const data = [] const data = []
this.multipleSelection.map((item) => { this.multipleSelection.map((item) => {
data.push({id:item.order_product_id,num:item.product_num}) data.push({ id: item.order_product_id, num: item.product_num })
}) })
this.ids = data this.ids = data
}, },
@ -761,18 +761,18 @@ 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 != '') {
this.getTempsLst(data.mer_from_com) this.getTempsLst(data.mer_from_com)
} }
}) })
.catch((res) => { .catch((res) => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}, },
// //
getStoreList() { getStoreList() {
getDeliveryStoreLst().then((res) => { getDeliveryStoreLst().then((res) => {
this.storeList = res.data this.storeList = res.data
@ -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) {
@ -802,16 +802,16 @@ export default {
}, },
// //
batchSend() { batchSend() {
if (!this.allCheck&&this.checkedIds.length == 0) { if (!this.allCheck && this.checkedIds.length == 0) {
return this.$message.warning('请先选择订单') return this.$message.warning('请先选择订单')
} else { } else {
this.isBatch = true this.isBatch = true
this.sendVisible = true this.sendVisible = true
this.shipment.delivery_type = 2 this.shipment.delivery_type = 2
this.shipment.select_type = this.allCheck ? 'all' : 'select' this.shipment.select_type = this.allCheck ? 'all' : 'select'
if(this.allCheck){ if (this.allCheck) {
this.shipment.where = this.tableFrom this.shipment.where = this.tableFrom
}else{ } else {
this.shipment.order_id = this.checkedIds this.shipment.order_id = this.checkedIds
} }
} }
@ -913,15 +913,15 @@ export default {
}) })
}, },
// 退 // 退
onOrderRefund(id){ onOrderRefund(id) {
this.$refs.orderRefund.getOrderDetails(id) this.$refs.orderRefund.getOrderDetails(id)
}, },
// 退 // 退
refundSuccess(){ refundSuccess() {
setTimeout(() => { setTimeout(() => {
this.drawer = false; this.drawer = false
this.getList(); this.getList()
},500) }, 500)
}, },
// //
addTdClass(val) { addTdClass(val) {
@ -938,27 +938,27 @@ 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)
if (lebData.export.length) { if (lebData.export.length) {
data = data.concat(lebData.export) data = data.concat(lebData.export)
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
}, },
/**订单 */ /** 订单 */
downOrderData(excelData) { downOrderData(excelData) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
exportOrderApi(excelData).then((res) => { exportOrderApi(excelData).then((res) => {
@ -966,7 +966,7 @@ export default {
}) })
}) })
}, },
/**发货单 */ /** 发货单 */
downInvoiceData(excelData) { downInvoiceData(excelData) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
exportInvoiceApi(excelData).then((res) => { exportInvoiceApi(excelData).then((res) => {
@ -993,13 +993,13 @@ 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()
} }
}, },
// //
@ -1114,7 +1114,7 @@ export default {
pay_postage: res.data.pay_postage, pay_postage: res.data.pay_postage,
total_price: res.data.total_price, total_price: res.data.total_price,
integral_price: res.data.integral_price, integral_price: res.data.integral_price,
coupon_price: (Number(res.data.coupon_price) + Number(res.data.svip_discount)).toFixed(2) , coupon_price: (Number(res.data.coupon_price) + Number(res.data.svip_discount)).toFixed(2),
pay_price: (Number(res.data.total_price) + Number(res.data.pay_postage) - Number(res.data.coupon_price) - Number(res.data.svip_discount)).toFixed(2) pay_price: (Number(res.data.total_price) + Number(res.data.pay_postage) - Number(res.data.coupon_price) - Number(res.data.svip_discount)).toFixed(2)
} }
this.loading = false this.loading = false
@ -1136,7 +1136,7 @@ export default {
this.formValidate.pay_price = (this.formValidate.total_price + this.formValidate.pay_postage - this.formValidate.coupon_price).toFixed(2) this.formValidate.pay_price = (this.formValidate.total_price + this.formValidate.pay_postage - this.formValidate.coupon_price).toFixed(2)
}, },
// //
send(row,id) { send(row, id) {
this.isBatch = false this.isBatch = false
this.sendVisible = true this.sendVisible = true
this.isResend = false this.isResend = false
@ -1148,9 +1148,9 @@ export default {
item.stock_num = item.product_num item.stock_num = item.product_num
}) })
this.productList = row.orderProduct this.productList = row.orderProduct
this.productNum = row.orderProduct && row.orderProduct[0] && row.orderProduct[0]['product_num'] || 0 this.productNum = row.orderProduct && row.orderProduct[0] && row.orderProduct[0]['product_num'] || 0
delete this.shipment.order_id delete this.shipment.order_id
if(this.tableFrom.order_type == 2)this.shipment.delivery_type = 3 if (this.tableFrom.order_type == 2) this.shipment.delivery_type = 3
}, },
sendReset() { sendReset() {
this.shipment = { this.shipment = {
@ -1190,13 +1190,13 @@ export default {
this.shipment.delivery_name = this.shipment.to_name this.shipment.delivery_name = this.shipment.to_name
this.shipment.delivery_id = this.shipment.to_phone this.shipment.delivery_id = this.shipment.to_phone
} }
if(this.shipment.is_split != '0' && this.shipment.is_split && this.orderType != 2){ if (this.shipment.is_split != '0' && this.shipment.is_split && this.orderType != 2) {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
return this.$message.warning('请选择拆单商品!') return this.$message.warning('请选择拆单商品!')
} }
const data = [] const data = []
this.multipleSelection.map((item) => { this.multipleSelection.map((item) => {
data.push({id:item.order_product_id,num:item.product_num_input}) data.push({ id: item.order_product_id, num: item.product_num_input })
}) })
this.ids = data this.ids = data
this.shipment.split = this.ids this.shipment.split = this.ids
@ -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)
}) })
@ -1234,7 +1234,7 @@ export default {
} }
}) })
}, },
// //
printImg(url) { printImg(url) {
printJS({ printJS({
// printable: 'http://api.kuaidi100.com/label/getImage/20230518/9CBFE5F980044698A54CF19EB1585125', // printable: 'http://api.kuaidi100.com/label/getImage/20230518/9CBFE5F980044698A54CF19EB1585125',
@ -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

View File

@ -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,20 +114,21 @@
: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">
<div> <div>
<span class="spBlock onHand" :class="{'check': chkName === 'dan'}" @click="onHandle('dan',scope.$index)">选中本页</span> <span class="spBlock onHand" :class="{'check': chkName === 'dan'}" @click="onHandle('dan',scope.$index)">选中本页</span>
<span class="spBlock onHand" :class="{'check': chkName === 'duo'}" @click="onHandle('duo')">选中全部</span> <span class="spBlock onHand" :class="{'check': chkName === 'duo'}" @click="onHandle('duo')">选中全部</span>
</div> </div>
<el-checkbox slot="reference" :value="(chkName === 'dan' && checkedPage.indexOf(tableFrom.page) > -1) || chkName === 'duo'" @change="changeType" /> <el-checkbox slot="reference" :value="(chkName === 'dan' && checkedPage.indexOf(tableFrom.page) > -1) || chkName === 'duo'" @change="changeType" />
</el-popover> </el-popover>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox :disabled="scope.row.cancel_time" :value="!scope.row.cancel_time && (checkedIds.indexOf(scope.row.product_id) > -1 || (chkName === 'duo' && noChecked.indexOf(scope.row.product_id) === -1))" @change="(v)=>changeOne(v,scope.row)" /> <el-checkbox :disabled="scope.row.cancel_time" :value="!scope.row.cancel_time && (checkedIds.indexOf(scope.row.product_id) > -1 || (chkName === 'duo' && noChecked.indexOf(scope.row.product_id) === -1))" @change="(v)=>changeOne(v,scope.row)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
@ -202,7 +203,7 @@
<el-button v-if="tableFrom.type !== '5'" type="text" size="small" class="mr10" @click="handlePreview(scope.row.product_id)">预览</el-button> <el-button v-if="tableFrom.type !== '5'" type="text" size="small" class="mr10" @click="handlePreview(scope.row.product_id)">预览</el-button>
<el-dropdown> <el-dropdown>
<span class="el-dropdown-link"> <span class="el-dropdown-link">
更多<i class="el-icon-arrow-down el-icon--right" /> 更多<i class="el-icon-arrow-down el-icon--right" />
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="tableFrom.type !== '5' && is_audit == '1'" @click.native="onAuditFree(scope.row)">免审编辑</el-dropdown-item> <el-dropdown-item v-if="tableFrom.type !== '5' && is_audit == '1'" @click.native="onAuditFree(scope.row)">免审编辑</el-dropdown-item>
@ -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
@ -261,7 +262,7 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 免审核弹窗--> <!-- 免审核弹窗-->
<edit-attr ref="editAttr"/> <edit-attr ref="editAttr" />
<!--运费模板弹窗--> <!--运费模板弹窗-->
<el-dialog <el-dialog
v-if="dialogFreight" v-if="dialogFreight"
@ -295,10 +296,10 @@
> >
<el-form ref="commisionForm" :model="commisionForm" :rules="commisionRule" @submit.native.prevent> <el-form ref="commisionForm" :model="commisionForm" :rules="commisionRule" @submit.native.prevent>
<el-form-item label="一级佣金比例:" prop="extension_one"> <el-form-item label="一级佣金比例:" prop="extension_one">
<el-input-number v-model="commisionForm.extension_one" :precision="2" :step="0.1" :min="0" :max="1" class="priceBox" controls-position="right"/> <el-input-number v-model="commisionForm.extension_one" :precision="2" :step="0.1" :min="0" :max="1" class="priceBox" controls-position="right" />
</el-form-item> </el-form-item>
<el-form-item label="二级佣金比例:" prop="extension_two"> <el-form-item label="二级佣金比例:" prop="extension_two">
<el-input-number v-model="commisionForm.extension_two" :precision="2" :step="0.1" :min="0" :max="1" class="priceBox" controls-position="right"/> <el-input-number v-model="commisionForm.extension_two" :precision="2" :step="0.1" :min="0" :max="1" class="priceBox" controls-position="right" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span>备注订单交易成功后给上级返佣的比例:0.5 = 返订单金额的50%</span> <span>备注订单交易成功后给上级返佣的比例:0.5 = 返订单金额的50%</span>
@ -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="参与方式:"
> >
@ -325,7 +326,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
备注默认设置会员价是指商户在 <router-link :to="{path: roterPre + '/systemForm/Basics/svip'}" class="member-link"> [设置-付费会员设置] </router-link> 备注默认设置会员价是指商户在 <router-link :to="{path: roterPre + '/systemForm/Basics/svip'}" class="member-link"> [设置-付费会员设置] </router-link>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -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="平台商品分类:">
@ -406,10 +408,10 @@
<el-tab-pane label="佣金设置" name="commission"> <el-tab-pane label="佣金设置" name="commission">
<el-form size="small" label-width="120px" :inline="false"> <el-form size="small" label-width="120px" :inline="false">
<el-form-item label="一级佣金比例:"> <el-form-item label="一级佣金比例:">
<el-input-number v-model="batchData.extension_one" :precision="2" :step="0.1" :min="0" :max="1" class="width100" controls-position="right"/> <el-input-number v-model="batchData.extension_one" :precision="2" :step="0.1" :min="0" :max="1" class="width100" controls-position="right" />
</el-form-item> </el-form-item>
<el-form-item label="二级佣金比例:"> <el-form-item label="二级佣金比例:">
<el-input-number v-model="batchData.extension_two" :precision="2" :step="0.1" :min="0" :max="1" class="width100" controls-position="right"/> <el-input-number v-model="batchData.extension_two" :precision="2" :step="0.1" :min="0" :max="1" class="width100" controls-position="right" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<span style="color:#909399">备注订单交易成功后给上级返佣的比例:0.5 = 返订单金额的50%</span> <span style="color:#909399">备注订单交易成功后给上级返佣的比例:0.5 = 返订单金额的50%</span>
@ -427,7 +429,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
备注默认设置会员价是指商户在 <router-link :to="{path: roterPre + '/systemForm/Basics/svip'}" class="member-link"> [设置-付费会员设置] </router-link> 备注默认设置会员价是指商户在 <router-link :to="{path: roterPre + '/systemForm/Basics/svip'}" class="member-link"> [设置-付费会员设置] </router-link>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
@ -435,12 +437,12 @@
<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"
:key="items.form_id" :key="items.form_id"
@ -450,7 +452,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="formData.length>0"> <el-form-item v-if="formData.length>0">
<el-table <el-table
border border
class="specsList" class="specsList"
@ -460,12 +462,12 @@
<el-table-column prop="label" label="表单标题" min-width="100" /> <el-table-column prop="label" label="表单标题" min-width="100" />
<el-table-column prop="type" label="表单类型" min-width="100"> <el-table-column prop="type" label="表单类型" min-width="100">
<template slot-scope="{row}"> <template slot-scope="{row}">
<span>{{row.type | formTypeFilter}}</span> <span>{{ row.type | formTypeFilter }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="100" label="是否必填"> <el-table-column min-width="100" label="是否必填">
<template slot-scope="{row}"> <template slot-scope="{row}">
<span>{{row.val ? '必填' : '不必填'}}</span> <span>{{ row.val ? '必填' : '不必填' }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -482,7 +484,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input-number v-model="batchData.price_number" :precision="2" :step="0.1" :min="0" class="width100" controls-position="right"/> <el-input-number v-model="batchData.price_number" :precision="2" :step="0.1" :min="0" class="width100" controls-position="right" />
<span style="color:#909399">({{ (batchData.price_type=='add' || batchData.price_type=='sub') ? '元' : '%' }})</span> <span style="color:#909399">({{ (batchData.price_type=='add' || batchData.price_type=='sub') ? '元' : '%' }})</span>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -498,14 +500,14 @@
</span> </span>
</el-dialog> </el-dialog>
<!--商品详情--> <!--商品详情-->
<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: '',
@ -596,14 +598,14 @@ export default {
{ label: '卡密商品', value: 2 } { label: '卡密商品', value: 2 }
], ],
tempRule: { tempRule: {
temp_id: [{required: true,message: '请选择运费模板',trigger: 'change'}] temp_id: [{ required: true, message: '请选择运费模板', trigger: 'change' }]
}, },
commisionRule: { commisionRule: {
extension_one: [{required: true,message: '请输入一级佣金',trigger: 'change'}], extension_one: [{ required: true, message: '请输入一级佣金', trigger: 'change' }],
extension_two: [{required: true,message: '请输入二级佣金',trigger: 'change'}] extension_two: [{ required: true, message: '请输入二级佣金', trigger: 'change' }]
}, },
commisionForm: {extension_one:0,extension_two:0}, commisionForm: { extension_one: 0, extension_two: 0 },
svipForm: {svip_price_type: 0}, svipForm: { svip_price_type: 0 },
goodsId: '', goodsId: '',
previewKey: '', previewKey: '',
product_id: '', product_id: '',
@ -623,7 +625,7 @@ export default {
batchModal: false, batchModal: false,
tabPosition: 'left', tabPosition: 'left',
formList: [], formList: [],
formData: [], // formData: [], //
batchName: 'cate', batchName: 'cate',
batchData: { batchData: {
delivery_way: [], delivery_way: [],
@ -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() {
@ -651,8 +653,8 @@ export default {
this.productCon() this.productCon()
}, },
methods: { methods: {
/**重置 */ /** 重置 */
searchReset(){ searchReset() {
this.$refs.searchForm.resetFields() this.$refs.searchForm.resetFields()
this.getList(1) this.getList(1)
}, },
@ -677,7 +679,7 @@ export default {
closeEdit() { closeEdit() {
this.tabClickIndex = null this.tabClickIndex = null
}, },
// //
onHandle(name) { onHandle(name) {
this.chkName = this.chkName === name ? '' : name this.chkName = this.chkName === name ? '' : name
this.changeType(!(this.chkName === '')) this.changeType(!(this.chkName === ''))
@ -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) {
@ -746,33 +748,33 @@ export default {
} }
}, },
// //
changePrice(){ changePrice() {
if(this.batchData.price_type == 'div'){ if (this.batchData.price_type == 'div') {
this.batchData.price_number = 1 this.batchData.price_number = 1
}else{ } else {
this.batchData.price_number = 0 this.batchData.price_number = 0
} }
}, },
// -- // --
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) {
return this.$message.warning('请选择商品分类!') return this.$message.warning('请选择商品分类!')
} }
break break
case 'delivery_method': case 'delivery_method':
if(!this.batchData.delivery_way.length){ if (!this.batchData.delivery_way.length) {
return this.$message.warning('请选择配送方式!') return this.$message.warning('请选择配送方式!')
} }
break break
case 'postage': case 'postage':
if(this.batchData.delivery_free != 0 && this.batchData.delivery_free != 1){ if (this.batchData.delivery_free != 0 && this.batchData.delivery_free != 1) {
return this.$message.warning('请选择运费设置!') return this.$message.warning('请选择运费设置!')
} }
if(this.batchData.delivery_free == 0 && !this.batchData.temp_id){ if (this.batchData.delivery_free == 0 && !this.batchData.temp_id) {
return this.$message.warning('请选择运费模板!') return this.$message.warning('请选择运费模板!')
} }
break break
@ -781,17 +783,17 @@ export default {
this.batchData.extension_two = this.batchData.extension_two || 0 this.batchData.extension_two = this.batchData.extension_two || 0
break break
case 'price': case 'price':
if(this.batchData.price_type == 'div' && this.batchData.price_number == 0){ if (this.batchData.price_type == 'div' && this.batchData.price_number == 0) {
return this.$message.warning('除数不能为0') return this.$message.warning('除数不能为0')
} }
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'
parmas.where = this.tableFrom parmas.where = this.tableFrom
}else{ } else {
parmas.batch_select_type = 'select' parmas.batch_select_type = 'select'
parmas.ids = this.checkedIds parmas.ids = this.checkedIds
} }
@ -799,9 +801,9 @@ export default {
this.batchModal = false this.batchModal = false
this.$message.success(res.message) this.$message.success(res.message)
}) })
.catch((res) => { .catch((res) => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
@ -841,9 +843,9 @@ export default {
}) })
}, },
// //
getFormList(){ getFormList() {
associatedFormList() associatedFormList()
.then(res => { .then(res => {
this.formList = res.data this.formList = res.data
}) })
.catch(res => { .catch(res => {
@ -851,15 +853,15 @@ export default {
}) })
}, },
// //
getFormInfo(){ getFormInfo() {
if(this.batchData.mer_form_id){ if (this.batchData.mer_form_id) {
associatedFormInfo(this.batchData.mer_form_id).then((res) => { associatedFormInfo(this.batchData.mer_form_id).then((res) => {
this.formData = res.data this.formData = res.data
}) })
.catch((res) => { .catch((res) => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}else{ } else {
this.formData = [] this.formData = []
} }
}, },
@ -879,32 +881,32 @@ 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() {
getProductLabelApi().then(res => { getProductLabelApi().then(res => {
this.labelList = res.data this.labelList = res.data
}) })
.catch(res => { .catch(res => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}, },
// //
getTempLst() { getTempLst() {
shippingListApi().then(res => { shippingListApi().then(res => {
this.tempList = res.data this.tempList = res.data
}) })
.catch(res => { .catch(res => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}, },
// //
onAuditFree(row) { onAuditFree(row) {
@ -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 => {
@ -945,45 +947,45 @@ export default {
}, },
// //
batchShelf() { batchShelf() {
if(this.checkedIds.length === 0 && !this.allCheck) return this.$message.warning('请先选择商品') if (this.checkedIds.length === 0 && !this.allCheck) return this.$message.warning('请先选择商品')
let ids = [] let ids = []
if(this.allCheck){ if (this.allCheck) {
this.tableData.data.map((item) => { this.tableData.data.map((item) => {
ids.push(item.product_id) ids.push(item.product_id)
}) })
}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()
this.getList('') this.getList('')
}) })
.catch(res => { .catch(res => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}, },
// //
batchOff() { batchOff() {
if(this.checkedIds.length === 0 && !this.allCheck) return this.$message.warning('请先选择商品') if (this.checkedIds.length === 0 && !this.allCheck) return this.$message.warning('请先选择商品')
let ids = [] let ids = []
if(this.allCheck){ if (this.allCheck) {
this.tableData.data.map((item) => { this.tableData.data.map((item) => {
ids.push(item.product_id) ids.push(item.product_id)
}) })
}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()
this.getList('') this.getList('')
}) })
.catch(res => { .catch(res => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}, },
// //
batchLabel() { batchLabel() {
@ -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() {
@ -1064,7 +1066,7 @@ export default {
}) })
}, },
// //
getProduct(){ getProduct() {
this.getList() this.getList()
this.changeType() this.changeType()
}, },
@ -1139,17 +1141,17 @@ export default {
submitForm(name) { submitForm(name) {
this.$refs[name].validate(valid => { this.$refs[name].validate(valid => {
if (valid) { if (valid) {
this.isBatch ? batchesLabelsApi(this.labelForm).then(({ message }) => { this.isBatch ? batchesLabelsApi(this.labelForm).then(({ message }) => {
this.$message.success(message) this.$message.success(message)
this.getList('') this.getList('')
this.dialogLabel = false this.dialogLabel = false
this.isBatch = false this.isBatch = false
}) :
updatetProductLabel(this.product_id, this.labelForm).then(({ message }) => {
this.$message.success(message)
this.getList('')
this.dialogLabel = false
}) })
: updatetProductLabel(this.product_id, this.labelForm).then(({ message }) => {
this.$message.success(message)
this.getList('')
this.dialogLabel = false
})
} else { } else {
return return
} }

View File

@ -7,15 +7,15 @@
<div v-if="infoType == '1'" class="user-msg"> <div v-if="infoType == '1'" class="user-msg">
<div class="basic-information"> <div class="basic-information">
<span class="basic-label">商户名称</span> <span class="basic-label">商户名称</span>
{{ merData.mer_name }} {{ merData.mer_name }}
</div> </div>
<div class="basic-information"> <div class="basic-information">
<span class="basic-label">商户负责人手机号</span> <span class="basic-label">商户负责人手机号</span>
{{ merData.mer_phone }} {{ merData.mer_phone }}
</div> </div>
<div v-if="merData.merchantCategory.category_name" class="basic-information"> <div v-if="merData.merchantCategory.category_name" class="basic-information">
<span class="basic-label">商户分类</span> <span class="basic-label">商户分类</span>
{{ merData.merchantCategory.category_name || "" }} {{ merData.merchantCategory.category_name || "" }}
</div> </div>
<div v-if="merData.merchantType" class="basic-information"> <div v-if="merData.merchantType" class="basic-information">
<span class="basic-label"> 商户类型</span> <span class="basic-label"> 商户类型</span>
@ -27,7 +27,7 @@
</div> </div>
<div class="basic-information"> <div class="basic-information">
<span class="basic-label"> 商户负责人姓名</span> <span class="basic-label"> 商户负责人姓名</span>
{{ merData.real_name }} {{ merData.real_name }}
</div> </div>
<div class="basic-information"> <div class="basic-information">
<span class="basic-label"> 商户入驻时间</span> <span class="basic-label"> 商户入驻时间</span>
@ -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>
@ -56,7 +56,7 @@
<!--未支付--> <!--未支付-->
<div v-if="merData.is_margin == 1"> <div v-if="merData.is_margin == 1">
<span class="basic-label">店铺保证金</span> <span class="basic-label">店铺保证金</span>
<span class="font_red">{{merData.margin}}</span> <span class="font_red">{{ merData.margin }}</span>
<div class="margin_count" @mouseenter="getCode()"> <div class="margin_count" @mouseenter="getCode()">
<el-button type="text" size="small" class="mr10 pay_btn">去支付保证金</el-button> <el-button type="text" size="small" class="mr10 pay_btn">去支付保证金</el-button>
<!--支付二维码--> <!--支付二维码-->
@ -64,25 +64,25 @@
<div class="pay_title">支付保证金</div> <div class="pay_title">支付保证金</div>
<div> <div>
<vue-qr class="bicode" :text="qrCode" :size="310" /> <vue-qr class="bicode" :text="qrCode" :size="310" />
<div class="pay_type" >请使用微信扫码支付</div> <div class="pay_type">请使用微信扫码支付</div>
<div class="pay_price" >{{marginPrice}}</div> <div class="pay_price">{{ marginPrice }}</div>
<div class="pay_time">支付码过期时间 {{qrEndTime}}</div> <div class="pay_time">支付码过期时间 {{ qrEndTime }}</div>
</div> </div>
</div> </div>
</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">
<span class="mr10 spanBtn" @click="viewRecords">查看保证金记录</span> <span class="mr10 spanBtn" @click="viewRecords">查看保证金记录</span>
<!--保证金弹窗--> <!--保证金弹窗-->
<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>
</div> </div>
</div> </div>
@ -90,42 +90,42 @@
</div> </div>
<div v-if="merData.marginStatus" style="display: inline-block;"> <div v-if="merData.marginStatus" style="display: inline-block;">
<div class="margin_count" @mouseenter="getCode()"> <div class="margin_count" @mouseenter="getCode()">
<el-button type="text" size="small" class="mr10 pay_btn">去补缴保证金</el-button> <el-button type="text" size="small" class="mr10 pay_btn">去补缴保证金</el-button>
<!--支付二维码--> <!--支付二维码-->
<div class="erweima"> <div class="erweima">
<div class="pay_title">支付保证金</div> <div class="pay_title">支付保证金</div>
<div> <div>
<vue-qr class="bicode" :text="qrCode" :size="310" /> <vue-qr class="bicode" :text="qrCode" :size="310" />
<div class="pay_type" >请使用微信扫码支付</div> <div class="pay_type">请使用微信扫码支付</div>
<div class="pay_price" >{{marginPrice}}</div> <div class="pay_price">{{ marginPrice }}</div>
<div class="pay_time">支付码过期时间 {{qrEndTime}}</div> <div class="pay_time">支付码过期时间 {{ qrEndTime }}</div>
</div>
</div> </div>
</div> </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">
<span class="mr10 spanBtn" @click="viewRecords">查看保证金记录</span> <span class="mr10 spanBtn" @click="viewRecords">查看保证金记录</span>
<!--保证金弹窗--> <!--保证金弹窗-->
<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>
</div> </div>
</div> </div>
@ -136,7 +136,7 @@
</div> </div>
</div> </div>
<!--申请退回保障金银行信息弹窗--> <!--申请退回保障金银行信息弹窗-->
<el-dialog <el-dialog
v-if="modalBank" v-if="modalBank"
v-model="modalBank" v-model="modalBank"
:visible.sync="modalBank" :visible.sync="modalBank"
@ -148,14 +148,14 @@
<div class="bank-container"> <div class="bank-container">
<div class="item">说明 <span class="red">申请退回保证金则视为关闭店铺请谨慎操作</span></div> <div class="item">说明 <span class="red">申请退回保证金则视为关闭店铺请谨慎操作</span></div>
<div class="item"> <div class="item">
<div v-if="online > 0">线上支付的保证金 <span class="red">{{online}}</span>会原路返回</div> <div v-if="online > 0">线上支付的保证金 <span class="red">{{ online }}</span>会原路返回</div>
<div v-if="offline > 0"> <div v-if="offline > 0">
线下支付的保证金<span class="red">{{offline}}</span>会通过下方账号信息返回请务必确认下方您的收款信息真实有效以确保资金可顺利退回感谢配合 线下支付的保证金<span class="red">{{ offline }}</span>会通过下方账号信息返回请务必确认下方您的收款信息真实有效以确保资金可顺利退回感谢配合
</div> </div>
</div> </div>
<div class="title">账号信息</div> <div class="title">账号信息</div>
<el-form ref="bankValidate" :model="bankValidate" :rules="bankRules" label-width="100px" @submit.native.prevent> <el-form ref="bankValidate" :model="bankValidate" :rules="bankRules" label-width="100px" @submit.native.prevent>
<el-form-item label="真实姓名:" prop="name"> <el-form-item label="真实姓名:" prop="name">
<el-input v-model="bankValidate.name" type="text" placeholder="请输入真实姓名" /> <el-input v-model="bankValidate.name" type="text" placeholder="请输入真实姓名" />
</el-form-item> </el-form-item>
@ -251,7 +251,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="(merData.delivery_way.length == 1 && merData.delivery_way[0] == '1') || (merData.delivery_way.length == 2)" > <el-row v-if="(merData.delivery_way.length == 1 && merData.delivery_way[0] == '1') || (merData.delivery_way.length == 2)">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="详细地址:" prop="mer_take_address"> <el-form-item label="详细地址:" prop="mer_take_address">
<el-input v-model="merData.mer_take_address" placeholder="请输入详细地址" /> <el-input v-model="merData.mer_take_address" placeholder="请输入详细地址" />
@ -275,7 +275,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row v-if="(merData.delivery_way.length == 1 && merData.delivery_way[0] == '1') || (merData.delivery_way.length == 2)" > <el-row v-if="(merData.delivery_way.length == 1 && merData.delivery_way[0] == '1') || (merData.delivery_way.length == 2)">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="提货点营业日期:" prop="mer_take_day"> <el-form-item label="提货点营业日期:" prop="mer_take_day">
<el-select <el-select
@ -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>
@ -331,7 +331,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="客服电话:"> <el-form-item label="客服电话:">
<el-input v-model="merData.service_phone" type="number"/> <el-input v-model="merData.service_phone" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -354,7 +354,7 @@
<div v-if="infoType == '3'" class="user-msg"> <div v-if="infoType == '3'" class="user-msg">
<div class="basic-information"> <div class="basic-information">
<span class="basic-label"> 商户手续费</span> <span class="basic-label"> 商户手续费</span>
{{ Number(merData.commission_rate) > 0 ? (parseFloat(merData.commission_rate)).toFixed(2) : (parseFloat(merData.merchantCategory.commission_rate * 100)).toFixed(2)}}% {{ Number(merData.commission_rate) > 0 ? (parseFloat(merData.commission_rate)).toFixed(2) : (parseFloat(merData.merchantCategory.commission_rate * 100)).toFixed(2) }}%
</div> </div>
<div class="basic-information"> <div class="basic-information">
<span class="basic-label"> 添加商品</span> <span class="basic-label"> 添加商品</span>
@ -398,33 +398,33 @@
class="mapBox" class="mapBox"
custom-class="dialog-scustom" custom-class="dialog-scustom"
> >
<el-table :data="tableData.data" :loading="loading" size="small"> <el-table :data="tableData.data" :loading="loading" size="small">
<el-table-column label="序号" min-width="50"> <el-table-column label="序号" min-width="50">
<template scope="scope"> <template scope="scope">
<span>{{ scope.$index+(tableFrom.page - 1) * tableFrom.limit + 1 }}</span> <span>{{ scope.$index+(tableFrom.page - 1) * tableFrom.limit + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="标题" min-width="90" prop="title" /> <el-table-column label="标题" min-width="90" prop="title" />
<el-table-column prop="number" label="金额" min-width="60"> <el-table-column prop="number" label="金额" min-width="60">
<template scope="scope"> <template scope="scope">
<span v-if="scope.row.pm == 1" style="color:#13ce66">+{{scope.row.number}}</span> <span v-if="scope.row.pm == 1" style="color:#13ce66">+{{ scope.row.number }}</span>
<span v-else style="color:rgb(237, 64, 20)">-{{scope.row.number}}</span> <span v-else style="color:rgb(237, 64, 20)">-{{ scope.row.number }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="balance" label="保证金结余" min-width="100" /> <el-table-column prop="balance" label="保证金结余" min-width="100" />
<el-table-column label="备注" min-width="150" prop="mark" /> <el-table-column label="备注" min-width="150" prop="mark" />
<el-table-column prop="create_time" label="操作时间" min-width="120" /> <el-table-column prop="create_time" label="操作时间" min-width="120" />
</el-table> </el-table>
<div class="acea-row row-right page"> <div class="acea-row row-right page">
<el-pagination <el-pagination
:page-size="tableFrom.limit" :page-size="tableFrom.limit"
:current-page="tableFrom.page" :current-page="tableFrom.page"
layout="prev, pager, next, jumper" layout="prev, pager, next, jumper"
:total="tableData.total" :total="tableData.total"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="pageChange" @current-change="pageChange"
/> />
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -464,7 +464,7 @@ export default {
if (value.charAt(0) == 0) { if (value.charAt(0) == 0) {
// charAt // charAt
regPone = tel regPone = tel
}else if(value.charAt(0) == 4){ } else if (value.charAt(0) == 4) {
regPone = tels regPone = tels
} else { } else {
regPone = mobile regPone = mobile
@ -476,38 +476,38 @@ export default {
} }
} }
// const checkPhone= (rule, value, callback) =>{ // const checkPhone= (rule, value, callback) =>{
// const phoneExp = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/; // const phoneExp = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/;
// setTimeout(()=>{ // setTimeout(()=>{
// if(value !== undefined && value !==''){ // if(value !== undefined && value !==''){
// if ((!phoneExp.test(value)) && value !== '') { // if ((!phoneExp.test(value)) && value !== '') {
// callback(new Error('')); // callback(new Error(''));
// } else { // } else {
// callback(); // callback();
// } // }
// }else{ // }else{
// callback() // callback()
// } // }
// },100) // },100)
// } // }
// var checkPhone = (rule, value, callback) => { // var checkPhone = (rule, value, callback) => {
// if (value === '') { // if (value === '') {
// callback(new Error('')) // callback(new Error(''))
// } // }
// if (value.length !== 11) { // if (value.length !== 11) {
// callback(new Error('')) // callback(new Error(''))
// } // }
// if (value.length !== 11) { // if (value.length !== 11) {
// callback(new Error('')) // callback(new Error(''))
// } // }
// // ? ? // // ? ?
// var ab = /^[1][3,4,5,7,8][0-9]{9}$/ // var ab = /^[1][3,4,5,7,8][0-9]{9}$/
// if (ab.test(value) === false) { // if (ab.test(value) === false) {
// callback(new Error('')) // callback(new Error(''))
// } // }
// callback() // callback()
// } // }
const validatePhone = (rule, value, callback) => { const validatePhone = (rule, value, callback) => {
if (!value) { if (!value) {
@ -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,16 +598,16 @@ 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: [
{value: '1',title: '基本信息'}, { value: '1', title: '基本信息' },
{value: '2',title: '店铺信息'}, { value: '2', title: '店铺信息' },
{value: '3',title: '功能信息'} { value: '3', title: '功能信息' }
] ]
} }
}, },
@ -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
}, },
// //
@ -708,17 +706,17 @@ export default {
} else { } else {
that.uploadedQualifications = [] that.uploadedQualifications = []
} }
if(that.merData.is_margin == 1)(this.getCode()) if (that.merData.is_margin == 1)(this.getCode())
}) })
}, },
// 线 // 线
bankConfirm(name){ bankConfirm(name) {
this.$refs[name].validate(valid => { this.$refs[name].validate(valid => {
if (valid) { if (valid) {
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) => {
@ -732,7 +730,7 @@ export default {
}, },
// / // /
submitForm(formName) { submitForm(formName) {
if(this.infoType == 2){ if (this.infoType == 2) {
this.$refs[formName].validate(valid => { this.$refs[formName].validate(valid => {
if (valid) { if (valid) {
const dataKey = Object.keys(this.rules) const dataKey = Object.keys(this.rules)
@ -765,12 +763,12 @@ export default {
return false return false
} }
}) })
}else{ } else {
let data = { const data = {
mer_state: this.merData.mer_state, mer_state: this.merData.mer_state,
type: this.infoType type: this.infoType
} }
merchantUpdate(data) merchantUpdate(data)
.then((res) => { .then((res) => {
console.log(res) console.log(res)
this.submitLoading = false this.submitLoading = false
@ -779,52 +777,52 @@ export default {
.catch((rej) => { .catch((rej) => {
this.submitLoading = false this.submitLoading = false
this.$message.error(rej.data.message) this.$message.error(rej.data.message)
}) })
} }
}, },
// //
getCode() { getCode() {
let that = this const that = this
if(this.merData.marginStatus){ if (this.merData.marginStatus) {
marginMakeCode() marginMakeCode()
.then((res) => { .then((res) => {
that.qrCode = res.data.config that.qrCode = res.data.config
that.qrEndTime = res.data.endtime that.qrEndTime = res.data.endtime
that.marginPrice = res.data.price that.marginPrice = res.data.price
}) })
.catch(function(res) { .catch(function(res) {
that.$message.error(res.message) that.$message.error(res.message)
}) })
}else{ } else {
marginCode() marginCode()
.then((res) => { .then((res) => {
that.qrCode = res.data.config that.qrCode = res.data.config
that.qrEndTime = res.data.endtime that.qrEndTime = res.data.endtime
that.marginPrice = res.data.price that.marginPrice = res.data.price
}) })
.catch(function(res) { .catch(function(res) {
that.$message.error(res.message) that.$message.error(res.message)
}) })
} }
}, },
// //
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,33 +834,33 @@ export default {
}, },
// 退 // 退
applyReturn() { applyReturn() {
let that = this; const that = this
that.$confirm('申请退回保证金则视为关闭店铺,请谨慎操作!您是否确定继续操作?', '提示', { that.$confirm('申请退回保证金则视为关闭店铺,请谨慎操作!您是否确定继续操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
marginRefund() marginRefund()
.then((res) => { .then((res) => {
that.bankValidate = res.data.info that.bankValidate = res.data.info
that.offline = res.data.offline that.offline = res.data.offline
that.online = res.data.online that.online = res.data.online
if(Number(res.data.offline) <= 0){ if (Number(res.data.offline) <= 0) {
marginRefundApply(this.bankValidate) marginRefundApply(this.bankValidate)
.then((res) => { .then((res) => {
this.$message.success(res.message) this.$message.success(res.message)
this.getInfo() this.getInfo()
}) })
.catch((res) => { .catch((res) => {
this.$message.error(res.message) this.$message.error(res.message)
}) })
}else{ } else {
that.modalBank = true that.modalBank = true
} }
}) })
.catch(function(res) { .catch(function(res) {
that.$message.error(res.message) that.$message.error(res.message)
}) })
}) })
}, },
// //