员工上传配件申请单图片,服务顾问、总检批量审核配件申请单和根据图片添加配件并审核

This commit is contained in:
xiaofajia 2024-11-14 18:33:55 +08:00
parent be40b95d6a
commit fb101bad59
5 changed files with 1516 additions and 452 deletions

View File

@ -4,13 +4,19 @@
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"type" : "uniCloud"
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "custom",

View File

@ -1,9 +1,9 @@
// 应用全局配置
module.exports = {
baseUrl: 'https://www.nuoyunr.com',
// baseUrl: 'https://www.nuoyunr.com',
// baseUrl: 'http://124.222.105.7:48080',
// baseUrl: 'http://192.168.1.4:48080',
// baseUrl: "http://localhost:48080",
baseUrl: "http://localhost:48080",
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'https://www.nuoyunr.com/minio/',
shareUrl: 'https://www.lighting-it.cn/share?inviteId=',

692
package-lock.json generated
View File

@ -1,6 +1,690 @@
{
"name": "lanan-repair-app",
"lockfileVersion": 2,
"requires": true,
"lockfileVersion": 1,
"packages": {
"": {
"dependencies": {
"rich-text-parser": "^1.0.2",
"uqrcodejs": "^4.0.7",
"uview-ui": "^2.0.36",
"weapp-qrcode": "^1.0.0"
},
"devDependencies": {
"rich-text-parser": "^1.0.2",
"sass": "^1.79.3",
"sass-loader": "^10.5.2"
}
},
"node_modules/@parcel/watcher": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.4.1.tgz",
"integrity": "sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==",
"dev": true,
"dependencies": {
"detect-libc": "^1.0.3",
"is-glob": "^4.0.3",
"micromatch": "^4.0.5",
"node-addon-api": "^7.0.0"
},
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"optionalDependencies": {
"@parcel/watcher-android-arm64": "2.4.1",
"@parcel/watcher-darwin-arm64": "2.4.1",
"@parcel/watcher-darwin-x64": "2.4.1",
"@parcel/watcher-freebsd-x64": "2.4.1",
"@parcel/watcher-linux-arm-glibc": "2.4.1",
"@parcel/watcher-linux-arm64-glibc": "2.4.1",
"@parcel/watcher-linux-arm64-musl": "2.4.1",
"@parcel/watcher-linux-x64-glibc": "2.4.1",
"@parcel/watcher-linux-x64-musl": "2.4.1",
"@parcel/watcher-win32-arm64": "2.4.1",
"@parcel/watcher-win32-ia32": "2.4.1",
"@parcel/watcher-win32-x64": "2.4.1"
}
},
"node_modules/@parcel/watcher-android-arm64": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.4.1.tgz",
"integrity": "sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-darwin-arm64": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.4.1.tgz",
"integrity": "sha512-ln41eihm5YXIY043vBrrHfn94SIBlqOWmoROhsMVTSXGh0QahKGy77tfEywQ7v3NywyxBBkGIfrWRHm0hsKtzA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-darwin-x64": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.4.1.tgz",
"integrity": "sha512-yrw81BRLjjtHyDu7J61oPuSoeYWR3lDElcPGJyOvIXmor6DEo7/G2u1o7I38cwlcoBHQFULqF6nesIX3tsEXMg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-freebsd-x64": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.4.1.tgz",
"integrity": "sha512-TJa3Pex/gX3CWIx/Co8k+ykNdDCLx+TuZj3f3h7eOjgpdKM+Mnix37RYsYU4LHhiYJz3DK5nFCCra81p6g050w==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-arm-glibc": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.4.1.tgz",
"integrity": "sha512-4rVYDlsMEYfa537BRXxJ5UF4ddNwnr2/1O4MHM5PjI9cvV2qymvhwZSFgXqbS8YoTk5i/JR0L0JDs69BUn45YA==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-arm64-glibc": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.4.1.tgz",
"integrity": "sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-arm64-musl": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.4.1.tgz",
"integrity": "sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-x64-glibc": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.4.1.tgz",
"integrity": "sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-x64-musl": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.4.1.tgz",
"integrity": "sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-win32-arm64": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.4.1.tgz",
"integrity": "sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-win32-ia32": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-ia32/-/watcher-win32-ia32-2.4.1.tgz",
"integrity": "sha512-maNRit5QQV2kgHFSYwftmPBxiuK5u4DXjbXx7q6eKjq5dsLXZ4FJiVvlcw35QXzk0KrUecJmuVFbj4uV9oYrcw==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-win32-x64": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.4.1.tgz",
"integrity": "sha512-+DvS92F9ezicfswqrvIRM2njcYJbd5mb9CUgtrHCHmvn7pPPa+nMDRu1o1bYYz/l5IB2NVGNJWiH7h1E58IF2A==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@types/json-schema": {
"version": "7.0.15",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"dev": true
},
"node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
"dev": true,
"dependencies": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/ajv-keywords": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true,
"peerDependencies": {
"ajv": "^6.9.1"
}
},
"node_modules/big.js": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
"dev": true,
"engines": {
"node": "*"
}
},
"node_modules/braces": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/chokidar": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz",
"integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==",
"dev": true,
"dependencies": {
"readdirp": "^4.0.1"
},
"engines": {
"node": ">= 14.16.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/detect-libc": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
"integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",
"dev": true,
"bin": {
"detect-libc": "bin/detect-libc.js"
},
"engines": {
"node": ">=0.10"
}
},
"node_modules/emojis-list": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true,
"engines": {
"node": ">= 4"
}
},
"node_modules/extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"node_modules/fast-deep-equal": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
"node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true
},
"node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/immutable": {
"version": "4.3.7",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz",
"integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==",
"dev": true
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/json-schema-traverse": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"dev": true
},
"node_modules/json5": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
"dev": true,
"bin": {
"json5": "lib/cli.js"
},
"engines": {
"node": ">=6"
}
},
"node_modules/klona": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz",
"integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==",
"dev": true,
"engines": {
"node": ">= 8"
}
},
"node_modules/loader-utils": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
},
"engines": {
"node": ">=8.9.0"
}
},
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"dependencies": {
"braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
"node": ">=8.6"
}
},
"node_modules/neo-async": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true
},
"node_modules/node-addon-api": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
"integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
"dev": true
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/readdirp": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz",
"integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==",
"dev": true,
"engines": {
"node": ">= 14.16.0"
},
"funding": {
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/rich-text-parser": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/rich-text-parser/-/rich-text-parser-1.0.2.tgz",
"integrity": "sha512-fv6Piuikqf0PCuFGfFMtfOdc9fWE/HoSxi4gkDawco/NDKHfR6W5t1/t7Lh0pySf3GkV/rVcgAp/LKx8ZMwjuw==",
"dev": true
},
"node_modules/sass": {
"version": "1.80.2",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.80.2.tgz",
"integrity": "sha512-9wXY8cGBlUmoUoT+vwOZOFCiS+naiWVjqlreN9ar9PudXbGwlMTFwCR5K9kB4dFumJ6ib98wZyAObJKsWf1nAA==",
"dev": true,
"dependencies": {
"@parcel/watcher": "^2.4.1",
"chokidar": "^4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
},
"bin": {
"sass": "sass.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/sass-loader": {
"version": "10.5.2",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.5.2.tgz",
"integrity": "sha512-vMUoSNOUKJILHpcNCCyD23X34gve1TS7Rjd9uXHeKqhvBG39x6XbswFDtpbTElj6XdMFezoWhkh5vtKudf2cgQ==",
"dev": true,
"dependencies": {
"klona": "^2.0.4",
"loader-utils": "^2.0.0",
"neo-async": "^2.6.2",
"schema-utils": "^3.0.0",
"semver": "^7.3.2"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"fibers": ">= 3.1.0",
"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"sass": "^1.3.0",
"webpack": "^4.36.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"fibers": {
"optional": true
},
"node-sass": {
"optional": true
},
"sass": {
"optional": true
}
}
},
"node_modules/schema-utils": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz",
"integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.8",
"ajv": "^6.12.5",
"ajv-keywords": "^3.5.2"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
}
},
"node_modules/semver": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/uqrcodejs": {
"version": "4.0.7",
"resolved": "https://registry.npmjs.org/uqrcodejs/-/uqrcodejs-4.0.7.tgz",
"integrity": "sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA=="
},
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
"dependencies": {
"punycode": "^2.1.0"
}
},
"node_modules/uview-ui": {
"version": "2.0.37",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-2.0.37.tgz",
"integrity": "sha512-iBcWNmQa01Wr+z004G6XIVPDctOrJIAx7LObQceUAPxZh6kJYjIOAMp5JE1K4VpoMV5bKYDpCd0gmX+M4nTEQQ==",
"engines": {
"HBuilderX": "^3.1.0"
}
},
"node_modules/weapp-qrcode": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/weapp-qrcode/-/weapp-qrcode-1.0.0.tgz",
"integrity": "sha512-4sa3W0rGDVJ9QaeZpAKlAuUxVyjhDwiUqHyGK/jJMsRMXnhb4yO8qWU/pZruMo+iT5J6CraS67lDMFb1VY+RaA==",
"dependencies": {
"extend": "^3.0.2"
}
}
},
"dependencies": {
"@parcel/watcher": {
"version": "2.4.1",
@ -132,7 +816,8 @@
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
"integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
"dev": true
"dev": true,
"requires": {}
},
"big.js": {
"version": "5.2.2",
@ -295,7 +980,8 @@
"rich-text-parser": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/rich-text-parser/-/rich-text-parser-1.0.2.tgz",
"integrity": "sha512-fv6Piuikqf0PCuFGfFMtfOdc9fWE/HoSxi4gkDawco/NDKHfR6W5t1/t7Lh0pySf3GkV/rVcgAp/LKx8ZMwjuw=="
"integrity": "sha512-fv6Piuikqf0PCuFGfFMtfOdc9fWE/HoSxi4gkDawco/NDKHfR6W5t1/t7Lh0pySf3GkV/rVcgAp/LKx8ZMwjuw==",
"dev": true
},
"sass": {
"version": "1.80.2",

View File

@ -4,10 +4,79 @@
<view class="body">
<view class="repairInfo">
<view class="header">
配件信息
申请人
</view>
<view class="repairItem" v-for="(item, index) in repairList" :key="index">
<view class="repairName">{{ item.waresName }} <text class="repairNum">×{{item.waresCount}}</text></view>
<view class="repairItem">
<view class="grid">
<view style="grid-area: a" class="girdItem">
<text class="label">岗位</text>
<text class="value">{{ info.repairWork }}</text>
</view>
<view style="grid-area: b" class="girdItem">
<text class="label">姓名</text>
<text class="value">{{ info.repairName }}</text>
</view>
<view style="grid-area: c" class="girdItem">
<text class="label">服务顾问</text>
<text class="value">{{ info.adviserName }}</text>
</view>
<view style="grid-area: d" class="girdItem">
<text class="label">时间</text>
<text class="value">{{ getDateFormat(info.createTime) }}</text>
</view>
</view>
</view>
</view>
<view class="repairInfo">
<view class="header">
客户信息
</view>
<view class="repairItem">
<view class="grid">
<view style="grid-area: a" class="girdItem">
<text class="label">车牌号</text>
<text class="value">{{ info.licenseNumber }}</text>
</view>
<view style="grid-area: b" class="girdItem">
<text class="label">车系</text>
<text class="value">{{ info.carBrandName }}</text>
</view>
<view style="grid-area: c" class="girdItem">
<text class="label">姓名</text>
<text class="value">{{ info.userName }}</text>
</view>
<view style="grid-area: d" class="girdItem">
<text class="label">电话</text>
<text class="value">{{ info.userMobile }}</text>
</view>
</view>
</view>
</view>
<view class="repairInfo" v-if="imageUrls && imageUrls.length > 0">
<view class="header">
配件申请表
</view>
<view class="repairItem">
<image
v-for="(url, index) in imageUrls"
:key="index"
:src="url"
class="image-item"
@click="showFullScreen(index)"
/>
</view>
</view>
<view class="repairInfo">
<view class="header">
配件信息
<view v-if="canOperate" style="float: right; color: #0174F6" @click="addWares">添加配件</view>
</view>
<view @click="changeChoose(item)" class="repairItem" v-for="(item, index) in repairList" :key="index">
<view class="repairName">
<radio v-if="canOperate" :value="item.id" :checked="item.selected"/>
{{ item.waresName }}
<text class="repairNum">×{{ item.waresCount }}</text>
</view>
<view class="grid">
<view style="grid-area: a" class="girdItem">
<text class="label">配件分类</text>
@ -21,13 +90,21 @@
<text class="label">单位</text>
<text class="value">{{ item.wares.unit }}</text>
</view>
<!-- <view style="grid-area: d" class="girdItem">-->
<!-- <text class="label">编码</text>-->
<!-- <text class="value">{{ item.wares.code || ""}}</text>-->
<!-- </view>-->
<!-- <view style="grid-area: d" class="girdItem">-->
<!-- <text class="label">编码</text>-->
<!-- <text class="value">{{ item.wares.code || ""}}</text>-->
<!-- </view>-->
<view style="grid-area: d" class="girdItem">
<text class="label">售价</text>
<text class="value" ><input type="number" placeholder="请输入售价" v-model="item.wares.price" /></text>
<text class="value"><input type="number" placeholder="请输入售价" v-model="item.wares.price"/></text>
</view>
<view style="grid-area: e" class="girdItem">
<text class="label">状态</text>
<text :class="getWaresStatusClass(item.waresStatus)">{{ getWaresStatus(item.waresStatus) }}</text>
</view>
<view style="grid-area: f" class="girdItem">
<text class="label">审核人</text>
<text class="value">{{ item.handleName }}</text>
</view>
</view>
</view>
@ -41,25 +118,32 @@
{{ yesText }}
</view>
</view>
<!-- 全屏查看弹窗 -->
<view v-if="showFullscreen" class="fullscreen-container" @click="closeFullscreen">
<image :src="currentImage" class="fullscreen-image" @click.stop />
</view>
</view>
</template>
<script>
import VNavigationBar from "@/components/VNavigationBar.vue";
import request from '@/utils/request';
import {getDictTextByCodeAndValue} from "@/utils/utils";
import {getDictTextByCodeAndValue, formatTimestampCustom} from "@/utils/utils";
import config from "@/config";
export default {
components: {
VNavigationBar
},
data() {
return {
viewType:"",
id:"",
title:"",
canOperate:false,
backText:"",
yesText:"",
viewType: "",
id: "",
title: "",
canOperate: false,
backText: "",
yesText: "",
repairList: [
// {
// name: '7',
@ -77,67 +161,171 @@ export default {
// total: 35,
// code: 'XCQHCJYS7 SPI SP 5W30 4L'
// }
]
],
selectWares: [],
info: {},
imageUrls: [],
showFullscreen: false,
currentImage: ''
};
},
onLoad(data){
this.canOperate = data.canOperate
this.id = data.id
onShow(){
this.getTicketWares()
this.getDetail()
},
methods:{
getDetail(){
onLoad(data) {
this.canOperate = data.canOperate
this.id = data.id
this.getTicketWares()
this.getDetail()
},
methods: {
addWares(){
//
uni.navigateTo({
url: '/pages-repair/apply/applyForm?twId=' + this.id
})
},
showFullScreen(index) {
this.currentImage = this.imageUrls[index];
this.showFullscreen = true;
},
closeFullscreen() {
this.showFullscreen = false;
},
getDateFormat(val) {
return formatTimestampCustom(val);
},
async getTicketWares() {
try {
const url = "/admin-api/repair/tw/getById?id=" + this.id
const res = await request({
url: url,
method: 'get'
})
this.info = res.data
await this.getTicketById(this.info.ticketId)
if (this.info.images && this.info.images.length > 0) {
this.getImageUrls(this.info.images)
}
}catch{}
},
getImageUrls(val) {
this.imageUrls = [...val.split(",").map(item => {
return config.baseImageUrl + item
})]
},
async getTicketById(id) {
const res = await request({
url: '/admin-api/repair/tickets/get?id=' + id,
method: 'get',
})
this.info.carBrandName = res.data.carBrandName
},
changeChoose(val) {
const flag = this.selectWares.findIndex(item => item.id === val.id)
if (flag === -1) {
val.selected = true
this.selectWares.push(val)
} else {
val.selected = false
this.selectWares.splice(flag, 1)
}
if (this.selectWares && this.selectWares.length > 0) {
this.yesText = "通过"
this.backText = "驳回"
} else {
this.yesText = "通过全部"
this.backText = "驳回全部"
}
},
getWaresStatus(val) {
switch (val) {
case "1":
return "通过";
case "0":
return "不通过";
default:
return "待定"
}
},
getWaresStatusClass(val) {
switch (val) {
case "1":
return "pass";
case "0":
return "no_pass";
default:
return ""
}
},
getDetail() {
let url;
let params={};
let params = {};
this.title = "配件申请单详情"
//
url = "/admin-api/repair/twi/list"
params.twId = this.id
this.yesText="审批通过"
this.backText="驳回"
this.yesText = "通过全部"
this.backText = "驳回全部"
request({
url: url,
method: 'get',
params:params
params: params
}).then((res) => {
if (res.code == 200) {
this.repairList = res.data
if (this.canOperate && this.repairList && this.repairList.length > 0) {
this.repairList = this.repairList.filter(item => item.waresStatus === '').map(item => {
return {
...item,
selected: false
}
})
}
}
})
},
confirmOpe(type){
let forSign = true
if (type == 'yes') {
this.repairList.map(item=>{
if (item.wares.price == null || item.wares.price == ''){
uni.showToast({
title: '售价不能为空!',
icon: 'none'
})
forSign = false
return;
}
})
}
if (!forSign) {
return;
}
confirmOpe(type) {
// let forSign = true
// if (type == 'yes') {
// this.repairList.map(item=>{
// if (item.wares.price == null || item.wares.price == ''){
// uni.showToast({
// title: '',
// icon: 'none'
// })
// forSign = false
// return;
// }
// })
// }
// if (!forSign) {
// return;
// }
let url = '/admin-api/repair/tw/audit'
let dataObj={
id:this.id,
type:"01",
status:"yes"==type?"02":"05"
let dataObj = {
id: this.id,
type: "01",
status: "yes" == type ? "01" : "02"
}
if (this.selectWares && this.selectWares.length > 0) {
dataObj.items = [...this.selectWares.map(item => {
return {
id: item.id
}
})]
} else {
dataObj.items = [...this.repairList.map(item => {
return {
id: item.id
}
})]
}
dataObj.repairWaresList = [...this.repairList.map(item => {
return{
id:item.id,
price:item.wares.price
}
})]
request({
url: url,
method: 'POST',
data:dataObj
data: dataObj
}).then((res) => {
if (res.code == 200) {
uni.showToast({
@ -225,13 +413,16 @@ export default {
padding: 30rpx;
border-bottom: 1rpx solid #DDDDDD;
}
.repairItem {
padding: 30rpx;
border-bottom: 1rpx solid #DDDDDD;
&:last-child {
border-bottom: none;
}
}
.repairName {
display: flex;
align-items: center;
@ -239,26 +430,32 @@ export default {
font-size: 32rpx;
color: #333333;
margin-bottom: 30rpx;
.repairNum {
font-size: 28rpx;
color: #0174F6;
}
}
.grid {
display: grid;
grid-template-areas:
'a b'
'c d';
'c d'
'e f';
grid-template-columns: 1fr 1fr;
gap: 30rpx;
.girdItem {
display: flex;
flex-direction: column;
row-gap: 12rpx;
font-size: 28rpx;
.label {
color: #858BA0;
}
.value {
color: #333333;
}
@ -294,4 +491,41 @@ export default {
color: #858BA0;
}
}
.pass {
color: #2979FF;
}
.no_pass {
color: #E8A321;
}
.image-item {
width: 100rpx;
height: 100rpx;
border-radius: 8rpx;
object-fit: cover;
margin-right: 10rpx; /* 增加右边距,使图片之间有间隔 */
}
.fullscreen-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.8);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
}
.fullscreen-image {
max-width: 90vw; /* 最大宽度为视口宽度的90% */
max-height: 90vh; /* 最大高度为视口高度的90% */
object-fit: contain; /* 保持宽高比 */
cursor: pointer;
margin: 0 20rpx; /* 增加左右边距,使图片距离屏幕边缘有一定距离 */
}
</style>

View File

@ -1,263 +1,148 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title="配件申请" :addWares="true" @addNewWares="addNewWaresFun" title-color="#333"></VNavigationBar>
<view class="search">
<view class="searchBox">
<input class="searchInput" v-model="searchName" placeholder="查询配件名称" placeholder-style="font-size: 28rpx" type="text">
<text @click="onRefresherrefresh">搜索</text>
</view>
</view>
<view class="tabs">
<view v-for="(item, index) in tabs" @click="chooseTab(item.value)" :key="index" :class="{'active': item.value === activeId}" class="tab-item">
{{ item.name }}
</view>
</view>
<view class="listBox">
<view class="list">
<scroll-view style="height: 100%" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view v-for="(item, index) in repairList" :key="index" class="listItem">
<view class="repairName">{{ item.name }}</view>
<view class="repairBottom">
<text class="repairDesc">单位
<text class="repairUnit">{{ item.unit }}</text>
</text>
<view class="repairBtns">
<u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon>
<text class="repairNum">{{ item.num }}</text>
<u-icon color="#0174F6" name="plus-circle-fill" size="24" @click="addNum(item)"></u-icon>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="footer">
<text class="label">共选择</text>
<text class="repairNum">{{ repairCount }}个配件</text>
<view class="submit" @click="submit">确认申请</view>
</view>
</view>
<view class="container">
<VNavigationBar background-color="#fff" title="配件申请" :addWares="true" @addNewWares="addNewWaresFun"
title-color="#333"></VNavigationBar>
<view class="search">
<view class="searchBox">
<input class="searchInput" v-model="searchName" placeholder="查询配件名称"
placeholder-style="font-size: 28rpx" type="text">
<text @click="onRefresherrefresh">搜索</text>
</view>
</view>
<view class="tabs">
<view v-for="(item, index) in tabs" @click="chooseTab(item.value)" :key="index"
:class="{'active': item.value === activeId}" class="tab-item">
{{ item.name }}
</view>
</view>
<view class="listBox">
<view class="list">
<scroll-view style="height: 100%" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view v-for="(item, index) in repairList" :key="index" class="listItem">
<view class="repairName">{{ item.name }}</view>
<view class="repairBottom">
<text class="repairDesc">单位
<text class="repairUnit">{{ item.unit }}</text>
</text>
<view class="repairBtns">
<u-icon name="minus-circle-fill" size="24" @click="delNum(item)"></u-icon>
<text class="repairNum">{{ item.num }}</text>
<u-icon color="#0174F6" name="plus-circle-fill" size="24"
@click="addNum(item)"></u-icon>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="footer">
<text class="label">共选择</text>
<text class="repairNum">{{ repairCount }}个配件</text>
<view class="submit" v-if="ticketId" @click="submit">确认申请</view>
<view class="submit" v-if="!ticketId" @click="addTwi">确认添加</view>
<view class="submit" v-if="ticketId" @click="openUpload">拍照上传</view>
</view>
<!-- 普通弹窗---拍照上传 -->
<uni-popup ref="popup" background-color="#fff">
<view class="popup-content" style="padding: 15px;">
<view class="dl-avatar-box">
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile"
limit="9" title="请上传配件申请单照片最多选择9张图片"></uni-file-picker>
</view>
<button type="primary" @click="$refs.popup.close()">保存</button>
</view>
</uni-popup>
</view>
</template>
<script>
import VNavigationBar from "@/components/VNavigationBar.vue";
import request from '@/utils/request';
import {getDictTextByCodeAndValue,createUniqueCodeByHead} from "@/utils/utils";
import {getUserInfo} from "@/utils/auth";
export default {
components: {VNavigationBar},
data() {
return {
tabs: [
{name: '全部', value: ''}
],
//
repairList: [],
//
selectedRepairList: [
import VNavigationBar from "@/components/VNavigationBar.vue";
import request from '@/utils/request';
import {
getDictTextByCodeAndValue,
createUniqueCodeByHead
} from "@/utils/utils";
import {
getUserInfo
} from "@/utils/auth";
import upload from "@/utils/upload";
import config from "@/config";
import {data} from "uview-ui/libs/mixin/mixin";
export default {
components: {
VNavigationBar
},
data() {
return {
tabs: [{
name: '全部',
value: ''
}],
//
repairList: [],
//
selectedRepairList: [
],
//
searchName: '',
//ID
activeId: '',
//ID
ticketId:null,
pageNo: 1,
pageSize: 10,
total: 0,
//
isTriggered:false,
userInfo:null,
};
},
computed: {
repairCount() {
return this.selectedRepairList.reduce((val, item) => {
return item.num + val
}, 0)
}
},
onLoad(data) {
this.userInfo = getUserInfo()
this.ticketId = data.ticketId
},
onShow(){
this.init()
},
methods: {
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')
return
}
//+1,
this.pageNo++
//
this.pageList()
},
/**
* 下拉刷新数据
*/
onRefresherrefresh(){
this.isTriggered = true
this.pageNo = 1
this.total = 0
this.repairList = []
this.pageList()
},
init() {
this.tabs = []
//tab
request({
url: '/admin-api/repair/wares/getAllTypeList',
method: 'get'
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.length>0) {
res.data.map((item)=>{
if(item.id){
this.tabs.push({
name:item.name,
value:item.id
})
}
],
//
searchName: '',
//ID
activeId: '',
//ID
ticketId: null,
pageNo: 1,
pageSize: 10,
total: 0,
//
isTriggered: false,
userInfo: null,
fileList: [],
sizeType: ['compressed'],
twId: null
};
},
computed: {
repairCount() {
return this.selectedRepairList.reduce((val, item) => {
return item.num + val
}, 0)
}
},
onLoad(data) {
this.userInfo = getUserInfo()
this.ticketId = data.ticketId
this.twId = data.twId
},
onShow() {
this.init()
},
methods: {
addTwi(){
if (!this.selectedRepairList || this.selectedRepairList.length === 0){
uni.showToast({
title: '请选择配件!',
icon: 'none'
})
return
}
})
//
this.pageList()
// //
// const result = [{name: 'S7 4L/ALL', num: 0, unit: '', id: 1},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 2},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 3},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 4},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 5}]
// //
// this.repairList = result.map(m => {
// if (this.selectedRepairList && this.selectedRepairList.length > 0) {
// const find = this.selectedRepairList.find(f => f.id === m.id)
// if (find) {
// m.num = find.num
// }
// }
// return m
// })
},
/**
* 分页加载所有配件
*/
pageList(){
let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize}
if(""!=this.activeId){
paramsObj.type = this.activeId
}
if(""!=this.searchName){
paramsObj.name = this.searchName
}
request({
url: '/admin-api/repair/wares/page',
method: 'get',
params:paramsObj
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.records.length>0) {
let thisDataList = res.data.records
//
thisDataList = thisDataList.map(m => {
if (this.selectedRepairList && this.selectedRepairList.length > 0) {
const find = this.selectedRepairList.find(f => f.id === m.id)
if (find) {
m.num = find.num
}else{
m.num = 0
}
}else{
m.num = 0
}
//
getDictTextByCodeAndValue("repair_unit",m.unit).then(value => {
m.unit = value
}).catch(error => {
m.unit = "未知"
console.error(error);
});
return m
})
// concat n
if (this.pageNo != 1) {
this.repairList = this.repairList.concat(thisDataList)
} else {
this.repairList = thisDataList
let dataObj = {
id: this.twId
}
dataObj.items = [...this.selectedRepairList.map(item => {
return {
id: item.id,
count: item.num,
name: item.name
}
//
this.total = res.data.total
this.isTriggered = false
}
})
},
addNum(repair) {
this.$set(repair, 'num', repair.num + 1)
const find = this.selectedRepairList.find(f => f.id === repair.id)
if (find) {
find.num = repair.num
} else {
this.selectedRepairList.push(JSON.parse(JSON.stringify(repair)))
}
console.log('repair', repair)
},
delNum(repair) {
if (repair.num <= 0) {
return
}
this.$set(repair, 'num', repair.num - 1)
const findIndex = this.selectedRepairList.findIndex(f => f.id === repair.id)
if (findIndex > -1 && repair.num <= 0) {
this.selectedRepairList.splice(findIndex, 1)
} else if (repair.num > 0) {
this.$set(this.selectedRepairList[findIndex], 'num', repair.num)
}
},
submit() {
let orderNo = createUniqueCodeByHead("LLSQ")
let dataObj = {
no:orderNo,
ticketId:this.ticketId,
type:"01",
repairId:this.userInfo.id,
repairName:this.userInfo.nickname,
}
if(this.selectedRepairList.length>0){
let itemList = []
this.selectedRepairList.map((item)=>{
itemList.push({
waresId:item.id,
waresName:item.name,
waresCount:item.num,
//
waresStatus:"02"
})
})
dataObj.items = itemList
}else{
uni.showToast({
title: '请选择配件!',
icon: 'none'
})
return
}
request({
url: '/admin-api/repair/tw/newApplyOrder',
method: 'POST',
data:dataObj
}).then((res) => {
console.log(res)
if (res.code == 200) {
})]
request({
url: "/admin-api/repair/twi/addTwi",
method: 'post',
data: dataObj
}).then(res => {
uni.showToast({
title: '提交成功!',
icon: 'none'
@ -265,159 +150,412 @@ export default {
setTimeout(() => {
uni.navigateBack()
}, 700)
}else{
uni.showToast({
title: '提交失败!',
icon: 'none'
})
}
})
},
/**
* 切换tab选中
* @param value
*/
chooseTab(value){
this.activeId = value
this.onRefresherrefresh()
},
/**
* 添加新的配件
*/
addNewWaresFun(){
uni.navigateTo({
url: '/pages-repair/apply/newWare'
})
},
}
}
})
},
openUpload() {
this.$refs.popup.open("bottom")
},
afterRead(file) {
for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({
url: '/admin-api/infra/file/upload',
filePath: file.tempFilePaths[i]
}).then((res) => {
this.fileList.push({
url: config.baseImageUrl + res.data
})
console.log(this.fileList)
})
}
},
deleteFile(file, index) {
this.fileList.splice(index, 1);
},
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')
return
}
//+1,
this.pageNo++
//
this.pageList()
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
this.isTriggered = true
this.pageNo = 1
this.total = 0
this.repairList = []
this.pageList()
},
init() {
this.tabs = []
//tab
request({
url: '/admin-api/repair/wares/getAllTypeList',
method: 'get'
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.length > 0) {
res.data.map((item) => {
if (item.id) {
this.tabs.push({
name: item.name,
value: item.id
})
}
})
}
})
//
this.pageList()
// //
// const result = [{name: 'S7 4L/ALL', num: 0, unit: '', id: 1},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 2},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 3},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 4},
// {name: 'S7 4L/ALL', num: 0, unit: '', id: 5}]
// //
// this.repairList = result.map(m => {
// if (this.selectedRepairList && this.selectedRepairList.length > 0) {
// const find = this.selectedRepairList.find(f => f.id === m.id)
// if (find) {
// m.num = find.num
// }
// }
// return m
// })
},
/**
* 分页加载所有配件
*/
pageList() {
let paramsObj = {
pageNo: this.pageNo,
pageSize: this.pageSize
}
if ("" != this.activeId) {
paramsObj.type = this.activeId
}
if ("" != this.searchName) {
paramsObj.name = this.searchName
}
request({
url: '/admin-api/repair/wares/page',
method: 'get',
params: paramsObj
}).then((res) => {
console.log(res)
if (res.code == 200 && res.data.records.length > 0) {
let thisDataList = res.data.records
//
thisDataList = thisDataList.map(m => {
if (this.selectedRepairList && this.selectedRepairList.length > 0) {
const find = this.selectedRepairList.find(f => f.id === m.id)
if (find) {
m.num = find.num
} else {
m.num = 0
}
} else {
m.num = 0
}
//
getDictTextByCodeAndValue("repair_unit", m.unit).then(value => {
m.unit = value
}).catch(error => {
m.unit = "未知"
console.error(error);
});
return m
})
// concat n
if (this.pageNo != 1) {
this.repairList = this.repairList.concat(thisDataList)
} else {
this.repairList = thisDataList
}
//
this.total = res.data.total
this.isTriggered = false
}
})
},
addNum(repair) {
this.$set(repair, 'num', repair.num + 1)
const find = this.selectedRepairList.find(f => f.id === repair.id)
if (find) {
find.num = repair.num
} else {
this.selectedRepairList.push(JSON.parse(JSON.stringify(repair)))
}
console.log('repair', repair)
},
delNum(repair) {
if (repair.num <= 0) {
return
}
this.$set(repair, 'num', repair.num - 1)
const findIndex = this.selectedRepairList.findIndex(f => f.id === repair.id)
if (findIndex > -1 && repair.num <= 0) {
this.selectedRepairList.splice(findIndex, 1)
} else if (repair.num > 0) {
this.$set(this.selectedRepairList[findIndex], 'num', repair.num)
}
},
submit() {
let orderNo = createUniqueCodeByHead("LLSQ")
let dataObj = {
no: orderNo,
ticketId: this.ticketId,
type: "01",
repairId: this.userInfo.id,
repairName: this.userInfo.nickname,
}
if (this.selectedRepairList.length === 0 && this.fileList.length === 0) {
uni.showToast({
title: '请选择配件!',
icon: 'none'
})
return
} else {
if (this.selectedRepairList.length > 0) {
let itemList = []
this.selectedRepairList.map((item) => {
itemList.push({
waresId: item.id,
waresName: item.name,
waresCount: item.num,
//---
waresStatus: ""
})
})
dataObj.items = itemList
}
if (this.fileList.length > 0){
dataObj.images = this.fileList.map(item => {
console.log(item)
return item.path.replace(config.baseImageUrl, '')
}).join(",")
}
}
request({
url: '/admin-api/repair/tw/update',
method: 'POST',
data:dataObj
}).then((res) => {
console.log(res)
if (res.code == 200) {
uni.showToast({
title: '提交成功!',
icon: 'none'
})
setTimeout(() => {
uni.navigateBack()
}, 700)
}else{
uni.showToast({
title: '提交失败!',
icon: 'none'
})
}
})
// if(this.selectedRepairList.length>0){
// let itemList = []
// this.selectedRepairList.map((item)=>{
// itemList.push({
// waresId:item.id,
// waresName:item.name,
// waresCount:item.num,
// //
// waresStatus:"02"
// })
// })
// dataObj.items = itemList
// }else{
// uni.showToast({
// title: '',
// icon: 'none'
// })
// return
// }
// request({
// url: '/admin-api/repair/tw/newApplyOrder',
// method: 'POST',
// data:dataObj
// }).then((res) => {
// console.log(res)
// if (res.code == 200) {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// setTimeout(() => {
// uni.navigateBack()
// }, 700)
// }else{
// uni.showToast({
// title: '',
// icon: 'none'
// })
// }
// })
},
/**
* 切换tab选中
* @param value
*/
chooseTab(value) {
this.activeId = value
this.onRefresherrefresh()
},
/**
* 添加新的配件
*/
addNewWaresFun() {
uni.navigateTo({
url: '/pages-repair/apply/newWare'
})
},
}
}
</script>
<style lang="scss">
.container {
height: 100%;
background-color: #F3F5F7;
display: flex;
flex-direction: column;
}
.container {
height: 100%;
background-color: #F3F5F7;
display: flex;
flex-direction: column;
}
.search {
padding: 0 40rpx;
background-color: #fff;
.search {
padding: 0 40rpx;
background-color: #fff;
& > .searchBox {
height: 84rpx;
background: #F3F5F7;
border-radius: 12rpx 12rpx 12rpx 12rpx;
margin: 0 auto;
padding: 0 30rpx;
font-size: 28rpx;
color: #0174F6;
&>.searchBox {
height: 84rpx;
background: #F3F5F7;
border-radius: 12rpx 12rpx 12rpx 12rpx;
margin: 0 auto;
padding: 0 30rpx;
font-size: 28rpx;
color: #0174F6;
display: flex;
align-items: center;
}
display: flex;
align-items: center;
}
.searchInput {
flex: 1;
width: 0;
color: #333;
}
}
.searchInput {
flex: 1;
width: 0;
color: #333;
}
}
.tabs {
background-color: #fff;
padding: 30rpx 40rpx;
margin: 0 auto;
display: flex;
align-items: center;
column-gap: 30rpx;
overflow: auto;
width: 100%;
.tabs {
background-color: #fff;
padding: 30rpx 40rpx;
margin: 0 auto;
display: flex;
align-items: center;
column-gap: 30rpx;
overflow: auto;
width: 100%;
.tab-item {
flex-shrink: 0;
padding: 16rpx 30rpx;
font-size: 28rpx;
color: #113A68;
background: #F2F2F7;
border-radius: 30rpx 30rpx 30rpx 30rpx;
.tab-item {
flex-shrink: 0;
padding: 16rpx 30rpx;
font-size: 28rpx;
color: #113A68;
background: #F2F2F7;
border-radius: 30rpx 30rpx 30rpx 30rpx;
&.active {
background: #0174F6;
color: #fff;
}
&.active {
background: #0174F6;
color: #fff;
}
}
}
}
}
.listBox {
padding: 30rpx 32rpx;
flex: 1;
height: 0;
.listBox {
padding: 30rpx 32rpx;
flex: 1;
height: 0;
.list {
background-color: #fff;
padding: 0 30rpx;
height: 99%;
}
.list {
background-color: #fff;
padding: 0 30rpx;
height: 99%;
}
.listItem {
padding: 30rpx 0;
border-bottom: 2rpx solid #DDDDDD;
&:last-child {
border-bottom: none;
}
.repairName {
font-size: 32rpx;
color: #333333;
margin-bottom: 20rpx;
}
.listItem {
padding: 30rpx 0;
border-bottom: 2rpx solid #DDDDDD;
.repairBottom {
display: flex;
align-items: center;
justify-content: space-between;
}
&:last-child {
border-bottom: none;
}
.repairDesc {
font-size: 28rpx;
color: #858BA0;
}
.repairName {
font-size: 32rpx;
color: #333333;
margin-bottom: 20rpx;
}
.repairUnit {
color: #333333;
}
.repairBottom {
display: flex;
align-items: center;
justify-content: space-between;
}
.repairBtns {
display: flex;
align-items: center;
column-gap: 10rpx;
}
}
}
.repairDesc {
font-size: 28rpx;
color: #858BA0;
}
.footer {
padding: 14rpx 32rpx;
background-color: #fff;
display: flex;
align-items: center;
.repairUnit {
color: #333333;
}
.repairNum {
flex: 1;
width: 0;
margin-right: 10rpx;
}
.repairBtns {
display: flex;
align-items: center;
column-gap: 10rpx;
}
}
}
.submit {
width: 208rpx;
height: 72rpx;
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
text-align: center;
line-height: 72rpx;
font-size: 32rpx;
color: #FFFFFF;
}
}
.footer {
padding: 14rpx 32rpx;
background-color: #fff;
display: flex;
align-items: center;
.repairNum {
flex: 1;
width: 0;
margin-right: 10rpx;
}
.submit {
width: 208rpx;
height: 72rpx;
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
text-align: center;
line-height: 72rpx;
font-size: 32rpx;
color: #FFFFFF;
}
}
</style>