Commit 571c8855 by 张立顺

fix:财务规则问题

1 parent ef5d6e59
https://start-kit.d2admin.fairyever.com/
\ No newline at end of file \ No newline at end of file
...@@ -226,12 +226,16 @@ export default { ...@@ -226,12 +226,16 @@ export default {
handleExport() { handleExport() {
const tHeader = ['序号', '素材名称', '产品ID', '分类', '品牌商', '创建时间', '状态'] const tHeader = ['序号', '素材名称', '产品ID', '分类', '品牌商', '创建时间', '状态']
const fieldVal = ['index', 'goodsName', 'id', 'goodsTypeName', 'brandMerchantName', 'createdDateStr', 'statusStr'] const fieldVal = ['index', 'goodsName', 'id', 'goodsTypeName', 'brandMerchantName', 'createdDateStr', 'statusStr']
// 改为调用后端下载
exportGoodsList(this.searchForm).then(res => { exportGoodsList(this.searchForm).then(res => {
require.ensure([], () => { this.$open(res)
const data = this.formatJson(fieldVal, res)
exportJsonToExcel(tHeader, data, '素材列表')
})
}) })
// exportGoodsList(this.searchForm).then(res => {
// require.ensure([], () => {
// const data = this.formatJson(fieldVal, res)
// exportJsonToExcel(tHeader, data, '素材列表')
// })
// })
}, },
formatJson(filterVal, jsonData) { formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => v[j])) return jsonData.map(v => filterVal.map(j => v[j]))
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
<div class="top_card_bm" <div class="top_card_bm"
v-show="customerType==='today'"> v-show="customerType==='today'">
<span <span
class="top_card_bm_left">周同比:{{customerData.onWeekCustomerNums}}%</span> class="top_card_bm_left">周同比:{{$$(customerData,'onWeekCustomerNums')}}%</span>
<span <span
class="top_card_bm_right customer">日环比:{{customerData.onDayCustomerNums}}%</span> class="top_card_bm_right customer">日环比:{{customerData.onDayCustomerNums}}%</span>
</div> </div>
......
...@@ -545,6 +545,7 @@ export default { ...@@ -545,6 +545,7 @@ export default {
this.$emit('changeParentVal', { attrName: 'isShowOkbtn', value: false }) this.$emit('changeParentVal', { attrName: 'isShowOkbtn', value: false })
} }
console.log(this.needJudgeMerchantList) console.log(this.needJudgeMerchantList)
console.log('accessFirstMerchantList', this.accessFirstMerchantList)
console.log('this.noVirtualAccMerchantList', this.noVirtualAccMerchantList) console.log('this.noVirtualAccMerchantList', this.noVirtualAccMerchantList)
}, },
isFind(tempList, val) { isFind(tempList, val) {
...@@ -552,14 +553,14 @@ export default { ...@@ -552,14 +553,14 @@ export default {
// 2: 'partnerMerchant', // 2: 'partnerMerchant',
// 3: 'realityDivisionMerchant' // 3: 'realityDivisionMerchant'
// }, // },
// console.log(tempList) console.log(tempList)
if (Object.values(tempList).includes(val)) { if (Object.values(tempList).includes(val)) {
this.needAccountNum = this.needAccountNum + 1 this.needAccountNum = this.needAccountNum + 1
// 平台方是 嘀加云跳过下面校验 // 平台方是 嘀加云跳过下面校验
// if (val == 1 && this.merchantInfo?.divisionRule?.realityPlatformMerchantId == -1) { if (val == 1 && this.merchantInfo?.divisionRule?.realityPlatformMerchantId == -1) {
// return this.accessFirstMerchantList.push('嘀加智慧云平台') this.accessFirstMerchantList.push('嘀加智慧云平台')
// } }
console.log(this.merchantInfo[this.valueToMerchantName[val]]) console.log(this.merchantInfo[this.valueToMerchantName[val]])
if (this.merchantInfo[this.valueToMerchantName[val]]) { if (this.merchantInfo[this.valueToMerchantName[val]]) {
if (this.merchantInfo[this.valueToMerchantName[val]].accountStatus !== 3) { if (this.merchantInfo[this.valueToMerchantName[val]].accountStatus !== 3) {
......
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
info: { info: {
type: Object, type: Object,
default: null default: null
}, }
}, },
watch: { watch: {
...@@ -68,11 +68,11 @@ export default { ...@@ -68,11 +68,11 @@ export default {
methods: { methods: {
createQrcodeImage() { createQrcodeImage() {
let oParams = {} const oParams = {}
oParams.channelType = 1 oParams.channelType = 1
oParams.appId = 'wx06d1198e751435d1' oParams.appId = 'wx06d1198e751435d1'
oParams.qrcodeType = 'QR_WXA_UNLIMIT' oParams.qrcodeType = 'QR_WXA_UNLIMIT'
// oParams.path = 'packagesPayment/pages/QRPayment/QRPayment' // oParams.path = 'packagesPayment/pages/QRPayment/QRPayment'
oParams.path = 'packagesPayment/pages/payment/index' oParams.path = 'packagesPayment/pages/payment/index'
oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}` oParams.scene = `merchantId=${this.info.yqMerchantId}&merchantName=${this.info.yqMerchantName}`
...@@ -81,43 +81,43 @@ export default { ...@@ -81,43 +81,43 @@ export default {
}) })
}, },
//下载保存图片 // 下载保存图片
takeScreenshot() { takeScreenshot() {
html2canvas(document.getElementById('view')).then(canvas => { html2canvas(document.getElementById('view')).then(canvas => {
this.convertCanvasToImg(canvas) this.convertCanvasToImg(canvas)
}); })
}, },
//转换图片格式 // 转换图片格式
convertCanvasToImg(canvas) { convertCanvasToImg(canvas) {
// canvas base64 转 blob // canvas base64 转 blob
var myBlob = this.dataURLtoBlob(canvas.toDataURL('img/png', 0.92)) var myBlob = this.dataURLtoBlob(canvas.toDataURL('img/png', 0.92))
// blob转URL对象 // blob转URL对象
let myUrl = URL.createObjectURL(myBlob) const myUrl = URL.createObjectURL(myBlob)
// 创建a标签,下载图片 // 创建a标签,下载图片
this.downImg(myUrl) this.downImg(myUrl)
}, },
//base64 转 blob // base64 转 blob
dataURLtoBlob(dataurl) { dataURLtoBlob(dataurl) {
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1], var arr = dataurl.split(','); var mime = arr[0].match(/:(.*?);/)[1]
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n); var bstr = atob(arr[1]); var n = bstr.length; var u8arr = new Uint8Array(n)
while (n--) { while (n--) {
u8arr[n] = bstr.charCodeAt(n); u8arr[n] = bstr.charCodeAt(n)
} }
return new Blob([u8arr], { type: mime }); return new Blob([u8arr], { type: mime })
}, },
//下载图片 filename是图片名称 // 下载图片 filename是图片名称
downImg(url) { downImg(url) {
// 创建a标签 并设置其相关属性,最后触发其点击事件 // 创建a标签 并设置其相关属性,最后触发其点击事件
let a = document.createElement("a") const a = document.createElement('a')
let clickEvent = document.createEvent("MouseEvents"); const clickEvent = document.createEvent('MouseEvents')
a.setAttribute("href", url) a.setAttribute('href', url)
a.setAttribute("download", "filename") a.setAttribute('download', 'filename')
a.setAttribute("target", '_blank') a.setAttribute('target', '_blank')
clickEvent.initEvent('click', true, true) clickEvent.initEvent('click', true, true)
a.dispatchEvent(clickEvent); a.dispatchEvent(clickEvent)
}, },
handleAddConfirm() { handleAddConfirm() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!