Compare commits
168 Commits
prod-24-06
...
prod-24-11
Author | SHA1 | Date | |
---|---|---|---|
226f9aef63 | |||
652055c3d3 | |||
fc2e9bfec6 | |||
8350cfb2a5 | |||
872e0ea91a | |||
5652ab9600 | |||
4e8e6d4f72 | |||
3bb4688652 | |||
675e89b02e | |||
c3100dd68f | |||
c04b43a8c8 | |||
c5c31c5eec | |||
94424faa2e | |||
db2493181a | |||
18ebd7c0d9 | |||
d239781d5d | |||
f2b4b3e853 | |||
57c3d3d679 | |||
4f8063bf2e | |||
266195ec26 | |||
898b4b8128 | |||
1e305b1734 | |||
e919d0136d | |||
6720928761 | |||
6affb368b7 | |||
a93c98b547 | |||
3ee550c985 | |||
28408ac803 | |||
41d44e93d4 | |||
8a822e829d | |||
8aafdc9bff | |||
432be97178 | |||
36cea0f447 | |||
07db998735 | |||
54b839fb0d | |||
343bccdcfa | |||
fcce91b6b5 | |||
baf25587a8 | |||
b0fd520316 | |||
1f8df28ef8 | |||
bd45b42ccd | |||
e19580e7f6 | |||
f954dff3ad | |||
2dc505c40d | |||
532b8d439b | |||
cc19777ddf | |||
812f3e3a03 | |||
b6a9836932 | |||
36d2895f2b | |||
d28a23e664 | |||
a642e7783c | |||
dccc3ae530 | |||
07ac2d1e86 | |||
6030432a8c | |||
235fe85604 | |||
a7f4018050 | |||
5c96f06916 | |||
2ad457c92a | |||
dd440e81df | |||
8212c1cd8a | |||
a0e6681ad6 | |||
4cf076914d | |||
7220ad8989 | |||
85ecdceaf1 | |||
a319a9d097 | |||
06591b6eb4 | |||
c9cedc526a | |||
d72a74c2ea | |||
e950ce2589 | |||
db45cecfe3 | |||
9345b2ab79 | |||
bc4f419aca | |||
7a73b0b83a | |||
45ca7a8382 | |||
584fded2f7 | |||
bd58a176f6 | |||
d8729033e1 | |||
20a9d7ebad | |||
9befe22373 | |||
ccf11f6fa6 | |||
edcd55b074 | |||
bce648bdc6 | |||
a5e4a2d5dd | |||
cc7ea113c4 | |||
5589417862 | |||
1dc5094172 | |||
413da6aea7 | |||
f255bf48e4 | |||
31d3bcf071 | |||
75e014562f | |||
3919bf6934 | |||
8223ff3e46 | |||
6e7254607b | |||
0e82be5cbe | |||
b6d86c4517 | |||
c3f859619f | |||
7b95507378 | |||
250e68bed7 | |||
e768f9c8f8 | |||
7aceb84ee5 | |||
0d91afc1e8 | |||
d362fef099 | |||
5dc9bfb840 | |||
fd1ad6db3c | |||
2d78a9cee6 | |||
68d9f83b66 | |||
728e70f00e | |||
46e2cb3b3e | |||
c22b3ac319 | |||
4250119cce | |||
5fc76a5765 | |||
71e1b1ebb7 | |||
73ec8c267b | |||
9cd3a70f43 | |||
431ba13eea | |||
672ed153da | |||
65c33e54f5 | |||
dedb0f53e9 | |||
8bed0868f8 | |||
70cea4d888 | |||
6d1df4a720 | |||
a7cf0a837e | |||
ec995b7548 | |||
372bbc44c0 | |||
7b160e12fb | |||
4c393f3f1e | |||
5afbf9df90 | |||
073814bd69 | |||
06fdbc4f84 | |||
86ed97f265 | |||
0aa9f3ec04 | |||
48cd129290 | |||
b8096b39f3 | |||
3a45615e4f | |||
d1b04ec51c | |||
dc091c6dd5 | |||
45914f0577 | |||
42694d57de | |||
61ccb58af2 | |||
f6c33c8c36 | |||
1fbc66a1d6 | |||
b80a748dc9 | |||
f38e2ce614 | |||
febf9a636e | |||
8deaa85c1c | |||
70675fde50 | |||
af297b5892 | |||
f472c878e8 | |||
5df83abfcf | |||
11664e92bf | |||
4be4015e30 | |||
39603134fb | |||
ad49a716b9 | |||
b1945ab42f | |||
4da4cacd7b | |||
39c8bb857b | |||
0dd54330af | |||
a7c7dafa33 | |||
b2af0684fa | |||
cb50de4039 | |||
7785c7ecbe | |||
f45792b527 | |||
793be9d28d | |||
d4c6081f34 | |||
e11946352c | |||
481c37f708 | |||
605bc306a5 | |||
d5d090cdc8 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -6,7 +6,7 @@ node_modules
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
/http.js
|
||||
src/http.js
|
||||
http.js
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
|
113
package-lock.json
generated
113
package-lock.json
generated
@ -1713,9 +1713,9 @@
|
||||
}
|
||||
},
|
||||
"@vant/icons": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-1.8.0.tgz",
|
||||
"integrity": "sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg=="
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@vant/icons/-/icons-3.0.2.tgz",
|
||||
"integrity": "sha512-4OlRVMd0uiDtD9hgSISZW8hB95vU0fFtc41tQchRIyiXkR0tS+DydZOLb8/bQkithrNWhW7Uud38MbKjlJ9lJw=="
|
||||
},
|
||||
"@vant/popperjs": {
|
||||
"version": "1.3.0",
|
||||
@ -2030,6 +2030,49 @@
|
||||
"webpack-merge": "^5.7.3",
|
||||
"webpack-virtual-modules": "^0.4.2",
|
||||
"whatwg-fetch": "^3.6.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vue/vue-loader-v15": {
|
||||
"version": "npm:vue-loader@15.11.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
|
||||
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/component-compiler-utils": "^3.1.0",
|
||||
"hash-sum": "^1.0.2",
|
||||
"loader-utils": "^1.1.0",
|
||||
"vue-hot-reload-api": "^2.3.0",
|
||||
"vue-style-loader": "^4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"hash-sum": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
|
||||
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"json5": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
||||
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@vue/cli-shared-utils": {
|
||||
@ -2194,47 +2237,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@vue/vue-loader-v15": {
|
||||
"version": "npm:vue-loader@15.11.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.11.1.tgz",
|
||||
"integrity": "sha512-0iw4VchYLePqJfJu9s62ACWUXeSqM30SQqlIftbYWM3C+jpPcEHKSPUZBLjSF9au4HTHQ/naF6OGnO3Q/qGR3Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/component-compiler-utils": "^3.1.0",
|
||||
"hash-sum": "^1.0.2",
|
||||
"loader-utils": "^1.1.0",
|
||||
"vue-hot-reload-api": "^2.3.0",
|
||||
"vue-style-loader": "^4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"hash-sum": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz",
|
||||
"integrity": "sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==",
|
||||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
|
||||
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz",
|
||||
"integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@vue/web-component-wrapper": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz",
|
||||
@ -3542,10 +3544,16 @@
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
|
||||
"integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ=="
|
||||
},
|
||||
"dayjs": {
|
||||
"version": "1.11.13",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz",
|
||||
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
|
||||
},
|
||||
"de-indent": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
||||
"integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg=="
|
||||
"integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
|
||||
"dev": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.4",
|
||||
@ -4880,7 +4888,8 @@
|
||||
"he": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||
"dev": true
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "10.7.3",
|
||||
@ -5508,7 +5517,8 @@
|
||||
"lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
@ -8025,12 +8035,12 @@
|
||||
}
|
||||
},
|
||||
"vant": {
|
||||
"version": "2.12.54",
|
||||
"resolved": "https://registry.npmjs.org/vant/-/vant-2.12.54.tgz",
|
||||
"integrity": "sha512-t7DCiLxNosDrg0Jm5EY9p0A5cAMo5OadmizbYtPEc0ru+OJKEa3kcfxtKIK5on7ZPqoOkyYJt8e6BQ1VDMPsrg==",
|
||||
"version": "2.13.2",
|
||||
"resolved": "https://registry.npmjs.org/vant/-/vant-2.13.2.tgz",
|
||||
"integrity": "sha512-anZbbLqXCq+rUJk10D67mn+V/1/i9tfOTdoR+64B0e+0BzV3KFgpHBF76noLa+yX9i/L+8DeL560WMk0GEN38g==",
|
||||
"requires": {
|
||||
"@babel/runtime": "7.x",
|
||||
"@vant/icons": "^1.7.1",
|
||||
"@vant/icons": "^3.0.2",
|
||||
"@vant/popperjs": "^1.1.0",
|
||||
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
|
||||
"vue-lazyload": "1.2.3"
|
||||
@ -8245,6 +8255,7 @@
|
||||
"version": "2.7.14",
|
||||
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz",
|
||||
"integrity": "sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"de-indent": "^1.0.2",
|
||||
"he": "^1.2.0"
|
||||
|
@ -18,7 +18,7 @@
|
||||
"qs": "^6.11.2",
|
||||
"sass": "^1.65.1",
|
||||
"sass-loader": "^13.3.2",
|
||||
"vant": "^2.12.54",
|
||||
"vant": "^2.13.2",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.0.7",
|
||||
"vuex": "^3.6.2",
|
||||
|
@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0">-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover,user-scalable=no">
|
||||
<meta name="format-detection" content="telephone=yes"/>
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
@ -29,5 +30,39 @@
|
||||
}
|
||||
</script>
|
||||
<script src="https://webapi.amap.com/maps?v=1.4.15&key=2560bbf04daef66c810c5e6a97e8c508&plugin=AMap.Polyline"></script>
|
||||
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>-->
|
||||
<script>
|
||||
// VConsole 默认会挂载到 `window.VConsole` 上
|
||||
// let vConsole = new window.VConsole();
|
||||
(function (doc, win) {
|
||||
console.log("==window.location.pathname===",window.location.pathname)
|
||||
let docEl = doc.documentElement
|
||||
let resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
||||
recalc = function () {
|
||||
var clientWidth = docEl.clientWidth;
|
||||
if (!clientWidth) return;
|
||||
if (clientWidth < 400) {
|
||||
clientWidth = 400;
|
||||
}
|
||||
docEl.style.fontSize = 18 * (clientWidth / 650) + 'px';
|
||||
};
|
||||
if (!doc.addEventListener) return;
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if (isMobile) {// 是移动端不变
|
||||
// console.log("是移动端不变")
|
||||
}else{
|
||||
if(window.location.pathname=='/h5/supplier/dispatch/kpiIndex'){
|
||||
// console.log("执行了执行了")
|
||||
win.addEventListener(resizeEvt, recalc, false);
|
||||
doc.addEventListener('DOMContentLoaded', recalc, false);
|
||||
}
|
||||
/*else{
|
||||
console.log("走着了这种饿 ")
|
||||
}*/
|
||||
}
|
||||
})(document, window);
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -4,7 +4,7 @@ export function getStatisticsKpiByMonth(data){
|
||||
return request({
|
||||
url: '/supplier/supplierKPI/querySupplierStatisticsKpiByMonth',
|
||||
method:'POST',
|
||||
contentType: 'application/json',
|
||||
// contentType: 'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -13,7 +13,7 @@ export function getStatisticsKpi(data){
|
||||
return request({
|
||||
url: '/supplier/supplierKPI/querySupplierStatisticsKpi',
|
||||
method:'POST',
|
||||
contentType: 'application/json',
|
||||
// contentType: 'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -23,7 +23,7 @@ export function getDriverStatisticsKpi(data){
|
||||
return request({
|
||||
url: '/supplier/supplierKPI/querySupplierDriverStatisticsKpi',
|
||||
method:'POST',
|
||||
contentType: 'application/json',
|
||||
// contentType: 'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -32,7 +32,45 @@ export function getKpiDetailsData(data){
|
||||
return request({
|
||||
url: '/supplier/supplierKPI/querySupplierKpiDetailsData',
|
||||
method:'POST',
|
||||
contentType: 'application/json',
|
||||
// contentType: 'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取近12个月的服务商数据
|
||||
export function getRecentSupplierKpi(data){
|
||||
return request({
|
||||
url: '/supplier/supplierKPI/queryRecentSupplierStatisticsKpi',
|
||||
method:'POST',
|
||||
// contentType: 'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 司机分数详情
|
||||
export function driverScoreDetail(data){
|
||||
return request({
|
||||
url: '/supplier/supplierKPI/querySupplierDriverStatisticsScore',
|
||||
method:'POST',
|
||||
// contentType: 'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 关键词搜索服务商名称
|
||||
export function getSupplierId(key) {
|
||||
return request({
|
||||
url: '/supplier/select/supplier',
|
||||
method: 'GET',
|
||||
params: {
|
||||
key: key ,
|
||||
}
|
||||
});
|
||||
}
|
||||
// supplier/select/driver 关键词搜索司机名称
|
||||
export function getDriverName(key) {
|
||||
return request({
|
||||
url: '/supplier/select/driver',
|
||||
method: 'GET',
|
||||
params: {
|
||||
key: key ,
|
||||
}
|
||||
});
|
||||
}
|
124
src/api/mine.js
124
src/api/mine.js
@ -132,7 +132,7 @@ export function deleteImage(data){
|
||||
})
|
||||
}
|
||||
//新增记账图片 form-data
|
||||
export function insertRecordPicture(data){
|
||||
/*export function insertRecordPicture(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/insertRecordPicture',
|
||||
method:'POST',
|
||||
@ -142,27 +142,35 @@ export function insertRecordPicture(data){
|
||||
// 'Content-Type': 'multipart/form-data',
|
||||
// },
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
//开票通知列表
|
||||
export function notifyInvoiceList(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/notifyInvoiceList',
|
||||
url:'/order/taskInvoiceBatch/selectPageList',
|
||||
method:'POST',
|
||||
contentType:'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
// contentType:'application/json',
|
||||
//开票通知详情
|
||||
export function notifyInvoiceDetail(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/accountRecord/notifyInvoiceDetail',
|
||||
url:'/order/taskInvoiceBatch/selectById',
|
||||
method:'POST',
|
||||
contentType:'application/json',
|
||||
data
|
||||
})
|
||||
}
|
||||
// /supplier/supplierTrainingMaterials/pageList 获取培训材料列表
|
||||
// 关联案件
|
||||
export function getOrderListByInvoice(data) {
|
||||
return request({
|
||||
url:'/order/taskOrderCostHisRecord/selectPageList',
|
||||
method:'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 调度app获取新签列表
|
||||
export function pageList(data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/user/supplierTrainingMaterialsPageList',
|
||||
@ -171,6 +179,31 @@ export function pageList(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
// 司机app获取新签列表
|
||||
export function driverTrainList(key){
|
||||
return request({
|
||||
url:'/supplier/supplierTraining/trainingTask',
|
||||
method:'GET',
|
||||
params:key
|
||||
})
|
||||
}
|
||||
|
||||
//获取普通材料
|
||||
export function getNormalList(key) {
|
||||
return request({
|
||||
url: '/supplier/supplierTraining/normalList',
|
||||
method: 'GET',
|
||||
params:key
|
||||
});
|
||||
}
|
||||
//获取培训材料
|
||||
export function getTrainingList(key) {
|
||||
return request({
|
||||
url: '/supplier/supplierTraining/trainingList',
|
||||
method: 'GET',
|
||||
params:key
|
||||
});
|
||||
}
|
||||
//用户操作权限
|
||||
export function userOperationPermissions(){
|
||||
return request({
|
||||
@ -189,6 +222,83 @@ export function uploadImage(data){
|
||||
})
|
||||
}
|
||||
|
||||
// 发票上传
|
||||
export function uploadInvoice(data){
|
||||
return request({
|
||||
url:'/order/taskInvoiceBatch/saveInvoiceImagesAndIdentify',
|
||||
method:'POST',
|
||||
contentType:'multipart/form-data',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除发票
|
||||
export function deleteInvoice(data) {
|
||||
return request({
|
||||
url:'/order/taskInvoiceBatch/deleteInfo',
|
||||
method:'POST',
|
||||
contentType:'multipart/form-data',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 生成财务批次
|
||||
export function createBatch(data) {
|
||||
return request({
|
||||
url:'/order/taskInvoiceBatch/supplierCreateFinanceBatch',
|
||||
method:'POST',
|
||||
contentType:'application/x-www-form-urlencoded',
|
||||
data,
|
||||
testFlag: true
|
||||
})
|
||||
}
|
||||
|
||||
// 开票信息列表
|
||||
export function getFinanceBatchList(data) {
|
||||
return request({
|
||||
url:'/order/taskInvoiceFinanceBatch/selectFinanceBatchPageList',
|
||||
method:'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 批次对应发票信息列表
|
||||
export function financeInvoiceList(data) {
|
||||
return request({
|
||||
url:'/order/taskInvoiceBatch/selectInvoicePageList',
|
||||
method:'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 查看发票
|
||||
export function selectInvoiceDetailInfo(data) {
|
||||
return request({
|
||||
url:'/order/taskInvoiceBatch/selectInvoiceDetailInfo',
|
||||
method:'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 填写快递
|
||||
export function saveBatchCourierNumber(data) {
|
||||
return request({
|
||||
url:'/order/taskInvoiceBatch/supplierSaveBatchCourierNumber',
|
||||
method:'POST',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取服务商发票信息
|
||||
export function getBillingInfo(url, data) {
|
||||
return request({
|
||||
url: url,
|
||||
method:'POST',
|
||||
contentType:'multipart/form-data',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// ocr 识别
|
||||
export function ocrHandler(data){
|
||||
return request({
|
||||
|
@ -77,3 +77,21 @@ export function updateOrderSettlement(data){
|
||||
data
|
||||
})
|
||||
}
|
||||
// 电瓶数量列表
|
||||
export function batteryCountList(){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/battery/batteryCountList',
|
||||
method:'POST',
|
||||
contentType:'application/json',
|
||||
// data
|
||||
})
|
||||
}
|
||||
// 电瓶详情
|
||||
export function batteryDetailList (data){
|
||||
return request({
|
||||
url:'/supplierAppV2/dispatchApp/battery/batteryDetailList',
|
||||
method:'POST',
|
||||
contentType:'application/json',
|
||||
data
|
||||
})
|
||||
}
|
BIN
src/assets/icon_upload.png
Normal file
BIN
src/assets/icon_upload.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 524 B |
@ -2,6 +2,7 @@ import Vue from "vue";
|
||||
import VueRouter from "vue-router";
|
||||
Vue.use(VueRouter);
|
||||
import kpiRouter from './kpi-router'
|
||||
import invoiceRouter from "@/router/invoice-router";
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
@ -84,15 +85,48 @@ const routes = [
|
||||
name: 'invoicingNotify',
|
||||
component: () => import('@/views/index/invoicingNotify.vue'),
|
||||
meta: {
|
||||
title: '开票通知'
|
||||
title: '工单批次'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/invoiceListInfo",
|
||||
name: 'invoiceListInfo',
|
||||
component: () => import('@/views/index/invoiceListInfo.vue'),
|
||||
meta: {
|
||||
title: '开票信息'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/invoiceInfo",
|
||||
name: 'invoiceInfo',
|
||||
component: () => import('@/views/index/invoiceInfo.vue'),
|
||||
meta: {
|
||||
title: '开票信息'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/invoicingDetail",
|
||||
name: 'invoicingDetail',
|
||||
component: () => import('@/views/index/invoicingDetail'),
|
||||
meta: {
|
||||
title: '开票通知详情'
|
||||
title: '工单批次详情'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/uploadInvoice",
|
||||
name: 'uploadInvoice',
|
||||
component: () => import('@/views/index/uploadInvoice.vue'),
|
||||
meta: {
|
||||
title: '上传发票',
|
||||
cache: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "/showInvoice",
|
||||
name: 'showInvoice',
|
||||
component: () => import('@/views/index/showInvoice.vue'),
|
||||
meta: {
|
||||
title: '查看发票'
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -131,6 +165,14 @@ const routes = [
|
||||
path: '/trainDocment',
|
||||
name: 'trainDocment',
|
||||
component:()=>import('@/views/documentView/trainDocment.vue'),
|
||||
meta: {
|
||||
title:'培训文档',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/diverTrainDocment',
|
||||
name: 'diverTrainDocment',
|
||||
component:()=>import('@/views/documentView/diverTrainDocment.vue'),
|
||||
meta: {
|
||||
title:'培训文档'
|
||||
}
|
||||
@ -180,7 +222,15 @@ const routes = [
|
||||
name: 'newTrainingList',
|
||||
component:()=>import('@/views/newcomerTraining/newTrainingList.vue'),
|
||||
meta: {
|
||||
title:'新人培训'
|
||||
title:'新服务商培训'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/driverTrainingList',
|
||||
name: 'driverTrainingList',
|
||||
component:()=>import('@/views/newcomerTraining/driverTrainingList.vue'),
|
||||
meta: {
|
||||
title:'新师傅培训'
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -199,7 +249,24 @@ const routes = [
|
||||
title:'维保申请'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/batteryList',
|
||||
name: 'batteryList',
|
||||
component:()=>import('@/views/battery/batteryList.vue'),
|
||||
meta: {
|
||||
title:'电瓶进销存'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/batteryDetail',
|
||||
name: 'batteryDetail',
|
||||
component:()=>import('@/views/battery/batteryDetail.vue'),
|
||||
meta: {
|
||||
title:'电瓶详情'
|
||||
}
|
||||
},
|
||||
...kpiRouter,
|
||||
...invoiceRouter,
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
|
11
src/router/invoice-router.js
Normal file
11
src/router/invoice-router.js
Normal file
@ -0,0 +1,11 @@
|
||||
const invoiceRouter = [
|
||||
{
|
||||
path: '/invoiceIndex',
|
||||
name: 'invoiceIndex',
|
||||
component: () => import('@/views/invoice/invoiceIndex'),
|
||||
meta:{
|
||||
title: '道路救援',
|
||||
}
|
||||
},
|
||||
]
|
||||
export default invoiceRouter
|
@ -1,8 +1,9 @@
|
||||
@import "@/styles/mixin.scss";
|
||||
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
overflow-y: auto;
|
||||
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
@ -13,16 +14,44 @@
|
||||
@include wh(17px, 17px);
|
||||
}
|
||||
}
|
||||
.tab_wrap {
|
||||
@include fontWeightSize(bold, 12px);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 5px 0 5px 0;
|
||||
@include colorOpa(#737373,0.7);
|
||||
div {
|
||||
padding-top: 8px;
|
||||
}
|
||||
.active {
|
||||
color: #3678FF;
|
||||
position: relative;
|
||||
}
|
||||
.active:after {
|
||||
content: '';
|
||||
display: block;
|
||||
@include wh(50px,2px);
|
||||
background: linear-gradient(270deg, #33A3FF 0%, #176AFE 100%);
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
margin-top: 3px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
.contentWrap{
|
||||
@include sizingPadding(0,8px);
|
||||
overflow-y: auto;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
height: calc(100% - 100px);
|
||||
margin-top: 10px;
|
||||
.itemWrap{
|
||||
margin-bottom: 16px;
|
||||
@include wh(100%, 300px);
|
||||
width: 100%;
|
||||
//@include wh(100%, 300px);
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
||||
@include sizingPadRadius(6px ,0,3px);
|
||||
@include sizingPadRadius(6px ,0,6px);
|
||||
@include flexAround;
|
||||
@include fontWeightSize(400, 12px);
|
||||
.flexBetween{
|
||||
@ -31,18 +60,16 @@
|
||||
.common{
|
||||
margin: 0 15px ;
|
||||
}
|
||||
.time{
|
||||
color: rgba(0,0,0,0.7);
|
||||
margin-top: 5px;
|
||||
}
|
||||
.imgWrap{
|
||||
@include wh(100%,200px);
|
||||
position: relative;
|
||||
margin: 6px 0;
|
||||
img{
|
||||
@include wh(100%,200px);
|
||||
}
|
||||
.name{
|
||||
position: absolute;
|
||||
left: 30px;
|
||||
bottom: 30px;
|
||||
@include fontWeightSize(bold,14px);
|
||||
color: #FFFFFF;
|
||||
@include wh(100%,100%);
|
||||
}
|
||||
}
|
||||
.left{
|
||||
|
103
src/styles/driverDocment.scss
Normal file
103
src/styles/driverDocment.scss
Normal file
@ -0,0 +1,103 @@
|
||||
@import "@/styles/mixin.scss";
|
||||
::v-deep .van-nav-bar__content{
|
||||
background-color: #3A3A3A !important;
|
||||
}
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
}
|
||||
.search{
|
||||
color: #AAADB3 !important;
|
||||
font-weight: bolder;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.navLeft{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #9C9C9C;
|
||||
font-size: 8px;
|
||||
.icon{
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
.statisticContainer{
|
||||
box-sizing: border-box;
|
||||
padding: 8px;
|
||||
}
|
||||
.statisticWrap{
|
||||
@include wh(100%,100px);
|
||||
background: #FFFFFF;
|
||||
box-sizing: border-box;
|
||||
padding: 8px 8px 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #c7c1c1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
.line1{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
span:first-child{
|
||||
font-weight: bolder;
|
||||
}
|
||||
span:last-child{
|
||||
opacity: .7;
|
||||
//font-size: 12px;
|
||||
}
|
||||
}
|
||||
.numWrap{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
div{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
span:first-child{
|
||||
margin-bottom: 3px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.rightWrap {
|
||||
@include flexCenter;
|
||||
.img2 {
|
||||
@include wh(17px, 17px);
|
||||
}
|
||||
}
|
||||
.driver_tab_wrap {
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 5px 0 5px 0;
|
||||
div {
|
||||
padding-top: 8px;
|
||||
}
|
||||
.active {
|
||||
position: relative;
|
||||
}
|
||||
.active:after {
|
||||
content: '';
|
||||
display: block;
|
||||
@include wh(100px,2px);
|
||||
background-color: #E8A524;
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
margin-top: 3px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
.empty{
|
||||
margin-top: 14px;
|
||||
|
||||
}
|
@ -15,20 +15,27 @@ let token = urlParams.get('token') ;
|
||||
localStorage.setItem('token', token);
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
let reqUrl=config.url
|
||||
// let reqUrl=config.url
|
||||
// console.log("reqUrl",reqUrl)
|
||||
config.data = config.contentType ? config.data : qs.stringify(config.data)
|
||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||
if (config.testFlag) {
|
||||
config.data = qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true})
|
||||
}
|
||||
config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded'
|
||||
let token = localStorage.getItem('token');
|
||||
// alert(token);
|
||||
// let token='4099761587129c46b03c9316c9e866c9'
|
||||
// let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MTI0NTQ5NTMsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiJDLeS4iua1t-a1i-ivleacjeWKoeWVhiIsInN1cHBsaWVySWQiOjMzMDQxLCJzdXBwbGllclR5cGUiOjIsInVzZXJuYW1lIjoic29uZyIsInVzZXJUeXBlIjoicmVzY3VlQXBwIiwiZGV2aWNlSWQiOiIyMmI0OWNhMjBmOWI4MzMwZDk4NzIxNzNmMzllYTY4YmMiLCJhdXRob3JpdGllcyI6W119LCJzY29wZSI6WyJhbGwiXSwiaXNzIjoiaHR0cHM6Ly9zaW5vYXNzaXN0LmNvbSIsImV4cCI6MTcxMjU0MTM1MywiaWF0IjoxNzEyNDU0OTUzfQ.sPU9_OD_TOWcTwqmlawEGyo4mCPrEaRYw2R02gnvYJw'
|
||||
// console.log("tokentokentoken",token)
|
||||
if (reqUrl.includes("/driverApp")) {
|
||||
config.headers['token'] = `${token}`;
|
||||
config.headers['Authorization'] = `${token}`;
|
||||
/*if (reqUrl.includes("/driverApp")) {
|
||||
// console.log("司机app")
|
||||
config.headers['token'] = `${token}`;
|
||||
} else {
|
||||
console.log("调度app")
|
||||
} else if(reqUrl.includes("/supplierApp") || reqUrl.includes("/supplierKPI") || reqUrl.includes('/supplier/select') || reqUrl.includes('/order') || reqUrl.includes('/order/taskInvoiceBatch') || reqUrl.includes('/supplier') ){
|
||||
// console.log("调度app,服务商kpi")
|
||||
config.headers['Authorization'] = `${token}`;
|
||||
}
|
||||
}else{
|
||||
config.headers['token'] = `${token}`;
|
||||
}*/
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
@ -48,7 +55,7 @@ service.interceptors.response.use(
|
||||
// }
|
||||
if ( res.code === 401 || res.code === 400 || res.code == 500) {
|
||||
Toast(res.msg || 'Error')
|
||||
return Promise.reject(new Error(res.msg || 'Error'))
|
||||
return Promise.reject(res.msg)
|
||||
} else {
|
||||
return res
|
||||
// if( res.code === 200 ) {
|
||||
|
@ -34,19 +34,26 @@ export const myMixins = {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
},
|
||||
goH5Detail(item){//h5传参到app文档资料,培训文档
|
||||
goH5Detail(item,type){//h5传参到app文档资料,培训文档
|
||||
// console.log("type",type)
|
||||
let data = {
|
||||
"action": "goTraining",
|
||||
"params": {
|
||||
"id": item.id,
|
||||
"id":type == '培训文档' ? Number(1000000+item.id) : item.id,
|
||||
}
|
||||
};
|
||||
|
||||
let u = navigator.userAgent;
|
||||
let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if(isiOS){
|
||||
// console.log("data",data)
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.android.sendMessage("articleId=" + item.id);
|
||||
if(type == '培训文档'){
|
||||
window.android.sendMessage("articleId=" +'q'+ item.id);
|
||||
}else{
|
||||
window.android.sendMessage("articleId=" + item.id);
|
||||
}
|
||||
}
|
||||
},
|
||||
h5GoBack(){
|
||||
|
138
src/views/battery/batteryDetail.vue
Normal file
138
src/views/battery/batteryDetail.vue
Normal file
@ -0,0 +1,138 @@
|
||||
<template>
|
||||
<div class="wrap" >
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="已售电瓶"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="h5GoBack"
|
||||
> </van-nav-bar>
|
||||
</div>
|
||||
<div class="container" v-if="batteryDetailList && batteryDetailList.length>0">
|
||||
<div class="itemWrap" v-for="(item,index) in batteryDetailList" :key="index">
|
||||
<div>
|
||||
<span class="halfOpci">设备号</span>
|
||||
<span class="allOpci">{{ item.productNo }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">品牌</span>
|
||||
<span class="allOpci">{{ item.brand }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">型号</span>
|
||||
<span class="allOpci">{{ item.model }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">售卖人员</span>
|
||||
<span class="allOpci">{{ item.saleName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">售卖时间</span>
|
||||
<span class="allOpci">{{ item.createTime }}</span>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {batteryDetailList} from "@/api/order"
|
||||
export default {
|
||||
name: "batteryDetail",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
batteryDetailList:[],
|
||||
isLoading: false,
|
||||
loading: false,
|
||||
brand: '',
|
||||
model:'',
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.brand = this.$route.params.brand;
|
||||
this.model = this.$route.params.model;
|
||||
await this.getDetailList()
|
||||
},
|
||||
methods:{
|
||||
async getDetailList(){
|
||||
let res = await batteryDetailList({
|
||||
brand:this.brand,
|
||||
model:this.model,
|
||||
})
|
||||
this.batteryDetailList=res.data.reverse();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/styles/mixin.scss';
|
||||
@import "@/styles/common.scss";
|
||||
|
||||
.wrap {
|
||||
background: #F4F5F7;
|
||||
@include wh(100%, 100%);
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
.rightWrap{
|
||||
@include wh(50px,20px);
|
||||
border-radius: 10px;
|
||||
opacity: 0.7;
|
||||
border: 1px solid #FFFFFF;
|
||||
@include flexTwoCenter;
|
||||
img{
|
||||
@include widHeiMar(9px,8px,4px);
|
||||
}
|
||||
.addTxt{
|
||||
@include fontWeightSize(bolder,11px);
|
||||
@include colorOpa( #FFFFFF,0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
.container{
|
||||
@include wh(100%, calc(100% - 56px));
|
||||
overflow-y: auto;
|
||||
@include sizingPadding(13px,13px);
|
||||
}
|
||||
.itemWrap {
|
||||
@include wh(100%, 104px);
|
||||
@include radiusSizing(6px);
|
||||
@include fontWeightSize(400, 12px);
|
||||
@include flexBetween;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
||||
margin-bottom: 10px;
|
||||
padding: 11px 13px 9px 15px;
|
||||
position: relative;
|
||||
.halfOpci {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
opacity: .5;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.allOpci {
|
||||
opacity: 1;
|
||||
}
|
||||
.statusNo {
|
||||
color: #FF0000;
|
||||
}
|
||||
.statusYes {
|
||||
color: #09B820
|
||||
}
|
||||
.img{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 35%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
171
src/views/battery/batteryList.vue
Normal file
171
src/views/battery/batteryList.vue
Normal file
@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<div class="wrap" >
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="电瓶进销存"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="goBack"
|
||||
>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
<van-field class="input" right-icon="search" v-model="keyword" placeholder="请输入品牌或型号" @input="filterBatteryList"/>
|
||||
<div class="container" v-if="batteryList && batteryList.length>0">
|
||||
<div class="itemWrap" v-for="(item,index) in batteryList" :key="index">
|
||||
<div>
|
||||
<span class="halfOpci">品牌</span>
|
||||
<span class="allOpci">{{ item.brand }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">型号</span>
|
||||
<span class="allOpci">{{ item.model }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">总量</span>
|
||||
<span class="allOpci">{{ item.totalNum }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">库存数量</span>
|
||||
<span class="allOpci">{{ item.stockNum }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="halfOpci">已售数量</span>
|
||||
<span class="allOpci">{{ item.sellNum }}</span>
|
||||
</div>
|
||||
<img @click="goBatteryDetail(item)" class="img" src="@/assets/arrow_rht.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bgEmptyImg" v-show="show" >
|
||||
<img src="@/assets/empty.png" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {batteryCountList} from "@/api/order"
|
||||
export default {
|
||||
name: "batteryList",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
batteryList:[],
|
||||
isLoading: false,
|
||||
keyword:'',
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
show() {
|
||||
return (this.batteryList.length < 0 || this.batteryList.length == 0); // 判断数组长度是否大于 0
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods:{
|
||||
async filterBatteryList(){
|
||||
await this.getList()
|
||||
this.batteryList = this.batteryList.filter(item =>
|
||||
item.brand.includes(this.keyword) || item.model.includes(this.keyword)
|
||||
);
|
||||
},
|
||||
goBatteryDetail(item){//电瓶详情
|
||||
this.$router.push({
|
||||
name: "batteryDetail",
|
||||
params: {
|
||||
brand: item.brand,
|
||||
model: item.model,
|
||||
}
|
||||
})
|
||||
},
|
||||
async getList(){
|
||||
let res = await batteryCountList()
|
||||
this.batteryList=res.data
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/styles/mixin.scss';
|
||||
@import "@/styles/common.scss";
|
||||
|
||||
.wrap {
|
||||
background: #F4F5F7;
|
||||
@include wh(100%, 100%);
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
.rightWrap{
|
||||
@include wh(50px,20px);
|
||||
border-radius: 10px;
|
||||
opacity: 0.7;
|
||||
border: 1px solid #FFFFFF;
|
||||
@include flexTwoCenter;
|
||||
img{
|
||||
@include widHeiMar(9px,8px,4px);
|
||||
}
|
||||
.addTxt{
|
||||
@include fontWeightSize(bolder,11px);
|
||||
@include colorOpa( #FFFFFF,0.7);
|
||||
}
|
||||
}
|
||||
}
|
||||
.input{
|
||||
//@include sizingPadding(13px,13px);
|
||||
//margin: 13px 0;
|
||||
}
|
||||
.container{
|
||||
@include sizingPadding(13px,13px);
|
||||
overflow-y: auto;
|
||||
@include wh(100%, calc(100% - 96px));
|
||||
}
|
||||
|
||||
.itemWrap {
|
||||
@include wh(100%, 104px);
|
||||
@include radiusSizing(6px);
|
||||
@include fontWeightSize(400, 12px);
|
||||
@include flexBetween;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
||||
margin-bottom: 10px;
|
||||
padding: 11px 13px 9px 15px;
|
||||
position: relative;
|
||||
//margin-top: 10px;
|
||||
.halfOpci {
|
||||
display: inline-block;
|
||||
width: 60px;
|
||||
opacity: .5;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.allOpci {
|
||||
opacity: 1;
|
||||
}
|
||||
.statusNo {
|
||||
color: #FF0000;
|
||||
}
|
||||
.statusYes {
|
||||
color: #09B820
|
||||
}
|
||||
.img{
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 35%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.bgEmptyImg{
|
||||
@include flexTwoCenter;
|
||||
height: 90% ;
|
||||
background-color: #FAFAFA;
|
||||
img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
175
src/views/documentView/diverTrainDocment.vue
Normal file
175
src/views/documentView/diverTrainDocment.vue
Normal file
@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
>
|
||||
<template slot="title">
|
||||
<van-field
|
||||
v-model="keyword"
|
||||
placeholder="名称/关键词/简介"
|
||||
>
|
||||
</van-field>
|
||||
</template>
|
||||
<template slot="left">
|
||||
<div class="navLeft" @click="goBack">
|
||||
<van-icon class="icon" name="arrow-left" />
|
||||
<div>返回</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<van-icon class="search" name="search" size="20" @click="getTrainingList"/>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
<div class="statisticContainer">
|
||||
<div class="statisticWrap">
|
||||
<div class="line1">
|
||||
<span>培训统计</span>
|
||||
<span>更新时间:{{time}}</span>
|
||||
</div>
|
||||
<div class="numWrap">
|
||||
<div>
|
||||
<span>{{ numInfo?.totalNum }}</span>
|
||||
<span>文章总数</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ numInfo?.readNum }}</span><span>已培训数量</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{{ numInfo?.notReadNum }}</span> <span>未培训数量</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="driver_tab_wrap">
|
||||
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
||||
@click="changeTab(index)">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentWrap" v-show="!showEmpty">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.name }}<span v-if="item.mustRead===1" class="read">必读</span></div>
|
||||
</div>
|
||||
<div class="imgWrap">
|
||||
<img :src="item.themePicture">
|
||||
</div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<div class="info flexBetween common" >
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
<span style="color: red;font-size: 14px;margin-right: 8px" :class="item.alreadyRead===1 ? 'alRead' : ''">{{ item.alreadyRead===1 ? '已处理' : '未处理' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<div class="empty" v-show="showEmpty">
|
||||
<img src="@/assets/empty.png" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {getTrainingList} from "@/api/mine"
|
||||
import {timeFormat} from "@/utils/common";
|
||||
export default {
|
||||
name: "diverTrainDocment",
|
||||
computed: {
|
||||
},
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
tabArr: [{name: '车型技术参数', status: 1}, {name: '中道服务规范', status:2},{name: '中道小课堂', status: 3}],
|
||||
activeIndex: 0,
|
||||
pageList:[],
|
||||
totalList:[],
|
||||
numInfo:'',
|
||||
keyword:'',
|
||||
show:false,
|
||||
showEmpty:false,
|
||||
isLoading:false,
|
||||
driverId:'',
|
||||
time:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.driverId = urlParams.get('driverId');
|
||||
this.time=timeFormat(Date.now())
|
||||
this.getTrainingList();
|
||||
document.addEventListener('visibilitychange', async ( ) => {
|
||||
let state = document.visibilityState
|
||||
if (state == 'hidden') { // 用户离开了
|
||||
}
|
||||
if (state == 'visible') {
|
||||
this.getTrainingList();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
this.getTrainingList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async changeTab(index) {
|
||||
this.activeIndex = index
|
||||
await this.getTrainingList()
|
||||
},
|
||||
async getTrainingList(){
|
||||
let res= await getTrainingList({
|
||||
type:1,
|
||||
id:this.driverId,
|
||||
text:this.keyword || '',
|
||||
})
|
||||
this.totalList=[]
|
||||
this.pageList=[]
|
||||
this.numInfo=res.data
|
||||
this.totalList=res.data.list
|
||||
let result=[]
|
||||
if(this.activeIndex === 0){
|
||||
result=this.totalList?.filter(q => q.title === '车型技术参数');
|
||||
}else if(this.activeIndex === 1){
|
||||
result=this.totalList?.filter(q => q.title === '中道服务规范');
|
||||
}else if(this.activeIndex === 2){
|
||||
result=this.totalList?.filter(q => q.title === '中道小课堂');
|
||||
}
|
||||
if(result){
|
||||
this.pageList=result[0].materials
|
||||
this.time=timeFormat(Date.now())
|
||||
}
|
||||
if(this.pageList?.length === 0){
|
||||
this.showEmpty = true
|
||||
}else {
|
||||
this.showEmpty = false
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/common.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/docment.scss";
|
||||
@import "@/styles/driverDocment.scss";
|
||||
.read{
|
||||
padding: 2px 8px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid red;
|
||||
color: red;
|
||||
font-size: 8px;
|
||||
}
|
||||
.alRead{
|
||||
color: #cccccc !important;
|
||||
}
|
||||
.contentWrap{
|
||||
height: calc(100% - 180px) !important;
|
||||
}
|
||||
</style>
|
@ -1,28 +1,59 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="goBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div v-show="!show">文档资料</div>
|
||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getList"/>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<div class="rightWrap" @click="show = !show">
|
||||
<img src="@/assets/serach.png" class="img2" v-show="!show"/>
|
||||
<img src="@/assets/delKey.png" class="img2" v-show="show" @click="initShow"/>
|
||||
</div>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
|
||||
<div class="tab_wrap">
|
||||
<template v-if="supplierId">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
class="supplier"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="goBack"
|
||||
>
|
||||
<template slot="title">
|
||||
<div v-show="!show">文档资料</div>
|
||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getNormalList"/>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<div class="rightWrap" @click="show = !show">
|
||||
<img src="@/assets/serach.png" class="img2" v-show="!show"/>
|
||||
<img src="@/assets/delKey.png" class="img2" v-show="show" @click="initShow"/>
|
||||
</div>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="driverId">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
>
|
||||
<template slot="title">
|
||||
<van-field
|
||||
v-model="keyword"
|
||||
placeholder="名称/关键词/简介"
|
||||
>
|
||||
<!-- <template #button>
|
||||
<van-icon class="search" name="search" size="20" @click="getTrainingList"/>
|
||||
</template>-->
|
||||
</van-field>
|
||||
</template>
|
||||
<template slot="left">
|
||||
<div class="navLeft" @click="goBack">
|
||||
<van-icon class="icon" name="arrow-left" />
|
||||
<div>返回</div>
|
||||
</div>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<van-icon class="search" name="search" size="20" @click="getNormalList"/>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
</template>
|
||||
<div :class="supplierId ? 'tab_wrap' : 'driver_tab_wrap'">
|
||||
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
||||
@click="changeTab(index)">
|
||||
{{ item.name }}
|
||||
@ -30,23 +61,15 @@
|
||||
</div>
|
||||
<div class="contentWrap" v-show="!showEmpty">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item)">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'文档资料')">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.pushUser }}</div>
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
<div class="title">{{ item.name }}</div>
|
||||
</div>
|
||||
<div class="imgWrap">
|
||||
<img :src="item.themePicture">
|
||||
<div class="name">{{item.name}}</div>
|
||||
</div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<div class="doc flexBetween common">
|
||||
<div class="left">{{ item.docType?.label }}</div>
|
||||
<div class="right">
|
||||
<span style="color: red;font-size: 14px;margin-right: 8px">{{ item.listShowButton==null ? '已处理' : '未处理' }}</span>
|
||||
<span style="opacity: .9;color: #ccc">阅读 {{item.readCount}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="time common">{{ item.pushTime }}</div>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
@ -58,30 +81,33 @@
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {pageList} from "@/api/mine";
|
||||
import {getNormalList} from "@/api/mine";
|
||||
export default {
|
||||
name: "trainDocment",
|
||||
name: "docmentList",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
tabArr: [{name: '中道制度', status: 1}, {name: '技术参数', status: 2},],
|
||||
tabArr: [{name: '车型技术参数', status: 1}, {name: '中道服务规范', status:2},{name: '中道小课堂', status: 3}, {name: '新手入列', status: 4},],
|
||||
activeIndex: 0,
|
||||
pageList:[],
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
totalList:[],
|
||||
keyword:'',
|
||||
trainingType:1,
|
||||
isLoading:false,
|
||||
show:false,
|
||||
showEmpty:false
|
||||
showEmpty:false,
|
||||
supplierId:'',
|
||||
driverId:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.supplierId = urlParams.get('supplierId');
|
||||
this.driverId = urlParams.get('driverId');
|
||||
this.getNormalList()
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
this.getList()
|
||||
this.getNormalList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
@ -89,32 +115,41 @@ export default {
|
||||
},
|
||||
async changeTab(index) {
|
||||
this.activeIndex = index
|
||||
this.pageNum = 1
|
||||
this.pageList = [];
|
||||
if(this.activeIndex === 0){
|
||||
this.trainingType =1
|
||||
}else{
|
||||
this.trainingType=2
|
||||
}
|
||||
await this.getList()
|
||||
await this.getNormalList()
|
||||
},
|
||||
async getList(){
|
||||
let res= await pageList({
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize,
|
||||
docType:2,
|
||||
trainingType:this.trainingType,
|
||||
keyword:this.keyword || ''
|
||||
async getNormalList(){
|
||||
let res= await getNormalList({
|
||||
type:this.supplierId ? 2 : 1,
|
||||
// type:2,
|
||||
id: this.supplierId ? this.supplierId : this.driverId,
|
||||
// id:this.supplierId,//33041,
|
||||
text:this.keyword || '',
|
||||
})
|
||||
this.pageList=res.data;
|
||||
if(res.data.length === 0){
|
||||
this.totalList=[]
|
||||
this.pageList=[]
|
||||
this.totalList=res.data.list
|
||||
let result=[]
|
||||
if(this.activeIndex === 0){
|
||||
result=this.totalList?.filter(q => q.title === '车型技术参数');
|
||||
}else if(this.activeIndex === 1){
|
||||
result=this.totalList?.filter(q => q.title === '中道服务规范');
|
||||
}else if(this.activeIndex === 2){
|
||||
result=this.totalList?.filter(q => q.title === '中道小课堂');
|
||||
}else if(this.activeIndex === 3){
|
||||
result=this.totalList?.filter(q => q.title === '新手入列');
|
||||
}
|
||||
if(result){
|
||||
this.pageList=result[0].materials
|
||||
}
|
||||
if(this.pageList?.length === 0){
|
||||
this.showEmpty = true
|
||||
}else {
|
||||
this.showEmpty = false
|
||||
} },
|
||||
}
|
||||
},
|
||||
initShow(){
|
||||
this.keyword= '',
|
||||
this.getList()
|
||||
this.getNormalList()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -124,29 +159,8 @@ export default {
|
||||
@import "@/styles/common.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/docment.scss";
|
||||
.tab_wrap {
|
||||
@include fontWeightSize(bolder, 15px);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 5px 0 5px 0;
|
||||
@include colorOpa(#737373,0.7);
|
||||
div {
|
||||
padding-top: 8px;
|
||||
}
|
||||
.active {
|
||||
color: #3678FF;
|
||||
position: relative;
|
||||
}
|
||||
.active:after {
|
||||
content: '';
|
||||
display: block;
|
||||
@include wh(50px,3px);
|
||||
background: linear-gradient(270deg, #33A3FF 0%, #176AFE 100%);
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
margin-top: 3px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
@import "@/styles/driverDocment.scss";
|
||||
.supplier ::v-deep .van-nav-bar__content{
|
||||
background-color: #2C395F !important;
|
||||
}
|
||||
</style>
|
@ -11,7 +11,7 @@
|
||||
>
|
||||
<template slot="title">
|
||||
<div v-show="!show">培训文档</div>
|
||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getList"/>
|
||||
<van-field v-model="keyword" placeholder="请输入关键词" v-show="show" @input="getTrainingList"/>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<div class="rightWrap" @click="show = !show">
|
||||
@ -21,25 +21,26 @@
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
|
||||
<div class="tab_wrap">
|
||||
<div v-for="(item, index) in tabArr" :key="index" :class="{'active' : activeIndex == index}"
|
||||
@click="changeTab(index)">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentWrap" v-show="!showEmpty">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item)">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.pushUser }}</div>
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
<div class="title">{{ item.name }}<span v-if="item.mustRead===1" class="read">必读</span></div>
|
||||
<!-- <div class="time">{{ item.pushTime }}</div>-->
|
||||
</div>
|
||||
<div class="imgWrap">
|
||||
<img :src="item.themePicture">
|
||||
<div class="name">{{item.name}}</div>
|
||||
</div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<div class="doc flexBetween common">
|
||||
<div class="left">{{ item.docType?.label }}</div>
|
||||
<div class="right">
|
||||
<span style="color: red;font-size: 14px;margin-right: 8px">{{ item.listShowButton==null ? '已处理' : '未处理' }}</span>
|
||||
<span style="opacity: .9;color: #ccc">阅读 {{item.readCount}}</span>
|
||||
</div>
|
||||
<div class="info flexBetween common" >
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
<span style="color: red;font-size: 14px;margin-right: 8px" :class="item.alreadyRead===1 ? 'alRead' : ''">{{ item.alreadyRead===1 ? '已处理' : '未处理' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
@ -52,7 +53,7 @@
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {pageList} from "@/api/mine"
|
||||
import {getTrainingList} from "@/api/mine"
|
||||
export default {
|
||||
name: "trainDocment",
|
||||
computed: {
|
||||
@ -60,35 +61,65 @@ export default {
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
tabArr: [{name: '车型技术参数', status: 1}, {name: '中道服务规范', status:2},{name: '中道小课堂', status: 3}],
|
||||
activeIndex: 0,
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
pageList:[],
|
||||
totalList:[],
|
||||
keyword:'',
|
||||
show:false,
|
||||
showEmpty:false,
|
||||
isLoading:false,
|
||||
supplierId:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.supplierId = urlParams.get('supplierId');
|
||||
this.getTrainingList();
|
||||
document.addEventListener('visibilitychange', async ( ) => {
|
||||
let state = document.visibilityState
|
||||
if (state == 'hidden') { // 用户离开了
|
||||
}
|
||||
if (state == 'visible') {
|
||||
this.getTrainingList();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
this.getList()
|
||||
this.getTrainingList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async getList(){
|
||||
let res= await pageList({
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize,
|
||||
docType:1,
|
||||
keyword:this.keyword || ''
|
||||
async changeTab(index) {
|
||||
this.activeIndex = index
|
||||
await this.getTrainingList()
|
||||
},
|
||||
async getTrainingList(){
|
||||
let res= await getTrainingList({
|
||||
type:2,
|
||||
id: this.supplierId,
|
||||
text:this.keyword || '',
|
||||
})
|
||||
this.pageList=res.data;
|
||||
if(res.data.length === 0){
|
||||
this.totalList=[]
|
||||
this.pageList=[]
|
||||
this.totalList=res.data.list
|
||||
let result=[]
|
||||
if(this.activeIndex === 0){
|
||||
result=this.totalList?.filter(q => q.title === '车型技术参数');
|
||||
}else if(this.activeIndex === 1){
|
||||
result=this.totalList?.filter(q => q.title === '中道服务规范');
|
||||
}else if(this.activeIndex === 2){
|
||||
result=this.totalList?.filter(q => q.title === '中道小课堂');
|
||||
}
|
||||
if(result){
|
||||
this.pageList=result[0].materials
|
||||
}
|
||||
if(this.pageList?.length === 0){
|
||||
this.showEmpty = true
|
||||
}else {
|
||||
this.showEmpty = false
|
||||
@ -96,7 +127,7 @@ export default {
|
||||
},
|
||||
initShow(){
|
||||
this.keyword= '',
|
||||
this.getList()
|
||||
this.getTrainingList()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -105,4 +136,14 @@ export default {
|
||||
@import "@/styles/common.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/docment.scss";
|
||||
.read{
|
||||
padding: 2px 8px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid red;
|
||||
color: red;
|
||||
font-size: 8px;
|
||||
}
|
||||
.alRead{
|
||||
color: #cccccc !important;
|
||||
}
|
||||
</style>
|
@ -16,13 +16,26 @@
|
||||
<img class="startImg" src="@/assets/start.png" />
|
||||
<span>身份证正面</span>
|
||||
</div>
|
||||
<!-- <van-image @click="handlePreview" @remove="handleRemove" style="width: 54px;height: 54px;" class="camerImg" v-if="identityCardFront" :src="identityCardFront" />-->
|
||||
<!-- <el-upload-->
|
||||
<!-- v-else-->
|
||||
<!-- :action="baseURL + '/order/uploadImage'"-->
|
||||
<!-- :headers='authorization'-->
|
||||
<!-- accept=".png,.jpg,.jpeg,.zip,.rar,.xlsx,.xsavels,.pdf,.PDF,.doc,.docx"-->
|
||||
<!-- :on-success="changeHandle"-->
|
||||
<!-- :before-upload="checkImgType"-->
|
||||
<!-- class="upload-demo"-->
|
||||
<!-- :show-file-list="false"-->
|
||||
<!-- >-->
|
||||
<!-- <van-icon slot="default" name="plus" style="font-size: 54px" />-->
|
||||
<!-- </el-upload>-->
|
||||
<van-uploader
|
||||
v-model="identityCardFrontList"
|
||||
:after-read="identityCardFrontHandler"
|
||||
:max-size="5 * 1024 * 1024"
|
||||
max-count="1"
|
||||
:preview-size="54"
|
||||
accept="image "
|
||||
v-model="identityCardFrontList"
|
||||
:after-read="identityCardFrontHandler"
|
||||
:max-count="1"
|
||||
:preview-size="54"
|
||||
:max-size="5 * 1024 * 1024"
|
||||
accept="image/*"
|
||||
/>
|
||||
</div>
|
||||
<div class="lineBot"></div>
|
||||
@ -139,11 +152,15 @@ import {saveDriver, uploadImage, ocrHandler} from "@/api/mine"
|
||||
import TwoCommonBtn from "@/components/twoBtnCommon.vue"
|
||||
import CellGroup from "@/components/cellGroup.vue"
|
||||
import {formatDate1} from "@/utils/common"
|
||||
// import {ImagePreview} from "vant";
|
||||
|
||||
export default {
|
||||
name: "driverAdd",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
// baseURL:'',
|
||||
// licenseOcrInfo:'',
|
||||
id:'',
|
||||
driverName:"",
|
||||
driverPhone:"",
|
||||
@ -169,9 +186,22 @@ export default {
|
||||
idCardAuthority:'',
|
||||
idCardValidStartTime:'',
|
||||
idCardValidEndTime:'',
|
||||
}
|
||||
// authorization:{Authorization: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MjY4MDk4MTQsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiLkuIrmtbfmtYvor5XkvpvlupTllYYiLCJzdXBwbGllcklkIjozMzA0MSwic3VwcGxpZXJUeXBlIjoyLCJ1c2VybmFtZSI6InNvbmciLCJ1c2VyVHlwZSI6InJlc2N1ZUFwcCIsImRldmljZUlkIjoiMTkwZTM1ZjdlMTRhYzdjMDAwNyIsImF1dGhvcml0aWVzIjpbXX0sInNjb3BlIjpbImFsbCJdLCJpc3MiOiJodHRwczovL3Npbm9hc3Npc3QuY29tIiwiZXhwIjoxNzI2ODk2MjE0LCJpYXQiOjE3MjY4MDk4MTR9.5KTAMXZf8ll6HS4Z49YJQ1HiRvHr79Q1goDAGEtsBmY'},
|
||||
// authorization:{Authorization:''},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
/* if (window.location.href.includes('www.sinoassist.com')) {
|
||||
this.baseURL = 'https://api.sinoassist.com'
|
||||
} else if (window.location.href.includes('ccreview.sino-assist.com')) {
|
||||
this.baseURL = 'https://api.sinoassist.com'
|
||||
} else {
|
||||
this.baseURL = 'https://api1.sino-assist.com'
|
||||
// this.baseURL = 'http://localhost:8080'
|
||||
|
||||
}
|
||||
let token=localStorage.getItem('token')
|
||||
this.authorization.Authorization=token;*/
|
||||
this.id = this.$route.params?.id;
|
||||
this.driverName = this.$route.params?.name;
|
||||
this.driverPhone = this.$route.params?.phone;
|
||||
@ -215,6 +245,41 @@ export default {
|
||||
isUse(e){
|
||||
this.states=e
|
||||
},
|
||||
/* checkImgType(file) {
|
||||
const FileExt = file.name.replace(/.+\./, "");
|
||||
const isLt5M = file.size / 1024 / 1024 < 5;
|
||||
const whiteList = ['png', 'jpeg', 'jpg'];
|
||||
if (whiteList.indexOf(FileExt.toLowerCase()) === -1) {
|
||||
this.$message.error("请上传正确的文件格式:" + whiteList.join('、'))
|
||||
return false
|
||||
}
|
||||
if (!isLt5M) {
|
||||
this.$message.error('上传图片大小不能超过 5MB!');
|
||||
return false
|
||||
}
|
||||
},
|
||||
handleRemove() {
|
||||
this.identityCardFront = ''
|
||||
},
|
||||
handlePreview() {
|
||||
ImagePreview({
|
||||
images: this.identityCardFront,
|
||||
startPosition: 1,
|
||||
closeable: true,
|
||||
});
|
||||
},
|
||||
async changeHandle(response) {
|
||||
if (response.success === true) {
|
||||
this.$toast('上传成功')
|
||||
// this.form.identityCardFront = response.data;
|
||||
// await this.ocrFrontHandler()
|
||||
this.identityCardFront = response.data;
|
||||
console.log("this.identityCardFront",this.identityCardFront)
|
||||
await this.idCardOcrHandler();
|
||||
} else {
|
||||
this.$toast('上传失败')
|
||||
}
|
||||
},*/
|
||||
async identityCardFrontHandler(file) { // 上传身份证正面照片
|
||||
const formData = new FormData();
|
||||
formData.append("file" , file.file);
|
||||
|
344
src/views/index/invoiceInfo.vue
Normal file
344
src/views/index/invoiceInfo.vue
Normal file
@ -0,0 +1,344 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="开票信息"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="h5GoBack"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentWrap">
|
||||
<div class="content_tab">
|
||||
<div class="tab_title">批次信息</div>
|
||||
<div class="tab_content">
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">财务编号</div>
|
||||
<div class="item_content">
|
||||
<span id="copyText">{{invoiceInfo.financeBatchCode}}</span>
|
||||
<img class="copyIcon" @click="copyHandler(invoiceInfo.financeBatchCode)" src="@/assets/copy.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">工单数量</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.orderNum}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">总金额</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.totalMoney}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">扣款</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.cutMoney || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">税额扣款</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.taxCutMoney || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">开票金额</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.invoiceMoney || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">备注</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.remark || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">失败原因</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.failRemark || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">创建时间</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.createTime}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">对账状况</div>
|
||||
<div class="item_content">
|
||||
{{ statusStr(invoiceInfo.status, invoiceInfo.createTime) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_tab mt10">
|
||||
<div class="tab_title">发票信息</div>
|
||||
<div class="itemWrap" v-for="(item,index) in invoiceList" :key="index">
|
||||
<div class="item line1">
|
||||
<div class="title own_title">{{item.accountName}}</div>
|
||||
<div class="checkBtn" @click="goShowInvoice(item)">查看</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">发票号码:</span>
|
||||
<span class="content">{{item.financeBatchCode}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">发票金额:</span>
|
||||
<span class="content">¥{{item.invoiceMoney}}元</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">开票日期:</span>
|
||||
<span class="content">{{ item.invoiceDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content_tab mt10">
|
||||
<div class="tab_title">快递信息</div>
|
||||
<div class="itemWrap bg_cls pd_cls">
|
||||
<div class="item mb10">
|
||||
<span class="title width_cls">发票类型:</span>
|
||||
<span class="content">
|
||||
<van-radio-group v-model="invoiceType" disabled direction="horizontal">
|
||||
<van-radio :name="1" icon-size="16px">电子发票</van-radio>
|
||||
<van-radio :name="2" icon-size="16px">纸质发票</van-radio>
|
||||
</van-radio-group>
|
||||
</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title width_cls">补录快递单号:</span>
|
||||
<span class="content" style="flex: 1">
|
||||
<van-field v-model="courierNumber" label="" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="invoice_btn_wrap">
|
||||
<div class="btn" @click="saveHandler">保存</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import { financeInvoiceList, selectInvoiceDetailInfo, saveBatchCourierNumber } from "@/api/mine"
|
||||
import {Dialog} from "vant";
|
||||
export default {
|
||||
name: "invoiceInfo",
|
||||
mixins: [ myMixins ],
|
||||
data() {
|
||||
return {
|
||||
invoiceInfo: {},
|
||||
invoiceList: [],
|
||||
invoiceType: '',
|
||||
courierNumber: '',
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
let showItemInfo = localStorage.getItem('showItemInfo');
|
||||
this.invoiceInfo = showItemInfo ? JSON.parse(showItemInfo) : {};
|
||||
console.log('this.invoiceInfo', this.invoiceInfo)
|
||||
this.invoiceType = this.invoiceInfo.invoiceType
|
||||
this.id = this.$route.query.id;
|
||||
await this.getInvoiceHandler()
|
||||
},
|
||||
methods: {
|
||||
async saveHandler() {
|
||||
await saveBatchCourierNumber({
|
||||
invoiceBatchId: this.id,
|
||||
courierNumber: this.courierNumber,
|
||||
})
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: '操作成功!',
|
||||
}).then(() => {
|
||||
this.h5GoBack()
|
||||
});
|
||||
},
|
||||
async goShowInvoice(item) {
|
||||
let res = await selectInvoiceDetailInfo({
|
||||
id: item.id
|
||||
})
|
||||
localStorage.setItem('invoiceDetail', JSON.stringify(res.data));
|
||||
this.goPage('showInvoice')
|
||||
},
|
||||
statusStr(status,date) {
|
||||
if(new Date('2024-01-01 00:00:00') > new Date(date)){
|
||||
return ''
|
||||
}
|
||||
if( status == 1 ) {
|
||||
return '待审核'
|
||||
} else if( [2 ,3].includes(status)) {
|
||||
return '审核通过'
|
||||
} else if( status == 7 ) {
|
||||
return '审核失败'
|
||||
} else if( status == 4 ) {
|
||||
return '已打款'
|
||||
} else if( status == 8 ) {
|
||||
return '打款中'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
async getInvoiceHandler() {
|
||||
let res = await financeInvoiceList({
|
||||
current: 1,
|
||||
pageSize: 1000,
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
invoiceBatchId: this.id
|
||||
});
|
||||
this.invoiceList = res.data;
|
||||
console.log('current', res)
|
||||
},
|
||||
copyHandler(copyText){
|
||||
let inputNode = document.createElement('input') // 创建input
|
||||
inputNode.value = copyText // 赋值给 input 值
|
||||
document.body.appendChild(inputNode) // 插入进去
|
||||
inputNode.select() // 选择对象
|
||||
document.execCommand('Copy') // 原生调用执行浏览器复制命令
|
||||
inputNode.className = 'oInput'
|
||||
inputNode.style.display = 'none' // 隐藏
|
||||
this.$toast('复制成功')
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
}
|
||||
|
||||
.contentWrap{
|
||||
.content_tab {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
padding: 15px 15px;
|
||||
box-sizing: border-box;
|
||||
.tab_title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.tab_content {
|
||||
.item_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 26px;
|
||||
font-size: 12px;
|
||||
.item_label {
|
||||
color: rgba(0,0,0,0.5);
|
||||
margin-right: 5px;
|
||||
width: 60px;
|
||||
}
|
||||
.item_content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.copyIcon {
|
||||
width: 35px;
|
||||
height: 15px;
|
||||
margin-left: 10px
|
||||
}
|
||||
|
||||
.itemWrap{
|
||||
/*background: #FFFFFF;*/
|
||||
background-color: #EBF2F7;
|
||||
padding: 10px 20px;
|
||||
border: 1px solid #EBF2F7;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
line-height: 26px;
|
||||
@include flexBetween;
|
||||
margin-bottom: 10px;
|
||||
.line1{
|
||||
width: 100%;
|
||||
@include flexColBet;
|
||||
.checkBtn{
|
||||
@include bgFontColor(#FFFFFF,#354D93);
|
||||
@include wh(48px,18px);
|
||||
border-radius: 3px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item{
|
||||
display: flex;
|
||||
@include fontWeightSize(400,12px);
|
||||
span{
|
||||
display: inline-block;
|
||||
}
|
||||
.title{
|
||||
opacity: 0.5;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.own_title {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
.mt10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.bg_cls {
|
||||
background-color: #fff;
|
||||
}
|
||||
.pd_cls {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
::v-deep .van-cell {
|
||||
padding: 0;
|
||||
border: 1px solid #EBF2F7;
|
||||
}
|
||||
.width_cls {
|
||||
width: 80px;
|
||||
}
|
||||
.invoice_btn_wrap {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
.btn {
|
||||
width: 100%;
|
||||
background-color: #2C395F;
|
||||
color: #fff;
|
||||
padding: 15px 0;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
.mb10 {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
::v-deep .van-radio__icon {
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
262
src/views/index/invoiceListInfo.vue
Normal file
262
src/views/index/invoiceListInfo.vue
Normal file
@ -0,0 +1,262 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="开票信息"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="goBack"
|
||||
/>
|
||||
</div>
|
||||
<div class="search_wrap">
|
||||
<div class="search_left">
|
||||
<el-select v-model="form.statusValue" size="mini" clearable placeholder="请选择审核状态">
|
||||
<el-option
|
||||
v-for="item in statusValueOptions"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="search_right">
|
||||
<van-search
|
||||
v-model="form.financeBatchCode"
|
||||
show-action
|
||||
placeholder="请输入搜索关键词"
|
||||
@search="onSearch"
|
||||
>
|
||||
<template #action>
|
||||
<div @click="onSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contentWrap">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
finished-text="没有更多了"
|
||||
@load="getMore"
|
||||
>
|
||||
<div class="itemWrap" v-for="(item,index) in invoiceList" :key="index">
|
||||
<div class="item line1">
|
||||
<div class="itemTime">
|
||||
<span class="title">开票编号:</span>
|
||||
<span class="content">{{ item.financeBatchCode }}</span>
|
||||
</div>
|
||||
<div class="checkBtn" @click="getInvoiceInfo(item)">查看</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">工单数量:</span>
|
||||
<span class="content">{{ item.orderNum }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">开票金额:</span>
|
||||
<span class="content">{{ item.invoiceMoney || 0 }}元</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">创建时间:</span>
|
||||
<span class="content">{{ item.createTime }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">对账状态:</span>
|
||||
<span class="content">{{ statusStr(item.status, item.createTime) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { myMixins } from "@/utils/myMixins"
|
||||
import { getFinanceBatchList } from "@/api/mine"
|
||||
export default {
|
||||
name: "invoiceListInfo",
|
||||
mixins: [ myMixins ],
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
statusValue: '',
|
||||
financeBatchCode: '',
|
||||
statusList: [],
|
||||
},
|
||||
invoiceList: [],
|
||||
isLoading: false,
|
||||
loading: false,
|
||||
finished: false,
|
||||
page: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
pageNum: 1,
|
||||
},
|
||||
supplierId: '',
|
||||
statusValueOptions:[{name:'待审核',value:1},{name:'审核通过待打款',value: 2},{name:'审核失败',value: 3},{name:'打款中',value: 4},{name:'已打款',value: 5}],
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
async 'form.statusValue' (){
|
||||
if( this.form.statusValue == 1 ) {
|
||||
this.form.statusList = [1]
|
||||
} else if( this.form.statusValue == 2 ) {
|
||||
this.form.statusList = [2, 3]
|
||||
} else if( this.form.statusValue == 3 ) {
|
||||
this.form.statusList = [7]
|
||||
} else if( this.form.statusValue == 4 ) {
|
||||
this.form.statusList = [8]
|
||||
} else if( this.form.statusValue == 5 ) {
|
||||
this.form.statusList = [4]
|
||||
} else {
|
||||
this.form.statusList = []
|
||||
}
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.supplierId = this.$route.query.supplierId;
|
||||
},
|
||||
methods: {
|
||||
async onSearch() {
|
||||
this.page.pageNum=1;
|
||||
await this.getList()
|
||||
},
|
||||
onRefresh() {
|
||||
this.page.pageNum=1;
|
||||
this.getList();
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
async getMore(){
|
||||
await this.getList()
|
||||
this.page.pageNum++;
|
||||
// 加载状态结束
|
||||
this.loading = false;
|
||||
// 数据全部加载完成
|
||||
if (this.invoiceList.length >= this.page.total) {
|
||||
this.finished = true;
|
||||
}
|
||||
},
|
||||
async getList() {
|
||||
let res = await getFinanceBatchList({
|
||||
...this.page,
|
||||
...this.form,
|
||||
supplierId: this.supplierId
|
||||
});
|
||||
if(res.code == 200){
|
||||
this.page.total = res.total;
|
||||
if(this.page.pageNum == 1){
|
||||
this.invoiceList = res.data;
|
||||
}else{
|
||||
let preList = this.invoiceList;
|
||||
let arr = res.data;
|
||||
this.invoiceList = preList.concat(arr)
|
||||
}
|
||||
if (this.invoiceList.length === 0) {
|
||||
this.show=true
|
||||
}else{
|
||||
this.show=false
|
||||
}
|
||||
}
|
||||
},
|
||||
getInvoiceInfo(item) {
|
||||
localStorage.setItem('showItemInfo', JSON.stringify(item));
|
||||
this.goPage('invoiceInfo', {
|
||||
id: item.id
|
||||
})
|
||||
},
|
||||
statusStr(status,date) {
|
||||
if(new Date('2024-01-01 00:00:00') > new Date(date)){
|
||||
return ''
|
||||
}
|
||||
if( status == 1 ) {
|
||||
return '待审核'
|
||||
} else if( [2 ,3].includes(status)) {
|
||||
return '审核通过'
|
||||
} else if( status == 7 ) {
|
||||
return '审核失败'
|
||||
} else if( status == 4 ) {
|
||||
return '已打款'
|
||||
} else if( status == 8 ) {
|
||||
return '打款中'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.navBar{
|
||||
margin-bottom: 46px;
|
||||
}
|
||||
.contentWrap {
|
||||
background-color: #F4F5F7;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
}
|
||||
.search_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 10px;
|
||||
background-color: #fff;
|
||||
.search_left {
|
||||
width: 100px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.search_right {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.itemWrap{
|
||||
background: #FFFFFF;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
border-radius: 6px;
|
||||
line-height: 26px;
|
||||
@include flexBetween;
|
||||
margin-bottom: 10px;
|
||||
.item{
|
||||
@include fontWeightSize(400,12px);
|
||||
span{
|
||||
display: inline-block;
|
||||
}
|
||||
.title{
|
||||
opacity: .5;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.line1{
|
||||
width: 100%;
|
||||
@include flexColBet;
|
||||
.checkBtn{
|
||||
@include bgFontColor(#FFFFFF,#354D93);
|
||||
@include wh(48px,18px);
|
||||
border-radius: 3px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -2,7 +2,7 @@
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="开票通知详情"
|
||||
title="工单批次详情"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
@ -12,52 +12,143 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="contentWrap">
|
||||
<div class="item" v-for="(item,index) in detailList" :key="index">
|
||||
<div class="itemContent">
|
||||
<span> {{ item.orderCode }}</span>
|
||||
<span>{{ item.serviceName }}</span>
|
||||
<span> {{item.settleAmount}}元</span>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="content_tab">
|
||||
<div class="tab_title">批次详情</div>
|
||||
<div class="tab_content">
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">批次编号</div>
|
||||
<div class="item_content">
|
||||
<span id="copyText">{{invoiceInfo.batchCode}}</span>
|
||||
<img class="copyIcon" @click="copyHandler(invoiceInfo.batchCode)" src="@/assets/copy.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">财务编号</div>
|
||||
<div class="item_content">
|
||||
<span id="copyText2">{{invoiceInfo.financeBatchCode}}</span>
|
||||
<img class="copyIcon" @click="copyHandler(invoiceInfo.financeBatchCode)" src="@/assets/copy.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">工单数量</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.orderNum}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">总金额</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.orderNum}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">扣款</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.cutMoney || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">税额扣款</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.taxCutMoney || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">开票金额</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.invoiceMoney || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">备注</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.remark || ''}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">创建时间</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.createTime}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">对账状况</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.statusString}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_tab mt_cls">
|
||||
<div class="tab_title">关联案件</div>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text_left">案件编号</th>
|
||||
<th>服务类型</th>
|
||||
<th>结算类型</th>
|
||||
</tr>
|
||||
<tr v-for="(item, index) in orderList" :key="index">
|
||||
<td class="text_left">
|
||||
{{item.orderCode}}
|
||||
<img class="copyIcon" @click="copyHandler(item.orderCode)" src="@/assets/copy.png" />
|
||||
</td>
|
||||
<td>{{item.serviceType || ''}}</td>
|
||||
<td>{{item.settleAmount || ''}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {notifyInvoiceDetail} from "@/api/mine"
|
||||
import { notifyInvoiceDetail, getOrderListByInvoice } from "@/api/mine"
|
||||
export default {
|
||||
name: "invoicingDetail",
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
detailList:[],
|
||||
form:{
|
||||
batchCode:'',
|
||||
startTime:'',
|
||||
overTime:'',
|
||||
}
|
||||
batchCode: '',
|
||||
id: '',
|
||||
invoiceInfo: {},
|
||||
orderList: [],
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
// console.log(this.$route.query?.id)
|
||||
this.form.batchCode=this.$route.query?.id;
|
||||
this.form.startTime=this.$route.query?.startTime;
|
||||
this.form.overTime=this.$route.query?.overTime;
|
||||
this.batchCode = this.$route.query?.batchCode;
|
||||
this.id = this.$route.query?.id;
|
||||
await this.getDetail()
|
||||
await this.getOrderList();
|
||||
},
|
||||
methods:{
|
||||
async getDetail(){
|
||||
let res=await notifyInvoiceDetail({
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize,
|
||||
...this.form,
|
||||
})
|
||||
this.detailList=res.data
|
||||
}
|
||||
copyHandler(copyText){
|
||||
let inputNode = document.createElement('input') // 创建input
|
||||
inputNode.value = copyText // 赋值给 input 值
|
||||
document.body.appendChild(inputNode) // 插入进去
|
||||
inputNode.select() // 选择对象
|
||||
document.execCommand('Copy') // 原生调用执行浏览器复制命令
|
||||
inputNode.className = 'oInput'
|
||||
inputNode.style.display = 'none' // 隐藏
|
||||
this.$toast('复制成功')
|
||||
},
|
||||
async getOrderList() {
|
||||
let res = await getOrderListByInvoice({
|
||||
batchCode: this.batchCode,
|
||||
pageSize: 1000,
|
||||
pageNum: 1,
|
||||
createTime: this.invoiceInfo.startTime
|
||||
})
|
||||
this.orderList = res.data;
|
||||
console.log('rerere', res);
|
||||
},
|
||||
async getDetail(){
|
||||
let res = await notifyInvoiceDetail({
|
||||
id: this.id
|
||||
})
|
||||
this.invoiceInfo = res.data
|
||||
console.log('rerere', res)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -67,26 +158,62 @@ export default {
|
||||
@import "@/styles/common.scss";
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
}
|
||||
.navBar{
|
||||
height: 46px;
|
||||
}
|
||||
.contentWrap{
|
||||
@include wh(100%,400px);
|
||||
margin-left: 27px;
|
||||
.item{
|
||||
.mt_cls {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.content_tab {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
@include all-height(47px);
|
||||
.itemContent{
|
||||
margin-left: 5px;
|
||||
color: #323643;
|
||||
@include fontWeightSize(400,13px);
|
||||
padding: 15px 15px;
|
||||
box-sizing: border-box;
|
||||
.tab_title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.line{
|
||||
@include wh(100%,1px);
|
||||
@include bgcolorOpa(#E9E9EA,0.6);
|
||||
.tab_content {
|
||||
.item_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
.item_label {
|
||||
color: rgba(0,0,0,0.5);
|
||||
margin-right: 5px;
|
||||
width: 60px;
|
||||
}
|
||||
.item_content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
table {
|
||||
line-height: 30px;
|
||||
width: 100%;
|
||||
.text_left {
|
||||
text-align: left;
|
||||
width: 50%;
|
||||
}
|
||||
th {
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.copyIcon {
|
||||
width: 35px;
|
||||
height: 15px;
|
||||
margin-left: 10px
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="开票通知"
|
||||
title="工单批次"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
@ -11,41 +11,74 @@
|
||||
@click-left="goBack"
|
||||
/>
|
||||
</div>
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<div class="itemWrap" v-for="(item,index) in notifyList" :key="index" >
|
||||
<div class="item line1">
|
||||
<div class="itemTime">
|
||||
<span class="title">开票月份:</span>
|
||||
<span class="content">{{ item.invoiceMonth }}</span>
|
||||
</div>
|
||||
<div class="orderNum">
|
||||
<span class="title">总案件数:</span>
|
||||
<span class="content">{{ item.orderNum }}</span>
|
||||
</div>
|
||||
<div class="checkBtn" @click="goPage('invoicingDetail',{id:item.batchCode,startTime:item.startTime,overTime:item.overTime})">查看 </div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">批次号:</span>
|
||||
<span class="content">{{ item.batchCode }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">结算总金额:</span>
|
||||
<span class="content">{{ item.totalMoney + '元' }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">扣款金额:</span>
|
||||
<span class="content">{{ item.cutMoney + '元'}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">扣款原因:</span>
|
||||
<span class="content" style="color: #FF8F37;">{{ item.remark }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">最终开票金额:</span>
|
||||
<span class="content">{{ item.invoiceMoney+ '元' }}</span>
|
||||
</div>
|
||||
<van-tabs v-model="active" sticky @click="changeTabHandler" background="#2C395F" color="#ffffff" title-active-color="#ffffff" title-inactive-color="#BDC1CD">
|
||||
<van-tab title="全部" name="1"></van-tab>
|
||||
<van-tab title="未开票" name="2"></van-tab>
|
||||
<van-tab title="已开票" name="3"></van-tab>
|
||||
</van-tabs>
|
||||
<div class="content_wrap" :class="{ 'pd_cls': active == 2 }">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
finished-text="没有更多了"
|
||||
@load="getMore"
|
||||
>
|
||||
<van-search
|
||||
v-model="batchCode"
|
||||
show-action
|
||||
placeholder="请输入批次号或开票编号"
|
||||
>
|
||||
<template #action>
|
||||
<div @click="onSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-checkbox-group v-model="checkList">
|
||||
<div class="itemWrap" v-for="(item,index) in notifyList" :key="index" @click="toggle(index)">
|
||||
<div class="item line1">
|
||||
<div class="itemTime">
|
||||
<span class="title">批次号:</span>
|
||||
<span class="content">{{ item.batchCode }}</span>
|
||||
</div>
|
||||
<div class="orderNum">
|
||||
<span class="title">总案件数:</span>
|
||||
<span class="content">{{ item?.orderNum || '' }}</span>
|
||||
</div>
|
||||
<div class="checkBtn" @click="goPage('invoicingDetail',{id:item.id, batchCode: item.batchCode})">查看</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">开票月份:</span>
|
||||
<span class="content">{{ getMonth(item) }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">结算总金额:</span>
|
||||
<span class="content">{{ item?.totalMoney ? item.totalMoney : 0 }}元</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">扣款金额:</span>
|
||||
<span class="content">{{ item?.cutMoney || 0 }}元</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">扣款原因:</span>
|
||||
<span class="content" style="color: #FF8F37;">{{ item.remark }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="title">最终开票金额:</span>
|
||||
<span class="content">{{ item?.invoiceMoney || 0 }}元</span>
|
||||
</div>
|
||||
<van-checkbox class="checkbox_cls" v-if="active == 2" :name="item" ref="checkboxes" />
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<div class="invoice_btn_wrap" v-if="active == 2 && totalCount > 0">
|
||||
<div class="invoice_btn_info">
|
||||
<span class="invoice_btn_title">开票总金额</span>
|
||||
<span class="invoice_btn_money">¥{{totalCount}}</span>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
<div class="btn" @click="goUploadPage">去开票</div>
|
||||
</div>
|
||||
<div v-show="show" class="bgShow">
|
||||
<img src="@/assets/empty.png">
|
||||
</div>
|
||||
@ -63,14 +96,78 @@ export default {
|
||||
notifyList:[],
|
||||
pageNum:1,
|
||||
pageSize:10,
|
||||
total: 0,
|
||||
show:false,
|
||||
isLoading: false,
|
||||
loading: false,
|
||||
active: 1,
|
||||
status: '',
|
||||
dispatchAppSearchInvoiced: '',
|
||||
batchCode: '',
|
||||
finished: false,
|
||||
checkList: [],
|
||||
supplierId: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
totalCount () {
|
||||
let total = 0;
|
||||
this.checkList.map(item => {
|
||||
total += item.invoiceMoney
|
||||
})
|
||||
return total
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getNotifyList()
|
||||
this.supplierId = this.$route.query?.supplierId;
|
||||
},
|
||||
methods:{
|
||||
goUploadPage() {
|
||||
localStorage.setItem('list', JSON.stringify(this.checkList));
|
||||
this.goPage('uploadInvoice', { supplierId : this.supplierId })
|
||||
},
|
||||
async onSearch() {
|
||||
this.pageNum=1
|
||||
await this.getNotifyList()
|
||||
},
|
||||
async getMore(){
|
||||
if ( this.active != 2 ) {
|
||||
await this.getNotifyList()
|
||||
this.pageNum++;
|
||||
// 加载状态结束
|
||||
this.loading = false;
|
||||
// 数据全部加载完成
|
||||
if (this.notifyList.length >= this.total) {
|
||||
this.finished = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
changeTabHandler() {
|
||||
this.pageNum = 1;
|
||||
this.notifyList = [];
|
||||
this.checkList = [];
|
||||
if (this.active == 1) { // 全部, 需要分页
|
||||
this.status = '';
|
||||
this.dispatchAppSearchInvoiced = '';
|
||||
this.pageSize = 10;
|
||||
} else if(this.active == 2) { // 未开票, 不需要分页
|
||||
this.status = 2;
|
||||
this.dispatchAppSearchInvoiced = '';
|
||||
this.pageSize = 10000
|
||||
} else if(this.active == 3) { // 已开票,需要分页
|
||||
this.status = '';
|
||||
this.dispatchAppSearchInvoiced = 1;
|
||||
this.pageSize = 10
|
||||
}
|
||||
this.getNotifyList()
|
||||
},
|
||||
getMonth(item) {
|
||||
let str = '';
|
||||
let startTime = new Date(item.createTime);
|
||||
let endTime = new Date(item.overTime);
|
||||
str = startTime.getFullYear() + '年' + (startTime.getMonth() + 1 ) + '月 - ' + endTime.getFullYear() + '年' + (endTime.getMonth() + 1) + '月'
|
||||
return str
|
||||
},
|
||||
onRefresh() {
|
||||
this.pageNum=1
|
||||
this.getNotifyList()
|
||||
@ -81,19 +178,34 @@ export default {
|
||||
},
|
||||
async getNotifyList(){
|
||||
let res = await notifyInvoiceList({
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize
|
||||
pageNum:this.pageNum,
|
||||
pageSize:this.pageSize,
|
||||
status: this.status,
|
||||
dispatchAppSearchInvoiced: this.dispatchAppSearchInvoiced,
|
||||
total: this.total,
|
||||
batchCode: this.batchCode,
|
||||
supplierId: this.supplierId,
|
||||
current: 1,
|
||||
})
|
||||
// if(res.code === 0){
|
||||
this.notifyList=res.data;
|
||||
console.log(this.notifyList)
|
||||
if(this.notifyList.length === 0){
|
||||
this.show=true
|
||||
if(res.code == 200){
|
||||
this.total=res.total
|
||||
if(this.pageNum == 1){
|
||||
this.notifyList=res.data;
|
||||
}else{
|
||||
let preList = this.notifyList;
|
||||
let arr = res.data;
|
||||
this.notifyList = preList.concat(arr)
|
||||
}
|
||||
if (this.notifyList.length === 0) {
|
||||
this.show=true
|
||||
}else{
|
||||
this.show=false
|
||||
}
|
||||
}
|
||||
// },
|
||||
},
|
||||
toggle(index) {
|
||||
this.$refs.checkboxes[index].toggle();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -101,6 +213,11 @@ export default {
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
.van-checkbox {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
right: 15px;
|
||||
}
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
@ -113,6 +230,7 @@ export default {
|
||||
}
|
||||
.itemWrap{
|
||||
background: #FFFFFF;
|
||||
position: relative;
|
||||
@include wh(100%,194px);
|
||||
box-sizing: border-box;
|
||||
padding: 14px 25px 18px 29px;
|
||||
@ -125,6 +243,7 @@ export default {
|
||||
}
|
||||
.title{
|
||||
opacity: .5;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.line1{
|
||||
@ -141,10 +260,52 @@ export default {
|
||||
}
|
||||
.bgShow{
|
||||
@include flexTwoCenter;
|
||||
height:calc(100% - 46px);
|
||||
/*height:calc(100% - 46px);*/
|
||||
background-color: #FAFAFA;
|
||||
img{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
.van-tabs {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
background-color: #2c395f;
|
||||
z-index: 1000000 !important;
|
||||
}
|
||||
.content_wrap {
|
||||
padding-top: 1.17333rem;
|
||||
}
|
||||
.invoice_btn_wrap {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
.invoice_btn_info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.invoice_btn_title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.invoice_btn_money {
|
||||
font-size: 26px;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 100%;
|
||||
background-color: #2C395F;
|
||||
color: #fff;
|
||||
padding: 15px 0;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.pd_cls {
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
|
@ -111,7 +111,7 @@ export default {
|
||||
padding: 13px 24px 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
//overflow-y: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
|
144
src/views/index/showInvoice.vue
Normal file
144
src/views/index/showInvoice.vue
Normal file
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="查看发票"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="h5GoBack"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentWrap">
|
||||
<div class="content_tab">
|
||||
<div class="tab_content">
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">付款方</div>
|
||||
<div class="item_content">中道汽车救援股份有限公司</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">收款方</div>
|
||||
<div class="item_content">{{invoiceInfo.accountName}}</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">发票号码</div>
|
||||
<div class="item_content">
|
||||
{{invoiceInfo.invoiceNumber}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">发票金额</div>
|
||||
<div class="item_content">¥{{invoiceInfo.invoiceMoney}}</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">税率</div>
|
||||
<div class="item_content">{{invoiceInfo.taxRate}}%</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">税额</div>
|
||||
<div class="item_content">{{invoiceInfo.taxAmount}}</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">未税金额</div>
|
||||
<div class="item_content">{{invoiceInfo.afterTaxAmount}}</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">发票类型</div>
|
||||
<div class="item_content">{{invoiceInfo.invoiceTypeCodeString}}</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">开票日期</div>
|
||||
<div class="item_content">{{invoiceInfo.invoiceDate}}</div>
|
||||
</div>
|
||||
<div class="item_wrap">
|
||||
<div class="item_label">发票影像</div>
|
||||
<div class="item_content">
|
||||
<div class="invoice_btn" @click="showInvoiceHandler(invoiceInfo.path)">查看发票</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { myMixins } from "@/utils/myMixins"
|
||||
export default {
|
||||
name: "showInvoice",
|
||||
mixins:[ myMixins ],
|
||||
data() {
|
||||
return {
|
||||
invoiceInfo: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let invoiceDetail = localStorage.getItem('invoiceDetail')
|
||||
this.invoiceInfo = invoiceDetail ? JSON.parse(invoiceDetail) : {};
|
||||
console.log('this.invoiceInfo', this.invoiceInfo)
|
||||
},
|
||||
methods: {
|
||||
showInvoiceHandler(path) {
|
||||
window.open(path)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
}
|
||||
.navBar{
|
||||
height: 46px;
|
||||
}
|
||||
.contentWrap{
|
||||
.mt_cls {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.content_tab {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
padding: 15px 15px;
|
||||
.tab_title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.tab_content {
|
||||
.item_wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 30px;
|
||||
font-size: 12px;
|
||||
.item_label {
|
||||
color: rgba(0,0,0,0.5);
|
||||
margin-right: 5px;
|
||||
width: 60px;
|
||||
}
|
||||
.item_content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.copyIcon {
|
||||
width: 35px;
|
||||
height: 15px;
|
||||
margin-left: 10px
|
||||
}
|
||||
.invoice_btn {
|
||||
padding: 0 15px;
|
||||
background-color: #354D93;
|
||||
border-radius: 4px;
|
||||
height: 28px;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
@ -42,7 +42,7 @@
|
||||
<div class="metersWrap">
|
||||
<div class="item" >
|
||||
<div class="leftKiloMeters">小轮个数</div>
|
||||
<div class="rightInput"><input type="number" v-model="form.tyreNumber"/>个</div>
|
||||
<div class="rightInput"><input type="number" v-model="form.tyreNumber" @input="handleInput"/>个</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="leftKiloMeters">等候费</div>
|
||||
@ -82,7 +82,7 @@ export default {
|
||||
bridgeAmountAb:'',
|
||||
bridgeAmountBc:'',
|
||||
bridgeAmountCa:'',
|
||||
tyreNumber:'',
|
||||
tyreNumber:0,
|
||||
waitAmount:'',
|
||||
dilemmaFee:'',
|
||||
customerAmount:'',
|
||||
@ -98,6 +98,15 @@ export default {
|
||||
await this.getDetail()
|
||||
},
|
||||
methods:{
|
||||
handleInput(event) {
|
||||
const newValue = parseInt(event.target.value, 10);
|
||||
if (!isNaN(newValue) && newValue >= 0 && newValue <= 4) {
|
||||
this.form.tyreNumber = newValue;
|
||||
} else {
|
||||
this.$toast('请输入0到4之间的数字')
|
||||
this.form.tyreNumber = null; // 或者上一个有效值
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
this.updatSettlement()
|
||||
},
|
||||
|
589
src/views/index/uploadInvoice.vue
Normal file
589
src/views/index/uploadInvoice.vue
Normal file
@ -0,0 +1,589 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div class="navBar">
|
||||
<van-nav-bar
|
||||
title="上传发票"
|
||||
left-arrow
|
||||
left-arrow-color="#FFFFFF"
|
||||
:border="false"
|
||||
:fixed="true"
|
||||
:safe-area-inset-top="true"
|
||||
@click-left="h5GoBack"
|
||||
/>
|
||||
</div>
|
||||
<div class="contentWrap">
|
||||
<div class="content_top">
|
||||
<div class="content_tip">【注】如结算金额确认无误后,请开具正规增值税专用发票(开票项为:施救费、救授费、拖车费、帝引费任选其一)。如有路桥费产生,请开在救援发票中。</div>
|
||||
<div class="top_detail">
|
||||
<div class="detail_title detail_color">
|
||||
<div class="title"> <span class="squire"></span> 应开金额</div>
|
||||
<div class="money">¥{{ invoiceTotal }}</div>
|
||||
</div>
|
||||
<div class="border"></div>
|
||||
<div class="detail_content" v-for="(item, index) in list" :key="index + '_1'">
|
||||
<div class="content_item">
|
||||
{{item.batchCode}}
|
||||
<span class="content_money">¥{{item.invoiceMoney}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_top mt10">
|
||||
<div class="detail_title detail_color2 pd_no">
|
||||
<div class="title"> <span class="squire squire2"></span> 实开金额</div>
|
||||
<div class="money">¥{{ invoiceMoney || 0 }}</div>
|
||||
</div>
|
||||
<div class="border"></div>
|
||||
<div class="invoice_wrap mt10" v-for="(item, index) in tableData" :key="index" @click="goInvoiceDetail(item)">
|
||||
<div class="invoice_title">
|
||||
<div>{{item.accountName}}</div>
|
||||
<div class="btn_del" @click.stop="deleteHandler(item)">删除</div>
|
||||
</div>
|
||||
<div class="border"></div>
|
||||
<div class="invoice_content">
|
||||
<div>
|
||||
<span class="label">发票号码:</span>
|
||||
<span>{{item.invoiceNumber}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span class="label">发票金额:</span>
|
||||
<span class="invoice_money">¥{{item.invoiceMoney}}</span>
|
||||
</div>
|
||||
<div class="invoice_flex">
|
||||
<div>
|
||||
<span class="label">开票日期:</span>
|
||||
<span>{{item.invoiceDate}}</span>
|
||||
</div>
|
||||
<van-icon class="icon" name="arrow" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload_btn_wrap">
|
||||
<div class="btn_save" @click="createInvoiceHandler">保存</div>
|
||||
<van-uploader :before-read="beforeRead" :after-read="afterRead" accept=".png,.jpg,.jpeg,.pdf,.ofd">
|
||||
<div class="btn_upload">
|
||||
<img class="icon_upload" src="@/assets/icon_upload.png" alt="">
|
||||
上传发票
|
||||
</div>
|
||||
</van-uploader>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Dialog } from "vant";
|
||||
import { myMixins } from "@/utils/myMixins"
|
||||
import { uploadInvoice, getBillingInfo, deleteInvoice, createBatch } from "@/api/mine"
|
||||
export default {
|
||||
name: "uploadInvoice",
|
||||
mixins:[ myMixins ],
|
||||
data(){
|
||||
return {
|
||||
list: [],
|
||||
invoiceMoneyTotal: 0,
|
||||
tableData: [],
|
||||
activeObj: {},
|
||||
billInfo: {},
|
||||
supplierId: '',
|
||||
queryId: '',
|
||||
batchIds: [],
|
||||
shouldRate: '',
|
||||
realRate: '',
|
||||
invoiceType: '',
|
||||
invoiceMoney: 0,
|
||||
afterTaxAmount: 0,
|
||||
form: {
|
||||
courierNumber: '',
|
||||
invoiceType: '', //电子发票还是纸质发票
|
||||
},
|
||||
show: true,
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.initData();
|
||||
},
|
||||
async activated() {
|
||||
await this.initData();
|
||||
this.show = true;
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
immediate: true,
|
||||
handler() {
|
||||
this.getInvoiceMoney()
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
invoiceTotal () {
|
||||
let total = 0;
|
||||
this.list?.map(item => {
|
||||
total += item.invoiceMoney
|
||||
})
|
||||
return total
|
||||
}
|
||||
},
|
||||
deactivated() {
|
||||
if (this.show) {
|
||||
this.tableData = [];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initData() {
|
||||
this.list = JSON.parse(localStorage.getItem('list'));
|
||||
this.batchIds = [];
|
||||
this.list.map(a => {
|
||||
this.batchIds.push(a.id)
|
||||
})
|
||||
console.log('this.batchIds', this.batchIds)
|
||||
this.shouldRate = this.list[0]?.shouldRate
|
||||
this.realRate = this.list[0]?.realRate
|
||||
this.invoiceType = this.list[0]?.invoiceType
|
||||
this.supplierId = this.list[0]?.supplierId
|
||||
await this.getInfo();
|
||||
},
|
||||
async getInfo() {
|
||||
if(this.supplierId) {
|
||||
let res = await getBillingInfo('/supplier/info/billing/getBySupplierId/' + this.supplierId )
|
||||
this.billInfo = res.data || {}
|
||||
}
|
||||
},
|
||||
async createInvoiceHandler() {
|
||||
if ( !this.form.invoiceType ) {
|
||||
this.$toast('发票类型不能为空!')
|
||||
return
|
||||
}
|
||||
if (this.invoiceTotal != this.invoiceMoney) {
|
||||
this.$toast('“应开金额”与“实开金额”不一致,请核实系统的开票金额与实际开出的发票金额。')
|
||||
return
|
||||
}
|
||||
if(this.form.invoiceType == 2){
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '纸质发票上传后请尽快邮寄,并在系统《开票信息》菜单,录入快递单号,以免影响结算时效!谢谢!',
|
||||
}).then(async () => {
|
||||
await this.saveHandle();
|
||||
}).catch(() => {
|
||||
});
|
||||
} else {
|
||||
await this.saveHandle();
|
||||
}
|
||||
},
|
||||
async saveHandle() {
|
||||
let paramsArr = this.getParams();
|
||||
console.log('.......', paramsArr)
|
||||
try {
|
||||
this.loading = true;
|
||||
let res = await createBatch({
|
||||
supplierId: this.supplierId,
|
||||
batchIds: this.batchIds,
|
||||
detailList: paramsArr
|
||||
})
|
||||
console.log('res', res)
|
||||
this.loading = false;
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: `发票已上传成功,待审核。开票编号为:${res.data},请前往菜单【开票信息】中查看。`,
|
||||
}).then(() => {
|
||||
this.h5GoBack()
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('eee', e)
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: e + '发票提交出错',
|
||||
}).then(() => {
|
||||
|
||||
});
|
||||
}finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
getParams() {
|
||||
let params = [...this.tableData]
|
||||
if(params.length > 0) {
|
||||
params.map(item => {
|
||||
item.courierNumber = (this.form.invoiceType == 2 ? this.form.courierNumber : '')
|
||||
item.invoiceType = this.form.invoiceType
|
||||
if( item.taxRate.toString().indexOf('%') != -1 ) {
|
||||
let tempRate = item.taxRate.replace('%', '');
|
||||
item.taxRate = (Number(tempRate) / 100)
|
||||
}
|
||||
})
|
||||
}
|
||||
return params
|
||||
},
|
||||
deleteHandler( row ) { // 删除发票
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '确认要删除发票信息吗?',
|
||||
}).then(async () => {
|
||||
await deleteInvoice({
|
||||
id: row?.id || '',
|
||||
path: row?.path
|
||||
});
|
||||
let index = this.tableData.findIndex(a => a.invoiceNumber == row.invoiceNumber)
|
||||
this.tableData.splice(index, 1)
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
beforeRead (file) {
|
||||
const FileExt = file.name.replace(/.+\./, "");
|
||||
if (['jpg', 'png', 'jpeg', 'pdf', 'ofd'].indexOf(FileExt.toLowerCase()) === -1) {
|
||||
this.$toast('请上传后缀名为jpg、jpeg、png、pdf、ofd的文件!')
|
||||
return false;
|
||||
}
|
||||
this.$set(this.activeObj, 'fileType', FileExt)
|
||||
return true
|
||||
},
|
||||
async afterRead (file) {
|
||||
try {
|
||||
var formData = new FormData(); // 创建form对象
|
||||
formData.append('file', file.file); // 通过append向form对象添加数据
|
||||
formData.append('supplierId', this.supplierId) // 如果还需要传替他参数的话
|
||||
let res = await uploadInvoice(formData)
|
||||
console.log('rrerer', res)
|
||||
if( res?.code == 200 ) {
|
||||
let test = this.tableData.filter(item => item.invoiceNumber == res.data.ocrInvoiceRes.data.invoiceNumber) // 如果
|
||||
if( test.length > 0 ) { // 发票是否已经上传过
|
||||
this.$message.warning("该发票已上传,不能重复上传")
|
||||
return false
|
||||
} else {
|
||||
|
||||
let invoiceDetails = this.getInvoiceRates(res.data.ocrInvoiceRes.data.invoiceDetails)
|
||||
let flag = this.legalRate(invoiceDetails)
|
||||
let realFlag = this.realRateCheck(invoiceDetails)
|
||||
let errorStr = "";
|
||||
//电子发票,验证必须是pdf版本
|
||||
if((res.data.ocrInvoiceRes.data.invoiceType.indexOf("数电") != -1 || res.data.ocrInvoiceRes.data.invoiceType.indexOf("电子") != -1) && this.activeObj.fileType != 'pdf'){
|
||||
errorStr = errorStr + "电票请上传PDF格式的文件;"
|
||||
}
|
||||
if(res.data.ocrInvoiceRes.data.invoiceType.indexOf("专用发票") == -1 && this.invoiceType == 1){
|
||||
errorStr = errorStr + "上传发票类型与服务商配置发票类型不一致,设置类型为:专票;";
|
||||
}
|
||||
if(!this.billInfo.unitName ){
|
||||
errorStr = errorStr + "未设置抬头,请联系区域经理;";
|
||||
}
|
||||
if(!this.billInfo.dutyParagraph ){
|
||||
errorStr = errorStr + "未设置纳税人识别号,请联系区域经理;";
|
||||
}
|
||||
let ocrName = res.data.ocrInvoiceRes.data.sellerName.replace('(','').replace('(','').replace(')','').replace(')','');
|
||||
let billName = ''
|
||||
if (this.billInfo && this.billInfo.unitName) {
|
||||
billName = this.billInfo.unitName.replace('(','').replace('(','').replace(')','').replace(')','');
|
||||
}
|
||||
let diffNumber = this.charDifference(ocrName,billName);
|
||||
if(ocrName != billName && diffNumber > 2 && !res.data.ocrInvoiceRes.data.sellerName.startsWith("国家税务总局")){
|
||||
errorStr = errorStr + "上传发票抬头与服务商配置不一致,设置抬头为:" + (this.billInfo.unitName || '未设置') + ",识别抬头为:" + res.data.ocrInvoiceRes.data.sellerName + ";如发票确认无误,请联系结算部:021-53682525";
|
||||
}
|
||||
|
||||
if( !flag ) {
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: '您上传的发票税率不符合要求',
|
||||
}).then(() => {
|
||||
this.uploadLoading=false;
|
||||
return false
|
||||
});
|
||||
}else if(!realFlag){
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: "您上传的发票税率与服务商配置税率不一致,设置税率为:" + this.realRate + "%"
|
||||
}).then(() => {
|
||||
this.uploadLoading=false;
|
||||
return false
|
||||
});
|
||||
}else if(errorStr && errorStr.length > 0){
|
||||
Dialog.alert({
|
||||
title: '提示',
|
||||
message: errorStr,
|
||||
}).then(() => {
|
||||
this.uploadLoading=false;
|
||||
return false
|
||||
});
|
||||
} else {
|
||||
console.log('res', res)
|
||||
console.log('file', file)
|
||||
this.form.invoiceType = res.data.ocrInvoiceRes.data.invoiceType.indexOf("数电") == -1 && res.data.ocrInvoiceRes.data.invoiceType.indexOf("电子") == -1 ? 2 : 1
|
||||
let isOrdinaryInvoice = res.data.ocrInvoiceRes.data.invoiceType.indexOf("普通") > -1
|
||||
this.$set(this.activeObj, 'imageUrl', '')
|
||||
this.$set(this.activeObj, 'fileName', '')
|
||||
if (['pdf','ofd'].indexOf(this.activeObj.fileType) === -1) {
|
||||
// this.activeObj.imageUrl = URL.createObjectURL(file.raw);
|
||||
this.activeObj.imageUrl = res.data.url
|
||||
this.$set(this.activeObj, 'fileName', file.file.name)
|
||||
} else {
|
||||
this.$set(this.activeObj, 'fileName', file.file.name)
|
||||
}
|
||||
this.$set(this.activeObj, 'path', res.data.url)
|
||||
this.$set(this.activeObj, 'invoiceNumber', res.data.ocrInvoiceRes.data.invoiceNumber)
|
||||
this.$set(this.activeObj, 'accountName', res.data.ocrInvoiceRes.data.sellerName)
|
||||
this.$set(this.activeObj, 'invoiceMoney', res.data.ocrInvoiceRes.data.totalAmount)
|
||||
this.$set(this.activeObj, 'taxRate',isOrdinaryInvoice?0: res.data.ocrInvoiceRes.data.invoiceDetails[0].taxRate)
|
||||
this.$set(this.activeObj, 'taxAmount',isOrdinaryInvoice?0: res.data.ocrInvoiceRes.data.invoiceTax)
|
||||
this.$set(this.activeObj, 'afterTaxAmount',isOrdinaryInvoice?res.data.ocrInvoiceRes.data.totalAmount: res.data.ocrInvoiceRes.data.invoiceAmountPreTax)
|
||||
this.$set(this.activeObj, 'invoiceDate', res.data.ocrInvoiceRes.data.invoiceDate)
|
||||
this.$set(this.activeObj, 'invoiceCode', res.data.ocrInvoiceRes.data.invoiceCode)
|
||||
this.$set(this.activeObj, 'invoiceTypeCodeString', res.data.ocrInvoiceRes.data.invoiceType)
|
||||
this.$set(this.activeObj, 'payName', res.data.ocrInvoiceRes.data.purchaserName)
|
||||
this.tableData.push({...this.activeObj})
|
||||
this.$forceUpdate()
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('eeee', e)
|
||||
}
|
||||
},
|
||||
goInvoiceDetail (item) {
|
||||
localStorage.setItem('invoiceDetail', JSON.stringify(item))
|
||||
this.show = false;
|
||||
this.goPage('showInvoice')
|
||||
},
|
||||
getInvoiceMoney() {
|
||||
let invoiceMoney = 0;
|
||||
let afterTaxAmount = 0;
|
||||
if( this.tableData.length > 0){
|
||||
this.tableData.map(item => {
|
||||
if( item.invoiceMoney && item.afterTaxAmount ) {
|
||||
invoiceMoney += (Number(item.invoiceMoney) * 100)
|
||||
afterTaxAmount += ( Number(item.afterTaxAmount) * 100 )
|
||||
}
|
||||
})
|
||||
this.invoiceMoney = invoiceMoney != 0 ? (invoiceMoney / 100) : 0
|
||||
this.afterTaxAmount = afterTaxAmount != 0 ? ( afterTaxAmount / 100 ) : 0
|
||||
} else {
|
||||
this.invoiceMoney = invoiceMoney
|
||||
this.afterTaxAmount = afterTaxAmount
|
||||
}
|
||||
},
|
||||
charDifference(str1,str2) {
|
||||
let difference = 0;
|
||||
// 遍历字符串1的每个字符
|
||||
for (let i = 0; i < str1.length; i++) {
|
||||
// 如果字符串2中不包含当前字符,或者位置不对,则误差加1
|
||||
if (str2.indexOf(str1[i]) === -1 || str2[i] !== str1[i]) {
|
||||
difference++;
|
||||
}
|
||||
}
|
||||
|
||||
//如果前面部分都对得上,但是长度不同,则差异是长度
|
||||
if(str1.length != str2.length){
|
||||
difference += Math.abs(str1.length - str2.length)
|
||||
}
|
||||
// 同样遍历字符串2,处理字符串1中不存在的字符
|
||||
/*for (let i = 0; i < str2.length; i++) {
|
||||
if (str1.indexOf(str2[i]) === -1) {
|
||||
difference++;
|
||||
}
|
||||
}*/
|
||||
return difference;
|
||||
},
|
||||
legalRate(rateList) { // 合法的 税率
|
||||
let rate = rateList[0]
|
||||
let flag = rateList.every(item => {
|
||||
//设置的是普票,不校验税率
|
||||
if(this.invoiceType == 2 && item != '免税' && item != '0%'){
|
||||
return true
|
||||
}
|
||||
return item == rate && ['1%', '3%', '6%', '9%', '13%'].includes(item)
|
||||
})
|
||||
console.log('flag', flag)
|
||||
return flag
|
||||
},
|
||||
realRateCheck(rateList) { // 和设置的税率是否符合
|
||||
let rate = rateList[0]
|
||||
let flag = rateList.every(item => {
|
||||
//设置的是普票,不校验税率
|
||||
if(this.invoiceType == 2 && item != '免税' && item != '0%'){
|
||||
return true
|
||||
}
|
||||
return item == rate && this.realRate + '%' == item
|
||||
})
|
||||
console.log('flag', flag)
|
||||
return flag
|
||||
},
|
||||
getInvoiceRates(invoiceDetails) { // 获取发票详情的税率数组
|
||||
let rates = [];
|
||||
invoiceDetails.map(item => {
|
||||
rates.push(item.taxRate)
|
||||
})
|
||||
return rates
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/common.scss";
|
||||
.wrap{
|
||||
@include wh(100%,100%);
|
||||
background-color: #F4F5F7;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.navBar{
|
||||
height: 46px;
|
||||
}
|
||||
.mt10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.contentWrap {
|
||||
padding-bottom: 70px;
|
||||
.content_top {
|
||||
padding: 15px 20px;
|
||||
background-color: #fff;
|
||||
.content_tip {
|
||||
font-size: 12px;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.top_detail {
|
||||
.detail_content {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
padding: 10px 0;
|
||||
.content_item {
|
||||
font-size: 12px;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
line-height: 27px;
|
||||
.content_money {
|
||||
font-size: 15px;
|
||||
color: #D48139;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.detail_title {
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.money {
|
||||
font-size: 22px;
|
||||
}
|
||||
.detail_color {
|
||||
color: #D48139;
|
||||
}
|
||||
.detail_color2 {
|
||||
color: #FF5D2E;
|
||||
}
|
||||
.pd_no {
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.squire {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
display: inline-block;
|
||||
background-color: #D48139;
|
||||
border-radius: 2px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.squire2 {
|
||||
background-color: #FF5D2E;
|
||||
}
|
||||
.border {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
border-bottom: 1px solid;
|
||||
opacity: 0.16;
|
||||
border-image: linear-gradient(270deg, rgba(217, 217, 217, 0.6), rgba(178, 178, 178, 1), rgba(178, 178, 178, 1), rgba(217, 217, 217, 0.6)) 1 1;
|
||||
}
|
||||
|
||||
.invoice_wrap {
|
||||
background-color: #F4FAFF;
|
||||
padding: 11px 3px 15px 18px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #EBF2F7;
|
||||
.invoice_title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: rgba(50, 54, 67, 0.76);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
.btn_del {
|
||||
width: 48px;
|
||||
height: 18px;
|
||||
margin-right: 12px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #DDDDDD;
|
||||
font-size: 12px;
|
||||
color: rgba(0, 0, 0, 0.7);
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
.invoice_content {
|
||||
padding-top: 10px;
|
||||
padding-right: 12px;
|
||||
color: #000;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
.label {
|
||||
font-size: 12px;
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
margin-right: 10px;
|
||||
}
|
||||
.invoice_money {
|
||||
color: #FF5D2E;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
.upload_btn_wrap {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 15px 30px;
|
||||
display: flex;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
background: #FBFBFB;
|
||||
box-shadow: 0px -1px 20px 4px rgba(98,107,128,0.2);
|
||||
div {
|
||||
height: 40px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
}
|
||||
.btn_save {
|
||||
background: #354D93;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.btn_upload {
|
||||
background: #354D93;
|
||||
margin-left: 4px;
|
||||
}
|
||||
.icon_upload {
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
}
|
||||
.invoice_flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
::v-deep .van-uploader__input-wrapper {
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
@ -70,6 +70,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="serviceInfo common" v-if="orderDetailInfo.batteryNo">
|
||||
<div class="title">电瓶信息:</div>
|
||||
<div class="line"></div>
|
||||
<div class="infoContent">
|
||||
<div class="item">
|
||||
<span class="leftTitle fontColor">设备号:</span><span class="rightContent">{{orderDetailInfo?.batteryNo}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="leftTitle fontColor">品牌:</span><span class="rightContent">{{orderDetailInfo?.batteryBrand}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="leftTitle fontColor">型号:</span><span class="rightContent">{{orderDetailInfo?.batteryModel}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="map" v-show="showPopup" id="container">
|
||||
<img @click="showPopup = false" src="@/assets/delKey.png" class="mapImg">
|
||||
</div>
|
||||
|
13
src/views/invoice/invoiceIndex.vue
Normal file
13
src/views/invoice/invoiceIndex.vue
Normal file
@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div class="wrap">票务首页</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "invoiceIndex"
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<div id="supplierScore" ref="supplierScore" style="width: 100%;height: 125px" @click="handle"></div>
|
||||
<div id="supplierScore" ref="supplierScore" class="chart" @click="handle"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -14,14 +14,25 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.drawHandle();
|
||||
/* if(this.data){
|
||||
this.drawHandle();
|
||||
}*/
|
||||
setTimeout(()=>{
|
||||
this.drawHandle();
|
||||
},500)
|
||||
|
||||
},
|
||||
methods:{
|
||||
initCircle(){
|
||||
// setTimeout(()=>{
|
||||
this.drawHandle();
|
||||
// },500)
|
||||
},
|
||||
handle(){
|
||||
if(this.titleText == '投诉率'){
|
||||
console.log(this.titleText)
|
||||
this.$emit('clickComplain')
|
||||
}else if(this.titleText == '使用率'){
|
||||
console.log(this.titleText)
|
||||
this.$emit('clickUse')
|
||||
}
|
||||
},
|
||||
// 绘制 总分图表
|
||||
@ -95,4 +106,8 @@ export default {
|
||||
.img{
|
||||
@include whMarLe(12px,10px,4px);
|
||||
}
|
||||
.chart{
|
||||
width: 100%;
|
||||
height: 125px;
|
||||
}
|
||||
</style>
|
@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<el-table :data="tableData"
|
||||
stripe
|
||||
border
|
||||
style="width: 100%"
|
||||
class="custom-table">
|
||||
<el-table-column
|
||||
v-for="(column,i) in tableData"
|
||||
:key="i"
|
||||
:prop="column.prop"
|
||||
:label="column.label"
|
||||
:fixed="i===0"
|
||||
:width="i===0 ? '40' :'80'"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "commonTable",
|
||||
props: ['tableData'],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
::v-deep .el-table thead{
|
||||
font-size: 11px;
|
||||
color: #1D2129;
|
||||
font-weight: bold;
|
||||
}
|
||||
::v-deep .el-table th.el-table__cell.is-leaf {
|
||||
background-color: #E5E6EB;
|
||||
}
|
||||
</style>
|
193
src/views/kpi/components/noFit-table.vue
Normal file
193
src/views/kpi/components/noFit-table.vue
Normal file
@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<div class="wrap">
|
||||
<el-table :data="tableData"
|
||||
stripe
|
||||
border
|
||||
style="width: 100%"
|
||||
height="100%"
|
||||
v-loading="loading"
|
||||
:cell-style="setTableCellStyle"
|
||||
class="custom-table">
|
||||
<template v-if="active===1">
|
||||
<el-table-column v-for="item in labelList" :key="item.prop" :label="item.label" :prop="item.prop" align="center">
|
||||
<template slot-scope="scope">{{scope.row[item.prop]}} </template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-else-if="active===3">
|
||||
<el-table-column v-for="(column,index) in filteredLabelList" :key="column.prop" :prop="column.prop" :label="column.label"
|
||||
:fixed="index===0" align="center" min-width="100"
|
||||
:width="(isMobile && (column.label=='案件编号' || column.label=='服务内容')) ? 70 : 'auto'">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="column.label === '师傅姓名'">
|
||||
{{ scope.row[column.prop] }}
|
||||
<span style=" color: #FFBA00;" v-if="scope.row.starRank"><i class="el-icon-star-on star"></i>{{scope.row.starRank}}</span>
|
||||
</span>
|
||||
<span v-else>{{ scope.row[column.prop] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-table-column v-for="column in labelList" :key="column.prop" :prop="column.prop" :label="column.label"
|
||||
align="center" min-width="100" :width="(isMobile && (column.label=='案件编号' || column.label=='服务内容')) ? 70 : 'auto'">
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "noFit-table",
|
||||
props: ['tableData', 'labelList', 'loading', 'isMobile','active'],
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
computed: {
|
||||
filteredLabelList() {
|
||||
if(this.active!==3){
|
||||
return
|
||||
}
|
||||
return this.labelList.filter(column => column.label !== '星级评分');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setTableCellStyle({ row, column,columnIndex }) {
|
||||
// 月总表格被转置,原始方法失效,重新定义对比
|
||||
if(this.active===1){
|
||||
if(row.month == '3′接单率(%)'){
|
||||
if(columnIndex){
|
||||
let res=row[column.property]
|
||||
const rate = parseFloat(res && res.replace('%', ''));
|
||||
if(rate < 95){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(row.month == '接单时效(分)'){
|
||||
if(columnIndex){
|
||||
let res=row[column.property]
|
||||
if(res > 5){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(row.month == '到达时效(分)'){
|
||||
if(columnIndex){
|
||||
let res=row[column.property]
|
||||
if(res > 40){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(row.month == '总聚合成功率(%)'){
|
||||
if(columnIndex){
|
||||
let res=row[column.property]
|
||||
const rate = parseFloat(res && res.replace('%', ''));
|
||||
if(rate < 80){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(row.month == '使用率(%)'){
|
||||
if(columnIndex){
|
||||
let res=row[column.property]
|
||||
const rate = parseFloat(res && res.replace('%', ''));
|
||||
if(rate < 95){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(row.month == '投诉率(%)'){
|
||||
if(columnIndex){
|
||||
let res=row[column.property]
|
||||
const rate = parseFloat(res && res.replace('%', ''));
|
||||
if(rate > 0.1){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 接单率
|
||||
if(column.property=='threeMinutesReceivingRate'){
|
||||
if(columnIndex){
|
||||
const rate = parseFloat(row.threeMinutesReceivingRate && row.threeMinutesReceivingRate.replace('%', ''));
|
||||
if(rate < 95){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
//师傅接单时效》5
|
||||
if(column.property=='receiving'){
|
||||
if(columnIndex){
|
||||
if(row.receiving > 5){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
//到达时效》40
|
||||
if(column.property=='arriving'){
|
||||
if(columnIndex){
|
||||
if(row.arriving > 40){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
//聚合成功率《80
|
||||
if(column.property=='polymerizationSuccessRate'){
|
||||
if(columnIndex){
|
||||
const rate = parseFloat(row.polymerizationSuccessRate && row.polymerizationSuccessRate.replace('%', ''));
|
||||
if(rate < 80){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
//app使用率《95
|
||||
if(column.property=='appRate'){
|
||||
if(columnIndex){
|
||||
const rate = parseFloat(row.appRate && row.appRate.replace('%', ''));
|
||||
if(rate < 95){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
//催促率》3
|
||||
if(column.property=='urgeRate'){
|
||||
if(columnIndex){
|
||||
const rate = parseFloat(row.urgeRate && row.urgeRate.replace('%', ''));
|
||||
if(rate > 3){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
//投诉率》0.1
|
||||
if(column.property=='complainOrderRate'){
|
||||
if(columnIndex){
|
||||
const rate = parseFloat(row.complainOrderRate.replace('%', ''));
|
||||
if(rate > 0.1){
|
||||
return {backgroundColor: '#F1B289'}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/mixin.scss";
|
||||
::v-deep .el-table{
|
||||
font-size: 11px;
|
||||
}
|
||||
::v-deep .el-table thead{
|
||||
color: #1D2129;
|
||||
font-weight: bold;
|
||||
}
|
||||
::v-deep .el-table th.el-table__cell.is-leaf {
|
||||
background-color: #E5E6EB;
|
||||
}
|
||||
::v-deep .el-table .el-table__cell{
|
||||
padding: 4px 0 !important;
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
308
src/views/newcomerTraining/driverTrainingList.vue
Normal file
308
src/views/newcomerTraining/driverTrainingList.vue
Normal file
@ -0,0 +1,308 @@
|
||||
<template>
|
||||
<div class="wrap" :style="{ 'overflow-y': showPoup ? 'hidden' : 'auto' }">
|
||||
<div class="navBar">
|
||||
<van-nav-bar title="师傅培训" :border="false" :fixed="true" :safe-area-inset-top="true">
|
||||
<template slot="left" v-if="isFinished">
|
||||
<van-icon name="checked" color="#37ec37" size="20"/>
|
||||
</template>
|
||||
</van-nav-bar>
|
||||
</div>
|
||||
<div class="contentWrap" v-show="!showEmpty">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.name }}</div>
|
||||
<!-- <div class="time">{{ item.pushTime }}</div>-->
|
||||
</div>
|
||||
<div class="imgWrap"><img :src="item.themePicture"></div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<div class="info flexBetween common">
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
<template v-if="item.alreadyRead === 1">
|
||||
<div class="status" style="color: #cccccc">已处理</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="status" >未处理</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<div class="empty" v-show="showEmpty">
|
||||
<img src="@/assets/empty.png" />
|
||||
</div>
|
||||
<div class="poupCommon" v-if="showPoup">
|
||||
<div class="container showPoupContainer">
|
||||
<div class="con">
|
||||
<div class="title">培训提醒</div>
|
||||
<div class="content">欢迎使用中道司机APP。请您先完成培训,阅读文章,并问答相应问题。完成后即可正常使用APP。祝您使用愉快!</div>
|
||||
<div class="line"></div>
|
||||
<div class="btnWrap">
|
||||
<div class="nextBtn" @click="showPoup = false">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="poupCommon" v-if="isFinished">
|
||||
<div class="container finishContainer">
|
||||
<div class="con">
|
||||
<div class="title">提示</div>
|
||||
<div class="content">恭喜您,您已经全部完成培训!现在您可以正常使用我们的app,请前往体验。</div>
|
||||
<div class="line"></div>
|
||||
<div class="btnWrap">
|
||||
<div class="nextBtn" @click="goApp">前往</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {driverTrainList} from "@/api/mine"
|
||||
export default {
|
||||
name: "driverTrainingList",
|
||||
computed: {
|
||||
},
|
||||
mixins:[myMixins],
|
||||
data(){
|
||||
return{
|
||||
pageList:[],
|
||||
show:false,
|
||||
showEmpty:false,
|
||||
isLoading:false,
|
||||
showPoup:true,//进入弹框
|
||||
isFinished:false,
|
||||
driverId:'',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.driverId = urlParams.get('driverId');
|
||||
this.getList();
|
||||
document.addEventListener('visibilitychange', async ( ) => {
|
||||
let state = document.visibilityState
|
||||
if (state == 'hidden') { // 用户离开了
|
||||
}
|
||||
if (state == 'visible') {
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
onRefresh() {
|
||||
this.getList()
|
||||
setTimeout(() => {
|
||||
this.$toast('刷新成功');
|
||||
this.isLoading = false;
|
||||
}, 1000);
|
||||
},
|
||||
|
||||
async getList(){
|
||||
let res= await driverTrainList({
|
||||
driverId:this.driverId,//79639
|
||||
})
|
||||
this.pageList=res.data?.list;
|
||||
if(res.data.assessState == 0){
|
||||
this.isFinished=false
|
||||
}else {
|
||||
this.isFinished=true //是否完成
|
||||
}
|
||||
if(this.pageList?.length === 0){
|
||||
this.showEmpty = true
|
||||
}else {
|
||||
this.showEmpty = false
|
||||
}
|
||||
},
|
||||
goApp(){
|
||||
let data = {"action":"goBack","params":""}
|
||||
var u = navigator.userAgent;
|
||||
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if(isiOS){
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "@/styles/common.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/docment.scss";
|
||||
@import "@/styles/driverDocment.scss";
|
||||
.contentWrap{
|
||||
height: calc(100% - 50px) !important;
|
||||
}
|
||||
.status{
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
margin-right: 8px;
|
||||
text-align: right
|
||||
}
|
||||
.wrap{
|
||||
position: relative;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.poupCommon{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba(0,0,0,.7);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.showPoupContainer{
|
||||
height: 310px;
|
||||
background-size: 320px 310px;
|
||||
.content{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.btnWrap{
|
||||
margin-top: 6px;
|
||||
}
|
||||
}
|
||||
.finishContainer{
|
||||
height: 260px;
|
||||
background-size: 320px 260px;
|
||||
.con{
|
||||
top: 80px !important;
|
||||
}
|
||||
}
|
||||
.container{
|
||||
width: 320px;
|
||||
background-image: url("@/assets/trainBg.png");
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
.con{
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
}
|
||||
.title{
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
color: #3364B7;
|
||||
line-height: 26px;
|
||||
width: 70%;
|
||||
margin-left: 35px;
|
||||
text-align: center;
|
||||
}
|
||||
.content{
|
||||
width: 70%;
|
||||
height: 92px;
|
||||
font-size: 14px;
|
||||
color: #4C5361;
|
||||
line-height: 23px;
|
||||
text-align: justify;
|
||||
margin-top: 8px;
|
||||
margin-left: 35px;
|
||||
}
|
||||
.line{
|
||||
width: 285px;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid #F1F2F5;
|
||||
}
|
||||
.btnWrap{
|
||||
width: 92%;
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
.closeBtn{
|
||||
color: #999B9F;
|
||||
}
|
||||
.line{
|
||||
width: 1px;
|
||||
height: 48px;
|
||||
border-right: 1px solid #F1F2F5;
|
||||
}
|
||||
.nextBtn{
|
||||
color: #3364B7;
|
||||
}
|
||||
}
|
||||
}
|
||||
//.poupWrap{
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// background-color: rgba(0,0,0,.7);
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// .container{
|
||||
// width: 320px;
|
||||
// height: 310px;
|
||||
// background-image: url("@/assets/trainBg.png");
|
||||
// background-size: 320px 310px;
|
||||
// background-repeat: no-repeat;
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// bottom: 0;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// margin: auto;
|
||||
// .con{
|
||||
// position: absolute;
|
||||
// top: 100px;
|
||||
// left: 20px;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// .title{
|
||||
// font-weight: bold;
|
||||
// font-size: 19px;
|
||||
// color: #3364B7;
|
||||
// line-height: 26px;
|
||||
// width: 70%;
|
||||
// margin-left: 35px;
|
||||
// text-align: center;
|
||||
// }
|
||||
// .content{
|
||||
// width: 70%;
|
||||
// height: 92px;
|
||||
// font-size: 14px;
|
||||
// color: #4C5361;
|
||||
// line-height: 23px;
|
||||
// text-align: justify;
|
||||
// margin-top: 8px;
|
||||
// margin-bottom: 20px;
|
||||
// margin-left: 35px;
|
||||
// }
|
||||
// .line{
|
||||
// width: 285px;
|
||||
// height: 1px;
|
||||
// border-bottom: 1px solid #F1F2F5;
|
||||
// }
|
||||
// .btnWrap{
|
||||
// width: 92%;
|
||||
// font-weight: bold;
|
||||
// font-size: 13px;
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
// margin-top: 6px;
|
||||
// height: 40px;
|
||||
// line-height: 40px;
|
||||
// .closeBtn{
|
||||
// color: #999B9F;
|
||||
// }
|
||||
// .line{
|
||||
// width: 1px;
|
||||
// height: 48px;
|
||||
// border-right: 1px solid #F1F2F5;
|
||||
// }
|
||||
// .nextBtn{
|
||||
// color: #3364B7;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="wrap" :style="{ 'overflow-y': showPoup ? 'hidden' : 'auto' }">
|
||||
<div class="navBar">
|
||||
<van-nav-bar title="新人培训" :border="false" :fixed="true" :safe-area-inset-top="true">
|
||||
<van-nav-bar title="培训" :border="false" :fixed="true" :safe-area-inset-top="true">
|
||||
<template slot="left" v-if="isFinished">
|
||||
<van-icon name="checked" color="#37ec37" size="20"/>
|
||||
</template>
|
||||
@ -9,19 +9,23 @@
|
||||
</div>
|
||||
<div class="contentWrap" v-show="!showEmpty">
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh" style="min-height:85vh">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item)">
|
||||
<div class="itemWrap" v-for="(item,index) in pageList" :key="index" @click="goH5Detail(item,'培训文档')">
|
||||
<div class="info flexBetween common">
|
||||
<div class="title">{{ item.pushUser }}</div>
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
<div class="title">{{ item.name }}</div>
|
||||
<!-- <div class="time">{{ item.updateTime }}</div>-->
|
||||
</div>
|
||||
<div class="imgWrap"><img :src="item.themePicture"></div>
|
||||
<div class="num common">{{ item.synopsis }}</div>
|
||||
<template v-if="item.listShowButton == null">
|
||||
<div class="info flexBetween common" >
|
||||
<div class="time">{{ item.pushTime }}</div>
|
||||
<span style="color: red;font-size: 14px;margin-right: 8px" :class="item.alreadyRead===1 ? 'alRead' : ''">{{ item.alreadyRead===1 ? '已处理' : '未处理' }}</span>
|
||||
</div>
|
||||
<!-- <template v-if="item.alreadyRead === 1">
|
||||
<div class="status" style="color: #cccccc">已处理</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="status" >未处理</div>
|
||||
</template>
|
||||
</template>-->
|
||||
</div>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
@ -38,7 +42,6 @@
|
||||
<div class="nextBtn" @click="showPoup = false">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="poupCommon" v-if="isFinished">
|
||||
@ -51,17 +54,14 @@
|
||||
<div class="nextBtn" @click="goApp">前往</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { Dialog } from 'vant';
|
||||
import {myMixins} from "@/utils/myMixins"
|
||||
import {pageList} from "@/api/mine"
|
||||
|
||||
export default {
|
||||
name: "newTrainingList",
|
||||
computed: {
|
||||
@ -78,16 +78,26 @@ export default {
|
||||
isLoading:false,
|
||||
showPoup:true,//进入弹框
|
||||
isFinished:false,
|
||||
// showPoup:false,//进入弹框
|
||||
// isFinished:true,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.onRefresh();
|
||||
this.getList();
|
||||
|
||||
document.addEventListener('visibilitychange', async ( ) => {
|
||||
let state = document.visibilityState
|
||||
if (state == 'hidden') { // 用户离开了
|
||||
// console.log('用户离开了')
|
||||
}
|
||||
if (state == 'visible') {
|
||||
// console.log('用户回来了')
|
||||
this.getList();
|
||||
//调用接口,获取订单状态
|
||||
}
|
||||
});
|
||||
},
|
||||
created() {
|
||||
console.log("createdcreatedcreated")
|
||||
// this.getList();
|
||||
// 每次回答完问题之后返回需重新加结果
|
||||
|
||||
@ -111,16 +121,14 @@ export default {
|
||||
docType:1,
|
||||
trainingType:4,
|
||||
})
|
||||
this.pageList=res.data;
|
||||
let aaa=this.pageList.every(item=>item.listShowButton != 1)
|
||||
if(aaa){
|
||||
this.showPoup=false
|
||||
this.isFinished=true
|
||||
// await this.allProcessed()
|
||||
this.pageList=res.data?.list || [];
|
||||
if(res.data.assessState == 0){
|
||||
this.isFinished=false
|
||||
}else {
|
||||
this.isFinished=true //是否完成
|
||||
}
|
||||
if(res.data.length === 0){
|
||||
if(this.pageList?.length == 0){
|
||||
this.showEmpty = true
|
||||
|
||||
}else {
|
||||
this.showEmpty = false
|
||||
}
|
||||
@ -139,28 +147,6 @@ export default {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
},
|
||||
/*allProcessed(){
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '恭喜您,您已经全部完成培训!现在您可以正常使用我们的app,请前往体验。',
|
||||
confirmButtonText: '前往',
|
||||
cancelButtonText: '稍后'
|
||||
})
|
||||
.then(() => {
|
||||
let data = {"action":"goBack","params":""}
|
||||
var u = navigator.userAgent;
|
||||
var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
||||
if(isiOS){
|
||||
window.webkit.messageHandlers.nativeObject.postMessage(data);
|
||||
}else {
|
||||
window.android.sendMessage("goBack");
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
console.log("全部处理")
|
||||
},*/
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -168,6 +154,10 @@ export default {
|
||||
@import "@/styles/common.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/docment.scss";
|
||||
.contentWrap{
|
||||
height: calc(100% - 50px) !important;
|
||||
}
|
||||
|
||||
.status{
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
@ -264,77 +254,8 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
//.poupWrap{
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// background-color: rgba(0,0,0,.7);
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// left: 0;
|
||||
// .container{
|
||||
// width: 320px;
|
||||
// height: 310px;
|
||||
// background-image: url("@/assets/trainBg.png");
|
||||
// background-size: 320px 310px;
|
||||
// background-repeat: no-repeat;
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// bottom: 0;
|
||||
// left: 0;
|
||||
// right: 0;
|
||||
// margin: auto;
|
||||
// .con{
|
||||
// position: absolute;
|
||||
// top: 100px;
|
||||
// left: 20px;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// .title{
|
||||
// font-weight: bold;
|
||||
// font-size: 19px;
|
||||
// color: #3364B7;
|
||||
// line-height: 26px;
|
||||
// width: 70%;
|
||||
// margin-left: 35px;
|
||||
// text-align: center;
|
||||
// }
|
||||
// .content{
|
||||
// width: 70%;
|
||||
// height: 92px;
|
||||
// font-size: 14px;
|
||||
// color: #4C5361;
|
||||
// line-height: 23px;
|
||||
// text-align: justify;
|
||||
// margin-top: 8px;
|
||||
// margin-bottom: 20px;
|
||||
// margin-left: 35px;
|
||||
// }
|
||||
// .line{
|
||||
// width: 285px;
|
||||
// height: 1px;
|
||||
// border-bottom: 1px solid #F1F2F5;
|
||||
// }
|
||||
// .btnWrap{
|
||||
// width: 92%;
|
||||
// font-weight: bold;
|
||||
// font-size: 13px;
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
// margin-top: 6px;
|
||||
// height: 40px;
|
||||
// line-height: 40px;
|
||||
// .closeBtn{
|
||||
// color: #999B9F;
|
||||
// }
|
||||
// .line{
|
||||
// width: 1px;
|
||||
// height: 48px;
|
||||
// border-right: 1px solid #F1F2F5;
|
||||
// }
|
||||
// .nextBtn{
|
||||
// color: #3364B7;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
.alRead{
|
||||
color: #cccccc !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<div ><span class="opa">车辆名称:</span><span>{{ detailInfo.vehicleName }}</span></div>
|
||||
<div><span class="opa">车牌号:</span><span>{{ detailInfo.plateNumber }}</span></div>
|
||||
<!-- 审批中,通过,终止detailInfo.states ==1 || detailInfo.states ==2 ||detailInfo.states ==3-->
|
||||
<div class="shopName" v-if="[1,2,3].includes(detailInfo.states)"><span class="opa" >门店信息:</span><span>{{detailInfo.repairPoint || ''}}</span></div>
|
||||
<div class="shopName" v-if="[1,2,3].includes(detailInfo.states)"><span class="opa" >门店信息:</span><span class="textarea">{{detailInfo.repairPoint || ''}}</span></div>
|
||||
<div class="shopImgList" v-if="[1,2,3].includes(detailInfo.states)">
|
||||
<template v-if="detailInfo.storePhotoUrls && detailInfo.storePhotoUrls.indexOf(',') !== -1">
|
||||
<div v-for="(item,index) in (detailInfo.storePhotoUrls?.split(','))" :key="index">
|
||||
@ -40,7 +40,7 @@
|
||||
<div v-if="noPassStatus"><span class="opa">车辆里程:</span><span>{{ parseInt(detailInfo.mileage) || '' }}km</span></div>
|
||||
<div v-if="noPassStatus"><span class="opa">结算类型:</span><span>{{ detailInfo.paymentType?.label || '' }}</span></div>
|
||||
<div v-if="noPassStatus && detailInfo.paymentType?.code !=2"><span class="opa">维修金额:</span><span>{{ detailInfo.amount || ''}}元</span></div>
|
||||
<div v-if="noPassStatus && detailInfo.paymentType?.code !=2" class="shopName"><span class="opa">维保项目:</span><span class="project">{{ detailInfo.information ||'' }}</span></div>
|
||||
<div v-if="noPassStatus && detailInfo.paymentType?.code !=2" class="shopName"><span class="opa">维保项目:</span><span class="project textarea">{{ detailInfo.information ||'' }}</span></div>
|
||||
</div>
|
||||
<!-- 不通过-->
|
||||
<div class="detailInfo" v-if="noPassStatus && detailInfo.paymentType?.code !=2">
|
||||
@ -335,13 +335,16 @@ export default {
|
||||
line-height: 27px;
|
||||
}
|
||||
.shopName{
|
||||
//width: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
.textarea{
|
||||
width: calc(100% - 60px);
|
||||
}
|
||||
}
|
||||
.project{
|
||||
color: #E8A524;
|
||||
width: calc(100% - 60px);
|
||||
//width: calc(100% - 60px);
|
||||
}
|
||||
.shopImgList{
|
||||
margin-top: 6px;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@
|
||||
@click-left="goback"
|
||||
/>
|
||||
</div>
|
||||
<div class="baseInfo common">
|
||||
<div class="baseInfo common" style="height: 344px">
|
||||
<div class="title">基本信息:</div>
|
||||
<div class="line"></div>
|
||||
<div class="item">
|
||||
@ -47,9 +47,16 @@
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">扣除责任险费:</span>
|
||||
<span class="content">{{orderInfo.policyAmount}} {{orderInfo.cutInsuranceAmount}}</span>
|
||||
<span class="content">{{orderInfo.policyAmount}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">车衣费用:</span>
|
||||
<span class="content">{{orderInfo.carClothingToolAmount}}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="titleLeft">换电瓶费用:</span>
|
||||
<span class="content">{{orderInfo.replaceBatteryAmount}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="baseInfo common">
|
||||
<div class="title">审核数据:</div>
|
||||
|
Reference in New Issue
Block a user