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'
# 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,

View File

@ -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 属性规则 -- 删除
*/
@ -528,11 +534,11 @@ export function batchesTempApi(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) {
return request.post(`store/params/temp/update/${id}`,data)
return request.post(`store/params/temp/update/${id}`, data)
}
/** 参数模板 -- 详情 */
export function productSpecsInfo(id) {
@ -552,7 +558,7 @@ export function specsDetailApi(id) {
}
/** 添加商品 -- 参数筛选 */
export function specsSelectedApi(data) {
return request.get(`store/params/temp/select`,data)
return request.get(`store/params/temp/select`, data)
}
/** 添加商品 -- 参数筛选详情 */
export function productSpecsDetailApi(data) {
@ -567,7 +573,7 @@ export function productBathSvipApi(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)
}
/** 商品列表 -- 系统表单下拉 */
@ -580,11 +586,11 @@ export function associatedFormInfo(id) {
}
/** 商品列表 -- 批量设置 */
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) {
return request.get(`store/product/get_operate_list/${id}`,data)
export function operateRecordList(id, data) {
return request.get(`store/product/get_operate_list/${id}`, data)
}
/**
@ -616,4 +622,4 @@ export function unitDeleteApi(id) {
*/
export function unitOptionsApi() {
return request.get(`product/unit/option`)
}
}

View File

@ -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">
@ -482,7 +482,7 @@ export default {
}
.noBox ::v-deep .el-form-item__content{
margin-left: 0 !important;
}
}
.tempBox ::v-deep .el-input-number--mini{
width: 100px !important;
}

View File

