Commit aebe688a authored by 刘文虎's avatar 刘文虎

dev-3/31

parent 41a602a0
...@@ -3039,16 +3039,6 @@ ...@@ -3039,16 +3039,6 @@
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
"dev": true "dev": true
}, },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"cacache": { "cacache": {
"version": "13.0.1", "version": "13.0.1",
"resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz", "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
...@@ -3075,34 +3065,6 @@ ...@@ -3075,34 +3065,6 @@
"unique-filename": "^1.1.1" "unique-filename": "^1.1.1"
} }
}, },
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://repo.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"css-loader": { "css-loader": {
"version": "3.6.0", "version": "3.6.0",
"resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz", "resolved": "https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz",
...@@ -3197,13 +3159,6 @@ ...@@ -3197,13 +3159,6 @@
"slash": "^2.0.0" "slash": "^2.0.0"
} }
}, },
"has-flag": {
"version": "4.0.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"hash-sum": { "hash-sum": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz", "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz",
...@@ -3368,16 +3323,6 @@ ...@@ -3368,16 +3323,6 @@
"minipass": "^3.1.1" "minipass": "^3.1.1"
} }
}, },
"supports-color": {
"version": "7.2.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
},
"terser-webpack-plugin": { "terser-webpack-plugin": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1610196021147&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz", "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1610196021147&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
...@@ -3415,32 +3360,6 @@ ...@@ -3415,32 +3360,6 @@
"dev": true "dev": true
} }
} }
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
}
}
} }
} }
}, },
...@@ -16461,6 +16380,94 @@ ...@@ -16461,6 +16380,94 @@
"vue-style-loader": "^4.1.0" "vue-style-loader": "^4.1.0"
} }
}, },
"vue-loader-v16": {
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
"dev": true,
"optional": true,
"requires": {
"chalk": "^4.1.0",
"hash-sum": "^2.0.0",
"loader-utils": "^2.0.0"
},
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"optional": true,
"requires": {
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true,
"optional": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"optional": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true,
"optional": true
},
"hash-sum": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz",
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
"dev": true,
"optional": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"optional": true,
"requires": {
"has-flag": "^4.0.0"
}
}
}
},
"vue-style-loader": { "vue-style-loader": {
"version": "4.1.3", "version": "4.1.3",
"resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz?cache=0&sync_timestamp=1614758652197&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-style-loader%2Fdownload%2Fvue-style-loader-4.1.3.tgz", "resolved": "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz?cache=0&sync_timestamp=1614758652197&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-style-loader%2Fdownload%2Fvue-style-loader-4.1.3.tgz",
......
...@@ -9,6 +9,8 @@ import { orderApiFun } from "@/common/api/order.js"; ...@@ -9,6 +9,8 @@ import { orderApiFun } from "@/common/api/order.js";
import {assessmentApiFun} from"@/common/api/assessment.js" import {assessmentApiFun} from"@/common/api/assessment.js"
import {certApiFun} from"@/common/api/cert.js" import {certApiFun} from"@/common/api/cert.js"
import {partsApiFun} from"@/common/api/parts.js" import {partsApiFun} from"@/common/api/parts.js"
import {receivedApiFun} from"@/common/api/mine/received.js"
import {inventoryApiFun} from"@/common/api/mine/inventory.js"
let apiFun = function(vm) { let apiFun = function(vm) {
let commonApi = commonApiFun(vm); let commonApi = commonApiFun(vm);
let settledApi = settledApiFun(vm) let settledApi = settledApiFun(vm)
...@@ -17,6 +19,8 @@ let apiFun = function(vm) { ...@@ -17,6 +19,8 @@ let apiFun = function(vm) {
let orderApi=orderApiFun(vm) let orderApi=orderApiFun(vm)
let certApi=certApiFun(vm) let certApi=certApiFun(vm)
let partsApi=partsApiFun(vm) let partsApi=partsApiFun(vm)
let receivedApi=receivedApiFun(vm)
let inventoryApi=inventoryApiFun(vm)
let apiUrl = { let apiUrl = {
...commonApi, ...commonApi,
...settledApi, ...settledApi,
...@@ -25,6 +29,8 @@ let apiFun = function(vm) { ...@@ -25,6 +29,8 @@ let apiFun = function(vm) {
...assessmentApi, ...assessmentApi,
...certApi, ...certApi,
...partsApi, ...partsApi,
...receivedApi,
...inventoryApi,
} }
return apiUrl return apiUrl
} }
......
import util from '@/utils/util.js'
const jsonType = {'content-type': 'application/json'}
const formType = {'content-type': 'application/x-www-form-urlencoded'}
const dataType = {'content-type': 'multipart/form-data'}
let inventoryApiFun = function(vm){
// 接口公共前缀
let parts="/wxh-worker-rest/rest/parts/" //收货 inventory 模块
/**
* 收货列表
*/
let inventoryListByInventoryModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/take/stock', params);
/**
* 收货单详情
*/
let inventoryDetailByInventoryModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/sign/detail/'+ params);
/**
* 确认收货
*/
let addInventoryByInventoryModules = async (params = {}) => await vm.$u.post(parts + vm.vuex_token + '/take/stock/detail/add', params,formType);
const inventoryApi = {
inventoryListByInventoryModules,
inventoryDetailByInventoryModules,
addInventoryByInventoryModules,
}
return inventoryApi
}
module.exports = {
inventoryApiFun
}
import util from '@/utils/util.js'
const jsonType = {'content-type': 'application/json'}
const formType = {'content-type': 'application/x-www-form-urlencoded'}
const dataType = {'content-type': 'multipart/form-data'}
let receivedApiFun = function(vm){
// 接口公共前缀
let parts="/wxh-worker-rest/rest/parts/" //收货 received 模块
/**
* 品牌列表 参数固定
*/
let brandListByReceivedModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/type/threeLevel/1100000216/1',params);
/**
* 收货列表
*/
let receiveListByReceivedModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/sign/list', params);
/**
* 收货单详情
*/
let receiveDetailByReceivedModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + '/take/stock/sign/detail/'+ params);
/**
* 确认收货
*/
let addReceiveByReceivedModules = async (params = {}) => await vm.$u.post(parts + vm.vuex_token + '/take/stock/sign/create', params,formType);
const receivedApi = {
brandListByReceivedModules,
receiveListByReceivedModules,
receiveDetailByReceivedModules,
addReceiveByReceivedModules,
}
return receivedApi
}
module.exports = {
receivedApiFun
}
// 自定义filter
export function myFilter(value, options,key="label") {
if (options && options instanceof Array) {
let arr = options.filter(item => item.value === value)
if (arr.length) {
return arr[0] && arr[0][key]
} else {
return value
}
} else {
return value
}
}
// showToast
export function showToast(title,mask=true) {
uni.showToast({
title,
icon: 'none',
mask,
duration:2000
})
}
let localtionshowModal = null
export function showModal({
content = "是否执行?",
showCancel = true,
success,
fail
}) {
if (localtionshowModal) {
return false;
}
localtionshowModal = setTimeout(() => {
uni.showModal({
content: content,
confirmText: '确认',
cancelText: '取消',
showCancel: showCancel,
success,
complete: () => {
clearTimeout(localtionshowModal);
localtionshowModal = null;
}
});
}, 1);
}
\ No newline at end of file
export const receiveStatusOptions = [{
name: '未使用',
value: 0
},
{
name: '已使用',
value: 1
}
]
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<template> <template>
<view class=""> <view class="">
<view class="u-flex" @click="scanCode"> <view class="u-flex" @click="scanCode">
<view class="txt u-flex-1">扫描二维码(仅挚达充电桩可扫描)</view> <view class="txt u-flex-1">
<text v-if="item.fieldsTitle==='充电桩箱体二维码'">扫描二维码</text>
<text v-else>扫描二维码(仅挚达充电桩可扫描)</text>
</view>
<u-icon name="arrow-right" color="#666" size="28"></u-icon> <u-icon name="arrow-right" color="#666" size="28"></u-icon>
</view> </view>
<view class="u-flex"> <view class="u-flex">
......
...@@ -50,6 +50,7 @@ export default { ...@@ -50,6 +50,7 @@ export default {
itemIndex: this.itemIndex, //右侧某一项下标 itemIndex: this.itemIndex, //右侧某一项下标
value: val, value: val,
} }
console.log(data)
this.$emit('value-change', data) this.$emit('value-change', data)
}, },
}, },
......
<template>
<!-- 底部按钮 -->
<view class="fixed-button"><xh-button @handleClick="handleClick" :text="text"></xh-button></view>
</template>
<script>
import XhButton from "./xh-button.vue"
export default {
name:"FixedButton",
components:{
XhButton
},
props:{
text:{
type:String,
default:"提交"
}
},
data() {
return {
buttonStyle: {
width: '100%',
height: '80rpx',
fontSize: '32rpx',
fontWeight: 'bold'
}
};
},
methods:{
handleClick(){
this.$emit("handleClick")
}
}
};
</script>
<style lang="scss" scoped>
.fixed-button {
width: 100%;
box-sizing: border-box;
position: fixed;
left: 0;
padding: 0 30rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
bottom: 20rpx;
}
</style>
<template>
<u-button class="settle-button" type="primary" shape="circle" @click="handleClick" :custom-style="buttonStyle">{{ text }}</u-button>
</template>
<script>
export default {
name: 'XhButton',
props: {
text: {
type: String,
default: '提交'
}
},
data() {
return {
buttonStyle: {
width: '100%',
height: '80rpx',
fontSize: '32rpx',
fontWeight: 'bold'
}
};
},
methods: {
handleClick() {
this.$emit('handleClick');
}
}
};
</script>
<style lang="scss"></style>
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
} }
}, },
"pages": [ "pages": [{
{
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
...@@ -42,16 +41,14 @@ ...@@ -42,16 +41,14 @@
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
// "navigationBarTitleText": "授权登录", // "navigationBarTitleText": "授权登录",
"navigationBarBackgroundColor":"#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"disableScroll": true "disableScroll": true
} }
} }
], ],
"subPackages": [ "subPackages": [{
{
"root": "pages/exam", "root": "pages/exam",
"pages": [ "pages": [{
{
"path": "start", "path": "start",
"style": { "style": {
"navigationBarTitleText": "考试" "navigationBarTitleText": "考试"
...@@ -69,8 +66,7 @@ ...@@ -69,8 +66,7 @@
}, },
{ {
"root": "pages/learn", "root": "pages/learn",
"pages": [ "pages": [{
{
"path": "assessment", "path": "assessment",
"style": { "style": {
"navigationBarTitleText": "认证介绍", "navigationBarTitleText": "认证介绍",
...@@ -143,8 +139,7 @@ ...@@ -143,8 +139,7 @@
}, },
{ {
"root": "pages/mine", "root": "pages/mine",
"pages": [ "pages": [{
{
"path": "address/index", "path": "address/index",
"style": { "style": {
"navigationBarTitleText": "收获地址", "navigationBarTitleText": "收获地址",
...@@ -344,7 +339,7 @@ ...@@ -344,7 +339,7 @@
"path": "warehouse/searchParts", "path": "warehouse/searchParts",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": " ", "navigationBarTitleText": " ",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F5F7", "navigationBarBackgroundColor": "#F4F5F7",
"disableScroll": true "disableScroll": true
...@@ -354,7 +349,7 @@ ...@@ -354,7 +349,7 @@
"path": "warehouse/express", "path": "warehouse/express",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTitleText": " ", "navigationBarTitleText": " ",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#F4F5F7", "navigationBarBackgroundColor": "#F4F5F7",
"disableScroll": true "disableScroll": true
...@@ -378,6 +373,25 @@ ...@@ -378,6 +373,25 @@
"disableScroll": true "disableScroll": true
} }
}, },
{
"path": "warehouse/inventory",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "盘点",
"enablePullDownRefresh": false,
"disableScroll": true
}
},
{
"path": "warehouse/received",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "充电桩收货",
"enablePullDownRefresh": false
}
},
{ {
"path": "superLogin/index", "path": "superLogin/index",
"style": { "style": {
...@@ -393,12 +407,32 @@ ...@@ -393,12 +407,32 @@
"disableScroll": true "disableScroll": true
} }
} }
]
,{
"path" : "warehouse/receiveDetail",
"style" :
{
"navigationStyle": "custom",
"navigationBarTitleText": "收货",
"enablePullDownRefresh": false
}
}
,{
"path" : "warehouse/inventoryDetail",
"style" :
{
"navigationStyle": "custom",
"navigationBarTitleText": "盘点",
"enablePullDownRefresh": false
}
}
]
}, },
{ {
"root": "pages/order", "root": "pages/order",
"pages": [ "pages": [{
{
"path": "complete", "path": "complete",
"style": { "style": {
"navigationBarTitleText": "订单完工", "navigationBarTitleText": "订单完工",
...@@ -495,8 +529,7 @@ ...@@ -495,8 +529,7 @@
}, },
{ {
"root": "pages/photo", "root": "pages/photo",
"pages": [ "pages": [{
{
"path": "index", "path": "index",
"style": { "style": {
"navigationBarTitleText": "拍照小工具", "navigationBarTitleText": "拍照小工具",
...@@ -545,8 +578,7 @@ ...@@ -545,8 +578,7 @@
}, },
{ {
"root": "pages/settle", "root": "pages/settle",
"pages": [ "pages": [{
{
"path": "index", "path": "index",
"style": { "style": {
"navigationBarTitleText": "入驻", "navigationBarTitleText": "入驻",
...@@ -611,10 +643,9 @@ ...@@ -611,10 +643,9 @@
] ]
}, },
{ {
"root":"pages/parts", "root": "pages/parts",
"pages":[ "pages": [{
{ "path": "application",
"path":"application",
"style": { "style": {
"navigationBarTitleText": "物料申请", "navigationBarTitleText": "物料申请",
"navigationStyle": "custom", "navigationStyle": "custom",
...@@ -622,7 +653,7 @@ ...@@ -622,7 +653,7 @@
} }
}, },
{ {
"path":"address", "path": "address",
"style": { "style": {
"navigationBarTitleText": "收货地址", "navigationBarTitleText": "收货地址",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
...@@ -636,26 +667,22 @@ ...@@ -636,26 +667,22 @@
"navigationBarTitleText": "物料选择", "navigationBarTitleText": "物料选择",
"disableScroll": true "disableScroll": true
} }
} }, {
,{ "path": "nodes",
"path" : "nodes", "style": {
"style" :
{
"navigationBarTitleText": "物料申请、返件成功", "navigationBarTitleText": "物料申请、返件成功",
"navigationStyle":"custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }, {
,{ "path": "returnParts",
"path" : "returnParts", "style": {
"style" :
{
"navigationBarTitleText": "退件", "navigationBarTitleText": "退件",
"navigationStyle":"custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
] ]
} }
], ],
"preloadRule": { "preloadRule": {
...@@ -682,8 +709,7 @@ ...@@ -682,8 +709,7 @@
"selectedColor": "#007AFF", "selectedColor": "#007AFF",
"borderStyle": "white", "borderStyle": "white",
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"list": [ "list": [{
{
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "static/tab/shouye-0@3x.png", "iconPath": "static/tab/shouye-0@3x.png",
"selectedIconPath": "static/tab/shouye-1@3x.png", "selectedIconPath": "static/tab/shouye-1@3x.png",
...@@ -711,8 +737,7 @@ ...@@ -711,8 +737,7 @@
}, },
"condition": { "condition": {
"current": 0, "current": 0,
"list": [ "list": [{
{
"name": "拍照小工具", "name": "拍照小工具",
"path": "pages/photo/index", "path": "pages/photo/index",
"query": {} "query": {}
...@@ -724,4 +749,4 @@ ...@@ -724,4 +749,4 @@
} }
] ]
} }
} }
\ No newline at end of file
...@@ -139,8 +139,8 @@ export default { ...@@ -139,8 +139,8 @@ export default {
return { return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交' status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location: [], // 经纬度 location: [], // 经纬度
title: false, // title: false,
title: 'Hello', // title: 'Hello',
loaded: false, loaded: false,
loadedOrder: false, loadedOrder: false,
needSettled: false, needSettled: false,
......
This diff is collapsed.
<!-- ******************* 单个下拉选择 ******************* -->
<template>
<view class="xh-select" :style="{ width: width }">
<view class="u-flex u-row-between picker-common" :class="{ border: border }" :style="{ background: background }">
<picker mode="selector" :value="index" :range-key="rangeKey" :range="list" @click="onOpen" @change="pickerChange" @cancel="close" class="u-flex-1" :disabled="disabled">
<view class="txt">{{ text || placeholder }}</view>
</picker>
<u-icon class="input-icon" color="#2272FF" :name="show ? 'arrow-up' : 'arrow-down'"></u-icon>
</view>
</view>
</template>
<script>
export default {
name: 'XhPickerSelect',
components: {},
props: {
value: {
type: [Number, String, null]
},
placeholder: {
type: String,
default: '请选择'
},
width: {
// 例如:454rpx
type: String,
default: '100%'
},
border: {
type: Boolean,
default: false
},
background: {
type: String
},
list: {
type: Array
},
rangeKey: {
type: String,
default: 'label'
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
show: false,
index: '',
dataValue: ''
};
},
computed: {
text() {
let option = this.list.find((a, i) => {
return a.id === this.dataValue;
});
return option ? option[this.rangeKey] : '';
},
placeholderStyle() {
return 'color:#999999;font-size:26rpx';
},
customStyle() {
return {
'background-color': '#F4F5F7',
'border-radius': '12rpx',
color: '#333333',
'padding-left': '20rpx',
'padding-right': '60rpx',
width: this.width,
'font-size': '26rpx',
height: '76rpx'
};
}
},
watch: {
value: function(val) {
this.dataValue = val;
}
},
mounted() {
/** 如果有值以传入值为主 如果无值 已默认值为主 */
this.dataValue = this.value;
},
methods: {
onOpen() {
if (this.disabled) return false;
this.show = true;
},
close() {
this.show = false;
},
pickerChange(event) {
this.index = +event.detail.value;
let params = this.list[this.index];
this.dataValue = params.id;
this.$emit('change', params);
this.close();
}
}
};
</script>
<style lang="scss" scoped>
.xh-select {
position: relative;
.input-icon {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
color: #2272ff;
}
}
.picker-common {
min-height: 34px;
background-color: #ffffff;
border-radius: 6px;
color: #333333;
padding-left: 10px;
padding-right: 50rpx;
width: 100%;
height: 36px;
.u-flex-1 {
width: 100%;
.txt {
font-size: 14px;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.border {
border: 2upx solid #eeeeee;
}
</style>
<template>
<view class="goods-count">
<view class="goods-count-item">
<view class="goods-count-item-title">充电桩库存量</view>
<view class="goods-count-item-count">{{inventoryCount}}</view>
</view>
<view class="goods-count-line"></view>
<view class="goods-count-item">
<view class="goods-count-item-title">充电桩盘点量</view>
<view class="goods-count-item-count">{{checkCount}}</view>
</view>
</view>
</template>
<script>
export default {
name: 'GoodsCount',
props:{
inventoryCount:{
type:Number,
default:0
},
checkCount:{
type:Number,
default:0
},
},
data() {
return {};
}
};
</script>
<style lang="scss" scoped>
.goods-count {
width: 100%;
padding: 0 30rpx;
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
&-item {
width: 45%;
text-align: center;
&-title {
color: #666666;
}
&-count {
margin-top: 30rpx;
font-weight: 550;
color: #2272ff;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
}
&-line {
margin-top: 68rpx;
width: 2rpx;
height: 40rpx;
background-color: #cccccc;
}
}
</style>
<template>
<!-- 各个tab -->
<view class="tools-box">
<view class="tools-box-left">
<view class="tools-box-left-title">选择品牌</view>
<view class="tools-box-left-select"><xh-picker-select background="#f4f5f7" placeholder="全部" :rangeKey="rangeKey" :value="value" :list="brandList" @change="pickerchange"></xh-picker-select></view>
</view>
<view class="tools-box-navi">
<xh-button @handleClick="naviTo" text="去盘点"></xh-button>
</view>
</view>
</template>
<script>
import XhPickerSelect from '../XhPickerSelect.vue';
import XhButton from "@/components/mine/xh-button.vue"
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
export default {
props: ['current','value'],
components: {
XhPickerSelect,
XhButton
},
data() {
return {
receiveStatusOptions,
rangeKey:"name",
brandList: [
{
id:0,
name:'全部',
},
{
id:982,
name:'长城',
},
],
};
},
methods: {
// 获取品牌列表
async getBrandList() {
let res = await this.$u.api.brandListByReceivedModules();
let { code, data } = res;
if (code === 200){
this.brandList = data || [];
}
},
pickerchange(data) {
this.$emit('pickerchange', data);
},
naviTo(){
this.$emit('toAdd');
}
}
};
</script>
<style lang="scss" scoped>
.tools-box {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
height: 100rpx;
background-color: #FFFFFF;
padding: 0 30rpx;
border-radius: 12rpx;
&-left{
display: flex;
align-items: center;
&-title{
width: 120rpx;
display: flex;
align-items: center;
justify-content: flex-start;
margin-right: 20rpx;
}
&-select{
width: 240rpx;
background-color: #ffffff;
border-radius: 8rpx;
}
}
&-navi{
width: 180rpx;
}
}
</style>
<template>
<uni-swipe-action-item :right-options="rightOptions" @click.stop="swipeClick" >
<view class="receiving-info" @click.stop="handleClick">
<view class="receiving-info-content">
<text class="receiving-info-content-left">箱码</text>
<text class="receiving-info-content-right">{{ detail.code }}</text>
</view>
<view class="receiving-info-content">
<text class="receiving-info-content-left">状态</text>
<text class="receiving-info-content-right" :class="[statusColor]">{{ statusLabel }}</text>
</view>
</view>
</uni-swipe-action-item>
</template>
<script>
import { myFilter } from '@/common/common.js';
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
import { showModal } from '@/common/common.js';
export default {
name: 'ReceivingInfo',
props: {
detail: {
type: Object,
default: () => {}
},
/* 品牌类型 */
options: {
type: Array|null,
default: () => []
}
},
data() {
return {
receiveStatusOptions,
statusColorOptions: {
1: 'receiving-info-footer-status-grey',
2: 'receiving-info-footer-status-blue'
},
rightOptions: [
{
text: '取消',
style: {
backgroundColor: '#007aff'
}
},
{
text: '删除',
style: {
backgroundColor: '#dd524d'
}
}
]
};
},
computed: {
statusColor() {
return this.statusColorOptions[this.detail.status] || '';
},
statusLabel() {
// 按钮文字
return myFilter(this.detail.status, this.receiveStatusOptions, 'name');
},
brandLabel() {
return myFilter(this.detail.brand, this.options);
}
},
created() {},
methods: {
/* index 为 当前所在的下标*/
/* index1 为 按钮的下标*/
swipeClick(e) {
let { text } = e.content;
console.log('点击了' + (e.position === 'left' ? '左侧' : '右侧') + e.content.text + '按钮');
if (e.position === 'right' && text === '删除') {
this.openDelete();
}
},
handleClick() {
this.$emit('handleClick', this.detail.id);
},
openDelete(index) {
showModal({
content: '删除车辆后,将无法收到车辆信息,是否删除该车辆?',
success: res => {
if (res.confirm) {
this.$emit('handleDelete', this.detail.id );
}
}
});
}
}
};
</script>
<style lang="scss" scoped>
.receiving-info {
background-color: #ffffff;
border-radius: 12rpx;
padding: 20rpx 30rpx;
// margin-bottom: 20rpx;
font-size: 24rpx;
color: #666666;
.hover-class {
background-color: #dddddd;
}
&-content {
display: flex;
justify-content: space-between;
line-height: 36rpx;
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
&-left {
width: 100rpx;
}
&-right {
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 80%;
}
}
}
</style>
<template>
<view class="bar-code">
<view class="bar-code-content"><text>快递单号</text></view>
<view class="bar-code-footer">
<view class="bar-code-footer-label">快递单号:</view>
<view class="bar-code-footer-value">
<u-input
type="text"
class="input-item"
v-model="dataValue"
@input="valueChange"
placeholder="请输入"
:placeholder-style="placeholderStyle"
:custom-style="customStyle"
:clearable="false"
border-color="#ECECEC"
maxlength="200"
:cursor-spacing="10"
:disabled="disabled"
/>
<view class="bar-code-footer-value-icon" @click="scanCode"><u-icon name="scan"></u-icon></view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'ReceiveBarCode',
props: {
value: {
type: [String, null]
},
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
dataValue: ''
};
},
mounted() {
this.dataValue=this.value
},
watch:{
value(data){
this.dataValue=data
}
},
computed: {
customStyle() {
return {
'border-radius': '12rpx',
color: '#999999',
'font-size': '26rpx',
height: '76rpx'
};
},
placeholderStyle() {
return 'color:#999999;font-size:26rpx';
}
},
created() {},
methods: {
scanCode() {
if(this.disabled) return false;
// 允许从相机和相册扫码
uni.scanCode({
scanType: ['barCode'],
success: res => {
let { scanType, result } = res;
console.log('类型:' + scanType);
console.log('内容:' + result);
this.dataValue = result;
this.$emit('onBarCodeChange', result);
}
});
},
valueChange(e) {
this.$emit('onBarCodeChange', e);
}
}
};
</script>
<style lang="scss" scoped>
.bar-code {
background-color: #ffffff;
border-radius: 12rpx;
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
color: #333333;
&-content {
font-size: 32rpx;
font-weight: 600;
}
&-footer {
margin-top: 8rpx;
display: flex;
width: 100%;
align-items: center;
color: #999999;
&-label {
margin-right: 12rpx;
}
&-value {
flex: 1;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #f4f5f7;
border-radius: 6px;
padding: 0rpx 20rpx;
.input-item {
flex: 1;
}
&-icon {
width: 40rpx;
height: 38rpx;
line-height: 38rpx;
text-align: center;
}
}
}
}
</style>
<template>
<view class="receive-images">
<view class="title-view">
<view class="title-left-view" >
<text>{{ uploadForm.label }}</text>
</view>
<view class="info-tip-text" v-if="!disabled">{{ uploadForm.tips }}</view>
<view class="image-view">
<block v-for="(item, key) in uploadForm.imgs" :key="key">
<view class="info-image-box" v-if="key < uploadForm.count">
<image class="info-image-box-inner" mode="aspectFill" v-if="item.path" :src="item.path" @click="perview(key)"></image>
<view class="info-image-box-close" v-if="!disabled" @click="removeImage(key)"><u-icon name="close"></u-icon></view>
</view>
</block>
<view class="info-image-box" @click="handleClick" v-if="!disabled&&uploadForm.imgs.length < uploadForm.count">
<view class="info-image-box-add"><u-icon name="plus"></u-icon></view>
</view>
</view>
<view v-if="!disabled&&uploadForm.imgs.length == 0" class="bottom-tip-view">
<image class="bottom-tip-image" mode="widthFix" :src="tishiImage"></image>
<text>最少上传一张箱码照片</text>
</view>
</view>
</view>
</template>
<script>
import base from '@/components/upload/index';
export default {
name: 'ReceiveImages',
mixins: [base],
props: {
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
tishiImage: process.uniEnv.qn_base_url + 'tishi.png',
uploadForm: {
filedName: '',
count: 3,
label: '箱码照片',
tips: '上传箱码照片',
imgs: []
}
};
},
computed: {},
created() {},
mounted() {
this.initImages();
},
methods: {
initImages(images) {
this.uploadForm.imgs = images || [];
console.log(this.uploadForm.imgs)
},
valueChange(e) {
this.$emit('onScanCodeChange', e);
},
async handleClick() {
if(this.disabled) return false;
let { count, imgs } = this.uploadForm;
// let imgCount=count-imgs.length;
// 已满3张不能再上传
if (imgs.length === count) {
return false;
}
let imgList = await this.chooseImg({ count: 1, size: ['compressed'] });
this.uploadForm.imgs.push(...imgList);
console.log(this.uploadForm.imgs)
this.updateImages();
},
// 预览
perview(index) {
let urls = this.uploadForm.imgs.map(item => {
return item.path;
});
uni.previewImage({
current: index,
urls: urls
});
},
removeImage(index) {
this.uploadForm.imgs.splice(index, 1);
this.updateImages();
},
updateImages() {
this.$emit('updateImages', this.uploadForm.imgs);
}
}
};
</script>
<style lang="scss" scoped>
.receive-images {
background-color: #ffffff;
border-radius: 12rpx;
padding: 20rpx 30rpx;
margin-bottom: 20rpx;
color: #333333;
.title-view {
font-size: 32rpx;
.title-left-view {
font-weight: bold;
}
.info-tip-text {
font-size: 24rpx;
color: #666666;
margin-top: 10rpx;
}
}
.bottom-tip-view {
color: #999999;
font-size: 20rpx;
display: flex;
align-items: flex-start;
margin-top: 30rpx;
}
.bottom-tip-image {
width: 22rpx;
height: 22rpx;
margin-right: 8rpx;
margin-top: 4rpx;
flex-shrink: 0;
}
.image-view {
margin-top: 30rpx;
display: flex;
.info-image-box {
width: 216rpx;
height: 216rpx;
background-color: #cccccc;
position: relative;
margin-right: 20rpx;
border-radius: 12rpx;
&:last-child {
margin-right: 0;
}
}
.info-image-box-inner {
border-radius: 12rpx;
overflow: hidden;
width: 100%;
height: 100%;
}
.info-image-box-close {
width: 38rpx;
height: 38rpx;
border-radius: 50%;
background-color: #666666;
font-size: 22rpx;
line-height: 38rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: -8rpx;
right: -8rpx;
z-index: 1;
}
.info-image-box-add {
width: 100%;
height: 100%;
font-size: 120rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>
<template>
<view class="receive-images">
<view class="title-view">
<view class="title-left-view" >
<text>{{ uploadForm.label }}</text>
</view>
<view class="info-tip-text" v-if="!disabled">{{ uploadForm.tips }}</view>
<view class="image-view">
<block v-for="(item, key) in uploadForm.imgs" :key="key">
<view class="info-image-box" v-if="key < uploadForm.count">
<image class="info-image-box-inner" mode="aspectFill" v-if="item.path" :src="item.path" @click="perview(key)"></image>
<view class="info-image-box-close" v-if="!disabled" @click="removeImage(key)"><u-icon name="close"></u-icon></view>
</view>
</block>
<view class="info-image-box" @click="handleClick" v-if="!disabled&&uploadForm.imgs.length < uploadForm.count">
<view class="info-image-box-add"><u-icon name="plus"></u-icon></view>
</view>
</view>
<view v-if="!disabled&&uploadForm.imgs.length == 0" class="bottom-tip-view">
<image class="bottom-tip-image" mode="widthFix" :src="tishiImage"></image>
<text>最少上传一张箱码照片</text>
</view>
</view>
</view>
</template>
<script>
import base from '@/components/upload/index';
export default {
name: 'ReceiveImages',
mixins: [base],
props: {
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
tishiImage: process.uniEnv.qn_base_url + 'tishi.png',
uploadForm: {
filedName: '',
count: 3,
label: '箱码照片',
tips: '上传箱码照片',
imgs: []
}
};
},
computed: {},
created() {},
mounted() {
this.initImages();
},
methods: {
initImages(images) {
this.uploadForm.imgs = images || [];
console.log(this.uploadForm.imgs)
},
valueChange(e) {
this.$emit('onScanCodeChange', e);
},
async handleClick() {
if(this.disabled) return false;
let { count, imgs } = this.uploadForm;
// let imgCount=count-imgs.length;
// 已满3张不能再上传
if (imgs.length === count) {
return false;
}
let imgList = await this.chooseImg({ count: 1, size: ['compressed'] });
this.uploadForm.imgs.push(...imgList);
console.log(this.uploadForm.imgs)
this.updateImages();
},
// 预览
perview(index) {
let urls = this.uploadForm.imgs.map(item => {
return item.path;
});
uni.previewImage({
current: index,
urls: urls
});
},
removeImage(index) {
this.uploadForm.imgs.splice(index, 1);
this.updateImages();
},
updateImages() {
this.$emit('updateImages', this.uploadForm.imgs);
}
}
};
</script>
<style lang="scss" scoped>
.receive-images {
background-color: #ffffff;
border-radius: 12rpx;
padding: 20rpx 30rpx;
margin-bottom: 20rpx;
color: #333333;
.title-view {
font-size: 32rpx;
.title-left-view {
font-weight: bold;
}
.info-tip-text {
font-size: 24rpx;
color: #666666;
margin-top: 10rpx;
}
}
.bottom-tip-view {
color: #999999;
font-size: 20rpx;
display: flex;
align-items: flex-start;
margin-top: 30rpx;
}
.bottom-tip-image {
width: 22rpx;
height: 22rpx;
margin-right: 8rpx;
margin-top: 4rpx;
flex-shrink: 0;
}
.image-view {
margin-top: 30rpx;
display: flex;
.info-image-box {
width: 216rpx;
height: 216rpx;
background-color: #cccccc;
position: relative;
margin-right: 20rpx;
border-radius: 12rpx;
&:last-child {
margin-right: 0;
}
}
.info-image-box-inner {
border-radius: 12rpx;
overflow: hidden;
width: 100%;
height: 100%;
}
.info-image-box-close {
width: 38rpx;
height: 38rpx;
border-radius: 50%;
background-color: #666666;
font-size: 22rpx;
line-height: 38rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: -8rpx;
right: -8rpx;
z-index: 1;
}
.info-image-box-add {
width: 100%;
height: 100%;
font-size: 120rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>
<template>
<view class="qr-code">
<view class="qr-code-head" @click="scanCode">
<view class="qr-code-head-scan"><image :src="backgroundImage" class="qr-code-head-scan-image" mode=""></image></view>
</view>
<view class="qr-code-content"><text>扫描结果</text></view>
<view class="qr-code-footer">
<view class="qr-code-footer-label">充电桩箱码:</view>
<view class="qr-code-footer-value">
<u-input
type="text"
class="input-item"
v-model="dataValue"
@input="valueChange"
placeholder="请输入"
:placeholder-style="placeholderStyle"
:custom-style="customStyle"
:clearable="false"
border-color="#ECECEC"
maxlength="200"
:cursor-spacing="10"
:disabled="disabled"
/>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'ReceiveQrCode',
props: {
value: {
type: [String, null]
},
disabled: {
type: Boolean,
default: false,
},
},
data() {
return {
backgroundImage: process.uniEnv.qn_base_url + 'saomashibie.png',
dataValue: ''
};
},
mounted() {
this.dataValue=this.value
},
watch:{
value(data){
this.dataValue=data
}
},
computed: {
customStyle() {
return {
'border-radius': '12rpx',
color: '#999999',
'padding': '0 20rpx',
'font-size': '26rpx',
height: '76rpx',
'background-color': "#f4f5f7",
'border-radius': "6px",
};
},
placeholderStyle() {
return 'color:#999999;font-size:26rpx';
}
},
created() {},
methods: {
scanCode() {
if(this.disabled) return false;
// 允许从相机和相册扫码
uni.scanCode({
scanType: ['qrCode'],
success: res => {
let { scanType, result } = res;
console.log('类型:' + scanType);
console.log('内容:' + result);
if (scanType === 'QR_CODE') {
this.dataValue = result;
this.$emit("onScanCodeChange",result)
}
}
});
},
valueChange(e) {
this.$emit("onScanCodeChange",e)
}
}
};
</script>
<style lang="scss" scoped>
.qr-code {
background-color: #ffffff;
border-radius: 12rpx;
padding: 40rpx 30rpx;
margin-bottom: 20rpx;
color: #333333;
&-head {
display: flex;
justify-content: center;
align-items: center;
&-scan {
width: 240rpx;
height: 240rpx;
&-image {
width: 100%;
height: 100%;
}
}
}
&-content {
margin-top: 20rpx;
font-size: 32rpx;
font-weight: 600;
}
&-footer {
margin-top: 8rpx;
display: flex;
align-items: center;
color: #999999;
&-label {
margin-right: 12rpx;
}
&-value {
flex: 1;
}
}
}
</style>
<template>
<!-- 各个tab -->
<view class="tools-box">
<view class="search-sub">
<u-subsection
:current="current"
:list="receiveStatusOptions"
active-color="white"
bg-color="white"
inactive-color="#666"
button-color="#2272FF"
border-radius="36"
@change="change"
height="72"
bold
></u-subsection>
</view>
<view class="select-view"><xh-picker-select placeholder="品牌" :list="brandList" :rangeKey="rangeKey" :value="value" @change="pickerchange"></xh-picker-select></view>
</view>
</template>
<script>
import XhPickerSelect from '../XhPickerSelect.vue';
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
export default {
props: ['current','value'],
components: {
XhPickerSelect
},
data() {
return {
receiveStatusOptions,
rangeKey:"name",
brandList: []
};
},
methods: {
// 获取品牌列表
async getBrandList() {
let res = await this.$u.api.brandListByReceivedModules();
let { code, data } = res;
if (code === 200){
this.brandList = data || [];
}
},
// tab栏切换
change(index) {
this.$emit('update:current', index);
this.$emit('currentChange');
},
pickerchange(data) {
this.$emit('pickerchange', data);
}
}
};
</script>
<style lang="scss" scoped>
.tools-box {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-bottom: 30rpx;
.search-sub {
height: 72rpx;
width: 320rpx;
}
.select-view {
width: 240rpx;
background-color: #ffffff;
border-radius: 8rpx;
}
}
</style>
<template>
<view class="receiving-info" @click="handleClick">
<view class="receiving-info-head">
<text class="receiving-info-head-left">箱码</text>
<text class="receiving-info-head-right">品牌</text>
</view>
<view class="receiving-info-content">
<text class="receiving-info-content-left">{{ detail.productCode }}</text>
<text class="receiving-info-content-right">{{ detail.brandName }}</text>
</view>
<view class="receiving-info-footer">
<view :class="[statusColor]">{{ detail.status }}</view>
</view>
</view>
</template>
<script>
import { myFilter } from '@/common/common.js';
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
export default {
name: 'ReceivingInfo',
props: {
detail: {
type: Object,
default: () => {}
},
},
data() {
return {
receiveStatusOptions
};
},
computed: {
statusColor() {
return this.detail.status === "已使用" ? 'receiving-info-footer-status-grey' : 'receiving-info-footer-status-blue';
},
statusLabel() {
// 按钮文字
return myFilter(this.detail.status, this.receiveStatusOptions, 'name');
},
},
created() {},
methods: {
handleClick() {
this.$emit('handleClick', this.detail.id);
}
}
};
</script>
<style lang="scss" scoped>
.receiving-info {
background-color: #ffffff;
border-radius: 12rpx;
padding: 20rpx 30rpx;
margin-bottom: 20rpx;
color: #333333;
.hover-class {
background-color: #dddddd;
}
&-head {
display: flex;
align-items: flex-end;
justify-content: space-between;
margin-bottom: 20rpx;
&-left {
font-size: 36rpx;
font-weight: bold;
}
&-right {
font-size: 24rpx;
}
}
&-content {
display: flex;
justify-content: space-between;
line-height: 36rpx;
&-left {
width: 45%;
font-size: 26rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&-right {
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 45%;
}
}
&-footer {
border-top: 2rpx solid #f4f5f7;
margin-top: 20rpx;
padding-top: 20rpx;
font-size: 28rpx;
text-align: right;
&-status {
&-grey {
color: #666666;
}
&-blue {
color: #2272ff;
}
}
}
}
</style>
This diff is collapsed.
<template>
<!-- 收货列表 -->
<view class="ware-house">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="盘点" titleColor="#333333" :border-bottom="false" title-bold></u-navbar>
<inventory-head ref="inventory-head" @toAdd="toAdd" :value="form.brandId" @pickerchange="pickerchange"></inventory-head>
<goods-count :inventoryCount="inventoryCount" :checkCount="checkCount"></goods-count>
<!-- 列表 -->
<view class="tab-view" @click="closeAll">
<scroll-view
scroll-y
style="height: 100%;width: 100%;"
@scrolltolower="reachBottom"
scroll-anchoring
refresher-enabled="true"
:refresher-triggered="triggered"
:refresher-threshold="100"
:scroll-top="scrollTop"
refresher-background="#F4F5F7"
@refresherrefresh="onRefresh"
@refresherrestore="onRestore"
@scroll="scroll"
enable-back-to-top
>
<NoOrder v-if="noParts" imageName="zwdd.png" :customStyle="noOrderCustomStyle" />
<template v-else>
<uni-swipe-action ref="uni-swipe-action">
<view class="swipe-action" v-for="(item, index) in list" :key="item.id">
<inventory-info :detail="item" :options="brandList" @handleClick="handleClick" @handleDelete="handleDelete"></inventory-info>
</view>
</uni-swipe-action>
<view class="load-more-view" v-show="(form.pageNumber == 1 && loaded) || form.pageNumber > 1"><u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore></view>
</template>
<view class="loading-view" v-if="!loaded && !freshing"><u-loading mode="flower"></u-loading></view>
</scroll-view>
</view>
<!-- 底部按钮 -->
<fixed-button text="确认盘点" @handleClick="confirm"></fixed-button>
<!-- 通用提示框 -->
<view><u-toast ref="uToast" /></view>
</view>
</template>
<script>
import inventoryHead from './components/inventory/inventoryHead.vue';
import GoodsCount from './components/inventory/goodsCount.vue';
import FixedButton from '@/components/mine/fixed-button.vue';
import InventoryInfo from './components/inventory/inventoryInfo.vue';
import NoOrder from '@/components/order/noOrder.vue';
import ApplyButton from '@/components/parts/applyButton.vue';
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
export default {
components: {
inventoryHead,
InventoryInfo,
NoOrder,
ApplyButton,
FixedButton,
GoodsCount
},
data() {
return {
receiveStatusOptions,
list: [
{ id: 1, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 2, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 3, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 4, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 5, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 6, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 7, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 8, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 9, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 10, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 11, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 12, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 13, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 14, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 15, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 16, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 17, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 18, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 19, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 20, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 21, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 22, status: 1, code: 'dsadq4231', brand: 'byd', show: false },
{ id: 23, status: 1, code: 'dsadq4231', brand: 'byd', show: false }
], // 物料订单列表
form: {
pageNumber: 0,
pageSize: 10,
brandId: '',
},
show: false,
loadStatus: 'loading', // 底部加载状态
loaded: false, // 页面加载
triggered: true, // true:下拉刷新
freshing: false, // 防止下拉刷新重复触发
buttonType: 'expand', // 申请按钮宽 collapse': '80rpx', 'expand': '220rpx''
scrollTop: 0,
old: {
scrollTop: 0
},
buttonStyle: {
width: '100%',
height: '80rpx',
fontSize: '32rpx',
fontWeight: 'bold'
},
inventoryCount: 0,
checkCount: 0
};
},
computed: {
// 无数据
noParts() {
return this.list.length == 0 && this.loaded;
},
// 无数据页面样式
noPartsCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7';
}
},
onLoad(e) {
// getApp().trackPage('物料订单页');
// if (e && e.index) {
// // 跳转到第几个tab页
// this.currentIndex = e.index;
// }
this.freshing = false;
this.reloadList(); // 加载数据
},
onShow() {
let pages = getCurrentPages();
let page = pages[pages.length - 1];
if (page.needRefresh) {
// 需要初始化页面
page.needRefresh = null;
this.reloadList();
}
},
methods: {
pickerchange(data) {
this.form.brandId = data.id||"";
this.reloadList();
},
// 获取品牌列表
getBrandList(){
this.$refs["inventory-head"].getBrandList()
},
// 页面数据:未入库
async getList() {
// 状态处理
this.form.pageNumber += 1;
if (this.form.pageNumber == 1) {
this.loaded = false;
}
var param = this.form
let res = await this.$u.api.inventoryListByReceivedModules(param);
if (res.code == 200) {
if (this.form.pageNumber == 1) {
this.list = [];
}
let list = res.data || [];
list.forEach(item => (item.show = false));
this.list.push(...list);
this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore'; // 底部加载状态
} else {
// this.loadStatus = 'loadmore';
console.log(res.message);
}
this.$nextTick(() => {
// 页面刷新完之后更新下拉状态
if (this.freshing) {
this.triggered = false;
this.freshing = false;
}
});
this.loaded = true; // 加载完成
},
// 跳转到详情
handleClick(id) {
let url = 'pages/mine/warehouse/inventoryDetail';
if (id) url += `?id=${id}`;
uni.navigateTo({
url
});
},
// 新增收货
toAdd() {
this.handleClick();
},
// 本页数据设置,用于其他页面访问本页数据
setPageInfo(info) {
var pages = getCurrentPages();
if (pages.length >= 1) {
var page = pages[pages.length - 1];
page.info = info;
}
},
// 下拉刷新
onRefresh() {
if (this.freshing) return;
this.freshing = true;
this.reloadList();
},
// 重置下拉状态
onRestore() {
this.triggered = 'restore'; // 需要重置
},
// 初始化加载
reloadList() {
// 第一页数据
this.form.pageNumber = 0;
this.loadStatus = 'loading';
this.getList();
},
// 滚到底部加载下一页
reachBottom(e) {
if (this.loadStatus != 'loadmore') return;
this.loadStatus == 'loading';
this.getList();
},
scroll(e) {
// this.old.scrollTop = e.detail.scrollTop;
},
closeAll() {
if (this.list.length) {
this.$refs['uni-swipe-action'].closeOther(undefined);
}
},
async handleDelete(id) {
console.log('删除--', id);
// let {code,data}=await onDelete(id)
},
// 确认盘点
async confirm() {
if (this.list.length) {
// let res=await confirmSubmit()
}
}
}
};
</script>
<style lang="scss" scoped>
.ware-house {
padding: 0 30rpx;
height: 100vh;
// min-height: 100vh;
display: flex;
flex-direction: column;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.tab-view {
height: 100%;
overflow: auto;
margin-bottom: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.swipe-action {
padding-bottom: 20rpx;
}
.load-more-view {
padding-bottom: 64rpx;
}
.loading-view {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 300rpx;
position: absolute;
}
}
.fixed-button {
width: 100%;
box-sizing: border-box;
position: fixed;
left: 0;
padding: 0 30rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
bottom: 20rpx;
}
}
</style>
<template>
<!-- 收货详情 -->
<view class="ware-house">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="盘点" titleColor="#333333" :border-bottom="false" title-bold></u-navbar>
<view class="tools-box">
<text class="tools-box-title">品牌</text>
<view class="select-view">
<xh-picker-select
background="#f4f5f7"
placeholder="全部"
border
width="100%"
:list="brandList"
:disabled="disabled"
:value="form.brandId"
:rangeKey="rangeKey"
@change="pickerchange"
></xh-picker-select>
</view>
</view>
<!-- 列表 -->
<view class="tab-view">
<receive-qr-code @onScanCodeChange="onScanCodeChange"></receive-qr-code>
<receive-images ref="receive-images" @updateImages="updateImages"></receive-images>
</view>
<!-- 底部按钮 -->
<fixed-button text="保存并下一个" @handleClick="submit"></fixed-button>
<!-- 通用提示框 -->
<view><u-toast ref="uToast" /></view>
</view>
</template>
<script>
import XhPickerSelect from './components/XhPickerSelect.vue';
import FixedButton from '@/components/mine/fixed-button.vue';
import ReceiveQrCode from './components/receiveDetail/receiveQrCode.vue';
import ReceiveImages from './components/receiveDetail/receiveImages.vue';
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
import { showToast } from '@/common/common.js';
export default {
components: {
XhPickerSelect,
FixedButton,
ReceiveQrCode,
ReceiveImages
},
data() {
return {
receiveStatusOptions,
rangeKey: 'name',
brandList: [
{
id: 0,
name: '全部'
},
{
id: 982,
name: '长城'
}
],
form: {
id: '',
takeId: '',
brandId: '',
brandName: '',
productCode: '', // 箱码二维码
image: '' // 箱码图片
}
};
},
computed: {},
onLoad(e) {
this.getBrandList();
if (e && e.id) {
this.form.id = e.id;
this.getDetail();
this.disabled = true;
}
},
onShow() {},
methods: {
pickerchange(data) {
this.form.brandId = data.id;
this.form.brandName = data.brandName;
},
onScanCodeChange(data) {
this.form.productCode = data;
},
updateImages(data) {
let image = data.map(item => process.uniEnv.qn_asset_url + '/' + item.src + '?imageView2/1/w/100/h/100/q/75');
this.form.image = image.join(";");
},
// 获取品牌列表
async getBrandList() {
let res = await this.$u.api.brandListByReceivedModules();
let { code, data } = res;
if (code === 200) {
this.brandList = data || [];
}
},
async getDetail() {
let res = await this.$u.api.inventoryDetailByInventoryModules(this.form.id);
let { code, data } = res;
if (code === 200) {
let image = data.image.split(';').map(item => {
return { path: item };
});
this.$refs['receive-images'].initImages(image);
this.form = Object.assign(this.form, data);
}
},
submit() {
let { brandId, productCode, image } = this.form;
if (!brandId) {
showToast('请选择品牌');
return false;
}
if (!productCode) {
showToast('请输入箱码');
return false;
}
if (!image) {
showToast('最少上传一张图片');
return false;
}
this.$u.throttle(this.createdReceive(this.form), 300)
},
async createdReceive(form) {
let res=await this.$u.api.addInventoryByInventoryModules(form)
let { code, data } = res;
if (code === 200) {
showToast('操作成功');
setTimeout(() => {
this.replacePage()
}, 1500);
}
},
// 刷新当前页
replacePage() {
uni.redirectTo({
url: 'pages/mine/warehouse/receiveDetail'
});
}
}
};
</script>
<style lang="scss" scoped>
.ware-house {
padding: 0 30rpx;
display: flex;
flex-direction: column;
margin-bottom: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.tools-box {
width: 100%;
height: 100rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
margin-bottom: 30rpx;
padding: 0 30rpx;
background-color: #ffffff;
.tools-box-title {
font-size: 28rpx;
margin-right: 20rpx;
width: 58rpx;
}
.select-view {
width: 552rpx;
}
}
}
</style>
<template>
<!-- 收货详情 -->
<view class="ware-house">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="收货" titleColor="#333333" :border-bottom="false" title-bold></u-navbar>
<view class="tools-box">
<text class="tools-box-title">品牌</text>
<view class="select-view">
<xh-picker-select
background="#f4f5f7"
placeholder="全部"
border
width="100%"
:disabled="disabled"
:value="form.brandId"
:rangeKey="rangeKey"
:list="brandList"
@change="pickerchange"
></xh-picker-select>
</view>
</view>
<!-- 列表 -->
<view class="tab-view">
<receive-qr-code :disabled="disabled" :value="form.productCode" @onScanCodeChange="onScanCodeChange"></receive-qr-code>
<receive-images ref="receive-images" :disabled="disabled" :value="form.image" @updateImages="updateImages"></receive-images>
<receive-bar-code :disabled="disabled" :value="form.courierNumber" @onBarCodeChange="onBarCodeChange"></receive-bar-code>
</view>
<!-- 底部按钮 -->
<fixed-button text="保存并下一个" v-if="!disabled" @handleClick="submit"></fixed-button>
<!-- 通用提示框 -->
<view><u-toast ref="uToast" /></view>
</view>
</template>
<script>
import XhPickerSelect from './components/XhPickerSelect.vue';
import FixedButton from '@/components/mine/fixed-button.vue';
import ReceiveQrCode from './components/receiveDetail/receiveQrCode.vue';
import ReceiveBarCode from './components/receiveDetail/receiveBarCode.vue';
import ReceiveImages from './components/receiveDetail/receiveImages.vue';
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
import { showToast } from '@/common/common.js';
export default {
components: {
XhPickerSelect,
FixedButton,
ReceiveQrCode,
ReceiveBarCode,
ReceiveImages
},
data() {
return {
receiveStatusOptions,
rangeKey: 'name',
brandList: [],
disabled: false,
form: {
id: '',
brandId: '',
brandName:"",
productCode: '', // 箱码二维码
image: "", // 箱码图片
courierNumber: '' // 快递单号
}
};
},
computed: {},
onLoad(e) {
this.getBrandList();
if (e && e.id) {
this.form.id = e.id;
this.getDetail();
this.disabled = true;
}
},
onShow() {},
methods: {
pickerchange(data) {
this.form.brandId = data.id;
this.form.brandName = data.brandName;
},
onScanCodeChange(data) {
this.form.productCode = data;
},
onBarCodeChange(data) {
this.form.courierNumber = data;
},
updateImages(data) {
let image = data.map(item => process.uniEnv.qn_asset_url + '/' + item.src + '?imageView2/1/w/100/h/100/q/75');
this.form.image = image.join(";");
},
// 获取品牌列表
async getBrandList() {
let res = await this.$u.api.brandListByReceivedModules();
let { code, data } = res;
if (code === 200) {
this.brandList = data || [];
}
},
async getDetail() {
let res = await this.$u.api.receiveDetailByReceivedModules(this.form.id);
let { code, data } = res;
if (code === 200) {
let image = data.image.split(';').map(item => {
return { path: item };
});
this.$refs['receive-images'].initImages(image);
this.form = Object.assign(this.form, data);
}
},
submit() {
console.log(this.form)
let { brandId, productCode, courierNumber, image } = this.form;
if (!brandId) {
showToast('请选择品牌');
return false;
}
if (!productCode) {
showToast('请输入箱码');
return false;
}
if (!image) {
showToast('最少上传一张图片');
return false;
}
if (!courierNumber) {
showToast('请输入快递单号');
return false;
}
this.$u.throttle(this.createdReceive(this.form), 300)
},
async createdReceive(form) {
let res=await this.$u.api.addReceiveByReceivedModules(form)
let { code, data } = res;
if (code === 200) {
showToast('操作成功');
setTimeout(() => {
this.replacePage()
}, 1500);
}
},
// 刷新当前页
replacePage() {
uni.redirectTo({
url: 'pages/mine/warehouse/receiveDetail'
});
}
}
};
</script>
<style lang="scss" scoped>
.ware-house {
padding: 0 30rpx;
display: flex;
flex-direction: column;
margin-bottom: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.tools-box {
width: 100%;
height: 100rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
margin-bottom: 30rpx;
padding: 0 30rpx;
background-color: #ffffff;
.tools-box-title {
font-size: 28rpx;
margin-right: 20rpx;
width: 58rpx;
}
.select-view {
width: 552rpx;
}
}
}
</style>
<template>
<!-- 收货列表 -->
<view class="ware-house">
<u-navbar back-icon-color="#333333" background="#FFFFFF" title="收货列表" titleColor="#333333" :border-bottom="false" title-bold></u-navbar>
<received-head ref="received-head" :current.sync="form.status" :value="form.brandId" @currentChange="currentChange" @pickerchange="pickerchange"></received-head>
<!-- 列表 -->
<view class="tab-view">
<scroll-view
scroll-y
style="height: 100%;width: 100%;"
@scrolltolower="reachBottom"
scroll-anchoring
refresher-enabled="true"
:refresher-triggered="triggered"
:refresher-threshold="100"
:scroll-top="scrollTop"
refresher-background="#F4F5F7"
@refresherrefresh="onRefresh"
@refresherrestore="onRestore"
@scroll="scroll"
enable-back-to-top
>
<NoOrder v-if="noParts" imageName="zwdd.png" :customStyle="noOrderCustomStyle" />
<template v-else>
<view v-for="(item, index) in list" :key="index"><receiving-info :detail="item" @handleClick="handleClick"></receiving-info></view>
<view class="load-more-view" v-show="(form.pageNumber == 1 && loaded) || form.pageNumber > 1"><u-loadmore :status="loadStatus" bgColor="#F4F5F7"></u-loadmore></view>
</template>
<view class="loading-view" v-if="!loaded && !freshing"><u-loading mode="flower"></u-loading></view>
</scroll-view>
</view>
<!-- 底部按钮 -->
<fixed-button text="新增收货" @handleClick="toAdd"></fixed-button>
<!-- 通用提示框 -->
<view><u-toast ref="uToast" /></view>
</view>
</template>
<script>
import ReceivedHead from './components/received/receivedHead.vue';
import FixedButton from '@/components/mine/fixed-button.vue';
import ReceivingInfo from './components/received/receivingInfo.vue';
import NoOrder from '@/components/order/noOrder.vue';
import ApplyButton from '@/components/parts/applyButton.vue';
import { receiveStatusOptions } from '@/common/optinos/mine/received.js';
export default {
components: {
ReceivedHead,
ReceivingInfo,
NoOrder,
ApplyButton,
FixedButton
},
data() {
return {
receiveStatusOptions,
list: [
{ id: 123456, status: "未使用", productCode: 'dsadq4231', brandName: '比亚迪',courierNumber:"SF7720" },
{ id: 1111, status: "未使用", productCode: 'dsadq4231', brandName: '比亚迪' ,courierNumber:"SF7720"},
{ id: 1111, status: "未使用", productCode: 'dsadq4231', brandName: '比亚迪',courierNumber:"SF7720" },
{ id: 1111, status: "未使用", productCode: 'dsadq4231', brandName: '比亚迪',courierNumber:"SF7720" },
], // 物料订单列表
form: {
pageNumber: 0,
pageSize: 10,
status: 0,
brandId: 982,
},
show: false,
loadStatus: 'loading', // 底部加载状态
loaded: false, // 页面加载
triggered: true, // true:下拉刷新
freshing: false, // 防止下拉刷新重复触发
buttonType: 'expand', // 申请按钮宽 collapse': '80rpx', 'expand': '220rpx''
scrollTop: 0,
old: {
scrollTop: 0
},
buttonStyle: {
width: '100%',
height: '80rpx',
fontSize: '32rpx',
fontWeight: 'bold'
}
};
},
computed: {
// 当下tab
currentTab() {
return this.receiveStatusOptions[this.form.status];
},
// 无数据
noParts() {
return this.list.length == 0 && this.loaded;
},
// 无数据页面样式
noPartsCustomStyle() {
return 'margin-top: 100rpx;background-color: #F4F5F7';
}
},
onLoad(e) {
// getApp().trackPage('物料订单页');
// if (e && e.index) {
// // 跳转到第几个tab页
// this.status = e.index;
// }
this.freshing = false;
this.getBrandList() // 获取品牌列表
this.reloadList(); // 加载数据
},
onShow() {
let pages = getCurrentPages();
let page = pages[pages.length - 1];
if (page.needRefresh) {
// 需要初始化页面
page.needRefresh = null;
this.form.status = 0;
this.reloadList();
}
},
methods: {
// tab栏切换
currentChange() {
this.reloadList();
},
pickerchange(data) {
this.form.brandId = data.id||"";
this.reloadList();
},
// 获取品牌列表
getBrandList(){
this.$refs["received-head"].getBrandList()
},
// 页面数据:收货列表
async getList() {
// 状态处理
this.form.pageNumber += 1;
if (this.form.pageNumber == 1) {
this.loaded = false;
}
var param = this.form
let res = await this.$u.api.receiveListByReceivedModules(param);
if (res.code == 200) {
if (this.form.pageNumber == 1) {
this.list = [];
}
let list = res.data || [];
this.list.push(...list);
this.loadStatus = list.length < this.pageSize ? 'nomore' : 'loadmore'; // 底部加载状态
} else {
// this.loadStatus = 'loadmore';
console.log(res.message);
}
this.$nextTick(() => {
// 页面刷新完之后更新下拉状态
if (this.freshing) {
this.triggered = false;
this.freshing = false;
}
});
this.loaded = true; // 加载完成
},
// 跳转到详情
handleClick(id) {
let url = 'pages/mine/warehouse/receiveDetail';
if (id) url += `?id=${id}`;
uni.navigateTo({
url
});
},
// 新增收货
toAdd() {
this.handleClick();
},
// 本页数据设置,用于其他页面访问本页数据
setPageInfo(info) {
var pages = getCurrentPages();
if (pages.length >= 1) {
var page = pages[pages.length - 1];
page.info = info;
}
},
// 下拉刷新
onRefresh() {
if (this.freshing) return;
this.freshing = true;
this.reloadList();
},
// 重置下拉状态
onRestore() {
this.triggered = 'restore'; // 需要重置
},
// 初始化加载
reloadList() {
// 第一页数据
this.form.pageNumber = 0;
this.loadStatus = 'loading';
this.getList();
},
// 滚到底部加载下一页
reachBottom(e) {
if (this.loadStatus != 'loadmore') return;
this.loadStatus == 'loading';
this.getList();
},
scroll(e) {
// this.old.scrollTop = e.detail.scrollTop;
}
}
};
</script>
<style lang="scss" scoped>
.ware-house {
padding: 0 30rpx;
height: 100vh;
// min-height: 100vh;
display: flex;
flex-direction: column;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.tab-view{
height: 100%;
overflow: auto;
margin-bottom: 100rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
.load-more-view {
padding-bottom: 64rpx;
}
.loading-view {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 300rpx;
position: absolute;
}
}
.fixed-button {
width: 100%;
box-sizing: border-box;
position: fixed;
left: 0;
padding: 0 30rpx;
padding-bottom: constant(safe-area-inset-bottom);
/* 兼容 iOS < 11.2 */
padding-bottom: env(safe-area-inset-bottom);
/* 兼容 iOS >= 11.2 */
bottom: 20rpx;
}
}
</style>
## 1.0.3(2022-01-21)
- 优化 组件示例
## 1.0.2(2021-11-22)
- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
## 1.0.1(2021-11-22)
- 修复 vue3中scss语法兼容问题
## 1.0.0(2021-11-18)
- init
@import './styles/index.scss';
{
"id": "uni-scss",
"displayName": "uni-scss 辅助样式",
"version": "1.0.3",
"description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
"keywords": [
"uni-scss",
"uni-ui",
"辅助样式"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"category": [
"JS SDK",
"通用 SDK"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "n",
"联盟": "n"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}
`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
@import './setting/_variables.scss';
@import './setting/_border.scss';
@import './setting/_color.scss';
@import './setting/_space.scss';
@import './setting/_radius.scss';
@import './setting/_text.scss';
@import './setting/_styles.scss';
.uni-border {
border: 1px $uni-border-1 solid;
}
\ No newline at end of file
// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
// @mixin get-styles($k,$c) {
// @if $k == size or $k == weight{
// font-#{$k}:#{$c}
// }@else{
// #{$k}:#{$c}
// }
// }
$uni-ui-color:(
// 主色
primary: $uni-primary,
primary-disable: $uni-primary-disable,
primary-light: $uni-primary-light,
// 辅助色
success: $uni-success,
success-disable: $uni-success-disable,
success-light: $uni-success-light,
warning: $uni-warning,
warning-disable: $uni-warning-disable,
warning-light: $uni-warning-light,
error: $uni-error,
error-disable: $uni-error-disable,
error-light: $uni-error-light,
info: $uni-info,
info-disable: $uni-info-disable,
info-light: $uni-info-light,
// 中性色
main-color: $uni-main-color,
base-color: $uni-base-color,
secondary-color: $uni-secondary-color,
extra-color: $uni-extra-color,
// 背景色
bg-color: $uni-bg-color,
// 边框颜色
border-1: $uni-border-1,
border-2: $uni-border-2,
border-3: $uni-border-3,
border-4: $uni-border-4,
// 黑色
black:$uni-black,
// 白色
white:$uni-white,
// 透明
transparent:$uni-transparent
) !default;
@each $key, $child in $uni-ui-color {
.uni-#{"" + $key} {
color: $child;
}
.uni-#{"" + $key}-bg {
background-color: $child;
}
}
.uni-shadow-sm {
box-shadow: $uni-shadow-sm;
}
.uni-shadow-base {
box-shadow: $uni-shadow-base;
}
.uni-shadow-lg {
box-shadow: $uni-shadow-lg;
}
.uni-mask {
background-color:$uni-mask;
}
@mixin radius($r,$d:null ,$important: false){
$radius-value:map-get($uni-radius, $r) if($important, !important, null);
// Key exists within the $uni-radius variable
@if (map-has-key($uni-radius, $r) and $d){
@if $d == t {
border-top-left-radius:$radius-value;
border-top-right-radius:$radius-value;
}@else if $d == r {
border-top-right-radius:$radius-value;
border-bottom-right-radius:$radius-value;
}@else if $d == b {
border-bottom-left-radius:$radius-value;
border-bottom-right-radius:$radius-value;
}@else if $d == l {
border-top-left-radius:$radius-value;
border-bottom-left-radius:$radius-value;
}@else if $d == tl {
border-top-left-radius:$radius-value;
}@else if $d == tr {
border-top-right-radius:$radius-value;
}@else if $d == br {
border-bottom-right-radius:$radius-value;
}@else if $d == bl {
border-bottom-left-radius:$radius-value;
}
}@else{
border-radius:$radius-value;
}
}
@each $key, $child in $uni-radius {
@if($key){
.uni-radius-#{"" + $key} {
@include radius($key)
}
}@else{
.uni-radius {
@include radius($key)
}
}
}
@each $direction in t, r, b, l,tl, tr, br, bl {
@each $key, $child in $uni-radius {
@if($key){
.uni-radius-#{"" + $direction}-#{"" + $key} {
@include radius($key,$direction,false)
}
}@else{
.uni-radius-#{$direction} {
@include radius($key,$direction,false)
}
}
}
}
@mixin fn($space,$direction,$size,$n) {
@if $n {
#{$space}-#{$direction}: #{$size*$uni-space-root}px
} @else {
#{$space}-#{$direction}: #{-$size*$uni-space-root}px
}
}
@mixin get-styles($direction,$i,$space,$n){
@if $direction == t {
@include fn($space, top,$i,$n);
}
@if $direction == r {
@include fn($space, right,$i,$n);
}
@if $direction == b {
@include fn($space, bottom,$i,$n);
}
@if $direction == l {
@include fn($space, left,$i,$n);
}
@if $direction == x {
@include fn($space, left,$i,$n);
@include fn($space, right,$i,$n);
}
@if $direction == y {
@include fn($space, top,$i,$n);
@include fn($space, bottom,$i,$n);
}
@if $direction == a {
@if $n {
#{$space}:#{$i*$uni-space-root}px;
} @else {
#{$space}:#{-$i*$uni-space-root}px;
}
}
}
@each $orientation in m,p {
$space: margin;
@if $orientation == m {
$space: margin;
} @else {
$space: padding;
}
@for $i from 0 through 16 {
@each $direction in t, r, b, l, x, y, a {
.uni-#{$orientation}#{$direction}-#{$i} {
@include get-styles($direction,$i,$space,true);
}
.uni-#{$orientation}#{$direction}-n#{$i} {
@include get-styles($direction,$i,$space,false);
}
}
}
}
\ No newline at end of file
/* #ifndef APP-NVUE */
$-color-white:#fff;
$-color-black:#000;
@mixin base-style($color) {
color: #fff;
background-color: $color;
border-color: mix($-color-black, $color, 8%);
&:not([hover-class]):active {
background: mix($-color-black, $color, 10%);
border-color: mix($-color-black, $color, 20%);
color: $-color-white;
outline: none;
}
}
@mixin is-color($color) {
@include base-style($color);
&[loading] {
@include base-style($color);
&::before {
margin-right:5px;
}
}
&[disabled] {
&,
&[loading],
&:not([hover-class]):active {
color: $-color-white;
border-color: mix(darken($color,10%), $-color-white);
background-color: mix($color, $-color-white);
}
}
}
@mixin base-plain-style($color) {
color:$color;
background-color: mix($-color-white, $color, 90%);
border-color: mix($-color-white, $color, 70%);
&:not([hover-class]):active {
background: mix($-color-white, $color, 80%);
color: $color;
outline: none;
border-color: mix($-color-white, $color, 50%);
}
}
@mixin is-plain($color){
&[plain] {
@include base-plain-style($color);
&[loading] {
@include base-plain-style($color);
&::before {
margin-right:5px;
}
}
&[disabled] {
&,
&:active {
color: mix($-color-white, $color, 40%);
background-color: mix($-color-white, $color, 90%);
border-color: mix($-color-white, $color, 80%);
}
}
}
}
.uni-btn {
margin: 5px;
color: #393939;
border:1px solid #ccc;
font-size: 16px;
font-weight: 200;
background-color: #F9F9F9;
// TODO 暂时处理边框隐藏一边的问题
overflow: visible;
&::after{
border: none;
}
&:not([type]),&[type=default] {
color: #999;
&[loading] {
background: none;
&::before {
margin-right:5px;
}
}
&[disabled]{
color: mix($-color-white, #999, 60%);
&,
&[loading],
&:active {
color: mix($-color-white, #999, 60%);
background-color: mix($-color-white,$-color-black , 98%);
border-color: mix($-color-white, #999, 85%);
}
}
&[plain] {
color: #999;
background: none;
border-color: $uni-border-1;
&:not([hover-class]):active {
background: none;
color: mix($-color-white, $-color-black, 80%);
border-color: mix($-color-white, $-color-black, 90%);
outline: none;
}
&[disabled]{
&,
&[loading],
&:active {
background: none;
color: mix($-color-white, #999, 60%);
border-color: mix($-color-white, #999, 85%);
}
}
}
}
&:not([hover-class]):active {
color: mix($-color-white, $-color-black, 50%);
}
&[size=mini] {
font-size: 16px;
font-weight: 200;
border-radius: 8px;
}
&.uni-btn-small {
font-size: 14px;
}
&.uni-btn-mini {
font-size: 12px;
}
&.uni-btn-radius {
border-radius: 999px;
}
&[type=primary] {
@include is-color($uni-primary);
@include is-plain($uni-primary)
}
&[type=success] {
@include is-color($uni-success);
@include is-plain($uni-success)
}
&[type=error] {
@include is-color($uni-error);
@include is-plain($uni-error)
}
&[type=warning] {
@include is-color($uni-warning);
@include is-plain($uni-warning)
}
&[type=info] {
@include is-color($uni-info);
@include is-plain($uni-info)
}
}
/* #endif */
@mixin get-styles($k,$c) {
@if $k == size or $k == weight{
font-#{$k}:#{$c}
}@else{
#{$k}:#{$c}
}
}
@each $key, $child in $uni-headings {
/* #ifndef APP-NVUE */
.uni-#{$key} {
@each $k, $c in $child {
@include get-styles($k,$c)
}
}
/* #endif */
/* #ifdef APP-NVUE */
.container .uni-#{$key} {
@each $k, $c in $child {
@include get-styles($k,$c)
}
}
/* #endif */
}
// @use "sass:math";
@import '../tools/functions.scss';
// 间距基础倍数
$uni-space-root: 2 !default;
// 边框半径默认值
$uni-radius-root:5px !default;
$uni-radius: () !default;
// 边框半径断点
$uni-radius: map-deep-merge(
(
0: 0,
// TODO 当前版本暂时不支持 sm 属性
// 'sm': math.div($uni-radius-root, 2),
null: $uni-radius-root,
'lg': $uni-radius-root * 2,
'xl': $uni-radius-root * 6,
'pill': 9999px,
'circle': 50%
),
$uni-radius
);
// 字体家族
$body-font-family: 'Roboto', sans-serif !default;
// 文本
$heading-font-family: $body-font-family !default;
$uni-headings: () !default;
$letterSpacing: -0.01562em;
$uni-headings: map-deep-merge(
(
'h1': (
size: 32px,
weight: 300,
line-height: 50px,
// letter-spacing:-0.01562em
),
'h2': (
size: 28px,
weight: 300,
line-height: 40px,
// letter-spacing: -0.00833em
),
'h3': (
size: 24px,
weight: 400,
line-height: 32px,
// letter-spacing: normal
),
'h4': (
size: 20px,
weight: 400,
line-height: 30px,
// letter-spacing: 0.00735em
),
'h5': (
size: 16px,
weight: 400,
line-height: 24px,
// letter-spacing: normal
),
'h6': (
size: 14px,
weight: 500,
line-height: 18px,
// letter-spacing: 0.0125em
),
'subtitle': (
size: 12px,
weight: 400,
line-height: 20px,
// letter-spacing: 0.00937em
),
'body': (
font-size: 14px,
font-weight: 400,
line-height: 22px,
// letter-spacing: 0.03125em
),
'caption': (
'size': 12px,
'weight': 400,
'line-height': 20px,
// 'letter-spacing': 0.03333em,
// 'text-transform': false
)
),
$uni-headings
);
// 主色
$uni-primary: #2979ff !default;
$uni-primary-disable:lighten($uni-primary,20%) !default;
$uni-primary-light: lighten($uni-primary,25%) !default;
// 辅助色
// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
$uni-success: #18bc37 !default;
$uni-success-disable:lighten($uni-success,20%) !default;
$uni-success-light: lighten($uni-success,25%) !default;
$uni-warning: #f3a73f !default;
$uni-warning-disable:lighten($uni-warning,20%) !default;
$uni-warning-light: lighten($uni-warning,25%) !default;
$uni-error: #e43d33 !default;
$uni-error-disable:lighten($uni-error,20%) !default;
$uni-error-light: lighten($uni-error,25%) !default;
$uni-info: #8f939c !default;
$uni-info-disable:lighten($uni-info,20%) !default;
$uni-info-light: lighten($uni-info,25%) !default;
// 中性色
// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
$uni-main-color: #3a3a3a !default; // 主要文字
$uni-base-color: #6a6a6a !default; // 常规文字
$uni-secondary-color: #909399 !default; // 次要文字
$uni-extra-color: #c7c7c7 !default; // 辅助说明
// 边框颜色
$uni-border-1: #F0F0F0 !default;
$uni-border-2: #EDEDED !default;
$uni-border-3: #DCDCDC !default;
$uni-border-4: #B9B9B9 !default;
// 常规色
$uni-black: #000000 !default;
$uni-white: #ffffff !default;
$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
// 背景色
$uni-bg-color: #f7f7f7 !default;
/* 水平间距 */
$uni-spacing-sm: 8px !default;
$uni-spacing-base: 15px !default;
$uni-spacing-lg: 30px !default;
// 阴影
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
// 蒙版
$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
// 合并 map
@function map-deep-merge($parent-map, $child-map){
$result: $parent-map;
@each $key, $child in $child-map {
$parent-has-key: map-has-key($result, $key);
$parent-value: map-get($result, $key);
$parent-type: type-of($parent-value);
$child-type: type-of($child);
$parent-is-map: $parent-type == map;
$child-is-map: $child-type == map;
@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
$result: map-merge($result, ( $key: $child ));
}@else {
$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
}
}
@return $result;
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
export function isPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var flag = true;
for (let v = 0; v < Agents.length - 1; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
\ No newline at end of file
This diff is collapsed.
## SwipeAction 滑动操作
> **组件名:uni-swipe-action**
> 代码块: `uSwipeAction`、`uSwipeActionItem`
通过滑动触发选项的容器
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-swipe-action)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment