Commit 63524b96 by 王志慧

Merge branch 'v3.22.1' into 'v3.22.2'

V3.22.1

See merge request !5
2 parents 070d671b e198262a
...@@ -1895,51 +1895,6 @@ ...@@ -1895,51 +1895,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"ssri": { "ssri": {
"version": "8.0.1", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
...@@ -1948,28 +1903,6 @@ ...@@ -1948,28 +1903,6 @@
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
}
} }
} }
}, },
...@@ -2308,6 +2241,11 @@ ...@@ -2308,6 +2241,11 @@
"integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==", "integrity": "sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==",
"dev": true "dev": true
}, },
"adler-32": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A=="
},
"ajv": { "ajv": {
"version": "6.12.6", "version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
...@@ -3381,6 +3319,15 @@ ...@@ -3381,6 +3319,15 @@
"integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==",
"dev": true "dev": true
}, },
"cfb": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"requires": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0"
}
},
"chalk": { "chalk": {
"version": "2.4.2", "version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
...@@ -3715,6 +3662,11 @@ ...@@ -3715,6 +3662,11 @@
"integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==",
"dev": true "dev": true
}, },
"codepage": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA=="
},
"collection-visit": { "collection-visit": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
...@@ -4166,6 +4118,11 @@ ...@@ -4166,6 +4118,11 @@
} }
} }
}, },
"crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="
},
"create-ecdh": { "create-ecdh": {
"version": "4.0.4", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
...@@ -6191,6 +6148,11 @@ ...@@ -6191,6 +6148,11 @@
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
"dev": true "dev": true
}, },
"frac": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
},
"fragment-cache": { "fragment-cache": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
...@@ -12189,6 +12151,14 @@ ...@@ -12189,6 +12151,14 @@
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
"dev": true "dev": true
}, },
"ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
"requires": {
"frac": "~1.1.2"
}
},
"sshpk": { "sshpk": {
"version": "1.17.0", "version": "1.17.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
...@@ -13414,6 +13384,75 @@ ...@@ -13414,6 +13384,75 @@
} }
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-router": { "vue-router": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.5.tgz",
...@@ -14214,6 +14253,16 @@ ...@@ -14214,6 +14253,16 @@
"dayjs": "^1.8.25" "dayjs": "^1.8.25"
} }
}, },
"wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
},
"word": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="
},
"word-wrap": { "word-wrap": {
"version": "1.2.3", "version": "1.2.3",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
...@@ -14290,6 +14339,20 @@ ...@@ -14290,6 +14339,20 @@
"async-limiter": "~1.0.0" "async-limiter": "~1.0.0"
} }
}, },
"xlsx": {
"version": "0.18.5",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"requires": {
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
}
},
"xtend": { "xtend": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
"glsx-components": "^1.5.7", "glsx-components": "^1.5.7",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-router": "^3.1.3", "vue-router": "^3.1.3",
"vuex": "^3.1.2" "vuex": "^3.1.2",
"xlsx": "^0.18.5"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.1.0", "@vue/cli-plugin-babel": "^4.1.0",
......
import { http } from '@/main'
const payPointsListApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail.page`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const payPointsDetailApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
const payPointsExportApi = params => {
params.method = `scrm.api.shopmall.integral.out.detail.export`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
// 用户积分转出的所有门店信息
const getMerchantList = params => {
params.method = 'scrm.api.shopmall.integral.out.merchant.list'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true
})
}
export default { payPointsListApi, payPointsDetailApi, payPointsExportApi, getMerchantList }
...@@ -111,4 +111,28 @@ const getDetails = params => { ...@@ -111,4 +111,28 @@ const getDetails = params => {
sign: true sign: true
}) })
} }
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getAllpayAmount, getDetails } // 普通提现导入
const uploadXlsx = params => {
params.method = 'scrm.api.shopmall.integral.transfer.out.import'
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
noSignAttr: ['file'],
returnAll:true
})
}
// 根据批次号更新普通提现导入为成功状态
const handleSaveImport =params => {
params.method = `scrm.api.shopmall.integral.transfer.out.import.confirm`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll:true
})
}
export default { getList, getAdmin, orderExport, integralpay, integralApprove, integralOut, getSms, getMerchantList, getAllpayAmount, getDetails,uploadXlsx,handleSaveImport }
...@@ -31,4 +31,41 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max ...@@ -31,4 +31,41 @@ function limitPrice(newValue, oldValue, intergerDigit, pointDigit, minValue, max
} }
} }
export { limitPrice } function getExplorer() {
var ua = navigator.userAgent.toLocaleLowerCase()
var browserType = null
if (ua.match(/msie/) != null || ua.match(/trident/) != null) {
browserType = 'IE'
} else if (ua.match(/firefox/) != null) {
browserType = '火狐'
} else if (ua.match(/ubrowser/) != null) {
browserType = 'UC'
} else if (ua.match(/opera/) != null) {
browserType = '欧朋'
} else if (ua.match(/bidubrowser/) != null) {
browserType = '百度'
} else if (ua.match(/metasr/) != null) {
browserType = '搜狗'
} else if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
browserType = 'QQ'
} else if (ua.match(/maxthon/) != null) {
browserType = '遨游'
} else {
browserType = '谷歌'
}
return browserType
}
function exportFn(url) {
let browserType = getExplorer()
if (browserType == 'QQ') {
window.open(url)
return
}
let iframe = document.createElement('iframe')
iframe.style.display = 'none'
iframe.src = url
document.body.appendChild(iframe)
}
export { limitPrice, getExplorer, exportFn }
...@@ -94,12 +94,18 @@ function aToExport(url) { ...@@ -94,12 +94,18 @@ function aToExport(url) {
document.body.appendChild(a) document.body.appendChild(a)
a.click() a.click()
} }
function getArrayIsSubset (arr2, arr1) {
if(arr2.length ==0) return false
return arr2.every(item => {
return arr1.includes(item)
})
}
export default { export default {
debounce, debounce,
dateFormat, dateFormat,
checkPhone, checkPhone,
getOptionsList, getOptionsList,
secondConfirm, secondConfirm,
aToExport aToExport,
getArrayIsSubset
} }
<template>
<div>
<GLTabs v-model="tabId" :tabPaneList="tabPaneList"></GLTabs>
<div class="main-wrap">
<GLCombiForm ref="pointerWriteOffSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="exportBtn">
<el-button :size="size" @click="handleExport" class="default-blue-btn" type="default">导出</el-button>
</div>
<GLTable ref="pointerWriteOffRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div slot="merchantNameSlot" slot-scope="scope">{{ getMerchantName(scope.scope.merchantId) }}</div>
<div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
</GLTable>
</div>
<GLDialog title="查看" mode="mid" :hasFooter="false" :visible.sync="dialogVisible" :before-close="handleClose" @onOk="handleConfirm" @onCancel="handleClose">
<ul class="detail-wrap">
<template v-for="item in detailList">
<li class="detail-li" v-if="!item.hasOwnProperty('include') || item.include == tabId" :key="item.key">
<label class="detail-label" for="">{{ item.label }}:</label>
<span v-if="item.key !== 'merchantId'" class="detail-key">{{ detailObj[item.key] || '--' }}</span>
<span v-else class="detail-key">{{ getMerchantName(detailObj[item.key]) }}</span>
</li>
</template>
</ul>
</GLDialog>
</div>
</template>
<script>
import { exportFn } from '@/common/constant'
const TABLE_COL = [
// {
// label: '批次号',
// prop: 'bizRelName'
// },
{
label: '门店名称',
addHtml: 'merchantNameSlot'
},
{
label: '客户姓名',
prop: 'customerName'
},
{
label: '客户手机号',
prop: 'customerPhone'
},
// {
// label: '保单号',
// prop: 'customerPhone',
// width: 200,
// line: 1
// },
{
label: '油卡面值',
prop: 'verificationStaffName',
width: 150,
show: true
},
{
label: '油卡数量',
prop: 'verificationStaffName',
width: 150,
show: true
},
{
label: '消耗积分',
prop: 'integralValue'
},
{
label: '消耗积分时间',
prop: 'createdDate'
}
]
const DETAIL_LIST = [
{ label: '门店名称', key: 'merchantId' },
// { label: '批次号', key: '' },
{ label: '消耗积分', key: 'integralValue' },
{ label: '客户名称', key: 'customerName' },
{ label: '客户手机号', key: 'customerPhone' },
// { label: '保单号', key: '' },
{ label: '商品名称', key: '', include: '3' },
{ label: '商品数量', key: '', include: '3' },
{ label: '商品价格/元', key: '', include: '3' },
{ label: '油卡面值', key: '', include: '2' },
{ label: '油卡数量', key: '', include: '2' },
{ label: '收款人身份证', key: 'idCardNo', include: '1' },
{ label: '收款银行卡号', key: 'recvBankCardNo', include: '1' },
{ label: '收款银行', key: 'recvBank', include: '1' },
{ label: '消耗积分类型', key: 'ruleDesc' },
{ label: '消耗积分时间', key: 'createdDate' }
]
export default {
name: 'index',
data() {
return {
size: 'small',
tabId: '1',
tabPaneList: [
{ name: '1', label: '积分转出明细' }
// { name: '2', label: '油卡兑换明细' },
// { name: '3', label: '商品兑换明细' }
],
detailList: DETAIL_LIST,
detailObj: {},
dialogVisible: false,
merchantList: [],
searchForm: {
ruleType: 'TRANSFER_OUT',
merchantId: '',
customerName: '',
customerPhone: '',
createDate: ''
},
searchFormData: [
// {
// label: '批次号',
// name: 'bizRelName',
// type: 'input'
// },
{
label: '客户手机号',
name: 'customerPhone',
isClear: true,
type: 'input'
},
{
label: '客户姓名',
name: 'customerName',
isClear: true,
type: 'input'
},
// {
// label: '保单号',
// name: 'bizRelName',
// type: 'input'
// },
{
label: '门店名称',
name: 'merchantId',
type: 'select',
optionList: [],
isClear: true,
optionId: 'merchantId',
optionLabel: 'merchantName'
},
{
label: '消耗积分时间',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
getListApi: this.$apis.pointWriteOff.payPointsListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: []
},
tableButtonList: [
{
type: 'el-button',
name: '查看',
attrs: {
type: 'text'
},
// condition: row => {
// return row.sopStatus != 1
// },
listeners: {
click: row => this.viewDetail(row)
}
}
],
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
watch: {
tabId: {
handler: function(nVal, oVal) {
this.tableParams.tableColumns = TABLE_COL.filter(item => (nVal == 1 && !item.show) || nVal != 1)
},
immediate: true
}
},
created() {
this.getMerchantList()
},
mounted() {},
methods: {
getMerchantName(merchantId) {
console.log(merchantId, 'merchantId')
const _target = this.merchantList.find(item => item.merchantId == merchantId)
return _target ? _target.merchantName : '--'
},
getMerchantList() {
this.$apis.pointWriteOff
.getMerchantList({
parameterType: 2
})
.then(res => {
console.log(res, 'list')
if (res?.length) {
const _target = this.searchFormData.find(e => e.name == 'merchantId')
_target && (_target.optionList = res)
this.merchantList = res
}
})
},
viewDetail({ id }) {
this.$apis.pointWriteOff.payPointsDetailApi({ id }).then(res => {
if (res) {
this.detailObj = res
this.dialogVisible = true
}
})
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
if (this.searchForm.createDate?.length) {
params.createdDateBegin = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.createdDateEnd = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
handleReset() {
this.searchForm = {
ruleType: 'TRANSFER_OUT',
customerName: '',
customerPhone: '',
merchantId: '',
createDate: ''
}
this.handleSearch()
},
handleSearch() {
this.$refs.pointerWriteOffRef.refreshTable()
},
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = this.getParams()
// delete this.searchForm.createDate
resolve()
})
},
handleExport() {
var params = this.getParams()
this.$apis.pointWriteOff.payPointsExportApi(params).then(res => {
exportFn(res)
})
}
}
}
</script>
<style lang="scss" scoped>
.main-wrap {
background-color: #fff;
padding: 20px;
margin-top: 16px;
}
.detail-wrap {
padding: 0 12px;
font-size: 14px;
line-height: 20px;
.detail-li {
&:first-child {
margin-top: 0;
}
margin-top: 20px;
}
.detail-label {
width: 154px;
display: inline-block;
text-align: right;
color: #666666;
}
.detail-key {
color: #333;
}
}
.exportBtn {
float: right;
margin-bottom: 10px;
}
</style>
...@@ -4,10 +4,26 @@ ...@@ -4,10 +4,26 @@
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="showFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="table-header"> <div class="table-header">
<h2>积分提现列表</h2> <h2>积分提现列表</h2>
<!-- <div class="statistics">
累计结算金额:熠轩
<span class="price">xxx.xx</span>
元,拓博
<span class="price">xxx.xx</span>
元,远行
<span class="price">xxx.xx</span>
元;账户余额:熠轩
<span class="price">xxx.xx</span>
元,拓博
<span class="price">xxx.xx</span>
元,远行
<span class="price">xxx.xx</span>
元;
</div> -->
<div> <div>
<div class="flex"> <div class="flex">
<el-button size="small" @click="handleCheck()" type="primary" plain>批量审核</el-button> <el-button size="small" @click="handleCheck()" type="primary" plain>批量审核</el-button>
<el-button size="small" @click="handlePay()">批量付款</el-button> <el-button size="small" @click="handlePay()">批量付款</el-button>
<el-button size="small" @click="handleImport">提现导入</el-button>
<el-button size="small" @click="exportExcel">导出</el-button> <el-button size="small" @click="exportExcel">导出</el-button>
</div> </div>
</div> </div>
...@@ -41,6 +57,13 @@ ...@@ -41,6 +57,13 @@
<!-- 付款 --> <!-- 付款 -->
<GLDialog class="gl-form-page gl-form-min" title="付款" mode="mid" :visible.sync="isPay" :close-on-click-modal="false" :before-close="cancelPay"> <GLDialog class="gl-form-page gl-form-min" title="付款" mode="mid" :visible.sync="isPay" :close-on-click-modal="false" :before-close="cancelPay">
<glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule"> <glsx-combi-form formRef="payChildRef" defaultWidth="284px" ref="payFormRef" :formObj="payForm" :formData="payFormData" :formRules="payRule">
<tempalte slot="money">
<div class="channelMoney">
可用余额:
<span class="price">xx.xx</span>
元
</div>
</tempalte>
<template slot="captcha"> <template slot="captcha">
<div class="captcha-wrap"> <div class="captcha-wrap">
<el-input v-model="payForm.captcha" placeholder="请输入"></el-input> <el-input v-model="payForm.captcha" placeholder="请输入"></el-input>
...@@ -55,17 +78,60 @@ ...@@ -55,17 +78,60 @@
<el-button type="primary" size="small" :loading="loading" @click="comfirmPay">确定</el-button> <el-button type="primary" size="small" :loading="loading" @click="comfirmPay">确定</el-button>
</span> </span>
</GLDialog> </GLDialog>
<!-- 提现导入 -->
<GLDialog class="gl-form-page gl-form-min" title="提现导入" mode="mid" :visible.sync="isImport" :close-on-click-modal="false" :before-close="cancelImport">
<template v-if="importForm.isLoading == 0">
<el-form ref="form" :model="importForm" label-width="154px" :rules="importRule">
<el-form-item label="上传文件:" prop="fileName">
<el-input v-model="importForm.fileName" placeholder="请选择文件" disabled></el-input>
<div class="import-btn">
<i class="el-icon-plus"></i>
选择文件
<input id="fileUpload" type="file" style="opacity: 0" ref="file" class="import-input" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" @change="e => uploadFile(e)" />
</div>
<a class="download-url" href="https://img01.glsx.com.cn/weapp/resource/saas/scrm/xlsx/提现导入模版.xlsx">下载模版</a>
</el-form-item>
</el-form>
</template>
<div class="middle" v-if="importForm.isLoading == 1">
<i class="el-icon el-icon-loading"></i>
<div class="resulttip">正在处理中</div>
<div class="state">说明:系统正在加急导入中,请耐心等待;导入过程中,请不要退出当前操作,否则将导致本次提现导入无效。</div>
</div>
<div class="middle" v-if="importForm.isSuccess == 1">
<i class="el-icon el-icon-success"></i>
<div class="resulttip">处理成功</div>
<div class="state">已自动为您导入{{ importForm.successCount }}条提现记录,可返回列表查看。</div>
</div>
<div class="middle" v-if="importForm.isSuccess == 2">
<i class="el-icon el-icon-error"></i>
<div class="resulttip">处理失败</div>
<div class="state">
可点击
<a class="err-url" :href="importForm.errorUrl">下载失败模版</a>
查看失败原因。
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="cancelImport" v-show="importForm.isSuccess == 0">取消</el-button>
<el-button type="primary" size="small" :loading="checkLoading" @click="comfirmImport" v-show="importForm.isLoading != 1">确定</el-button>
</span>
</GLDialog>
<!-- 详情 --> <!-- 详情 -->
<detail-dialog :detail-visible="detailVisible" :id="id" @dialogClose="dialogClose"></detail-dialog> <detail-dialog :detail-visible="detailVisible" :id="id" @dialogClose="dialogClose"></detail-dialog>
</div> </div>
</template> </template>
<script> <script>
import * as XLSX from 'xlsx'
import DetailDialog from './detail.vue' import DetailDialog from './detail.vue'
import * as dayjs from 'dayjs' import * as dayjs from 'dayjs'
import url from '@/assets/empty.png' import url from '@/assets/empty.png'
import util from '@/utils/index'
const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回'] const tableStatus = ['待审核', '已审核', '第三方处理', '成功', '失败', '驳回']
const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E'] const colors = ['#FDB757', '#2CCA74', '#5850FF', '#2CCA74', '#999999', '#EB4E4E']
const tabelHeaderModel = ['商户名称', '商户号', '客户名称', '客户手机号', '提现金额', '收款人姓名', '收款人身份证', '收款银行卡号', '收款银行', '收款人手机号']
export default { export default {
components: { components: {
DetailDialog DetailDialog
...@@ -85,7 +151,8 @@ export default { ...@@ -85,7 +151,8 @@ export default {
customerPhone: '', customerPhone: '',
status: '', status: '',
channel: '', channel: '',
merchantName: '' merchantName: '',
transferType: ''
}, },
hasFooter: false, hasFooter: false,
tableSearchForm: {}, tableSearchForm: {},
...@@ -135,6 +202,15 @@ export default { ...@@ -135,6 +202,15 @@ export default {
pickerOptions: 'beforeRangePickerOptions' pickerOptions: 'beforeRangePickerOptions'
}, },
{ {
label: '付款渠道',
name: 'channel',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confLabel',
optionsName: 'channelList'
},
{
label: '所属门店', label: '所属门店',
name: 'merchantName', name: 'merchantName',
type: 'select', type: 'select',
...@@ -144,13 +220,13 @@ export default { ...@@ -144,13 +220,13 @@ export default {
optionsName: 'merchantList' optionsName: 'merchantList'
}, },
{ {
label: '付款渠道', label: '提现类型',
name: 'channel', name: 'transferType',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'confId', optionId: 'confId',
optionLabel: 'confLabel', optionLabel: 'confLabel',
optionsName: 'channelList' optionsName: 'withdrawalTypeList'
} }
], ],
tableButtonList: [ tableButtonList: [
...@@ -348,6 +424,16 @@ export default { ...@@ -348,6 +424,16 @@ export default {
confId: 'TXIAT', confId: 'TXIAT',
confLabel: '熠轩' confLabel: '熠轩'
} }
],
withdrawalTypeList: [
{
confId: '0',
confLabel: '积分提现'
},
{
confId: '1',
confLabel: '普通提现'
}
] ]
}, },
showPassDialog: false, showPassDialog: false,
...@@ -379,19 +465,21 @@ export default { ...@@ -379,19 +465,21 @@ export default {
label: '付款渠道', label: '付款渠道',
type: 'select', type: 'select',
name: 'channel', name: 'channel',
optionId: 'id', optionId: 'confId',
optionLabel: 'text', optionLabel: 'confLabel',
optionList: [ optionList: [
// {
// text: '拓博',
// id: 'LG'
// },
{ {
text: '熠轩', confId: 'TXIAT',
id: 'TXIAT' confLabel: '熠轩'
} }
] ]
}, },
// {
// label: '',
// name: 'admin',
// type: 'input',
// addHtml: 'money'
// },
{ {
label: '管理员', label: '管理员',
name: 'admin', name: 'admin',
...@@ -414,7 +502,21 @@ export default { ...@@ -414,7 +502,21 @@ export default {
payRule: { payRule: {
channel: [{ required: true, message: '请选择付款渠道', trigger: 'change' }], channel: [{ required: true, message: '请选择付款渠道', trigger: 'change' }],
captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }] captcha: [{ required: true, message: '请输入验证码', trigger: 'blur' }]
} },
importRule: {
fileName: [{ required: true, message: '请选择', trigger: 'blur' }]
},
importForm: {
isLoading: 0,
isSuccess: 0,
result: '',
fileName: '',
fileUrl: '',
successCount: '',
batchNo: '',
errorUrl: ''
},
isImport: false
} }
}, },
watch: { watch: {
...@@ -486,18 +588,160 @@ export default { ...@@ -486,18 +588,160 @@ export default {
this.$utils.aToExport(res) this.$utils.aToExport(res)
}) })
}, },
async uploadFile(e) {
const file = e.srcElement.files[0]
let AllImgExt = '.xls|.xlsx'
let extName = file.name.substring(file.name.lastIndexOf('.')).toLowerCase()
if (AllImgExt.indexOf(extName) === -1) {
this.$message.error('上传格式不正确')
return false
}
const header = await this.compareHeader(file)
if (!util.getArrayIsSubset(header, tabelHeaderModel)) {
this.$message.error('模版错误')
} else {
const reader = new FileReader()
reader.readAsDataURL(file)
reader.onload = event => {
const imgFile = event.target.result
const arrBase64 = imgFile.split(',')
this.importForm.fileUrl = file.name.split('.')[1] + '@' + arrBase64[1]
this.importForm.fileName = file.name
}
}
},
compareHeader(file) {
return new Promise(resolve => {
const reader = new FileReader()
reader.onload = event => {
/* 解析数据 */
const bstr = event.target.result
const wb = XLSX.read(bstr, { type: 'binary' })
/* 获取文件的第一个工作表(WorkSheet) */
const wsname = wb.SheetNames[0]
let ws = wb.Sheets[wsname]
if (!ws['!ref']) {
this.$message.error('格式错误')
return
}
ws = this.handleStartTd(ws, 'A9')
const data = this.getHeaderRow(ws)
resolve(data)
}
reader.readAsBinaryString(file)
})
},
handleStartTd(worksheet, start) {
let old = worksheet['!ref']
old = old.split(':')
worksheet['!ref'] = start + ':' + old[1]
return worksheet
},
getHeaderRow(sheet) {
// console.log(sheet)
const headers = []
/* sheet['!ref']表示所有单元格的范围,例如从A1到F8则记录为 A1:F8*/
const range = XLSX.utils.decode_range(sheet['!ref'])
let C,
R = range.s.r /* 从第一行开始 */
/* 按列进行数据遍历 */
for (C = range.s.c; C <= range.e.c; ++C) {
/* 查找第一行中的单元格 */
const cell = sheet[XLSX.utils.encode_cell({ c: C, r: R })]
let hdr = 'UNKNOWN ' + C // <-- 进行默认值设置
if (cell && cell.t) hdr = XLSX.utils.format_cell(cell)
if (!hdr.includes('UNKNOWN')) {
headers.push(hdr)
}
}
return headers
},
handleSaveImport() {
let params = {
batchNo: this.importForm.batchNo
}
this.$apis.withdraw.handleSaveImport(params).then(res => {
this.handleSearch()
})
},
//提现导入
handleImport() {
this.isImport = true
this.clearFile()
},
clearFile() {
this.importForm = {
isLoading: 0,
isSuccess: 0,
result: '',
fileName: '',
fileUrl: '',
successCount: '',
batchNo: '',
errorUrl: ''
}
},
comfirmImport() {
let {
importForm: { isSuccess, fileName, isLoading },
isImport
} = this
if (fileName == '' && isLoading == 0) {
this.$message({
message: '请先选择文件',
type: 'error'
})
return
}
if (isImport && isSuccess != 0) {
this.isImport = false
this.clearFile()
return
}
this.importForm.isLoading = 1
this.$apis.withdraw.uploadXlsx({ file: this.importForm.fileUrl }).then(res => {
if (this.isImport) {
if (res.code == 0) {
this.importForm.isLoading = 2
if (res.data.importStatue == 0) {
this.importForm.successCount = res.data.successCount
this.importForm.isSuccess = 1 //处理成功
this.importForm.batchNo = res.data.batchNo
this.handleSaveImport()
} else {
this.importForm.errorUrl = res.data.errorUrl
this.importForm.isSuccess = 2 //处理失败
}
} else {
this.importForm.isLoading = 0
this.$message({
message: res.message,
type: 'error'
})
}
}
})
},
cancelImport() {
this.isImport = false
this.clearFile()
},
//获取复选table数据 //获取复选table数据
selectionTable(val) { selectionTable(val) {
this.ids = val.map(item => item.id) this.ids = val.map(item => item.id)
}, },
//批量审核 //批量审核
handleCheck(row, isRefuse = 0) { handleCheck(row, isRefuse = 0) {
// console.log(row)
// isRefuse: 0:审批,2:驳回 // isRefuse: 0:审批,2:驳回
if (row) { if (row) {
this.ids = isRefuse == 0 ? [row.id] : row.id this.ids = isRefuse == 0 ? [row.id] : row.id
this.$refs.withdrawRef.clearMutiSelect()
} else { } else {
if (!this.ids||this.ids.length == 0) { if (!this.ids || this.ids.length == 0) {
this.$message({ this.$message({
message: '请选择待审核的提现记录', message: '请选择待审核的提现记录',
type: 'error' type: 'error'
...@@ -514,9 +758,8 @@ export default { ...@@ -514,9 +758,8 @@ export default {
if (row) { if (row) {
this.ids = [row.id] this.ids = [row.id]
this.payForm.payMoney = (row.payAmount / 100).toFixed(2) this.payForm.payMoney = (row.payAmount / 100).toFixed(2)
this.$refs.withdrawRef.clearMutiSelect()
} else { } else {
if (!this.ids||this.ids.length == 0) { if (!this.ids || this.ids.length == 0) {
this.$message({ this.$message({
message: '请选择已审核的提现记录', message: '请选择已审核的提现记录',
type: 'error' type: 'error'
...@@ -540,6 +783,7 @@ export default { ...@@ -540,6 +783,7 @@ export default {
}) })
}, },
comfirmCheck() { comfirmCheck() {
// console.log(this.ids)
if (this.isRefuse == 2 && this.form.remark == '') { if (this.isRefuse == 2 && this.form.remark == '') {
this.$message({ this.$message({
message: '请输入驳回原因', message: '请输入驳回原因',
...@@ -647,28 +891,6 @@ export default { ...@@ -647,28 +891,6 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.import-btn {
position: relative;
width: 116px;
height: 32px;
text-align: center;
background: #5850ff;
border-radius: 4px;
color: #ffffff;
font-size: 14px;
margin-right: 8px;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 36px;
cursor: pointer;
font-size: 0;
}
.describe { .describe {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
...@@ -694,9 +916,100 @@ export default { ...@@ -694,9 +916,100 @@ export default {
text-align: right; text-align: right;
} }
} }
.table-header{ .table-header {
.el-button+.el-button { .el-button + .el-button {
margin-left: 10px; margin-left: 10px;
}
}
.price {
color: #5850ff;
}
.statistics {
font-size: 14px;
color: #999999;
}
.channelMoney {
position: relative;
font-size: 12px;
color: #999999;
right: 322px;
top: 35px;
margin-bottom: 20px;
.price {
color: #333333;
}
}
.import-btn {
position: relative;
width: 116px;
height: 32px;
text-align: center;
border-radius: 4px;
color: #666666;
font-size: 14px;
margin-left: 8px;
border: 1px solid #00000026;
line-height: 32px;
display: inline-block;
}
.import-input {
opacity: 0;
position: absolute;
right: 0;
top: 0;
width: 98px;
height: 32px;
cursor: pointer;
font-size: 0;
}
.download-url {
margin-top: 7px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
display: block;
}
.err-url {
margin-top: 7px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
display: inline-block;
}
.middle {
margin: 0 auto;
.el-icon {
font-size: 48px;
text-align: center;
position: relative;
left: 50%;
margin-left: -24px;
}
.el-icon-success {
color: #2dca75;
}
.el-icon-error {
color: #ec4f4f;
}
.resulttip {
font-weight: 600;
font-size: 16px;
color: #000000;
margin: 12px 0;
text-align: center;
}
.state {
font-size: 14px;
color: #666666;
text-align: center;
margin: 0 67px;
line-height: 20px;
}
} }
.gl-form-page /deep/ .el-dialog__footer {
text-align: center !important;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!