Commit 38219f37 by 前端

Merge branch 'dev_v4.8.0' into 'develop'

Dev v4.8.0

See merge request !25
2 parents 2157814c b530d884
Showing 50 changed files with 1079 additions and 218 deletions
......@@ -2,8 +2,18 @@
node_modules
/dist
/.history
<<<<<<< HEAD
<<<<<<< HEAD
/cache
/copyDirTarget
=======
/copyDirTarget
/cache
>>>>>>> dev_v4.7.1
=======
/copyDirTarget
/cache
>>>>>>> f81240335293fde6e6360bb9dc5570d1d01e7660
# Log files
npm-debug.log*
......
......@@ -15,3 +15,7 @@ dev_v4.7.0 已上线并且已合并到 develop 与 mater 上
从 develop 拉分支号 dev_v4.7.2,需求:广汇 ERP
从 dev_v4.7.1 已提测未上线版本中拉分支 dev_v4.8.0,需求:虚拟对公账户和订单补录 7 月中旬需求
dev_v4.8.0 下载二维码地址在上线需换 path,并且需要配置按钮权限,ERP 功能视情况是否与 7 月紧急版本一起上线,不然就上线时屏蔽
dev_v4.8.0 已上线,合并到 develop 以及 master 主干上
https://start-kit.d2admin.fairyever.com/
\ No newline at end of file
......@@ -25,12 +25,15 @@
"default-passive-events": "^2.0.0",
"echarts": "^5.3.2",
"element-ui": "^2.13.1",
"eslint-plugin-standard": "^5.0.0",
"file-saver": "^2.0.5",
"flex.css": "^1.1.7",
"fuse.js": "^3.4.4",
"hotkeys-js": "^3.6.2",
"html2canvas": "^1.4.1",
"js-cookie": "^2.2.0",
"js-md5": "^0.7.3",
"jspdf": "^2.5.1",
"lodash": "^4.17.11",
"lowdb": "^1.0.0",
"nprogress": "^0.2.0",
......
......@@ -4,7 +4,7 @@ const path = 'dj.api.smartcarlife.orderDivision.'
const pathSub = 'dj.api.smartcarlife.subOrderDivision.'
const path2 = 'dj.api.withdraw.'
const pathServicer = 'dj.api.smartcarlife.sevicerOrderDivision.'
const path3 = 'dj.api.smartcarlife.'
// const path3 = 'dj.api.smartcarlife.'
// 分账 - start
export function getListApi(data) {
......
import request from './request'
const path = 'dj.api.smartcarlife.'
// 出库订单查询
export function getIssueOrder(data) {
data.method = `${path}goodsOrder.getIssueOrder`
return request(data, 'post')
}
// erp订单查询
export function getErpOrderDetail(data) {
data.method = `${path}goodsOrder.getErpOrderDetail`
return request(data, 'post', '', { timeout: 3 * 1000 })
}
// 替换升级产品查询
export function getReplaceUpgrade(data) {
data.method = `${path}goodsOrder.getReplaceUpgrade`
return request(data, 'post')
}
// erp销售升级订单
export function ErpUpgradeSales(data) {
data.method = `${path}goodsOrder.ErpUpgradeSales`
return request(data, 'post')
}
......@@ -37,6 +37,7 @@ export function getServicerefApi(data) {
return request(data)
}
/** 服务商查询 */
export function getServiceListApi(data) {
data.method = `${path2}goodsOrderProfitAllocation.page.bySubOrder`
return request(data)
......
......@@ -22,3 +22,21 @@ export function getOrderCount(data) {
data.method = `${path2}ordermanage.count`
return request(data)
}
// 待补录订单统计(交易记录条数,已补录数,待补录数)
export function waitinputorderCount(data) {
data.method = `${path2}waitinputorder.count`
return request(data)
}
// 待补录订单导出
export function waitinputorderExport(data) {
data.method = `${path2}waitinputorder.export`
return request(data)
}
// 分页查询待补录订单
export function waitinputorderPage(data) {
data.method = `${path2}waitinputorder.page`
return request(data)
}
......@@ -9,7 +9,12 @@ import axios from '@/plugin/axios'
import sign from './sign'
import RequestMethods from './request.methods'
import util from '@/libs/util.js'
const request = (params = {}, method = RequestMethods.GET, noSignAttr = []) => {
const request = (
params = {},
method = RequestMethods.GET,
noSignAttr = [],
options
) => {
// params.source = 'glsx'
// params.appKey = 'd7ffc3346fc9a45bccaaa35300d59022'
params.appKey = window.location.href.includes('dj.glsx.com.cn')
......@@ -37,9 +42,11 @@ const request = (params = {}, method = RequestMethods.GET, noSignAttr = []) => {
method === RequestMethods.POST
? { baseURL: '/', data: sign(params, noSignAttr) }
: { params: sign(params, noSignAttr) }
reqData = reqData = Object.assign(reqData, options, {})
// console.log(method === RequestMethods.POST)
// console.log(url)
console.log(options)
console.log(reqData)
return axios({
url,
method,
......
......@@ -48,3 +48,9 @@ export function UPDATEYQMERCHANTCONFIG(data) {
data.method = `dj.api.smarcarlife.yqMerchantConfig.modify`
return request(data, 'post')
}
// 生成小程序码
export function createWeappQrcode(data) {
data.method = `dj.api.smartcarlife.common.createWeappQrcode.new`
return request(data, 'post')
}
......@@ -328,6 +328,26 @@ export const withdrawChannelList = [
}
]
// 出库状态
export const warehouseStatusList = [
{
confId: 1,
confLabel: '待出库'
},
{
confId: 3,
confLabel: '出库中'
},
{
confId: 4,
confLabel: '出库成功'
},
{
confId: 5,
confLabel: '出库失败'
}
]
// 获取最近n个月,默认6个月
export function getCurrentSixMonth(n = 5) {
return [new Date(new Date().setMonth(new Date().getMonth() - n)), new Date()]
......
/* eslint-disable standard/computed-property-even-spacing */
// import Vue from 'vue'
import { Message, MessageBox, Loading } from 'element-ui'
// import moment from 'moment'
......@@ -260,6 +261,61 @@ export const Util = {
document.body.append(Temp)
Temp.click()
document.body.removeChild(Temp)
},
/**
* @param {Object} json
* @param {Object} type: 默认不传 ==>全部小写;传1 ==>全部大写;传2 ==>首字母大写
* 将json的key值进行大小写转换
*/
jsonKeysToCase: function(json, type) {
if (typeof json == 'object') {
var tempJson = JSON.parse(JSON.stringify(json))
toCase(tempJson)
return tempJson
} else {
return json
}
function toCase(json) {
if (typeof json == 'object') {
if (Array.isArray(json)) {
json.forEach(function(item) {
toCase(item)
})
} else {
for (var key in json) {
var item = json[key]
if (typeof item == 'object') {
toCase(item)
}
delete json[key]
switch (type) {
case 1:
// key值全部大写
json[key.toLocaleUpperCase()] = item
break
case 2:
// key值首字母大写,其余小写
json[
key.substring(0, 1).toLocaleUpperCase() +
key.substring(1).toLocaleLowerCase()
] = item
break
default:
// 默认key值全部小写
json[key.toLocaleLowerCase()] = item
break
}
}
}
}
}
},
// 判断字段为空时显示
fieldShow: function(field, show) {
return field || show
}
}
......
......@@ -7,11 +7,12 @@
:width="dialogConfig.width"
:visible.sync="visible"
:show-close="config.showClose"
class="noborder"
:append-to-body="config.appendToBody">
<slot></slot>
<div slot="footer"
v-if="config.isShowFooter">
<el-button type="danger"
<el-button type="primary"
@click="confirmBtn">
{{config.confirm_name}}
</el-button>
......@@ -135,6 +136,7 @@ export default {
font-size: 20px;
}
}
.el-dialog__body {
box-sizing: border-box;
// padding-left: 25px;
......
......@@ -330,7 +330,7 @@ export default {
}
</script>
<style>
<style lang="scss">
.a-click {
cursor: pointer;
}
......@@ -343,28 +343,31 @@ export default {
.d2-table .head-search {
cursor: pointer;
}
.ashSpot {
@mixin spotBase {
width: 8px;
height: 8px;
border-radius: 50%;
background: #c6c8cc;
margin-right: 5px;
display: inline-block;
}
.ashSpot {
@include spotBase();
background: #c6c8cc;
}
.greenSpot {
width: 8px;
height: 8px;
border-radius: 50%;
@include spotBase();
background: #2cca74;
margin-right: 5px;
display: inline-block;
}
.yellowSpot {
width: 8px;
height: 8px;
border-radius: 50%;
@include spotBase();
background: #fdb757;
margin-right: 5px;
display: inline-block;
}
.redSpot {
@include spotBase();
background: #eb4e4e;
}
.orgenSpot {
@include spotBase();
background: #eb4e4e;
}
</style>
......@@ -179,6 +179,13 @@ service.interceptors.response.use(
break
}
}
if (error && error.stack.indexOf('timeout') > -1) {
if (error.stack.indexOf('5000ms')) {
error.message = '查询超时,请刷新页面重试!'
}
// console.log('超时')
// console.log(error)
}
store.commit('d2admin/loading/set', false)
errorLog(error)
return Promise.reject(error)
......
......@@ -513,6 +513,8 @@ export const resources = {
authId: '9040103',
parentId: '90401',
label: '待补录订单',
category: 'Button',
type: 'primary',
handle: 'handlMakeUpOrder',
addRoutePath: [
{
......@@ -782,6 +784,12 @@ export const resources = {
parentId: '90608',
label: '编辑',
handle: 'handleDetail'
},
{
authId: '9060802',
parentId: '90608',
label: '收款二维码',
handle: 'collectionQRcode'
}
],
component: _import('systemConfig/yqStoreManage')
......@@ -878,13 +886,13 @@ export const resources = {
parentId: '90610'
}
]
},
{
authId: '9061002',
parentId: '90610',
label: '关联设置',
handle: 'associationSettings'
}
// {
// authId: '9061002',
// parentId: '90610',
// label: '关联设置',
// handle: 'associationSettings'
// }
],
component: _import('systemConfig/accountNew/accountList')
},
......
......@@ -256,6 +256,10 @@ export default {
this.getOptionsList()
})
getPlatformMerchantList({}).then(res => {
res.unshift({
merchantId: -1,
merchantName: '嘀加智慧云'
})
this.baseData.PlatformMerchantList = res
this.getOptionsList()
})
......
......@@ -145,7 +145,8 @@
<span v-if="scope.row.divisionStatus"
:style="{ 'color': [4, 5].includes(+scope.row.divisionStatus) ? 'red' : '#606266' }">{{baseData.divisionStatusList.find(item => +item.confId === scope.row.divisionStatus).confLabel}}</span>
<span v-else>-</span>
</template></el-table-column>
</template>
</el-table-column>
<el-table-column label="分账时间"
prop="divisionDateStr"
align="center"
......@@ -304,6 +305,10 @@ export default {
this.getOptionsList()
})
getPlatformMerchantList({}).then(res => {
res.unshift({
merchantId: -1,
merchantName: '嘀加智慧云'
})
this.baseData.PlatformMerchantList = res
this.getOptionsList()
})
......
......@@ -39,7 +39,8 @@
import { mapActions } from 'vuex'
import { Util } from '@/common/util'
// import { divisionTypeList } from '@/common/constants.js'
import { getSeviceListApi, getSeviceCountApi, exportSeviceApi, getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account'
// getSeviceCountApi, getSeviceListApi, exportSeviceApi,
import { getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account'
export default {
name: 'serviceOfflineList',
data() {
......@@ -111,11 +112,11 @@ export default {
// {
// label: '子订单编号',
// prop: 'subOrderCode'
// },
// },
{
label: '园区店名',
prop: 'yqMerchantName',
width: '170',
width: '170'
// formatter: (cellValue) => {
// return cellValue.orderDivision ? cellValue.orderDivision.yqMerchantName : ''
// }
......@@ -142,7 +143,7 @@ export default {
formatter: (cellValue) => {
return cellValue.payOrder.successDate ? Util.dateFormate(cellValue.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
},
}
// {
// label: '商品编号',
// prop: '',
......
......@@ -83,7 +83,8 @@ import { Util } from '@/common/util'
import cashDialog from './cashDialog'
import { divisionStatusList } from '@/common/constants.js'
// import { getPartnerYqListApi } from '@api/editCustomer'
import { getSeviceListApi, getSeviceCountApi, exportSeviceApi, getBankBalanceApi, getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account'
// exportSeviceApi getSeviceListApi, getSeviceCountApi,
import { getBankBalanceApi, getPartnerYqListApi, getSeviceList, getSeviceCount, getSeviceExport } from '@/api/account'
export default {
name: 'serviceOnlineList',
data() {
......@@ -176,11 +177,11 @@ export default {
// {
// label: '子订单编号',
// prop: 'subOrderCode'
// },
// },
{
label: '园区店名',
prop: 'yqMerchantName',
width: '170',
width: '170'
// formatter: cellValue => {
// return cellValue.orderDivision ? cellValue.orderDivision.yqMerchantName : ''
// }
......@@ -218,7 +219,7 @@ export default {
formatter: (cellValue) => {
return cellValue.payOrder.successDate ? Util.dateFormate(cellValue.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss') : ''
}
},
}
// {
// label: '商品编号',
// prop: '',
......
<template>
<div class="row-center captcha_input_wrapper">
<input v-for="(item,index) in captchas"
:key="index"
v-model="item.num"
:id="'captcha'+index"
@input="inputFinash(index)"
@focus="adjust(index)"
@keydown="inputDirection(index)"
class="captcha_input_box row-center"
:style="customStyle"
type="tel"
maxlength="1" />
</div>
</template>
<script>
export default {
name: 'captchaInput',
props: {
customStyle: {
type: String,
required: false,
default: ''
},
captchasLenght: {
type: Number,
required: false,
default: 4
},
captchaList: {
type: String,
required: true
}
},
data() {
return {
// 当前输入框
activeInput: 0,
captchas: [
// { num: '' },
// { num: '' },
// { num: '' },
// { num: '' },
// { num: '' },
// { num: '' }
]
}
},
watch: {
'captchas': {
handler: function (value) {
console.log(value)
const str = value.map((item) => {
return item.num
}).join('')
this.$emit('update:captchaList', str)
},
deep: true
},
'captchasLenght': {
handler: function (value) {
for (let index = 0; index < this.captchasLenght; index++) {
// const element = array[index];
// list[index] = this.item
// this.captchas[index] = { num: '' }
this.$set(this.captchas, index, { num: '' })
}
},
immediate: true
}
},
computed: {
test() {
const list = []
for (let index = 0; index < this.captchasLenght; index++) {
// const element = array[index];
list[index] = this.item
}
return list
// return list.map((item) => {
// item = this.item
// return item
// })
}
},
methods: {
// 自动校准输入顺序
adjust(index) {
const dom = document.getElementById('captcha' + this.activeInput)
if (index !== this.activeInput && dom) {
dom.focus()
}
},
// 控制前后方向
inputDirection(index) {
const val = this.captchas[index].num
// debugger
console.log(event.keyCode)
// 回退键处理
if (event.keyCode == 8 && val == '') {
console.log(index)
// 重新校准
const dom = document.getElementById('captcha' + (index - 1))
// 解决第一位为-1 导致能选其他空的位置输入
index = index - 1
this.activeInput = index == -1 ? 0 : index
if (dom) dom.focus()
}
if (event.keyCode != 8 && val != '') {
const dom = document.getElementById('captcha' + (index + 1))
this.activeInput = index + 1
if (dom) dom.focus()
}
},
// 输入框相互联动
inputFinash(index) {
const val = this.captchas[index].num
this.activeInput = val ? index + 1 : index - 1
const dom = document.getElementById('captcha' + this.activeInput)
if (dom) dom.focus()
if (index == this.captchas.length - 1) {
const code = this.captchas.map((x) => x.num).join('')
if (code.length == 6) {
this.$emit('finish', code)
}
}
}
}
}
</script>
<style lang='scss'>
.row-center {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.captcha_input_wrapper {
width: 100%;
}
.captcha_input_box {
width: 48px;
height: 60px;
margin-right: 12px;
background: rgba(255, 255, 255, 1);
border-radius: 6px;
border: 1px solid #dddddd;
font-size: 40px;
text-align: center;
color: #1e243a;
}
</style>
......@@ -89,7 +89,7 @@ import {
import dayjs from 'dayjs'
import * as api from '@api/finance'
import { getMerchantPageSearch } from '@api/publicAccount'
import { getMerchantList } from '@api/serviceManage'
// import { getMerchantList } from '@api/serviceManage'
export default {
name: 'downloadAccountDialog',
data() {
......
......@@ -154,39 +154,39 @@
<el-table :data="tableData"
row-key="uniqueKey"
:tree-props="{ children: 'subOrderProfitAllocations' }">
<el-table-column v-if="!userInfo.beSuper"
<!-- <el-table-column v-if="!userInfo.beSuper"
type="index"
label="序号"
align="center"
width="80"
:index="index => index + (page.currentPage - 1) * page.pageSize + 1">
</el-table-column>
<el-table-column v-if="userInfo.beSuper"
label="序号"
</el-table-column> -->
<!-- v-if="userInfo.beSuper" -->
<el-table-column label="序号"
prop="indexNum"
align="center"
width="80">
</el-table-column>
<el-table-column label="商品信息"
align="center">
<el-table-column v-if="!userInfo.beSuper"
<!-- <el-table-column v-if="!userInfo.beSuper"
prop="mainOrderCode"
label="主订单编号"
align="center"
width="170">
</el-table-column>
<el-table-column v-if="!isSubOrder"
prop="orderCode"
</el-table-column> -->
<!-- v-if="!isSubOrder" -->
<el-table-column prop="orderCode"
label="主订单编号"
width="170"
align="center">
</el-table-column>
<el-table-column v-if="isSubOrder"
<!-- <el-table-column v-if="isSubOrder"
prop="orderCode"
label="子订单编号"
width="170"
align="center">
</el-table-column>
</el-table-column> -->
<el-table-column prop="customerName"
label="客户姓名"
align="center">
......@@ -268,8 +268,8 @@
}}</span>
</template> -->
</el-table-column>
<el-table-column v-if="userInfo.beSuper"
prop="userActualIncomeMoney "
<!-- v-if="userInfo.beSuper" -->
<el-table-column prop="userActualIncomeMoney "
label="实收金额"
align="center">
<template slot-scope="scope">
......@@ -294,7 +294,17 @@
</el-table-column>
<!-- </el-table-column> -->
</el-table-column>
<el-table-column label="流量方"
<el-table-column prop="outboundStatus"
label="出库状态"
width="120"
align="center">
<template slot-scope="scope">
<span :class="outboundStatusClass[scope.row.outboundStatus]"></span>
<span>{{ outboundStatusShow[scope.row.outboundStatus] }}</span>
</template>
</el-table-column>
<el-table-column label="
4S店分账"
align="center">
<el-table-column prop="shopMerchantName"
label="流量方"
......@@ -381,9 +391,9 @@
</template>
</el-table-column>
</el-table-column> -->
<!-- v-show="userInfo.beSuper" -->
<el-table-column label="服务商"
align="center"
v-show="userInfo.beSuper">
align="center">
<el-table-column prop="franchiseeProfitPer"
label="服务商比例"
width="100"
......@@ -504,8 +514,14 @@
</el-table-column>
<el-table-column align="center"
label="操作"
width="120"
fixed="right">
<template slot-scope="scope">
<el-button type="text"
size="mini"
style="margin-right: 10px;"
v-if="scope.row.hasOwnProperty('subOrderProfitAllocations') && scope.row.channelType == 2"
@click="exWarehouse(scope.row)">出库</el-button>
<auth-button :data="scope"></auth-button>
</template>
</el-table-column>
......@@ -523,6 +539,11 @@
<download-account-dialog :accountVisible="accountVisible"
v-if="accountVisible"
@accountClose="accountClose"></download-account-dialog>
<!-- 出库面板 -->
<warehouse-detail v-if="warehouseVisible"
:warehouseVisible="warehouseVisible"
:orderInfoId="orderId"
@handleDrawerClose="handleDrawerClose"></warehouse-detail>
</div>
</template>
......@@ -538,14 +559,17 @@ import { mapActions } from 'vuex'
import {
divisionTypeList,
payTypeList,
orderTypeList
orderTypeList,
warehouseStatusList
} from '@/common/constants.js'
import downloadAccountDialog from './downloadAccountDialog'
import warehouseDetail from './warehouseDetail'
import * as echarts from 'echarts'
export default {
name: 'financeList',
components: {
downloadAccountDialog
downloadAccountDialog,
warehouseDetail
},
data() {
......@@ -562,7 +586,8 @@ export default {
merchantId: '',
orderCode: '',
divisionType: '',
platformMerchantId: ''
platformMerchantId: '',
outboundStatus: ''
},
searchSelectObj: {
orderOrTrade: {
......@@ -670,6 +695,15 @@ export default {
optionId: 'merchantId',
optionLabel: 'merchantName',
optionsName: 'PlatformMerchantList'
},
{
label: '出库状态',
name: 'outboundStatus',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'warehouseStatusList'
}],
tableData: [],
......@@ -678,6 +712,7 @@ export default {
storeIdList: [],
divisionTypeList: _.cloneDeep(divisionTypeList),
orderTypeList: _.cloneDeep(orderTypeList),
warehouseStatusList: _.cloneDeep(warehouseStatusList),
PlatformMerchantList: []
},
total: 0,
......@@ -698,7 +733,23 @@ export default {
toShopTransfer: '',
upgradeTransfer: ''
},
accountVisible: false
accountVisible: false,
warehouseVisible: false,
orderId: '2203150922321960',
outboundStatusShow: {
'1': '待出库',
'2': '待出库',
'3': '出库中',
'4': '已出库',
'5': '出库失败'
},
outboundStatusClass: {
'1': 'ashSpot',
'2': 'ashSpot',
'3': 'yellowSpot',
'4': 'greenSpot',
'5': 'redSpot'
}
}
},
......@@ -721,6 +772,11 @@ export default {
// console.log(this.$store.state.d2admin.user.info.detail.merchantId)
getPlatformMerchantList({}).then(res => {
console.log(res)
res.unshift({
merchantId: -1,
merchantName: '嘀加智慧云'
})
this.baseData.PlatformMerchantList = res
this.getOptionsList()
})
......@@ -760,7 +816,8 @@ export default {
merchantId: '',
orderCode: '',
divisionType: '',
platformMerchantId: ''
platformMerchantId: '',
outboundStatus: ''
}
this.searchSelectObj = {
orderOrTrade: {
......@@ -854,10 +911,11 @@ export default {
...this.page,
...params
}
const apiName = this.userInfo.beSuper ? 'getList' : 'getYqList'
// const apiName = this.userInfo.beSuper ? 'getList' : 'getYqList'
// console.log(params)
api[apiName](params).then(res => {
// api[apiName](params).then(res => {
api.getList(params).then(res => {
let temp = 1
this.tableData = res.list.map((item, index) => {
this.isSubOrder = !item.hasOwnProperty('subOrderProfitAllocations')
......@@ -921,6 +979,7 @@ export default {
},
getParams() {
var params = this.getSelectInputParams()
if (this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId
}
......@@ -946,9 +1005,9 @@ export default {
params.platformMerchantId = this.searchForm.platformMerchantId
}
// if (this.searchForm.divisionType) {
// params.divisionType = this.searchForm.divisionType
// }
if (this.searchForm.outboundStatus) {
params.outboundStatus = this.searchForm.outboundStatus
}
return params
},
getTotal() {
......@@ -976,6 +1035,19 @@ export default {
accountClose(isRefresh) {
this.accountVisible = !this.accountVisible
// isRefresh && this.handleSearch()
},
exWarehouse(row) {
this.orderId = row.orderCode
// this.orderId = '2203150922321960'
this.warehouseVisible = true
},
handleDrawerClose(isExamineOp) {
this.warehouseVisible = false
// if (isExamineOp) {
// this.$refs.commodityTable.refreshTable()
// }
}
}
}
......@@ -1096,4 +1168,37 @@ export default {
.search-icon {
margin: 0;
}
.ashSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #c6c8cc;
margin-right: 5px;
display: inline-block;
}
.greenSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #2cca74;
margin-right: 5px;
display: inline-block;
}
.yellowSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #fdb757;
margin-right: 5px;
display: inline-block;
}
.redSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #eb4e4e;
margin-right: 5px;
display: inline-block;
}
</style>
<!-- 服务商 = 财务列表 -->
<template>
<div class="service_finance_list">
<!-- <captchaInput :captchaList.sync="captchaList"></captchaInput> -->
<div v-show="!isSingle"
class="header"
slot="header"
......@@ -193,6 +194,15 @@
label="总分账金额"
align="center">
</el-table-column>
<el-table-column prop="outboundStatus"
label="出库状态"
width="120"
align="center">
<template slot-scope="scope">
<span :class="outboundStatusClass[scope.row.outboundStatus]"></span>
<span>{{ outboundStatusShow[scope.row.outboundStatus] }}</span>
</template>
</el-table-column>
<!-- </el-table-column> -->
</el-table-column>
<el-table-column label="流量方"
......@@ -394,6 +404,11 @@
label="操作"
fixed="right">
<template slot-scope="scope">
<el-button type="text"
size="mini"
style="margin-right: 10px;"
v-if="scope.row.hasOwnProperty('subOrderProfitAllocations')"
@click="exWarehouse(scope.row)">出库</el-button>
<auth-button :data="scope"></auth-button>
</template>
</el-table-column>
......@@ -411,6 +426,11 @@
<service-detail-dialog :isVisible="serviceVisible"
:date="summaryDate"
@handleStoreClose="handleStoreDetail"></service-detail-dialog>
<!-- 出库面板 -->
<warehouse-detail v-if="warehouseVisible"
:warehouseVisible="warehouseVisible"
:orderInfoId="orderId"
@handleDrawerClose="handleDrawerClose"></warehouse-detail>
</div>
</template>
......@@ -418,7 +438,9 @@
// import moment from 'moment'
import dayjs from 'dayjs'
import serviceDetailDialog from './serviceDetailDialog'
import { getServiceListApi, exportFile, getListTotal, getServicerefApi, getServiceSummaryApi, getList } from '@api/finance'
import warehouseDetail from './warehouseDetail'
// getServiceListApi getServiceListApi
import { exportFile, getListTotal, getServicerefApi, getServiceSummaryApi, getList } from '@api/finance'
import { getPartnerYqListApi } from '@/api/account'
import { getServiceStore } from '@api/editCustomer'
import { mapActions } from 'vuex'
......@@ -428,6 +450,23 @@ export default {
name: 'serviceFinanceList',
data() {
return {
// captchaList: '',
orderId: '',
warehouseVisible: false,
outboundStatusShow: {
'1': '待出库',
'2': '待出库',
'3': '出库中',
'4': '已出库',
'5': '出库失败'
},
outboundStatusClass: {
'1': 'ashSpot',
'2': 'ashSpot',
'3': 'yellowSpot',
'4': 'greenSpot',
'5': 'redSpot'
},
userInfo: this.$store.state.d2admin.user.info,
// 单店或多店
isSingle: true,
......@@ -586,7 +625,9 @@ export default {
},
components: {
serviceDetailDialog
serviceDetailDialog,
warehouseDetail
// captchaInput
},
mounted() {
......@@ -616,6 +657,18 @@ export default {
handleAddClose(isRefresh = false) {
},
handleDrawerClose(isExamineOp) {
this.warehouseVisible = false
// if (isExamineOp) {
// this.$refs.commodityTable.refreshTable()
// }
},
exWarehouse(row) {
this.orderId = row.orderCode
// this.orderId = '2203150922321960'
this.warehouseVisible = true
},
drawFunnelChart() {
this.option.yAxis.data = this.summayData.countList.slice(0, 10).map(item => item.yqMerchantName)
this.option.series[0].data = this.summayData.countList.slice(0, 10).map(item => item.totalFranchiseeProfitMoney)
......
......@@ -215,7 +215,7 @@ export default {
this.proInfo.goodsType = targetItem.goodsType
this.proInfo.goodsTypeName = targetItem.goodsTypeName
this.proInfo.warrantyPeriod = this.warrantyProList.includes(targetItem.goodsType) ? '5' : ''
console.log(this.proInfo);
console.log(this.proInfo)
},
handleRelateProConfirm() {
this.$refs.proRuleForm1.validate(valid1 => {
......
<!-- 查看详情 -->
<template>
<el-drawer size="60%"
class="drawerContainer"
:with-header="false"
:visible.sync="drawerDetailVisible"
:before-close="handleDrawerClose">
......@@ -154,8 +155,8 @@ export default {
userTypeList: userType,
ghUserTypeList: ghUserType
},
examineFlag: false, //是否有审核权限
isExamineOp: false //是否做了审核操作
examineFlag: false, // 是否有审核权限
isExamineOp: false // 是否做了审核操作
}
},
......@@ -171,11 +172,11 @@ export default {
},
mounted() {
console.log(this.userInfo);
console.log(this.userInfo.loginAccount.userName);
console.log(this.userInfo)
console.log(this.userInfo.loginAccount.userName)
const $store = this.$store.getters['d2admin/auth/curBtns']
console.log($store);
const btnId = '9030207' //审核权限ID
console.log($store)
const btnId = '9030207' // 审核权限ID
const _item = $store.find(i => (i.authId === btnId))
if (_item) {
this.examineFlag = true
......@@ -221,110 +222,112 @@ export default {
}
</script>
<style lang="scss">
.el-drawer__body {
overflow: scroll;
}
.d2-drawer-content .close-icon {
font-size: 24px;
height: 22px;
line-height: 22px;
cursor: pointer;
}
.d2-drawer-content .d2-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
}
.d2-drawer-content .d2-drawer-block.title-block {
position: relative;
display: flex;
justify-content: space-between;
padding: 20px 20px;
background: #ffffff;
}
.d2-drawer-block .d2-drawer-item {
width: 47%;
margin-bottom: 0;
}
.d2-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
}
.parentGoods {
font-family: PingFangSC-Medium;
font-size: 18px;
color: #333333;
line-height: 28px;
font-weight: 600;
}
.parent-type {
font-family: PingFangSC-Regular;
font-size: 16px;
color: #666666;
line-height: 24px;
font-weight: 400;
padding-left: 15px;
}
.car-txt .examineP {
font-family: PingFangSC-Regular;
font-size: 16px;
margin-left: auto;
margin-right: 40px;
padding: 3px;
}
.d2-drawer-content .child-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 20px 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 10px 8px 0 10px;
}
.child-drawer-block .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 30%;
margin: 0 0 0 0;
}
/* .child-drawer-block .d2-drawer-row {
<style lang="scss" scoped>
::v-deep.drawerContainer {
.el-drawer__body {
overflow: scroll;
}
.d2-drawer-content .close-icon {
font-size: 24px;
height: 22px;
line-height: 22px;
cursor: pointer;
}
.d2-drawer-content .d2-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 0 20px 20px;
margin-bottom: 20px;
background: #ffffff;
}
.d2-drawer-content .d2-drawer-block.title-block {
position: relative;
display: flex;
justify-content: space-between;
padding: 20px 20px;
background: #ffffff;
}
.d2-drawer-block .d2-drawer-item {
width: 47%;
margin-bottom: 0;
}
.d2-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
}
.parentGoods {
font-family: PingFangSC-Medium;
font-size: 18px;
color: #333333;
line-height: 28px;
font-weight: 600;
}
.parent-type {
font-family: PingFangSC-Regular;
font-size: 16px;
color: #666666;
line-height: 24px;
font-weight: 400;
padding-left: 15px;
}
.car-txt .examineP {
font-family: PingFangSC-Regular;
font-size: 16px;
margin-left: auto;
margin-right: 40px;
padding: 3px;
}
.d2-drawer-content .child-drawer-block {
border-bottom: 1px solid #e7eaec;
padding: 20px 20px 20px;
margin-bottom: 20px;
background: #ffffff;
margin: 10px 8px 0 10px;
}
.child-drawer-block .d2-drawer-item {
font-family: PingFangSC-Regular;
font-size: 14px;
color: #333333;
font-weight: 400;
width: 30%;
margin: 0 0 0 0;
}
/* .child-drawer-block .d2-drawer-row {
width: 100%;
margin-bottom: 0;
} */
.child-drawer-block .car-sub-head {
font-family: PingFangSC-Medium;
font-size: 16px;
color: #333333;
line-height: 24px;
font-weight: 600;
}
.timeline-item_wrapper {
.el-form-item__content {
width: calc(100% - 110px);
.child-drawer-block .car-sub-head {
font-family: PingFangSC-Medium;
font-size: 16px;
color: #333333;
line-height: 24px;
font-weight: 600;
}
.el-timeline-item__wrapper {
display: flex;
align-items: center;
justify-content: space-between;
// margin-top: 5px;
.timeline-item_wrapper {
.el-form-item__content {
width: calc(100% - 110px);
}
.el-timeline-item__wrapper {
display: flex;
align-items: center;
justify-content: space-between;
// margin-top: 5px;
}
.el-timeline-item__timestamp.is-bottom {
margin-top: 0;
}
}
.el-timeline-item__timestamp.is-bottom {
margin-top: 0;
.timeline-item_wrapper .el-timeline-item__tail {
position: absolute;
left: 4px;
height: 100%;
top: 8px;
border-left: 2px solid #e4e7ed;
}
.timeline-item_wrapper .el-timeline-item__node--normal {
left: -1px;
top: 8px;
width: 12px;
height: 12px;
}
}
.timeline-item_wrapper .el-timeline-item__tail {
position: absolute;
left: 4px;
height: 100%;
top: 8px;
border-left: 2px solid #e4e7ed;
}
.timeline-item_wrapper .el-timeline-item__node--normal {
left: -1px;
top: 8px;
width: 12px;
height: 12px;
}
</style>
......@@ -22,7 +22,7 @@
<script>
import { mapActions } from 'vuex'
import { limitPrice } from '@/common/constants'
// import { limitPrice } from '@/common/constants'
import d2FormGoods from './d2-form/index'
import { commodityAddSeviceMerchant, getGoodsList, baseGoodsAdd, baseGoodsUpdate, getGoodsInfoById } from '@/api/commodity'
export default {
......@@ -104,7 +104,7 @@ export default {
type: 'input',
isDisabled: true,
width: '400px'
},
}
// {
// name: 'shopPrice',
// label: '产品成本',
......@@ -231,7 +231,6 @@ export default {
}
},
handleAddConfirm(data) {
// 升级商品的产品成本要大于或等于基础商品产品成本
var upgradeList = data.upgradeGoods.length ? data.upgradeGoods.filter(item => item.shopPrice < data.shopPrice) : []
if (upgradeList.length) {
......
......@@ -58,7 +58,7 @@ import _ from 'lodash'
import { getList, deleteGoods, checkDeleteGoods, exportGoodsList } from '@api/product'
import { BaseData, brandMerchantList } from '@/common/constants.js'
import { mapActions } from 'vuex'
import { exportJsonToExcel } from '@/common/Export2Excel.js'
// import { exportJsonToExcel } from '@/common/Export2Excel.js'
export default {
name: 'product',
data() {
......@@ -224,14 +224,18 @@ export default {
})
},
handleExport() {
const tHeader = ['序号', '素材名称', '产品ID', '分类', '品牌商', '创建时间', '状态']
const fieldVal = ['index', 'goodsName', 'id', 'goodsTypeName', 'brandMerchantName', 'createdDateStr', 'statusStr']
// const tHeader = ['序号', '素材名称', '产品ID', '分类', '品牌商', '创建时间', '状态']
// const fieldVal = ['index', 'goodsName', 'id', 'goodsTypeName', 'brandMerchantName', 'createdDateStr', 'statusStr']
// 改为调用后端下载
exportGoodsList(this.searchForm).then(res => {
require.ensure([], () => {
const data = this.formatJson(fieldVal, res)
exportJsonToExcel(tHeader, data, '素材列表')
})
this.$open(res)
})
// exportGoodsList(this.searchForm).then(res => {
// require.ensure([], () => {
// const data = this.formatJson(fieldVal, res)
// exportJsonToExcel(tHeader, data, '素材列表')
// })
// })
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j]))
......
......@@ -158,7 +158,7 @@
<div class="top_card_bm"
v-show="customerType==='today'">
<span
class="top_card_bm_left">周同比:{{customerData.onWeekCustomerNums}}%</span>
class="top_card_bm_left">周同比:{{$$(customerData,'onWeekCustomerNums')}}%</span>
<span
class="top_card_bm_right customer">日环比:{{customerData.onDayCustomerNums}}%</span>
</div>
......
......@@ -243,8 +243,13 @@ export default {
return sums
},
handleClose() {
this.close({ tagName: '/orderList' })
this.$router.push({ name: 'orderList' })
if (this.$route.params.from) { // 从待补录订单列表跳转
this.close({ tagName: '/orderSupplement' })
this.$router.push({ name: 'orderSupplement' })
} else { // 从订单列表跳转
this.close({ tagName: '/orderList' })
this.$router.push({ name: 'orderList' })
}
this.close({ tagName: '/orderDetail' })
}
}
......
......@@ -19,17 +19,19 @@
<div class="d2-container-content">
<d2-table-header>
<span slot="left">累计订单金额:¥{{totalCount}}元</span>
<!-- <el-button type="primary"
<el-button type="primary"
size="mini"
class="orderTips"
icon="el-icon-download"
@click="handlMakeUpOrder"
v-if="jurisdictionFlag"
style="padding:0px 13px;height:30px;margin-top:6px">待补录订单
<span class="tipsNum"
v-show="waitOrderNum">{{waitOrderNum}}</span>
</el-button>&nbsp; -->
</el-button>
<!-- @click="downloadAccount" -->
<auth-button category="Button"></auth-button>
<!-- <auth-button category="Button"></auth-button> -->
<auth-button :showBtnIds="['9040101']"
category="Button"></auth-button>
</d2-table-header>
<el-table :data="tableData"
v-loading="$store.state.d2admin.loading.value"
......@@ -168,7 +170,7 @@
<script>
import { Util } from '@/common/util'
import { getList, exportFile, getOrderCount } from '@api/order'
import { getList, exportFile, getOrderCount, waitinputorderCount } from '@api/order'
import { mapActions } from 'vuex'
import { getServiceStore, getParkStore } from '@api/editCustomer'
export default {
......@@ -339,7 +341,8 @@ export default {
pageNum: 1,
pageSize: 20
},
totalCount: ''
totalCount: '',
jurisdictionFlag: false // 待补录按钮权限标识
}
},
......@@ -356,6 +359,13 @@ export default {
this.showFormData = this.showFormData.filter(item => item.name !== 'yqMerchantId')
this.getServiceStore(this.userInfo.detail.merchantId)
}
const $store = this.$store.getters['d2admin/auth/curBtns']
const btnId = '9040103' // 待补录订单权限ID
const _item = $store.find(i => (i.authId === btnId))
if (_item) {
this.jurisdictionFlag = true // 是否有待补录订单按钮权限
this.getWaitinputorderCount()
}
this.getList()
this.getOrderCount()
},
......@@ -460,8 +470,6 @@ export default {
// 跳转订单补录
handlMakeUpOrder(data) {
console.log('跳转订单补录')
// console.log(data.row)
this.close({ tagName: '/orderDetail' })
this.$router.push({
name: 'orderSupplement'
// params: {
......@@ -479,6 +487,13 @@ export default {
handleCurrentChange(value) {
this.page.pageNum = value
this.getList()
},
// 待补录订单数
getWaitinputorderCount() {
waitinputorderCount({}).then(res => {
this.waitOrderNum = res.waitInputCount
})
}
}
}
......
......@@ -51,7 +51,7 @@
:accountDetailVisible="accountDetailVisible"
:merchantRow="merchantRow"></account-detail>
</baseDialog>
<settingDetail :show="settingDetailVisible"></settingDetail>
</d2-container>
</template>
......@@ -63,6 +63,7 @@ import { mapActions } from 'vuex'
import accountDetail from './accountDetail'
import { BaseData, merchantStoreServiceList } from '@/common/constants.js'
import baseDialog from '@/components/baseDialog/baseDialog'
import settingDetail from './settingDetail.vue'
export default {
name: 'accountList',
data() {
......@@ -208,8 +209,6 @@ export default {
appendToBody: false,
// width: '720px',
btnList: [
// { name: '取消', type: 'cancel' },
// { name: '前往', type: 'confirm' }
]
},
config: {
......@@ -222,7 +221,8 @@ export default {
},
components: {
accountDetail,
baseDialog
baseDialog,
settingDetail
},
mounted() {
......
<template>
<baseDialog :isShow.sync="show"
:config="dialogConfig.setting"
:dialogConfig="dialogConfig.config"
@closeDialog="handleDetailClose"
class="settingContainer">
<span class="test">222</span>
</baseDialog>
</template>
<script>
import baseDialog from '@/components/baseDialog/baseDialog'
export default {
name: 'settingDetail',
components: {
baseDialog
},
props: {
show: {
type: Boolean,
default: true
}
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
// width: '720px',
btnList: [
]
},
config: {
title: '查看详情',
width: '720px'
}
}
}
},
methods: {
handleDetailClose() {
}
}
}
</script>
<style lang="scss" scoped>
::v-deep.settingContainer {
// color: rebeccapurple;
.el-dialog__header {
border: none;
}
}
</style>
/* eslint-disable no-useless-escape */
<!-- 1 - 分账比例设置 -->
<template>
<div>
......@@ -616,7 +617,7 @@ export default {
newValue = newValue.replace(/\.{2,}/g, '.')
newValue = newValue.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.')
// 只能输入两个小数
// eslint-disable-next-line no-unused-expressions
// eslint-disable-next-line no-useless-escape
newValue = newValue.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3')
if (newValue > 100) newValue = 100
......
......@@ -155,7 +155,7 @@
</div>
</div>
<div class="step-desc-box">
<p class="desc-title">POS机扫码支付(10元)</p>
<p class="desc-title">POS机扫码支付({{goodsInfo.totalPrice||3.5}}元)</p>
<div class="txt-box">
<img class="middle"
src="./images/scan-code.png" />
......@@ -167,7 +167,9 @@
<el-form style="margin-top: 10px;"
:model="moneyForm"
:rules="moneyRules">
<el-form-item v-if="Object.values(needJudgeMerchantList).includes(1)">
<!-- <div>{{Object.values(needJudgeMerchantList).includes(1)}}</div> -->
<el-form-item
v-if="Object.values(needJudgeMerchantList).includes(1)&&merchantInfo.realityPlatformMerchant">
<p class="one-line-ellipsis"
:title="merchantInfo.realityPlatformMerchant ?merchantInfo.realityPlatformMerchant.merchantName: '嘀加智慧云'">
<img class="point"
......@@ -364,7 +366,8 @@ export default {
default: () => { }
}
},
computed: {
},
watch: {
stepStat(val) {
// console.log(val)
......@@ -524,36 +527,41 @@ export default {
this.needJudgeMerchantList[item] = this.merchantInfo.divisionRule[item]
}
})
// console.log(this.needJudgeMerchantList)
// console.log(this.needJudgeMerchantList)
this.noVirtualAccMerchantList = []
this.accessFirstMerchantList = []
this.needAccountNum = 0
this.isFind(this.needJudgeMerchantList, 1)
// console.log(this.needJudgeMerchantList)
this.isFind(this.needJudgeMerchantList, 2)
this.isFind(this.needJudgeMerchantList, 3)
this.isFind(this.needJudgeMerchantList, 4)
this.isFind(this.needJudgeMerchantList, 5)
for (let index = 1; index < 6; index++) {
this.isFind(this.needJudgeMerchantList, index)
}
// this.isFind(this.needJudgeMerchantList, 2)
// this.isFind(this.needJudgeMerchantList, 3)
// this.isFind(this.needJudgeMerchantList, 4)
// this.isFind(this.needJudgeMerchantList, 5)
if (this.needAccountNum === this.accessFirstMerchantList.length) {
this.$emit('changeParentVal', { attrName: 'isShowOkbtn', value: false })
}
console.log(this.needJudgeMerchantList)
console.log('accessFirstMerchantList', this.accessFirstMerchantList)
console.log('this.noVirtualAccMerchantList', this.noVirtualAccMerchantList)
},
isFind(tempList, val) {
// valueToMerchantName: {
// 2: 'partnerMerchant',
// 3: 'realityDivisionMerchant'
// },
// console.log(tempList)
console.log(tempList)
if (Object.values(tempList).includes(val)) {
this.needAccountNum = this.needAccountNum + 1
// 平台方是 嘀加云跳过下面校验
if (val == 1 && this.merchantInfo?.divisionRule?.realityPlatformMerchantId == -1) {
return this.accessFirstMerchantList.push('嘀加智慧云平台')
this.accessFirstMerchantList.push('嘀加智慧云平台')
}
console.log(this.merchantInfo[this.valueToMerchantName[val]])
if (this.merchantInfo[this.valueToMerchantName[val]]) {
if (this.merchantInfo[this.valueToMerchantName[val]].accountStatus !== 3) {
this.noVirtualAccMerchantList.push(this.merchantInfo[this.valueToMerchantName[val]].merchantName + '(' + this.merchantInfo[this.valueToMerchantName[val]].merchantId + ')')
......
......@@ -215,7 +215,8 @@
</template>
<script>
import { userType, ghUserType } from '@/common/constants'
// ghUserType
import { userType } from '@/common/constants'
import { getDivisionRuleApi, updateDivisionRuleApi, getMerchantLevelApi, getAccountRule } from '@api/merchant'
export default {
name: 'stepTwo',
......
<!-- 下载对账单 -->
<template>
<d2-dialog title="收款二维码"
:isVisible="qRcodeVisible"
class="qRcodeDailog"
width="40%"
btnOkLabel="下载二维码"
@closeDialog="handleClose"
@confirmDialog="handleAddConfirm">
<div class="codeDiv"
id="view">
<img style="width:100%;height:100%"
src="./images/code3.png">
<!-- v-if="qrCodeURL" <div class="imgDiv"> -->
<img v-if="qrCodeURL"
class="qrImg"
id="img1"
crossorigin="anonymous"
:src="qrCodeURL">
<div v-if="!qrCodeURL"
class="el-icon-loading loadingIcon"></div>
<!-- </div> -->
<div class="merchantNameDiv">{{info.yqMerchantName}}</div>
</div>
</d2-dialog>
</template>
<script>
import { createWeappQrcode } from '@api/serviceManage'
import html2canvas from 'html2canvas'
export default {
name: 'qRcodeDialog',
data() {
return {
infoForm: {
merchantType: '',
merchant: [],
payStartDate: '',
payEndDate: '',
reportType: '1'
},
// 基本数据
baseData: {
merchantList: []
},
qrCodeURL: '',
defaultImg: require('./images/defaultImg.png')
}
},
props: {
qRcodeVisible: {
type: Boolean,
default: false
},
info: {
type: Object,
default: null
}
},
watch: {
},
created() {
},
components: {},
mounted() {
this.createQrcodeImage()
},
methods: {
/**
* @description: 图片转base64
* @param {String} url 需要转换的图片原链接(http://....jpg)
* @param {String} outputFormat 转换出来的图片的类型(canvas支持jpg/png格式)
* @return: 返回图片对应的base64编码
*/
getBas64(url, outputFormat = 'image/png') {
return new Promise(function (resolve, reject) {
let canvas = document.createElement('CANVAS')
const ctx = canvas.getContext('2d')
const img = new Image()
img.crossOrigin = 'Anonymous' // 重点!设置image对象可跨域请求
img.onload = function () {
canvas.height = img.height
canvas.width = img.width
ctx.drawImage(img, 0, 0)
const dataURL = canvas.toDataURL(outputFormat)
canvas = null
resolve(dataURL)
}
// img.src = url; // 旧的方式
img.src = url + '?t=' + new Date().valueOf() // 防止oss的缓存问题
})
},
createQrcodeImage() {
const oParams = {}
oParams.channelType = 1
oParams.appId = 'wx06d1198e751435d1'
oParams.qrcodeType = 'QR_WXA_UNLIMIT'
oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
// oParams.path = 'packagesPayment/pages/payment/index'
oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}`
createWeappQrcode(oParams).then(res => {
this.qrCodeURL = res
// function getBase64(imgUrl) {
// window.URL = window.URL || window.webkitURL
// var xhr = new XMLHttpRequest()
// xhr.open('get', imgUrl, true)
// xhr.responseType = 'blob'
// xhr.onload = function () {
// if (this.status == 200) {
// // 得到一个blob对象
// var blob = this.response
// console.log('blob', blob)
// // 至关重要
// const oFileReader = new FileReader()
// oFileReader.onloadend = function (e) {
// // 此处拿到的已经是base64的图片了,可以赋值做相应的处理
// console.log(e.target.result)
// }
// oFileReader.readAsDataURL(blob)
// }
// }
// xhr.send()
// }
// console.log(getBase64(res))
// getBase64('需要转成base64的图片url')
})
},
// 下载保存图片
takeScreenshot() {
// const opts = {
// useCORS: true
// }
html2canvas(document.getElementById('view'), {
backgroundColor: null,
allowTaint: true, // 允许污染
taintTest: true, // 在渲染前测试图片(没整明白有啥用)
useCORS: true // 使用跨域(当allowTaint为true时这段代码没什么用,下面解释)
}).then(canvas => {
this.convertCanvasToImg(canvas)
})
},
// 转换图片格式
convertCanvasToImg(canvas) {
// canvas base64 转 blob
var myBlob = this.dataURLtoBlob(canvas.toDataURL('img/png', 0.92))
// blob转URL对象
const myUrl = URL.createObjectURL(myBlob)
// 创建a标签,下载图片
this.downImg(myUrl)
},
// base64 转 blob
dataURLtoBlob(dataurl) {
var arr = dataurl.split(','); var mime = arr[0].match(/:(.*?);/)[1]
var bstr = atob(arr[1]); var n = bstr.length; var u8arr = new Uint8Array(n)
while (n--) {
u8arr[n] = bstr.charCodeAt(n)
}
return new Blob([u8arr], { type: mime })
},
// 下载图片 filename是图片名称
downImg(url) {
// 创建a标签 并设置其相关属性,最后触发其点击事件
const a = document.createElement('a')
const clickEvent = document.createEvent('MouseEvents')
a.setAttribute('href', url)
a.setAttribute('download', 'filename')
a.setAttribute('target', '_blank')
clickEvent.initEvent('click', true, true)
a.dispatchEvent(clickEvent)
},
handleAddConfirm() {
this.takeScreenshot()
},
handleClose() {
this.$emit('dialogClose', true)
}
}
}
</script>
<style>
.dateItem {
display: flex;
}
.dateItem .el-form-item__content {
display: flex;
margin-left: 0 !important;
}
.codeDiv {
width: 345px;
height: 468px;
margin: 0px auto;
position: relative;
/* background-image: url('./images/code3.png'); */
}
.qrImg {
width: 150px;
height: 150px;
position: absolute;
left: 50%;
top: 42%;
transform: translate(-50%, -50%);
/* background-color: #d8d8d8; */
z-index: 2;
}
.loadingIcon {
position: absolute;
/* width: 44px;
height: 44px; */
font-size: 30px;
/* top: 60px;
left: 60px; */
/* transform: translate(-50%, -50%); */
/* width: 150px;
height: 150px; */
position: absolute;
left: 46%;
top: 40%;
transform: translate(-50%, -50%);
}
.merchantNameDiv {
width: 150px;
height: 20px;
position: absolute;
left: 50%;
top: 63%;
transform: translate(-50%, -50%);
text-align: center;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 17px;
}
</style>
......@@ -103,7 +103,8 @@
<script>
import { Util } from '@/common/util'
import { getList, getMerchantList, addParentMerchant, deleteParentMerchant, saveParentMerchant } from '@api/serviceManage'
// addParentMerchant,
import { getList, getMerchantList, deleteParentMerchant, saveParentMerchant } from '@api/serviceManage'
import { mapActions } from 'vuex'
import { BaseData } from '@/common/constants.js'
import { sendSms, getAdminInfo } from '@api/merchant'
......
......@@ -28,8 +28,17 @@
:beforeSearchFn="beforeSearchFn">
<auth-button slot="auth-button"
slot-scope="scope"
:data="scope.scope"></auth-button>
:data="scope.scope">
<!-- <el-button type="text"
size="mini"
style="margin-right: 10px;"
@click="collectionQRcode(scope.row)">收款二维码</el-button> -->
</auth-button>
</d2-table>
<qrcode-dialog :qRcodeVisible="qRcodeVisible"
:info="recordInfo"
v-if="qRcodeVisible"
@dialogClose="dialogClose"></qrcode-dialog>
</div>
</d2-container>
</template>
......@@ -46,7 +55,8 @@ import {
import { mapActions } from 'vuex'
import { BaseData } from '@/common/constants.js'
// import { sendSms, getAdminInfo } from '@api/merchant'
import { getParkStore } from '@api/editCustomer'
// import { getParkStore } from '@api/editCustomer'
import qrcodeDialog from './qRcodeDialog'
export default {
name: 'serviceManage',
data() {
......@@ -180,11 +190,15 @@ export default {
8: '虚拟园区店',
9: '供应商'
}
}
},
qRcodeVisible: false,
recordInfo: {}
}
},
components: {},
components: {
qrcodeDialog
},
mounted() {
this.getBaseData()
......@@ -242,7 +256,17 @@ export default {
)
}
})
},
collectionQRcode(row) {
this.recordInfo = row
this.qRcodeVisible = !this.qRcodeVisible
},
dialogClose() {
this.qRcodeVisible = !this.qRcodeVisible
}
}
}
</script>
......
......@@ -2,10 +2,10 @@ const VueFilenameInjector = require('./tools/vue-filename-injector')
const ThemeColorReplacer = require('webpack-theme-color-replacer')
const forElementUI = require('webpack-theme-color-replacer/forElementUI')
const HardPlugin = require('hard-source-webpack-plugin') // 使用缓存,优化启动速度
const SpeedMeasurePlugin = require('speed-measure-webpack-plugin')
// const SpeedMeasurePlugin = require('speed-measure-webpack-plugin')
const SentryWebpackPlugin = require('@sentry/webpack-plugin')
const CopyDir = require('./plugins/copyDir')
const AsyncRomveDir = require('./plugins/removeDir')
// const CopyDir = require('./plugins/copyDir')
// const AsyncRomveDir = require('./plugins/removeDir')
const { resolve: assets } = require('path')
const os = require('os')
......@@ -65,7 +65,7 @@ const cdn = {
module.exports = {
publicPath, // 根据你的实际情况更改这里
outputDir: 'copyDirTarget',
// outputDir: 'copyDirTarget',
lintOnSave: false,
devServer: {
// publicPath, // 和 publicPath 保持一致
......@@ -126,9 +126,9 @@ module.exports = {
cacheDirectory: assets(__dirname, 'cache'),
// 解决报错问题
test: /mini-css-extract-plugin[\\/]dist[\\/]loader/
}),
})
// new SpeedMeasurePlugin(),
new CopyDir() // 把dist 文件修改成有两份来兼容部署时请求目录不一样的情况
// new CopyDir() // 把dist 文件修改成有两份来兼容部署时请求目录不一样的情况
// new AsyncRomveDir()
)
config.plugins = [...config.plugins, ...plugins]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!