@ -8,198 +8,200 @@
// | 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 ;
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 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);
}
/**
* 设置表名介绍等
* @param {*} title
* @param {*} long
*/
function setTitle(title,long){
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;
worksheet.mergeCells(i + 1 , 1, i + 1, long)
ti.commit();
lcomun++;
}
}
/**
* 设置表头行
* @param {*} header
*/
function setHeader(header){
if (isEmpty(header)) return ;
const headerRow = worksheet.getRow(lcomun);
for (let index = 1; index <= header.length; index++) {
headerRow.getCell(index).value = header[index - 1];
}
headerRow.height = 25;
headerRow.width = 50;
headerRow.font = {bold: true, size: 18,vertAlign: 'subscript',};
headerRow.alignment = { vertical: 'bottom', horizontal: 'center' };
headerRow.outlineLevel = 1;
headerRow.commit();
lcomun++;
}
/**
* 导出内容
* @param {*} data
*/
function setContent(data){
if (isEmpty(data)) return ;
for (let h = 0; h < data.length; h++) {
let satarLcomun = lcomun;
let lcomunNow = worksheet.getRow(lcomun);
let hasMerge = false;
let starKey = 0;
let endKey = 0;
/** 循环列 */
//需要操作第几列
let sk = 0;
for (let l = 0; l < data[h].length; l++) {
if (Array.isArray(data[h][l])) {
//数组长度
starKey = sk;
hasMerge = true;
setArrayContent(data[h][l],sk);
sk = sk + data[h][l][0].length
endKey =sk;
} else {
//不是数组
lcomunNow.getCell(getLetter(sk)).value = data[h][l];
lcomunNow.getCell(getLetter(sk)).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' };
sk++
}
}
if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey);
lcomunNow.height = 25;
lcomunNow.commit();
lcomun++
}
}
/**
* 占多行的数组
* @param {*} arr
* @param {*} sk
*/
function setArrayContent(arr, sk) {
/**
* 循环二维数组,在循环行
*/
let al = arr.length;
let sl = al - 1 ;
for (let i = 0; i < arr.length; i++ ) {
let 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.height = 25;
lcomunNow.commit()
if (i < sl) lcomun++
* 创建工作薄
* @param {*} sheets
*/
function createSheets(sheets) {
const sheet = Array.isArray(sheets) ? sheets[0] : sheets
const style = Array.isArray(sheets) ? sheets[1] : {}
worksheet = workBook.addWorksheet(sheet, style)
}
}
/**
* 合并操作
* @param {*} satarLcomun
* @param {*} endLcomun
* @param {*} starKey
* @param {*} endKey
*/
function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey){
for(let ml = 0 ; ml < long ; ml++ ){
if (ml < starKey || ml >= endKey) {
worksheet.mergeCells(getLetter(ml) + satarLcomun +':'+getLetter(ml) + endLcomun)
}
}
}
/**
* 设置表末尾统计备注等
* @param {*} footData
/**
* 设置表名介绍等
* @param {*} title
* @param {*} long
*/
function setFoot(footData){
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' };
worksheet.mergeCells('A' + lcomun +':'+getLetter(long-1) + lcomun)
function setTitle(title, long) {
if (isEmpty(title)) return
title = Array.isArray(title) ? title : title.split(',')
for (let i = 0; i < title.length; i++) {
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++
}
} else {
let lcomunNow = worksheet.getRow(lcomun);
lcomunNow.getCell(1).value = footData[f];
lcomunNow.getCell(1).border = {top: {style:'thin'},left: {style:'thin'},bottom: {style:'thin'},right: {style:'thin'}};
lcomunNow.alignment = { vertical: 'middle', horizontal: 'left' };
worksheet.mergeCells('A' + lcomun +':'+getLetter(long-1) + lcomun)
}
}
/**
* 设置表头行
* @param {*} header
*/
function setHeader(header) {
if (isEmpty(header)) return
const headerRow = worksheet.getRow(lcomun)
for (let index = 1; index <= header.length; index++) {
headerRow.getCell(index).value = header[index - 1]
}
headerRow.height = 25
headerRow.width = 50
headerRow.font = { bold: true, size: 18, vertAlign: 'subscript' }
headerRow.alignment = { vertical: 'bottom', horizontal: 'center' }
headerRow.outlineLevel = 1
headerRow.commit()
lcomun++
}
/**
/**
* 导出内容
* @param {*} data
*/
function setContent(data) {
if (isEmpty(data)) return
for (let h = 0; h < data.length; h++) {
const satarLcomun = lcomun
const lcomunNow = worksheet.getRow(lcomun)
let hasMerge = false
let starKey = 0
let endKey = 0
/** 循环列 */
// 需要操作第几列
let sk = 0
for (let l = 0; l < data[h].length; l++) {
if (Array.isArray(data[h][l])) {
// 数组长度
starKey = sk
hasMerge = true
setArrayContent(data[h][l], sk)
// console.log(data[h][l][0].length)
if (data[h][l][0]) {
sk = sk + data[h][l][0].length
}
endKey = sk
} else {
// 不是数组
lcomunNow.getCell(getLetter(sk)).value = data[h][l]
lcomunNow.getCell(getLetter(sk)).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } }
lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' }
sk++
}
}
if (hasMerge) setMergeLcomun(satarLcomun, lcomun, starKey, endKey)
lcomunNow.height = 25
lcomunNow.commit()
lcomun++
}
}
/**
* 占多行的数组
* @param {*} arr
* @param {*} sk
*/
function setArrayContent(arr, sk) {
/**
* 循环二维数组,在循环行
*/
const al = arr.length
const sl = al - 1
for (let i = 0; i < arr.length; i++) {
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.height = 25
lcomunNow.commit()
if (i < sl) lcomun++
}
}
/**
* 合并操作
* @param {*} satarLcomun
* @param {*} endLcomun
* @param {*} starKey
* @param {*} endKey
*/
function setMergeLcomun(satarLcomun, endLcomun, starKey, endKey) {
for (let ml = 0; ml < long; ml++) {
if (ml < starKey || ml >= endKey) {
worksheet.mergeCells(getLetter(ml) + satarLcomun + ':' + getLetter(ml) + endLcomun)
}
}
}
/**
* 设置表末尾统计备注等
* @param {*} footData
*/
function setFoot(footData) {
if (isEmpty(footData)) return
if (Array.isArray(footData)) {
for (let f = 0; f < footData.length; f++) {
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 {
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)
}
}
/**
* 处理超过26个字母的列
* @param {*} number
* @returns
* @param {*} number
* @returns
*/
function getLetter(number){
if (number < 26) {
return letter[number];
} else {
let n = number % 26
let l = Math.floor(number % 26)
return letter[l]+letter[n]
function getLetter(number) {
if (number < 26) {
return letter[number]
} else {
const n = number % 26
const l = Math.floor(number % 26)
return letter[l] + letter[n]
}
}
}
/**
/**
* 导出下载
* @param {*} filename
* @param {*} filename
*/
function saveAndDowloade(filename){
if (!filename) filename = new Date().getTime();
workBook.xlsx.writeBuffer().then(data => {
const blob = new Blob([data], {type: 'application/octet-stream'})
FileSaver.saveAs(blob, filename + '.xlsx')
})
}
createSheets(sheets);
setTitle(title,long);
setHeader(header);
setContent(data);
setFoot(foot);
saveAndDowloade(filename);
function saveAndDowloade(filename) {
if (!filename) filename = new Date().getTime()
workBook.xlsx.writeBuffer().then(data => {
const blob = new Blob([data], { type: 'application/octet-stream' })
FileSaver.saveAs(blob, filename + '.xlsx')
})
}
createSheets(sheets)
setTitle(title, long)
setHeader(header)
setContent(data)
setFoot(foot)
saveAndDowloade(filename)
}

View File

@ -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>
@ -89,13 +89,13 @@
</el-form-item>
<el-form-item label="用户信息:" prop="username">
<el-input v-model="tableFrom.username" placeholder="请输入用户昵称/手机号" class="selWidth" clearable @keyup.enter.native="getList(1),getCardList()" />
</el-form-item>
</el-form-item>
<el-form-item label="快递单号:" prop="delivery_id">
<el-input v-model="tableFrom.delivery_id" placeholder="请输入快递单号" class="selWidth" clearable @keyup.enter.native="getList(1),getCardList()" />
</el-form-item>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList(1),getCardList()">搜索</el-button>
<el-button size="small" @click="searchReset()">重置</el-button>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
@ -168,7 +168,7 @@
<span v-show="scope.row.is_del > 0" style="color: #ED4014;display: block;">用户已删除</span>
</template>
</el-table-column>
<el-table-column prop="real_name" label="收货人/订购人" min-width="130" />
<el-table-column label="商品信息" min-width="330">
<template slot-scope="scope">
@ -223,7 +223,7 @@
<el-button v-if="scope.row.paid === 0 && scope.row.is_del===0 && scope.row.activity_type != 2" type="text" size="small" @click="edit(scope.row.order_id)">编辑</el-button>
<el-button v-if="(scope.row.order_type == 0 || scope.row.order_type == 2) && scope.row.status === 0 && scope.row.paid === 1" type="text" size="small" @click="send(scope.row,scope.row.order_id)">发送货</el-button>
<el-button v-if="scope.row.is_del !== 0" type="text" size="small" @click.native="handleDelete(scope.row, scope.$index)">删除</el-button>
<el-button v-if="scope.row.order_type == 1 && scope.row.status === 0 && scope.row.paid === 1" type="text" size="small" @click.native="orderCancellation(scope.row.verify_code)">去核销</el-button>
<el-button v-if="scope.row.order_type == 1 && scope.row.status === 0 && scope.row.paid === 1" type="text" size="small" @click.native="orderCancellation(scope.row.verify_code)">去核销</el-button>
</template>
</el-table-column>
</el-table>
@ -277,7 +277,7 @@
<el-form-item label="选择类型:" prop="delivery_type">
<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 :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="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>
@ -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"
@ -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-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-form-item v-if="shipment.delivery_type == 5 && tableFrom.order_type != 2 && orderType !=1" label="配送备注:">
<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="请输入快递单号" />
@ -376,32 +376,32 @@
:row-key="(row) => { return row.product_id }"
@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">
<template slot-scope="scope">
<div class="acea-row" style="align-items: center;">
<div class="demo-image__preview">
<el-image :src="scope.row.cart_info.product.image" :preview-src-list="[scope.row.cart_info.product.image]" />
</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>
</template>
</el-table-column>
<el-table-column align="center" label="规格" min-width="80">
<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>
</el-table-column>
<el-table-column align="center" label="商品售价" min-width="80">
<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>
</el-table-column>
<el-table-column align="center" label="总数" min-width="80">
<template slot-scope="scope">
<span class="priceBox">{{scope.row.stock_num}}</span>
<span class="priceBox">{{ scope.row.stock_num }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="待发数量" align="center" min-width="120">
<template slot-scope="scope">
<el-input
@ -412,17 +412,17 @@
size="small"
class="priceBox"
@blur="limitCount(scope.row)"
/>
/>
</template>
</el-table-column>
</el-table>
</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-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 printJS from 'print-js';
import timeOptions from '@/utils/timeOptions'
//
import printJS from 'print-js'
export default {
components: {
orderDetail,
@ -533,7 +533,7 @@ export default {
type: this.$route.query.order_type || '1',
username: '',
filter_delivery: '',
filter_product : '',
filter_product: '',
pay_type: '',
order_id: this.$route.query.id ? this.$route.query.id : '',
activity_type: ''
@ -551,12 +551,12 @@ export default {
{ value: 4, label: '核销订单' },
{ value: 3, label: '虚拟发货' },
{ value: 6, label: '自动发货' }
], //
], //
productTypeList: [
{ value: 1, label: '实物商品' },
{ value: 2, label: '虚拟商品' },
{ value: 3, label: '卡密商品' }
], //
], //
orderChartType: {},
timeVal: [],
fromList: {
@ -621,15 +621,15 @@ export default {
},
deliveryList: [],
eleTempsLst: [],
productList: [], //
productList: [], //
productNum: 0,
storeList: [], //
storeList: [], //
multipleSelection: [],
shipment: {
delivery_type: 1,
station_id: '',
is_split:"0",
split:[]
is_split: '0',
split: []
},
original: {
delivery_name: '',
@ -701,10 +701,10 @@ export default {
this.getStoreList()
},
methods: {
/**重置 */
searchReset(){
/** 重置 */
searchReset() {
this.timeVal = []
this.tableFrom.date = ""
this.tableFrom.date = ''
this.$refs.searchForm.resetFields()
this.getList(1)
},
@ -713,17 +713,17 @@ 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) {
this.multipleSelection = val
const data = []
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
},
@ -761,18 +761,18 @@ 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 != ''){
if (data.mer_from_com != '') {
this.getTempsLst(data.mer_from_com)
}
})
.catch((res) => {
this.$message.error(res.message)
})
.catch((res) => {
this.$message.error(res.message)
})
},
//
//
getStoreList() {
getDeliveryStoreLst().then((res) => {
this.storeList = res.data
@ -781,11 +781,11 @@ export default {
})
},
changeSend(e) {
this.$refs['shipment'].clearValidate();
if(e == 3){
//
this.shipment.is_split = '0';
delete this.shipment.split;
this.$refs['shipment'].clearValidate()
if (e == 3) {
//
this.shipment.is_split = '0'
delete this.shipment.split
}
},
getPicture(name) {
@ -802,18 +802,18 @@ export default {
},
//
batchSend() {
if (!this.allCheck&&this.checkedIds.length == 0) {
if (!this.allCheck && this.checkedIds.length == 0) {
return this.$message.warning('请先选择订单')
} else {
this.isBatch = true
this.sendVisible = true
this.shipment.delivery_type = 2
this.shipment.select_type = this.allCheck ? 'all' : 'select'
if(this.allCheck){
if (this.allCheck) {
this.shipment.where = this.tableFrom
}else{
} else {
this.shipment.order_id = this.checkedIds
}
}
}
},
handleClose() {
@ -913,15 +913,15 @@ export default {
})
},
// 退
onOrderRefund(id){
this.$refs.orderRefund.getOrderDetails(id)
onOrderRefund(id) {
this.$refs.orderRefund.getOrderDetails(id)
},
// 退
refundSuccess(){
refundSuccess() {
setTimeout(() => {
this.drawer = false;
this.getList();
},500)
this.drawer = false
this.getList()
}, 500)
},
//
addTdClass(val) {
@ -938,27 +938,27 @@ 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()
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)
pageCount = Math.ceil(lebData.count / excelData.limit)
if (lebData.export.length) {
data = data.concat(lebData.export)
excelData.page++
}
}
}
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
createWorkBook(lebData.header, lebData.title, data, lebData.foot, lebData.filename)
return
},
/**订单 */
/** 订单 */
downOrderData(excelData) {
return new Promise((resolve, reject) => {
exportOrderApi(excelData).then((res) => {
@ -966,7 +966,7 @@ export default {
})
})
},
/**发货单 */
/** 发货单 */
downInvoiceData(excelData) {
return new Promise((resolve, reject) => {
exportInvoiceApi(excelData).then((res) => {
@ -993,13 +993,13 @@ export default {
//
orderCancellation(code) {
const that = this
that.$refs.orderCancellate.dialogVisible = true;
if(code) {
that.$refs.orderCancellate.productDetails(code)
that.$refs.orderCancellate.isColum = true;
}else{
that.$refs.orderCancellate.isColum = false;
that.$refs.orderCancellate.resetData()
that.$refs.orderCancellate.dialogVisible = true
if (code) {
that.$refs.orderCancellate.productDetails(code)
that.$refs.orderCancellate.isColum = true
} else {
that.$refs.orderCancellate.isColum = false
that.$refs.orderCancellate.resetData()
}
},
//
@ -1114,8 +1114,8 @@ export default {
pay_postage: res.data.pay_postage,
total_price: res.data.total_price,
integral_price: res.data.integral_price,
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)
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)
}
this.loading = false
}).catch(({ message }) => {
@ -1136,7 +1136,7 @@ export default {
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.sendVisible = true
this.isResend = false
@ -1148,9 +1148,9 @@ export default {
item.stock_num = item.product_num
})
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
if(this.tableFrom.order_type == 2)this.shipment.delivery_type = 3
if (this.tableFrom.order_type == 2) this.shipment.delivery_type = 3
},
sendReset() {
this.shipment = {
@ -1190,13 +1190,13 @@ export default {
this.shipment.delivery_name = this.shipment.to_name
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) {
return this.$message.warning('请选择拆单商品!')
}
const data = []
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.shipment.split = this.ids
@ -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)
})
@ -1234,7 +1234,7 @@ export default {
}
})
},
//
//
printImg(url) {
printJS({
// printable: 'http://api.kuaidi100.com/label/getImage/20230518/9CBFE5F980044698A54CF19EB1585125',
@ -1244,8 +1244,8 @@ export default {
style: `img{
width: 100%;
height: 476px;
}`,
});
}`
})
},
//
getList(num) {

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<template>
<div class="divBox">
<div class="selCard">
<el-form :model="tableFrom" ref="searchForm" size="small" label-width="95px" :inline="true">
<div class="selCard">
<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>
@ -89,11 +89,11 @@
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getList(1)">搜索</el-button>
<el-button size="small" @click="searchReset()">重置</el-button>
<el-button size="small" @click="searchReset()">重置</el-button>
</el-form-item>
</el-form>
</div>
<el-card class="mt14 dataBox">
<el-card class="mt14 dataBox">
<el-tabs v-model="tableFrom.type" @tab-click="getProduct">
<el-tab-pane v-for="(item,index) in headeNum" :key="index" :name="item.type.toString()" :label="item.name +'('+item.count +')' " />
</el-tabs>
@ -101,33 +101,34 @@
<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>
</div>
<el-alert v-if="checkedIds.length>0 || allCheck" :title="allCheck ? `已选择 ${tableData.total}` : `已选择 ${checkedIds.length}`" type="info" show-icon class="mb10" />
<el-table
v-loading="listLoading"
:data="tableData.data"
size="small"
:row-class-name="tableRowClassName"
<el-table
v-loading="listLoading"
:data="tableData.data"
size="small"
:row-class-name="tableRowClassName"
:row-key="(row) => { return row.product_id }"
@selection-change="handleSelectionChange"
@rowclick.stop="closeEdit">
<el-table-column width="50">
@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">
<div>
<div>
<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>
</div>
<el-checkbox slot="reference" :value="(chkName === 'dan' && checkedPage.indexOf(tableFrom.page) > -1) || chkName === 'duo'" @change="changeType" />
</div>
<el-checkbox slot="reference" :value="(chkName === 'dan' && checkedPage.indexOf(tableFrom.page) > -1) || chkName === 'duo'" @change="changeType" />
</el-popover>
</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)" />
</template>
</template>
</el-table-column>
<el-table-column type="expand">
<template slot-scope="props">
@ -195,14 +196,14 @@
</el-table-column>
<el-table-column label="操作" min-width="150" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" class="mr10" @click="onDetails(scope.row.product_id)">详情</el-button>
<el-button type="text" size="small" class="mr10" @click="onDetails(scope.row.product_id)">详情</el-button>
<router-link v-if="tableFrom.type != 5" :to="{path: roterPre + '/product/list/addProduct/' + scope.row.product_id}">
<el-button type="text" size="small" class="mr10">编辑</el-button>
</router-link>
<el-button v-if="tableFrom.type !== '5'" type="text" size="small" class="mr10" @click="handlePreview(scope.row.product_id)">预览</el-button>
<el-dropdown>
<span class="el-dropdown-link">
更多<i class="el-icon-arrow-down el-icon--right" />
更多<i class="el-icon-arrow-down el-icon--right" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="tableFrom.type !== '5' && is_audit == '1'" @click.native="onAuditFree(scope.row)">免审编辑</el-dropdown-item>
@ -218,7 +219,7 @@
</router-link>
</el-dropdown-item>
<el-dropdown-item v-if="tableFrom.type !== '1' && tableFrom.type!== '3' && tableFrom.type !=='4'" @click.native="handleDelete(scope.row.product_id, scope.$index)">{{ tableFrom.type === '5' ? '删除' : '加入回收站' }}</el-dropdown-item>
<el-dropdown-item v-if="tableFrom.type === '5'" @click.native="handleRestore(scope.row.product_id)">恢复商品</el-dropdown-item>
<el-dropdown-item v-if="tableFrom.type === '5'" @click.native="handleRestore(scope.row.product_id)">恢复商品</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
@ -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
@ -261,7 +262,7 @@
</span>
</el-dialog>
<!-- 免审核弹窗-->
<edit-attr ref="editAttr"/>
<edit-attr ref="editAttr" />
<!--运费模板弹窗-->
<el-dialog
v-if="dialogFreight"
@ -295,10 +296,10 @@
>
<el-form ref="commisionForm" :model="commisionForm" :rules="commisionRule" @submit.native.prevent>
<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 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>
<span>备注订单交易成功后给上级返佣的比例:0.5 = 返订单金额的50%</span>
@ -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="参与方式:"
>
@ -325,7 +326,7 @@
</el-radio-group>
</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>
<span slot="footer" class="dialog-footer">
@ -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="平台商品分类:">
@ -388,7 +390,7 @@
<el-radio-group v-model="batchData.delivery_free">
<el-radio :label="1">包邮</el-radio>
<el-radio :label="0" class="radio">运费模板</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="batchData.delivery_free == 0">
@ -406,10 +408,10 @@
<el-tab-pane label="佣金设置" name="commission">
<el-form size="small" label-width="120px" :inline="false">
<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 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>
<span style="color:#909399">备注订单交易成功后给上级返佣的比例:0.5 = 返订单金额的50%</span>
@ -427,7 +429,7 @@
</el-radio-group>
</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>
</el-tab-pane>
@ -435,12 +437,12 @@
<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"
:key="items.form_id"
@ -450,7 +452,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item v-if="formData.length>0">
<el-form-item v-if="formData.length>0">
<el-table
border
class="specsList"
@ -460,12 +462,12 @@
<el-table-column prop="label" label="表单标题" min-width="100" />
<el-table-column prop="type" label="表单类型" min-width="100">
<template slot-scope="{row}">
<span>{{row.type | formTypeFilter}}</span>
<span>{{ row.type | formTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column min-width="100" label="是否必填">
<template slot-scope="{row}">
<span>{{row.val ? '必填' : '不必填'}}</span>
<span>{{ row.val ? '必填' : '不必填' }}</span>
</template>
</el-table-column>
</el-table>
@ -482,7 +484,7 @@
</el-radio-group>
</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>
</el-form-item>
<el-form-item>
@ -498,14 +500,14 @@
</span>
</el-dialog>
<!--商品详情-->
<pro-detail
<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: '',
@ -596,14 +598,14 @@ export default {
{ label: '卡密商品', value: 2 }
],
tempRule: {
temp_id: [{required: true,message: '请选择运费模板',trigger: 'change'}]
temp_id: [{ required: true, message: '请选择运费模板', trigger: 'change' }]
},
commisionRule: {
extension_one: [{required: true,message: '请输入一级佣金',trigger: 'change'}],
extension_two: [{required: true,message: '请输入二级佣金',trigger: 'change'}]
extension_one: [{ required: true, message: '请输入一级佣金', trigger: 'change' }],
extension_two: [{ required: true, message: '请输入二级佣金', trigger: 'change' }]
},
commisionForm: {extension_one:0,extension_two:0},
svipForm: {svip_price_type: 0},
commisionForm: { extension_one: 0, extension_two: 0 },
svipForm: { svip_price_type: 0 },
goodsId: '',
previewKey: '',
product_id: '',
@ -623,7 +625,7 @@ export default {
batchModal: false,
tabPosition: 'left',
formList: [],
formData: [], //
formData: [], //
batchName: 'cate',
batchData: {
delivery_way: [],
@ -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() {
@ -651,8 +653,8 @@ export default {
this.productCon()
},
methods: {
/**重置 */
searchReset(){
/** 重置 */
searchReset() {
this.$refs.searchForm.resetFields()
this.getList(1)
},
@ -677,7 +679,7 @@ export default {
closeEdit() {
this.tabClickIndex = null
},
//
//
onHandle(name) {
this.chkName = this.chkName === name ? '' : name
this.changeType(!(this.chkName === ''))
@ -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') {
@ -697,7 +699,7 @@ export default {
} else if (index > -1) {
this.checkedPage.splice(index, 1)
}
this.syncCheckedId()
},
syncCheckedId() {
@ -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) {
@ -746,52 +748,52 @@ export default {
}
},
//
changePrice(){
if(this.batchData.price_type == 'div'){
changePrice() {
if (this.batchData.price_type == 'div') {
this.batchData.price_number = 1
}else{
} else {
this.batchData.price_number = 0
}
},
// --
submitBatchForm(){
submitBatchForm() {
console.log(this.batchName)
let name = this.batchName
const name = this.batchName
switch (name) {
case 'cate':
if(!this.batchData.cate_id){
if (!this.batchData.cate_id) {
return this.$message.warning('请选择商品分类!')
}
break
case 'delivery_method':
if(!this.batchData.delivery_way.length){
if (!this.batchData.delivery_way.length) {
return this.$message.warning('请选择配送方式!')
}
break
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('请选择运费设置!')
}
if(this.batchData.delivery_free == 0 && !this.batchData.temp_id){
if (this.batchData.delivery_free == 0 && !this.batchData.temp_id) {
return this.$message.warning('请选择运费模板!')
}
break
case 'commission':
this.batchData.extension_one = this.batchData.extension_one || 0
this.batchData.extension_two = this.batchData.extension_two || 0
this.batchData.extension_two = this.batchData.extension_two || 0
break
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')
}
break
}
let parmas = this.batchData
const parmas = this.batchData
parmas.batch_type = this.batchName
if(this.allCheck){
if (this.allCheck) {
parmas.batch_select_type = 'all'
parmas.where = this.tableFrom
}else{
} else {
parmas.batch_select_type = 'select'
parmas.ids = this.checkedIds
}
@ -799,11 +801,11 @@ export default {
this.batchModal = false
this.$message.success(res.message)
})
.catch((res) => {
this.$message.error(res.message)
})
.catch((res) => {
this.$message.error(res.message)
})
},
handleSelectionChange(val) {
this.multipleSelection = val
const data = []
@ -841,9 +843,9 @@ export default {
})
},
//
getFormList(){
getFormList() {
associatedFormList()
.then(res => {
.then(res => {
this.formList = res.data
})
.catch(res => {
@ -851,17 +853,17 @@ export default {
})
},
//
getFormInfo(){
if(this.batchData.mer_form_id){
getFormInfo() {
if (this.batchData.mer_form_id) {
associatedFormInfo(this.batchData.mer_form_id).then((res) => {
this.formData = res.data
})
.catch((res) => {
this.$message.error(res.message)
})
}else{
.catch((res) => {
this.$message.error(res.message)
})
} else {
this.formData = []
}
}
},
getSuccess() {
this.getLstFilterApi()
@ -879,32 +881,32 @@ export default {
},
//
onCopy() {
this.$router.push({
this.$router.push({
path: this.roterPre + '/product/list/addProduct',
query: { type: 1 },
});
query: { type: 1 }
})
},
//
openBatch(){
this.batchModal = true;
openBatch() {
this.batchModal = true
},
//
getLabelLst() {
getProductLabelApi().then(res => {
this.labelList = res.data
})
.catch(res => {
this.$message.error(res.message)
})
.catch(res => {
this.$message.error(res.message)
})
},
//
getTempLst() {
shippingListApi().then(res => {
this.tempList = res.data
})
.catch(res => {
this.$message.error(res.message)
})
.catch(res => {
this.$message.error(res.message)
})
},
//
onAuditFree(row) {
@ -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;
if (this.multipleSelection.length === 0) return this.$message.warning('请先选择商品')
this.dialogSvip = true
},
submitCommisionForm(name) {
this.$refs[name].validate(valid => {
@ -945,45 +947,45 @@ export default {
},
//
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 = []
if(this.allCheck){
if (this.allCheck) {
this.tableData.data.map((item) => {
ids.push(item.product_id)
})
}else{
} 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()
this.getList('')
})
.catch(res => {
this.$message.error(res.message)
})
.catch(res => {
this.$message.error(res.message)
})
},
//
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 = []
if(this.allCheck){
if (this.allCheck) {
this.tableData.data.map((item) => {
ids.push(item.product_id)
})
}else{
} 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()
this.getList('')
})
.catch(res => {
this.$message.error(res.message)
})
.catch(res => {
this.$message.error(res.message)
})
},
//
batchLabel() {
@ -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() {
@ -1064,7 +1066,7 @@ export default {
})
},
//
getProduct(){
getProduct() {
this.getList()
this.changeType()
},
@ -1139,17 +1141,17 @@ export default {
submitForm(name) {
this.$refs[name].validate(valid => {
if (valid) {
this.isBatch ? batchesLabelsApi(this.labelForm).then(({ message }) => {
this.isBatch ? batchesLabelsApi(this.labelForm).then(({ message }) => {
this.$message.success(message)
this.getList('')
this.dialogLabel = 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 {
return
}

View File

@ -7,15 +7,15 @@
<div v-if="infoType == '1'" class="user-msg">
<div class="basic-information">
<span class="basic-label">商户名称</span>
{{ merData.mer_name }}
{{ merData.mer_name }}
</div>
<div class="basic-information">
<div class="basic-information">
<span class="basic-label">商户负责人手机号</span>
{{ merData.mer_phone }}
{{ merData.mer_phone }}
</div>
<div v-if="merData.merchantCategory.category_name" class="basic-information">
<span class="basic-label">商户分类</span>
{{ merData.merchantCategory.category_name || "" }}
{{ merData.merchantCategory.category_name || "" }}
</div>
<div v-if="merData.merchantType" class="basic-information">
<span class="basic-label"> 商户类型</span>
@ -27,7 +27,7 @@
</div>
<div class="basic-information">
<span class="basic-label"> 商户负责人姓名</span>
{{ merData.real_name }}
{{ merData.real_name }}
</div>
<div class="basic-information">
<span class="basic-label"> 商户入驻时间</span>
@ -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>
@ -56,7 +56,7 @@
<!--未支付-->
<div v-if="merData.is_margin == 1">
<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()">
<el-button type="text" size="small" class="mr10 pay_btn">去支付保证金</el-button>
<!--支付二维码-->
@ -64,25 +64,25 @@
<div class="pay_title">支付保证金</div>
<div>
<vue-qr class="bicode" :text="qrCode" :size="310" />
<div class="pay_type" >请使用微信扫码支付</div>
<div class="pay_price" >{{marginPrice}}</div>
<div class="pay_time">支付码过期时间 {{qrEndTime}}</div>
<div class="pay_type">请使用微信扫码支付</div>
<div class="pay_price">{{ marginPrice }}</div>
<div class="pay_time">支付码过期时间 {{ qrEndTime }}</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="margin_price">{{merData.margin}}</span>
<span class="margin_price">{{ merData.margin }}</span>
<div class="margin_count">
<span class="mr10 spanBtn" @click="viewRecords">查看保证金记录</span>
<!--保证金弹窗-->
<div class="margin_modal" @mouseleave="supplyPay=false">
<!--保证金弹窗-->
<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>
<span class="text_g">剩余保证金{{ merData.margin }}</span>
<el-button v-if="merData.margin>0" type="primary" size="small" @click="applyReturn">申请退回保证金</el-button>
</div>
</div>
@ -90,42 +90,42 @@
</div>
<div v-if="merData.marginStatus" style="display: inline-block;">
<div class="margin_count" @mouseenter="getCode()">
<el-button type="text" size="small" class="mr10 pay_btn">去补缴保证金</el-button>
<!--支付二维码-->
<div class="erweima">
<div class="pay_title">支付保证金</div>
<div>
<vue-qr class="bicode" :text="qrCode" :size="310" />
<div class="pay_type" >请使用微信扫码支付</div>
<div class="pay_price" >{{marginPrice}}</div>
<div class="pay_time">支付码过期时间 {{qrEndTime}}</div>
<el-button type="text" size="small" class="mr10 pay_btn">去补缴保证金</el-button>
<!--支付二维码-->
<div class="erweima">
<div class="pay_title">支付保证金</div>
<div>
<vue-qr class="bicode" :text="qrCode" :size="310" />
<div class="pay_type">请使用微信扫码支付</div>
<div class="pay_price">{{ marginPrice }}</div>
<div class="pay_time">支付码过期时间 {{ qrEndTime }}</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="margin_price">{{merData.margin}}</span>
<span class="margin_price">{{ merData.margin }}</span>
<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>
<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">
<span class="text_g">剩余保证金{{merData.margin}}</span>
<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>
<div class="margin_refused">未通过原因<span>{{ merData.refundMarginOrder.refusal }}</span></div>
<el-button type="primary" size="small" @click="applyReturn">再次申请</el-button>
</div>
</div>
@ -136,7 +136,7 @@
</div>
</div>
<!--申请退回保障金银行信息弹窗-->
<el-dialog
<el-dialog
v-if="modalBank"
v-model="modalBank"
:visible.sync="modalBank"
@ -148,14 +148,14 @@
<div class="bank-container">
<div class="item">说明 <span class="red">申请退回保证金则视为关闭店铺请谨慎操作</span></div>
<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">
线下支付的保证金<span class="red">{{offline}}</span>会通过下方账号信息返回请务必确认下方您的收款信息真实有效以确保资金可顺利退回感谢配合
线下支付的保证金<span class="red">{{ offline }}</span>会通过下方账号信息返回请务必确认下方您的收款信息真实有效以确保资金可顺利退回感谢配合
</div>
</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-input v-model="bankValidate.name" type="text" placeholder="请输入真实姓名" />
</el-form-item>
@ -210,8 +210,8 @@
<div v-else class="upLoad">
<i class="el-icon-camera cameraIconfont" />
</div>
<div class="trip">建议尺寸710*134px或710*460px(请根据平台要求选择尺寸此图如未上传默认展示店铺背景图)</div>
</div>
<div class="trip">建议尺寸710*134px或710*460px(请根据平台要求选择尺寸此图如未上传默认展示店铺背景图)</div>
</div>
</el-form-item>
<el-form-item class="form-item" label="店铺资质:" :prop="merData.sys_bases_status == 1 ? 'uploadedqualifications' : ''">
<div class="upLoadPicBox_qualification">
@ -251,7 +251,7 @@
</el-form-item>
</el-col>
</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-form-item label="详细地址:" prop="mer_take_address">
<el-input v-model="merData.mer_take_address" placeholder="请输入详细地址" />
@ -275,7 +275,7 @@
</el-form-item>
</el-col>
</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-form-item label="提货点营业日期:" prop="mer_take_day">
<el-select
@ -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>
@ -331,7 +331,7 @@
</el-radio-group>
</el-form-item>
<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-col>
</el-row>
@ -354,7 +354,7 @@
<div v-if="infoType == '3'" class="user-msg">
<div class="basic-information">
<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 class="basic-information">
<span class="basic-label"> 添加商品</span>
@ -398,33 +398,33 @@
class="mapBox"
custom-class="dialog-scustom"
>
<el-table :data="tableData.data" :loading="loading" size="small">
<el-table-column label="序号" min-width="50">
<template scope="scope">
<span>{{ scope.$index+(tableFrom.page - 1) * tableFrom.limit + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="标题" min-width="90" prop="title" />
<el-table-column prop="number" label="金额" min-width="60">
<template scope="scope">
<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>
</template>
</el-table-column>
<el-table-column prop="balance" label="保证金结余" min-width="100" />
<el-table-column label="备注" min-width="150" prop="mark" />
<el-table-column prop="create_time" label="操作时间" min-width="120" />
</el-table>
<div class="acea-row row-right page">
<el-pagination
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
<el-table :data="tableData.data" :loading="loading" size="small">
<el-table-column label="序号" min-width="50">
<template scope="scope">
<span>{{ scope.$index+(tableFrom.page - 1) * tableFrom.limit + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="标题" min-width="90" prop="title" />
<el-table-column prop="number" label="金额" min-width="60">
<template scope="scope">
<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>
</template>
</el-table-column>
<el-table-column prop="balance" label="保证金结余" min-width="100" />
<el-table-column label="备注" min-width="150" prop="mark" />
<el-table-column prop="create_time" label="操作时间" min-width="120" />
</el-table>
<div class="acea-row row-right page">
<el-pagination
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</el-dialog>
</div>
</template>
@ -464,7 +464,7 @@ export default {
if (value.charAt(0) == 0) {
// charAt
regPone = tel
}else if(value.charAt(0) == 4){
} else if (value.charAt(0) == 4) {
regPone = tels
} else {
regPone = mobile
@ -476,38 +476,38 @@ export default {
}
}
// const checkPhone= (rule, value, callback) =>{
// const phoneExp = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/;
// setTimeout(()=>{
// if(value !== undefined && value !==''){
// if ((!phoneExp.test(value)) && value !== '') {
// callback(new Error(''));
// } else {
// callback();
// }
// }else{
// callback()
// }
// },100)
// }
// var checkPhone = (rule, value, callback) => {
// if (value === '') {
// callback(new Error(''))
// }
// if (value.length !== 11) {
// callback(new Error(''))
// }
// if (value.length !== 11) {
// callback(new Error(''))
// }
// // ? ?
// var ab = /^[1][3,4,5,7,8][0-9]{9}$/
// if (ab.test(value) === false) {
// callback(new Error(''))
// }
// callback()
// }
// const checkPhone= (rule, value, callback) =>{
// const phoneExp = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/;
// setTimeout(()=>{
// if(value !== undefined && value !==''){
// if ((!phoneExp.test(value)) && value !== '') {
// callback(new Error(''));
// } else {
// callback();
// }
// }else{
// callback()
// }
// },100)
// }
// var checkPhone = (rule, value, callback) => {
// if (value === '') {
// callback(new Error(''))
// }
// if (value.length !== 11) {
// callback(new Error(''))
// }
// if (value.length !== 11) {
// callback(new Error(''))
// }
// // ? ?
// var ab = /^[1][3,4,5,7,8][0-9]{9}$/
// if (ab.test(value) === false) {
// callback(new Error(''))
// }
// callback()
// }
const validatePhone = (rule, value, callback) => {
if (!value) {
@ -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,16 +598,16 @@ 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: [
{value: '1',title: '基本信息'},
{value: '2',title: '店铺信息'},
{value: '3',title: '功能信息'}
{ value: '1', title: '基本信息' },
{ value: '2', title: '店铺信息' },
{ value: '3', title: '功能信息' }
]
}
},
@ -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;
onchangeTime2(e) {
this.value2 = e
this.merData.mer_take_time[1] = e
},
//
@ -707,18 +705,18 @@ export default {
})
} else {
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 => {
if (valid) {
marginRefundApply(this.bankValidate)
.then((res) => {
this.$message.success(res.message)
this.modalBank = false;
this.modalBank = false
this.getInfo()
})
.catch((res) => {
@ -732,7 +730,7 @@ export default {
},
// /
submitForm(formName) {
if(this.infoType == 2){
if (this.infoType == 2) {
this.$refs[formName].validate(valid => {
if (valid) {
const dataKey = Object.keys(this.rules)
@ -765,12 +763,12 @@ export default {
return false
}
})
}else{
let data = {
} else {
const data = {
mer_state: this.merData.mer_state,
type: this.infoType
}
merchantUpdate(data)
merchantUpdate(data)
.then((res) => {
console.log(res)
this.submitLoading = false
@ -779,52 +777,52 @@ export default {
.catch((rej) => {
this.submitLoading = false
this.$message.error(rej.data.message)
})
}
})
}
},
//
getCode() {
let that = this
if(this.merData.marginStatus){
const that = this
if (this.merData.marginStatus) {
marginMakeCode()
.then((res) => {
that.qrCode = res.data.config
that.qrEndTime = res.data.endtime
that.marginPrice = res.data.price
})
.catch(function(res) {
that.$message.error(res.message)
})
}else{
.then((res) => {
that.qrCode = res.data.config
that.qrEndTime = res.data.endtime
that.marginPrice = res.data.price
})
.catch(function(res) {
that.$message.error(res.message)
})
} else {
marginCode()
.then((res) => {
that.qrCode = res.data.config
that.qrEndTime = res.data.endtime
that.marginPrice = res.data.price
})
.catch(function(res) {
that.$message.error(res.message)
})
.then((res) => {
that.qrCode = res.data.config
that.qrEndTime = res.data.endtime
that.marginPrice = res.data.price
})
.catch(function(res) {
that.$message.error(res.message)
})
}
},
//
viewRecords() {
this.tableFrom.page = 1;
this.modalRecord = true;
this.tableFrom.page = 1
this.modalRecord = true
this.getRecordList()
},
//
getRecordList(){
let 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;
getRecordList() {
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
}).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,33 +834,33 @@ export default {
},
// 退
applyReturn() {
let that = this;
const that = this
that.$confirm('申请退回保证金则视为关闭店铺,请谨慎操作!您是否确定继续操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
marginRefund()
.then((res) => {
that.bankValidate = res.data.info
that.offline = res.data.offline
that.online = res.data.online
if(Number(res.data.offline) <= 0){
marginRefundApply(this.bankValidate)
.then((res) => {
this.$message.success(res.message)
this.getInfo()
})
.catch((res) => {
this.$message.error(res.message)
})
}else{
that.modalBank = true
}
})
.catch(function(res) {
that.$message.error(res.message)
})
.then((res) => {
that.bankValidate = res.data.info
that.offline = res.data.offline
that.online = res.data.online
if (Number(res.data.offline) <= 0) {
marginRefundApply(this.bankValidate)
.then((res) => {
this.$message.success(res.message)
this.getInfo()
})
.catch((res) => {
this.$message.error(res.message)
})
} else {
that.modalBank = true
}
})
.catch(function(res) {
that.$message.error(res.message)
})
})
},
//
@ -1023,7 +1021,7 @@ export default {
margin-top: 10px;
color: #282828;
font-size: 13px;
line-height: 26px;
line-height: 26px;
}
.red{
color:rgb(237, 64, 20);;
@ -1133,7 +1131,7 @@ export default {
border-radius: 8px;
padding: 10px;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3);
img{
width: 160px;
height: 160px;
@ -1143,7 +1141,7 @@ export default {
font-size: 16px;
color: #303133;
font-weight: normal;
}
.pay_price{
font-size: 18px;
@ -1158,7 +1156,7 @@ export default {
.pay_time{
font-size: 12px;
color: #6D7278;
}
}